hyperlane-xyz / hyperlane-monorepo

The home for Hyperlane core contracts, sdk packages, and other infrastructure
https://hyperlane.xyz
Other
311 stars 341 forks source link

Permissionless deployers should be able to omit domain ID #2108

Open asaj opened 1 year ago

asaj commented 1 year ago

User deployment failed on this line when specifying chainId but not domain id. Specifying the domainId in addition to the chain ID fixed the issue

https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/sdk/src/gas/HyperlaneIgpDeployer.ts#L51 Error:

Pending https://goerli.etherscan.io/tx/0x6e71a4e95465a64431f10b6ba8fc54b9f78edd89e07020abd63bcbdb25739d00 (waiting 1 blocks for confirmation) +38s
  hyperlane:ERROR Error running Hyperlane deployment Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="gasOracles(uint32)", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)
    at Logger.makeError (/home/gnome/hyperlane-nova/hyperlane-deploy/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
    at Logger.throwError (/home/gnome/hyperlane-nova/hyperlane-deploy/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
    at Interface.decodeFunctionResult (/home/gnome/hyperlane-nova/hyperlane-deploy/node_modules/@ethersproject/abi/src.ts/interface.ts:427:23)
    at Contract.<anonymous> (/home/gnome/hyperlane-nova/hyperlane-deploy/node_modules/@ethersproject/contracts/src.ts/index.ts:400:44)
    at step (/home/gnome/hyperlane-nova/hyperlane-deploy/node_modules/@ethersproject/contracts/lib/index.js:48:23)
    at Object.next (/home/gnome/hyperlane-nova/hyperlane-deploy/node_modules/@ethersproject/contracts/lib/index.js:29:53)
    at fulfilled (/home/gnome/hyperlane-nova/hyperlane-deploy/node_modules/@ethersproject/contracts/lib/index.js:20:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  reason: null,
  code: 'CALL_EXCEPTION',
  method: 'gasOracles(uint32)',
  data: '0x',
  errorArgs: null,
  errorName: null,
  errorSignature: null,
  address: '0x6b6997511C5365a93A8B1038EF852CDf994c1C31',
  args: [ 421613 ],
  transaction: {
    data: '0x1d16c8c80000000000000000000000000000000000000000000000000000000000066eed',
    to: '0x6b6997511C5365a93A8B1038EF852CDf994c1C31',
    from: '0x19d96301865fdD07427db3c445508A051BC6D352'
  }
} +0ms
nambrot commented 1 year ago

Do you have a reference to the incident at hand? Looking at the code, it should fallback to the chain ID if domainID is not set https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/1b7d41ad8e90864e7e6b856a0e2d1e64948b3b91/typescript/sdk/src/providers/MultiProvider.ts#L184