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

abi is inconsistently undefined when calling zkEvmClient.isDepositClaimable() #428

Open
shanefontaine opened this issue Feb 13, 2024 · 0 comments

Comments

@shanefontaine
Copy link

shanefontaine commented Feb 13, 2024

Describe the bug

Calling zkEvmClient.isDepositClaimable() appears to randomly error out with Cannot read properties of undefined (reading 'abi'). It works most of the time, but when it fails it appears to do so for hours at a time.

I believe the error is being thrown here in abi_manager.ts.

This call fails in the same process where it has worked many times before, so I do not believe it is a client init error. However, restarting the process seems to work 🤔

Versions

  • @maticnetwork/maticjs-ethers@1.0.3
  • @maticnetwork/maticjs@3.7.7

Trace

module.exports../src/utils/abi_manager.ts.ABIManager.getABI (/prod/app/node_modules/.pnpm/@maticnetwork+maticjs@3.7.7/node_modules/@maticnetwork/maticjs/dist/matic.node.js:2915:13)
module.exports../src/utils/web3_side_chain_client.ts.Web3SideChainClient.getABI (/prod/app/node_modules/.pnpm/@maticnetwork+maticjs@3.7.7/node_modules/@maticnetwork/maticjs/dist/matic.node.js:4333:32)
module.exports../src/zkevm/bridge_util.ts.BridgeUtil.decodedBridgeData_ (/prod/app/node_modules/.pnpm/@maticnetwork+maticjs@3.7.7/node_modules/@maticnetwork/maticjs/dist/matic.node.js:4476:29)

Client init code

Full code here.

const zkEvmClient = new ZkEvmClient()
await zkEvmClient.init({
  network: 'mainnet',
  version: 'cherry',
  parent: {
    provider: this.l1Wallet,
    defaultConfig: {
      from: '<wallet_address>'
    }
  },
  child: {
    provider: this.l2Wallet,
    defaultConfig: {
      from: '<wallet_address>'
    }
  }
})

Example Claim

The following message was exhibiting this behavior until it was manually claimed:

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