Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Execution reverted when calling contract functions #121

@ganymedio

Description

@ganymedio

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: viem@1.19.9
    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: viem@1.19.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions