(Note this can only be done in nitro stack, not in Arbitrum classic.)
delayedInbox-l2msg is a simple sample example that allows you to send a l2 msg without using sequencer way, this can be used when a sequencer censors your tx or when a sequencer is down.
The demo allows you to send an L2 message without having to use the L2 RPC (only using the L1 RPC). This demo has 2 parts; (1) one part will show how to send a normal L2 transaction using the delayed inbox, (2) another will show how to withdraw your funds back without the sequencer.
If the sequencer goes down when running the Withdraw Funds
, you need to use our Arbitrum SDK to force include your tx to continue. (example here)
Set the values shown in .env-sample
as environmental variables. To copy it into a .env
file:
cp .env-sample .env
(you'll still need to edit some variables, i.e., DEVNET_PRIVKEY
)
Normal Transaction:
yarn normalTx
Withdraw Funds:
yarn withdrawFunds
Once the script is successfully executed, you can go to the Arbitrum nitro block explorer, enter your L2 address, and see the corresponding transactions on the Arbitrum chain!