Send on the source chain
The source-chainOutbox exposes this interface:
send writes the following commitment:
Storage commitment
Themessages mapping occupies storage slot 0. A commitment for nonce
therefore resides at:
ForeignInbox verifies this storage value. Relayers
use MessageSent to reconstruct the execution call.
The inbox pins the source Outbox’s runtime bytecode hash as immutable
foreignOutboxCodeHash. Route providers must supply the approved runtime
bytecode and hash for a direct, immutable Outbox. This excludes proxies,
whose implementations can change while their runtime bytecode stays the same. A
new Outbox version requires a new inbox. Preserve application replay records
when replacing a route, since the new inbox starts with no consumed nonces.
Foreign inbox
keccak256("") with
InvalidOutboxCodeHash. Calculate the configured hash from the outbox’s
runtime bytecode.
Build the proof
First select an accepted source-chain checkpoint on Metal. For Tempo and Arc, a relayer can submit the checkpoint to the corresponding contract light client. Metal block execution maintains Ethereum checkpoints. Calleth_getProof on the
source chain for the outbox at the accepted checkpoint’s block number:
accountProof and the requested slot’s proof
as storageProof. The inbox authenticates the account under the accepted state
root and compares its code hash to foreignOutboxCodeHash before using its
storage root. CodeHashMismatch indicates different runtime bytecode at that
checkpoint.
Authenticate the source sender
The receiving contract authenticates the inbox throughmsg.sender, then
authorizes the source sender returned by foreignSender() before processing the
payload:
Receive messages on Metal
Configure a route, collect matching proofs, and handle delivery results.
Light clients
Review the checkpoints that authenticate source-chain state roots.
Outbound messages
Send a cross-chain message from Metal to a destination chain.