Skip to content

Commit 257f2b8

Browse files
authored
Merge pull request #60 from OffchainLabs/verification-readme
Add instructions for verifying token bridge deployment
2 parents f03619e + 7f8e68b commit 257f2b8

File tree

3 files changed

+35
-4
lines changed

3 files changed

+35
-4
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ See security audit reports [here](./audits).
1414

1515
This repository is offered under the Apache 2.0 license. See LICENSE for details.
1616

17+
## Deployment
18+
Check [this doc](./docs/deployment.md) for instructions on deployment and verification of token bridge.
19+
1720
## Contact
1821

1922
Discord - [Arbitrum](https://discord.com/invite/5KE54JwyTs)

docs/deployment.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# How to deploy RollupCreator and TokenBridgeCreator?
22

3-
## RollupCreator
3+
## Deploy RollupCreator
44
RollupCreator is in nitro-contracts repo
55
```
66
cd nitro-contracts
@@ -38,7 +38,7 @@ yarn run deploy-factory --network arb1
3838
Script output will contain all deployed addresses.
3939

4040

41-
## TokenBridgeCreator
41+
## Deploy TokenBridgeCreator
4242
Checkout target code, install dependencies and build
4343
```
4444
cd token-bridge-contracts
@@ -71,4 +71,31 @@ Script outputs `L1TokenBridgeCreator` and `L1TokenBridgeRetryableSender` address
7171
These contracts will be owned by deployer:
7272
- RollupCreator (owner can set templates)
7373
- L1AtomicTokenBridgeCreator (owner can set templates)
74-
- ProxyAdmin of L1AtomicTokenBridgeCreator and L1TokenBridgeRetryableSender (owner can do upgrades)
74+
- ProxyAdmin of L1AtomicTokenBridgeCreator and L1TokenBridgeRetryableSender (owner can do upgrades)
75+
76+
77+
## Verify token bridge deployment
78+
There is a verification script which checks that token bridge contracts have been properly deployed and initialized. Here are steps for running it.
79+
80+
Checkout target code, install dependencies and build
81+
```
82+
cd token-bridge-contracts
83+
yarn install
84+
yarn build
85+
```
86+
87+
Populate .env
88+
```
89+
ROLLUP_ADDRESS
90+
L1_TOKEN_BRIDGE_CREATOR
91+
L1_RETRYABLE_SENDER
92+
BASECHAIN_DEPLOYER_KEY
93+
ORBIT_RPC
94+
```
95+
(`L1_RETRYABLE_SENDER` address can be obtained by calling `retryableSender()` on the L1 token bridge creator)
96+
97+
98+
Run the script
99+
```
100+
yarn run test:tokenbridge:deployment
101+
```

scripts/atomicTokenBridgeDeployer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,8 @@ export const deployL1TokenBridgeCreator = async (
510510
)
511511
await l1Verifier.verifyWithAddress(
512512
'l1TokenBridgeCreatorLogic',
513-
l1TokenBridgeCreatorLogic.address
513+
l1TokenBridgeCreatorLogic.address,
514+
abi.encode(['address'], [l2MulticallAddressOnL1.address])
514515
)
515516
await l1Verifier.verifyWithAddress(
516517
'l1TokenBridgeCreatorProxy',

0 commit comments

Comments
 (0)