Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
wcgcyx committed Nov 2, 2023
1 parent 9a4b1c8 commit cb511af
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 14 deletions.
8 changes: 6 additions & 2 deletions bootstrap/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ ADMIN_EOA_SECRET=
AXELAR_EOA=
## The amount of fund Axelar requested, unit is in IMX or 10^18 Wei.
AXELAR_FUND=
# The address to perform child bridge upgrade.
CHILD_PROXY_ADMIN=
# The address to perform root adaptor upgrade.
ROOT_PROXY_ADMIN=

# Set prior to 2_deployment_validation.js
CHILD_GATEWAY_ADDRESS=
Expand All @@ -25,9 +29,9 @@ ROOT_GAS_SERVICE_ADDRESS=

# Set prior to 5_child_initialisation.js
CHILD_BRIDGE_ADDRESS=
CHILD_ADAPTER_ADDRESS=
CHILD_ADAPTOR_ADDRESS=
WRAPPED_IMX_ADDRESS=
CHILD_TOKEN_TEMPLATE=
ROOT_BRIDGE_ADDRESS=
ROOT_ADAPTER_ADDRESS=
ROOT_ADAPTOR_ADDRESS=
ROOT_TOKEN_TEMPLATE=
22 changes: 13 additions & 9 deletions bootstrap/2_deployment_validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,26 @@ async function run() {
console.log("Check contracts on child chain...");
console.log("Check gateway contract...")
await requireNonEmptyCode(childProvider, childGatewayAddr);
console.log("Succeed.")
console.log("Succeed.");
console.log("Check gas service contract...")
await requireNonEmptyCode(childProvider, childGasServiceAddr);
console.log("Succeed.")
console.log("Check multisig contract...")
await requireNonEmptyCode(childProvider, multisigAddr);
console.log("Succeed.")
console.log("Succeed.");
if (process.env["SKIP_MULTISIG_CHECK"] != null) {
console.log("Skip multisig contract check...");
} else {
console.log("Check multisig contract...");
await requireNonEmptyCode(childProvider, multisigAddr);
console.log("Succeed.");
}

// Check root chain.
console.log("Check contracts on root chain...");
console.log("Check gateway contract...")
console.log("Check gateway contract...");
await requireNonEmptyCode(rootProvider, rootGatewayAddr);
console.log("Succeed.")
console.log("Check gas service contract...")
console.log("Succeed.");
console.log("Check gas service contract...");
await requireNonEmptyCode(rootProvider, rootGasService);
console.log("Succeed.")
console.log("Succeed.");
}

run();
Expand Down
21 changes: 18 additions & 3 deletions bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prerequisite
1. Coordinate with Axelar to obtain their admin address for initial funding as well as the desired amount in $IMX. (50 IMX in previous discussion).
2. Fund admin EOA account with `ETH` and `IMX` on root chain. (As a rule of thumb, _0.1 ETH and 100 IMX_ (TBD))
2. Fund admin EOA account with `ETH` and `IMX` on root chain. (As a rule of thumb, _0.1 ETH and 100 IMX_ (TBD)).


## Bootstrapping
Expand All @@ -24,11 +24,20 @@ CHILD_CHAIN_ID=
ROOT_CHAIN_NAME=
ROOT_RPC_URL=
ROOT_CHAIN_ID=
## The IMX token address on root chain.
IMX_ROOT_ADDR=
## The Wrapped ETH token address on the root chain.
WETH_ROOT_ADDR=
ADMIN_EOA_SECRET= (Note: Use private key string or "ledger" if using hardware wallet)
## The private key for the admin EOA or "ledger" if using hardware wallet.
ADMIN_EOA_SECRET=
## The Axelar address for receive initial funding.
AXELAR_EOA=
## The amount of fund Axelar requested, unit is in IMX or 10^18 Wei.
AXELAR_FUND=
# The address to perform child bridge upgrade.
CHILD_PROXY_ADMIN=
# The address to perform root adaptor upgrade.
ROOT_PROXY_ADMIN=
```
3. Fund deployer
```
Expand All @@ -44,8 +53,14 @@ ROOT_GATEWAY_ADDRESS=
ROOT_GAS_SERVICE_ADDRESS=
```
6. Basic contract validation

For Mainnet:
```
node 2_deployment_validation.js
```
For Testnet/Devnet when multisig isn't deployed:
```
node 2_deployment_validation.js (Note, for testnet regenesis, multisig contract check in line 38 needs to be disabled.)
SKIP_MULTISIG_CHECK=true node 2_deployment_validation.js
```
7. Deploy bridge contracts on child and root chain. (see [here](../README.md#remote-deployment) for more details)
```
Expand Down

0 comments on commit cb511af

Please sign in to comment.