STEP 1 OF 3
ALL QUICKSTARTS →
L1 · YOUR TRANSACTION
YOUR CONTRACT
CounterAndProxy
You call incrementProxy()
target.increment()
PROXY ON L1 · FOR COUNTER ON L2
fallback()
no functions of its own
msg.sender, msg.data
EEZ MANAGER · L1
executeCrossChainCall
L2 · THE ROLLUP
Counter
increment()
Counter is the L2 contract. Its increment() function adds one to its stored number and returns it: starting at 0, the result is 1.
CounterAndProxy is the caller contract, separate from the proxy. Its incrementProxy() function saves the result in targetCounter and also increments its own local counter.DAPP DEVELOPERS
One Call, Two Chains, One Transaction
Call Counter on L2. Get 1 back on L1, in the same transaction. L1 is the base chain; L2 is a rollup that settles on it.
L1
YOUR CONTRACT
CounterAndProxy
You call
incrementProxy()
increment()
returns 1
PROXY
Counter proxy
Represents Counter on L2
Cross-chain call
returns 1
L2
CONTRACT
Counter
increment() 0 → 1Adds 1 and returns it
Verified against eez-core-protocol Git commit 9a1f815; interfaces may move.