You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# How to deploy RollupCreator and TokenBridgeCreator?
2
+
3
+
## RollupCreator
4
+
RollupCreator is in nitro-contracts repo
5
+
```
6
+
cd nitro-contracts
7
+
```
8
+
9
+
Checkout target code, ie.
10
+
```
11
+
git checkout v1.1.0
12
+
```
13
+
14
+
Install dependencies and build
15
+
```
16
+
yarn install
17
+
yarn build
18
+
```
19
+
20
+
Populate .env
21
+
```
22
+
DEVNET_PRIVKEY or MAINNET_PRIVKEY
23
+
ARBISCAN_API_KEY
24
+
```
25
+
26
+
Finally deploy it, using `--network` flag to specify network.
27
+
28
+
Ie. to deploy to Arbitrum Sepolia
29
+
```
30
+
yarn run deploy-factory --network arbSepolia
31
+
```
32
+
33
+
To deploy to Arbitrum One
34
+
```
35
+
yarn run deploy-factory --network arb1
36
+
```
37
+
38
+
Script output will contain all deployed addresses.
39
+
40
+
41
+
## TokenBridgeCreator
42
+
Checkout target code, install dependencies and build
43
+
```
44
+
cd token-bridge-contracts
45
+
yarn install
46
+
yarn build
47
+
```
48
+
49
+
50
+
Populate .env
51
+
```
52
+
BASECHAIN_RPC
53
+
BASECHAIN_DEPLOYER_KEY
54
+
BASECHAIN_WETH
55
+
GAS_LIMIT_FOR_L2_FACTORY_DEPLOYMENT
56
+
ARBISCAN_API_KEY
57
+
```
58
+
59
+
Note: Gas limit for deploying child chain factory via retryable needs to be provided to the TokenBridgeCreator when templates are set. This value can be obtained in 2 ways - 1st is to provide `ORBIT_RPC` and `ROLLUP_ADDRESS` env vars, and script will then use Arbitrum SDK to estimate gas needed for deploying L2 factory. Other way to do it is much simpler - provide hardcoded value by setting the `GAS_LIMIT_FOR_L2_FACTORY_DEPLOYMENT`. Previous deployments showed that gas needed is ~5140000. Adding a bit of buffer on top, we can set this value to `GAS_LIMIT_FOR_L2_FACTORY_DEPLOYMENT=6000000`.
60
+
61
+
62
+
Finally, deploy token bridge creator. Target chain is defined by `BASECHAIN_RPC` env var (no need to provide `--network` flag).
63
+
```
64
+
yarn run deploy:token-bridge-creator
65
+
```
66
+
67
+
Script outputs `L1TokenBridgeCreator` and `L1TokenBridgeRetryableSender` addresses. All deployed addresses can be obtained through `L1TokenBridgeCreator` contract.
68
+
69
+
70
+
## Ownership
71
+
These contracts will be owned by deployer:
72
+
- RollupCreator (owner can set templates)
73
+
- L1AtomicTokenBridgeCreator (owner can set templates)
74
+
- ProxyAdmin of L1AtomicTokenBridgeCreator and L1TokenBridgeRetryableSender (owner can do upgrades)
0 commit comments