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

At web3zksync.ts, the method estimateGasL1ToL2 needs the sent data to be formatted similar to the formatting done at estimateGas #41

Closed
Muhammad-Altabba opened this issue Aug 22, 2024 · 0 comments · Fixed by #47
Assignees

Comments

@Muhammad-Altabba
Copy link
Contributor

When calling estimateGasL1ToL2 the following error come:

Error: ContractExecutionError: Error happened while trying to execute a function inside a smart contract

And when trying the log the internal error, it is:

ContractExecutionError -> rpcError {
  code: 3,
  message: 'execution reverted',
  data: '0x4e487b710000000000000000000000000000000000000000000000000000000000000041'
}

Diagnosis

At web3zksync.ts, the method estimateGasL1ToL2 needs the sent data to be formatted similar to the formatting you did inside estimateGas. Actually all the rpc method calls should have something similar (that is how it is done in zksync-ethers).

Reproduce

Check the error by running yarn test:prepare after checking out this branch: #39

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

Successfully merging a pull request may close this issue.

2 participants