Skip to content

callWithMemo reverts during gas estimation (eth_call) but succeeds with direct signed transaction #189

Description

@consumeobeydie

Summary

callWithMemo on the predeployed Memo contract (0x5294E9927c3306DcBaDb03fe70b92e01cCede505) reverts during gas estimation (eth_estimateGas / eth_call) but executes successfully when sent as a direct signed transaction.

Environment

  • Network: Arc Testnet (Chain ID: 5042002)
  • Memo contract: 0x5294E9927c3306DcBaDb03fe70b92e01cCede505
  • SDK: viem v2.52.2
  • Tool: Foundry cast

Reproduction

Fails (estimation):

cast call 0x5294E9927c3306DcBaDb03fe70b92e01cCede505 \
  "callWithMemo(address,bytes,bytes32,string)(bool,bytes)" \
  0xe81f5BA4181eA29061C3C229c8D6EB4cFE56639C \
  0xb7dc1284 \
  0xf02ff6783ff9bca82d31d52554ec1a67aafc314374620c489f58afe2d84326d2 \
  "test" \
  --rpc-url https://rpc.testnet.arc.network \
  --from 0x54b4B44749a95070560509B6Ec0be501665CcF63
# → execution reverted (empty revert data)

Succeeds (direct send):

cast send --private-key $KEY \
  0x5294E9927c3306DcBaDb03fe70b92e01cCede505 \
  --data 0xc3b2c4f8... \
  --rpc-url https://rpc.testnet.arc.network
# → status: 1 (success), Memo event emitted

Impact

Any library or SDK that estimates gas before sending (viem writeContract, Circle Developer Controlled Wallets createContractExecutionTransaction, ethers.js) will fail to call callWithMemo. Only raw signed transactions work.

Verified Successful Transactions

Hypothesis

The CallFrom precompile's msg.sender preservation mechanism may behave differently in read-only simulation mode (eth_call) vs actual execution. This causes standard gas estimation to fail even when the real transaction would succeed.

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