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

Execution reverted when calling contract functions #121

Open
andygolay opened this issue Apr 17, 2024 · 0 comments
Open

Execution reverted when calling contract functions #121

andygolay opened this issue Apr 17, 2024 · 0 comments

Comments

@andygolay
Copy link

I'm following this tutorial https://docs.movementlabs.xyz/developers/tutorials/build-dapp/solidity-dapp
getting "execution reverted" error when i try to call functions from the front-end.

It appears that the front-end recognizes contract on MEVM.

Here's an example console error:

ReadOnlyFunctionForm.tsx:82 ContractFunctionExecutionError: Execution reverted for an unknown reason.

Raw Call Arguments:
  to:    0x2141beb349b377bbc718529fc4c366ba2bf530d4
  data:  0xcea49c3c000000000000000000000000885643f126bb3320fff11e5b0d1ef6123496e321
 
Contract Call:
  address:   0x2141beb349b377bbc718529fc4c366ba2bf530d4
  function:  userGreetingCounter(address)
  args:                         (0x885643f126bB3320FFF11E5B0d1EF6123496e321)

Docs: https://viem.sh/docs/contract/readContract.html
Details: execution reverted
Version: [email protected]
    at getContractError (getContractError.js:34:12)
    at readContract (readContract.js:66:98)
    at async Object.eval [as queryFn] (index.js:1307:12)

Here is an example error after attempting to call the "withdraw" function from the front-end:

Execution reverted for an unknown reason.

Raw Call Arguments:
to: 0x2141beb349b377bbc718529fc4c366ba2bf530d4
data: 0x97feba9d

Contract Call:
address: 0x2141beb349b377bbc718529fc4c366ba2bf530d4
function: totalCounter()

Docs: https://viem.sh/docs/contract/readContract.html
Details: execution reverted
Version: [email protected]
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