Awesome
Arbitrum Tutorials
This monorepo will help you get started with building on Arbitrum chains. It provides various simple demos showing and explaining how to interact with Arbitrum chains (including Orbit chains) — deploying and using contracts directly on Arbitrum, moving Ether and tokens betweens the parent and child chains, and more.
We show how you can use broadly supported Ethereum ecosystem tooling (Hardhat, Ethers-js, etc.) as well as our special Arbitrum SDK for convenience.
Installation
From root directory:
yarn install
What's included?
:white_check_mark: Basics
:white_check_mark: Moving stuff around
- ⤴️ 🔹 Deposit Ether or native token
- ⤴️ 🔹 Deposit Ether or native token to a different address
- ⤵️ 🔹 Withdraw Ether or native token
- ⤴️ 💸 Deposit token
- ⤵️ 💸 Withdraw token
- ⤴️ 🔹 Contract alias control in the child chain, and fund-transfer guide
:white_check_mark: General interop
- 🤝 Greeter (parent to child messages)
- 📤 Outbox tutorial: execute a child-to-parent message (child to parent messages)
- ⏰ Parent chain confirmation checker
- ⏰ Block verification in parent chain's assertion
:white_check_mark: Advanced features
- ®️ ArbAddress table
- 🌉 Bridging a custom token through the generic-custom gateway
- 🌉 Bridging a custom token through a custom gateway
- ✈️ Send a signed transaction from the parent chain
- 🎁 Redeem pending retryable ticket
- 🧮 Gas estimation
- 🌀 Deposit Ether or Tokens from L1 to L3
How to run the tutorials against a custom network
As mentioned above, these tutorials use the Arbitrum SDK, which loads the regular Arbitrum chains by default (Arbitrum One, Arbitrum Nova and Arbitrum Sepolia). You can use these tutorials against any other Arbitrum chain (including Orbit chains), by loading it to the Arbitrum SDK.
To do that, fill the information of your chain in the customNetwork.json
file, which is automatically loaded in all tutorials.
To obtain the information of a specific chain, you can use the method prepareArbitrumNetwork
of the Orbit SDK.
You can also register multiple chains if you need to (for example, for the l1-l3-teleport
tutorial). In that case, create an array of chain information objects in the customNetwork.json
file.