Arbitrum L2 to L1 Hook
Arbitrum's Outbox system allows for arbitrary L2 to L1 contract calls after the optimistic challenge period, i.e., messages initiated on the L2 chain which eventually resolve in execution on L1. See more details about here. Hyperlane can wrap around the Outbox system to leverage the optimistic security of Arbitrum L2 (with a 7 day withdrawal period and operational fraud proofs) to secure L2 to L1 messages from any Arbitrum Nitro rollups. We've implemented the ArbL2ToL1Hook and ArbL2ToL1Ism.
How it works
Outgoing messages from L2 cannot provide in-protocol automatic L1 execution because Ethereum doesn't offer scheduled execution affordances through the L1 node.
The ArbL2ToL1Hook
sends the encoded function call with the messageId
to the ArbSys
precompile on the L2. After waiting for the withdrawal period, you can the getOutboxProof()
on the L2 to get a merkle proof of the message. From here, you have two options:
- Option A. You can call the
ArbL2ToL1Ism
's verify function via themailbox.process()
call with the proof and the other encoded data which in turn calls theoutbox.executeTransaction()
checking for the message sender and message data validity. - Option B. You can directly call the
outbox.executeTransaction()
with the proof and the other encoded data. However, you'll need to make a second call to theArbL2ToL1Ism
's verify function to deliver the message. This option also you delivery of message values to the recipient contract.
Option A
Option B
Note: here, the relayer is responsible for encoding the message proof from arbSys.getOutboxProof()
and calling the outbox.executeTransaction()
function.