Skip to content

Commit 0e354aa

Browse files
committed
Update README files
1 parent 98e12df commit 0e354aa

File tree

3 files changed

+33
-22
lines changed

3 files changed

+33
-22
lines changed

README.md

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Arbitrum Tutorials
22

3-
This monorepo will help you get started with building on Arbitrum. It provides various simple demos showing and explaining how to interact with Arbitrum — deploying and using contracts directly on L2, moving Ether and tokens betweens L1 and L2, and more.
3+
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.
44

55
We show how you can use broadly supported Ethereum ecosystem tooling (Hardhat, Ethers-js, etc.) as well as our special [Arbitrum SDK](https://github.com/OffchainLabs/arbitrum-sdk) for convenience.
66

@@ -16,30 +16,38 @@ yarn install
1616

1717
#### :white_check_mark: Basics
1818

19-
- 🐹 [Pet Shop DApp](./packages/demo-dapp-pet-shop/) (L2 only)
20-
- 🗳 [Election DApp](./packages/demo-dapp-election/) (L2 only)
19+
- 🐹 [Pet Shop DApp](./packages/demo-dapp-pet-shop/)
20+
- 🗳 [Election DApp](./packages/demo-dapp-election/)
2121

22-
#### :white_check_mark: Moving Stuff around
22+
#### :white_check_mark: Moving stuff around
2323

2424
- ⤴️ 🔹 [Deposit Ether](./packages/eth-deposit/)
2525
- ⤵️ 🔹 [Withdraw Ether](./packages/eth-withdraw/)
2626
- ⤴️ 💸 [Deposit Token](./packages/token-deposit/)
2727
- ⤵️ 💸 [Withdraw token](./packages/token-withdraw/)
28-
- ⤴️ 🔹 [L2 Alias Control and Fund Transfer Guide](./packages/contract-deposit/)
28+
- ⤴️ 🔹 [Contract alias control in the child chain, and fund-transfer guide](./packages/contract-deposit/)
2929

3030
#### :white_check_mark: General interop
3131

32-
- 🤝 [Greeter](./packages/greeter/) (L1 to L2)
33-
- 📤 [Outbox](./packages/outbox-execute/) (L2 to L1)
32+
- 🤝 [Greeter](./packages/greeter/) (parent to child messages)
33+
- 📤 [Outbox](./packages/outbox-execute/) (child to parent messages)
3434
-[L1 Confirmation Checker](./packages/l1-confirmation-checker/)
3535
-[L2 block verification in assertion](./packages/l2-block-verification-in-assertion/)
3636

37-
#### :white_check_mark: Advanced Features
37+
#### :white_check_mark: Advanced features
3838

3939
- ®️ [Arb Address Table](./packages/address-table/)
4040
- 🌉 [Bridging Custom Token](./packages/custom-token-bridging/)
4141
- ✈️ [Delayed inbox message(l2MSG)](./packages/delayedInbox-l2msg/)
4242
- 🎁 [Redeem Retryable Ticket](./packages/redeem-failed-retryable/)
4343
- 🌀 [Deposit Ether or Tokens from L1 to L3](./packages/l1-l3-teleport/)
4444

45+
## How to run the tutorials against a custom network
46+
47+
As mentioned above, these tutorials use the [Arbitrum SDK](https://github.com/OffchainLabs/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.
48+
49+
To do that, fill the information of your chain in the [`customNetwork.json`](./customNetwork.json) file., which is automatically loaded in all tutorials.
50+
51+
To obtain the information of a specific chain, you can use the method [`prepareArbitrumNetwork`](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/main/src/utils/registerNewNetwork.ts#L18) of the Orbit SDK.
52+
4553
<p align="center"><img src="assets/logo.svg" width="300"></p>

packages/address-table/README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Address Table Demo
1+
# Address table demo
22

3-
The Address table is a precompiled contract on Arbitrum for registering addresses which are then retrievable by an integer index; this saves gas by minimizing precious calldata required to input an address as a parameter.
3+
The Address table is a precompiled contract on Arbitrum chains for registering addresses which are then retrievable by an integer index; this saves gas by minimizing precious calldata required to input an address as a parameter.
44

55
This demo shows a simple contract with affordances to retrieve an address from a contract by its index in the address table, and a client-side script to pre-register the given address (if necessary).
66

@@ -12,15 +12,17 @@ See `exec.js` for inline comments / explanation.
1212
yarn run exec
1313
```
1414

15-
## Config Environment Variables
15+
## Set environment variables
1616

1717
Set the values shown in `.env-sample` as environmental variables. To copy it into a `.env` file:
1818

1919
```bash
2020
cp .env-sample .env
2121
```
2222

23-
(you'll still need to edit some variables, i.e., `PRIVATE_KEY` and `CHAIN_RPC`)
23+
You'll still need to edit some variables, i.e., `PRIVATE_KEY` and `CHAIN_RPC`.
24+
25+
Note that you can also set the environment variables in an `.env` file in the root of the monorepo, which will be available in all tutorials.
2426

2527
### More info
2628

packages/contract-deposit/README.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
1-
# L2 alias control and fund transfer guide
1+
# Contract alias control in the child chain, and fund-transfer guide
22

3-
`L2 Alias Control and Fund Transfer Guide` is a simple demonstration of how Arbitrum facilitates sending deposits from an L1 contract to L2.
3+
`Contract alias control in the child chain, and fund-transfer guide` is a simple demonstration of how Arbitrum facilitates sending deposits from a contract in the parent chain, to the child chain.
44

5-
It will deposit funds to l2 via a l1 contract, and because the inbox contract will alias the sender address if it is a contract,
6-
this tutorial shows how to control the alias address on l2 via its l1 contract address.
5+
It will deposit funds to the child chain via a contract deployed to the parent chain, and because the inbox contract will alias the sender address if it is a contract, this tutorial shows how to control the alias address on the child chain via the address of the contract on the parent chain.
76

8-
This tutorial demonstrates depositing funds to L2 using an L1 contract. Since the Inbox contract changes the sender address if it's a contract [(a.k.a address aliasing)](https://docs.arbitrum.io/how-arbitrum-works/arbos/l1-l2-messaging#address-aliasing), it explains how to manage the new L2 address using the L1 contract address. It's a basic example of how an L1 contract controls its L2 alias and transfers its alias funds to another address. For practical use, we recommend our [funds recovery tool](<(https://github.com/OffchainLabs/arbitrum-funds-recovery-tool)>).
7+
This tutorial demonstrates depositing funds to the child chain using a contract deployed to the parent chain. Since the Inbox contract changes the sender address if it's a contract [(a.k.a address aliasing)](https://docs.arbitrum.io/how-arbitrum-works/arbos/l1-l2-messaging#address-aliasing), it explains how to manage the aliased address on the child chain using the contract address on the parent chain. It's a basic example of how a contract controls its alias on the child chain, and transfers its funds from the aliased address to another address. For practical use, we recommend our [funds recovery tool](https://github.com/OffchainLabs/arbitrum-funds-recovery-tool).
98

10-
The script and contracts demonstrate how to interact with Arbitrum's core bridge contracts to create these retryable messages, how to calculate and forward appropriate fees from L1 to L2, and how to use Arbitrum's L1-to-L2 message [address aliasing](https://developer.offchainlabs.com/docs/l1_l2_messages#address-aliasing).
9+
The script and contracts demonstrate how to interact with Arbitrum's core bridge contracts to create these retryable messages, how to calculate and forward appropriate fees from the parent to the child chain, and how to use Arbitrum's cross-chain message [address aliasing](https://docs.arbitrum.io/how-arbitrum-works/arbos/l1-l2-messaging#address-aliasing).
1110

1211
See [./exec.js](./scripts/exec.js) for inline explanations.
1312

14-
[Click here](https://developer.offchainlabs.com/docs/l1_l2_messages) for more info on retryable tickets.
13+
[Click here](https://docs.arbitrum.io/how-arbitrum-works/arbos/l1-l2-messaging) for more info on retryable tickets.
1514

16-
### Run demo:
15+
### Run demo
1716

1817
```
1918
yarn start
2019
```
2120

22-
## Config environment variables
21+
## Set environment variables
2322

2423
Set the values shown in `.env-sample` as environmental variables. To copy it into a `.env` file:
2524

2625
```shell
2726
cp .env-sample .env
2827
```
2928

30-
(you'll still need to edit some variables, i.e., `DEVNET_PRIVKEY`)
29+
You'll still need to edit some variables, i.e., `PRIVATE_KEY`, `CHAIN_RPC`, `PARENT_CHAIN_RPC` and `TransferTo`.
30+
31+
Note that you can also set the environment variables in an `.env` file in the root of the monorepo, which will be available in all tutorials.
3132

3233
<p align="left">
3334
<img width="350" height="150" src= "../../assets/logo.svg" />

0 commit comments

Comments
 (0)