Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acala mainnet bug #4096

Open
HelloRWA opened this issue Aug 26, 2024 · 2 comments
Open

acala mainnet bug #4096

HelloRWA opened this issue Aug 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@HelloRWA
Copy link

Description and context

When I calling wormholeRelayer.quoteEVMDeliveryPrice on acala mainnet, it return error

Steps to reproduce

  1. deploy hello wormhole contract which have a logic to call the wormholeRelayer.quoteEVMDeliveryPrice on acala mainnet
  2. call your method which call wormholeRelayer.quoteEVMDeliveryPrice

Experienced behavior

it shows the error

Error: ContractFunctionExecutionError: The contract function "quoteCrossChainMessage" reverted with the following reason:
Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).

Contract Call:
  address:   0xf9982e648ee8f9e3e9039b0071ba939c3bc19652
  function:  quoteCrossChainMessage(uint16 targetChain)
  args:                            (12)

Expected behavior

it should return a bigint as cost for the cross message call.

Solution recommendation

I dig into the source code, find two code:

targetChainRefundPerUnitGasUnused = GasPrice.wrap(gasPrice(targetChain).unwrap() * (denominator) / (uint256(denominator) + buffer));

assetConversion.denominator = toleranceDenominator;

It maybe cause by the setAssetConversionBuffer that admin input 0 as toleranceDenominator ?

@HelloRWA HelloRWA added the bug Something isn't working label Aug 26, 2024
@scnale
Copy link
Collaborator

scnale commented Aug 26, 2024

Hello there, the standard relayers contract, i.e. the WormholeRelayer, is not deployed on Acala mainnet. What are you trying to do?

@HelloRWA
Copy link
Author

HelloRWA commented Aug 27, 2024

Hello there, the standard relayers contract, i.e. the WormholeRelayer, is not deployed on Acala mainnet. What are you trying to do?

Oh, I suppose this is the standard relayer? https://docs.wormhole.com/wormhole/reference/blockchain-environments/evm#mainnet-contracts-787

I am building uni-bridge which provides a universal bridge that can bridge native/erc20/erc721/erc1155 in one bridge.

https://github.com/HelloRWA/uni-bridge/pull/1

If it is not a standard relayer, can we deploy one there? As I see current relayer on acala do not have any tx yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants
@scnale @HelloRWA and others