Skip to main content

Send on the source chain

The source-chain Outbox exposes this interface:
send writes the following commitment:
The message commitment binds both chain IDs, the sequential nonce, the source sender, and the exact Metal call.

Storage commitment

The messages mapping occupies storage slot 0. A commitment for nonce therefore resides at:
Each slot is written once. 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

Deployment rejects a zero code hash or 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. Call eth_getProof on the source chain for the outbox at the accepted checkpoint’s block number:
Pass the returned account proof as 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 through msg.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.