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

feeRouterDeployChildToParentRewardRouter using wrong client when getting token address in Orbit chain #229

Open
antonio-altr opened this issue Dec 10, 2024 · 0 comments

Comments

@antonio-altr
Copy link

antonio-altr commented Dec 10, 2024

In this line:

const orbitChainTokenAddress = await parentChainPublicClient.readContract({

We're trying to get the token address on the Orbit side, but we're using parentChainPublicClient instead of orbitChainWalletClient

Result is reading Orbit router address on the parent chain:

Deploying contract ChildToParentRouter...
error: Uncaught ContractFunctionExecutionError: The contract function "calculateL2TokenAddress" returned no data ("0x").

This could be due to any of the following:
  - The contract does not have the function "calculateL2TokenAddress",
  - The parameters passed to the contract function may be invalid, or
  - The address is not a contract.
 
Contract Call:
  address:   0x0a1f68F439288729f3cc9F0ca6EeA203393Eb57F
  function:  calculateL2TokenAddress(address)
  args:                             (0x6aD2d2C22Bb58eA94Be18Cff11EF67e8bb97B652)

Docs: https://viem.sh/docs/contract/readContract
Version: [email protected]
    at getContractError (file:///deno-dir/npm/registry.npmjs.org/viem/2.21.54/_esm/utils/errors/getContractError.js:26:12)
    at readContract (file:///deno-dir/npm/registry.npmjs.org/viem/2.21.54/_esm/actions/public/readContract.js:58:15)
    at eventLoopTick (ext:core/01_core.js:182:7)
    at async feeRouterDeployChildToParentRewardRouter (file:///deno-dir/npm/registry.npmjs.org/@arbitrum/orbit-sdk/0.21.3/dist/feeRouterDeployChildToParentRewardRouter.js:81:40)
    at async main (file:///app/setupAEPFeeRouterCustomGas.ts:129:5)
Caused by: ContractFunctionZeroDataError: The contract function "calculateL2TokenAddress" returned no data ("0x")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant