Cross-chain messaging overview
The Arbitrum protocol and related tooling makes it easy for developers to build cross-chain applications; i.e., applications that involve sending messages from Ethereum to an Arbitrum chain, and/or from an Arbitrum chain to Ethereum.
Ethereum-to-Arbitrum messaging
Arbitrary parent to child chain contract calls can be created via the Inbox's createRetryableTicket method; upon publishing the parent chain transaction, the child chain side will typically get included within minutes. Commonly, the child chain execution will automatically succeed, but if it reverts, it can be rexecuted via a call to the redeem method of the ArbRetryableTx precompile.
- How-to guide: How to bridge from parent chain to child chain
- Protocol details: Parent to child chain messaging
- Example:
Greetertutorial using the Arbitrum SDK
Arbitrum-to-Ethereum messaging
Similarly, child chain contracts can send arbitrary messages for execution on the parent chain. These are initiated via calls to the ArbSys precompile contract's sendTxToL1 method. Upon confirmation (about one week later), they can be executed by retrieving the relevant data via a call to the NodeInterface contract's constructOutboxProof method, and then executing them via the Outbox's executeTransaction method.
- How-to guide: How to bridge to parent chain from child chain
- Protocol details: Child to parent chain messaging
- Example: Outbox Tutorial