Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for verifying token bridge deployment #60

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ See security audit reports [here](./audits).

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

## Deployment
Check [this doc](./docs/deployment.md) for instructions on deployment and verification of token bridge.

## Contact

Discord - [Arbitrum](https://discord.com/invite/5KE54JwyTs)
Expand Down
33 changes: 30 additions & 3 deletions docs/deployment.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to deploy RollupCreator and TokenBridgeCreator?

## RollupCreator
## Deploy RollupCreator
RollupCreator is in nitro-contracts repo
```
cd nitro-contracts
Expand Down Expand Up @@ -38,7 +38,7 @@ yarn run deploy-factory --network arb1
Script output will contain all deployed addresses.


## TokenBridgeCreator
## Deploy TokenBridgeCreator
Checkout target code, install dependencies and build
```
cd token-bridge-contracts
Expand Down Expand Up @@ -71,4 +71,31 @@ Script outputs `L1TokenBridgeCreator` and `L1TokenBridgeRetryableSender` address
These contracts will be owned by deployer:
- RollupCreator (owner can set templates)
- L1AtomicTokenBridgeCreator (owner can set templates)
- ProxyAdmin of L1AtomicTokenBridgeCreator and L1TokenBridgeRetryableSender (owner can do upgrades)
- ProxyAdmin of L1AtomicTokenBridgeCreator and L1TokenBridgeRetryableSender (owner can do upgrades)


## Verify token bridge deployment
There is a verification script which checks that token bridge contracts have been properly deployed and initialized. Here are steps for running it.

Checkout target code, install dependencies and build
```
cd token-bridge-contracts
yarn install
yarn build
```

Populate .env
```
ROLLUP_ADDRESS
L1_TOKEN_BRIDGE_CREATOR
L1_RETRYABLE_SENDER
BASECHAIN_DEPLOYER_KEY
ORBIT_RPC
```
(`L1_RETRYABLE_SENDER` address can be obtained by calling `retryableSender()` on the L1 token bridge creator)


Run the script
```
yarn run test:tokenbridge:deployment
```
3 changes: 2 additions & 1 deletion scripts/atomicTokenBridgeDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@ export const deployL1TokenBridgeCreator = async (
)
await l1Verifier.verifyWithAddress(
'l1TokenBridgeCreatorLogic',
l1TokenBridgeCreatorLogic.address
l1TokenBridgeCreatorLogic.address,
abi.encode(['address'], [l2MulticallAddressOnL1.address])
)
await l1Verifier.verifyWithAddress(
'l1TokenBridgeCreatorProxy',
Expand Down