Cross-chain messaging overview
The Arbitrum protocol and related tooling make 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
Creating an arbitrary parent-to-child chain contract call occurs via the Inbox's createRetryableTicket method. Upon publishing the parent chain transaction, the child chain side will typically be included within minutes. Commonly, the child chain execution will automatically succeed, but if it reverts, it can be re-executed via a call to the redeem method of the ArbRetryableTx precompile.
- How-to guide: How to bridge from the parent chain to the 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), you can execute them by retrieving the relevant data via a call to the NodeInterface contract's constructOutboxProof method, and then calling 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