STEP 1 OF 3
NEXT: How to handle msg.sender across chains →
ENCODE — ORDINARY CALLDATA
abi.encodeCall(IRemote.balanceOf, (user))
selector
70
a0
82
31
arg: user
00
⋯
user
20 address bytes, zero-padded to 32
No cross-chain-specific ABI — this is calldata for any contract call.
DAPP DEVELOPERS
How to call a contract on another rollup
Calling a contract on another rollup starts as an ordinary encode — a normal call, with no cross-chain-specific ABI.
You send it to the proxy address, and the proxy's fallback catches everything. Send it as a staticcall and the answer comes back as return data you decode and branch on, inside the same transaction.
WHAT YOU'LL LEARN
- 01 · ENCODE IT LIKE ANY CALLA normal call, encoded with no cross-chain-specific ABI.
- 02 · STATICCALL, NOT CALLYour frame picks the path: the proxy's probe only halts inside a static one, so a read has to be a staticcall.
- 03 · DECODE IT AND BRANCHWhat comes back is a value, not a receipt — decode it and let it decide what the transaction does.
RUN IT YOURSELF · forge test --match-test test_theBranchTracksTheValueNotTheSuccessFlag -vv — from eez-demos/snippets, Foundry only.
Verified against eez-core-protocol @ 9735f53 — pre-mainnet; interfaces may move.