Skip to content

Commit

Permalink
Output to file
Browse files Browse the repository at this point in the history
  • Loading branch information
wcgcyx committed Nov 22, 2023
1 parent c758f9f commit b0fc86b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@ node_modules/
# Bootstrap output files
scripts/bootstrap/*.contracts.json
scripts/localdev/*.contracts.json
bootstrap.out

# MacOS
.DS_Store
20 changes: 10 additions & 10 deletions scripts/bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ RATE_LIMIT_GOG_LARGE_THRESHOLD=
```
3. Fund deployer
```
node 1_deployer_funding.js
node 1_deployer_funding.js 2>&1 | tee bootstrap.out
```
4. Wait for Axelar to deploy & setup their system and Security team to deploy & setup multisig wallet.
5. Set the following environment variables
Expand All @@ -156,38 +156,38 @@ ROOT_GAS_SERVICE_ADDRESS=

If multisig is deployed:
```
node 2_deployment_validation.js
node 2_deployment_validation.js 2>&1 | tee -a bootstrap.out
```
If multisig isn't deployed:
```
SKIP_MULTISIG_CHECK=true node 2_deployment_validation.js
SKIP_MULTISIG_CHECK=true node 2_deployment_validation.js 2>&1 | tee -a bootstrap.out
```
7. Deploy bridge contracts on child and root chain.
```
node 3_child_deployment.js
node 4_root_deployment.js
node 3_child_deployment.js 2>&1 | tee -a bootstrap.out
node 4_root_deployment.js 2>&1 | tee -a bootstrap.out
```
8. Initialise bridge contracts on child chain.
```
node 5_child_initialisation.js
node 5_child_initialisation.js 2>&1 | tee -a bootstrap.out
```
9. IMX Burning
```
node 6_imx_burning.js
node 6_imx_burning.js 2>&1 | tee -a bootstrap.out
```
10. IMX Rebalancing
```
node 7_imx_rebalancing.js
node 7_imx_rebalancing.js 2>&1 | tee -a bootstrap.out
```
11. Initialise bridge contracts on root chain.
```
node 8_root_initialisation.js
node 8_root_initialisation.js 2>&1 | tee -a bootstrap.out
```
12. Set the following environment variable
```
TEST_ACCOUNT_SECRET=
```
13. Test bridge functions
```
npx mocha --require mocha-suppress-logs ../e2e/
npx mocha --require mocha-suppress-logs ../e2e/ 2>&1 | tee -a bootstrap.out
```
14 changes: 7 additions & 7 deletions scripts/localdev/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
#!/bin/bash

# Verify deployment
SKIP_WAIT_FOR_CONFIRMATION=true SKIP_MULTISIG_CHECK=true node ../bootstrap/2_deployment_validation.js
SKIP_WAIT_FOR_CONFIRMATION=true SKIP_MULTISIG_CHECK=true node ../bootstrap/2_deployment_validation.js 2>&1 | tee -a bootstrap.out
if [ $? -ne 0 ]; then
exit 1;
fi

# Deploy child contracts
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/3_child_deployment.js
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/3_child_deployment.js 2>&1 | tee -a bootstrap.out
if [ $? -ne 0 ]; then
exit 1;
fi

# Deploy root contracts
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/4_root_deployment.js
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/4_root_deployment.js 2>&1 | tee -a bootstrap.out
if [ $? -ne 0 ]; then
exit 1;
fi

# Initialise child contracts
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/5_child_initialisation.js
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/5_child_initialisation.js 2>&1 | tee -a bootstrap.out
if [ $? -ne 0 ]; then
exit 1;
fi

# IMX Burning
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/6_imx_burning.js
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/6_imx_burning.js 2>&1 | tee -a bootstrap.out
if [ $? -ne 0 ]; then
exit 1;
fi

# IMX Rebalancing
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/7_imx_rebalancing.js
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/7_imx_rebalancing.js 2>&1 | tee -a bootstrap.out
if [ $? -ne 0 ]; then
exit 1;
fi

# Initialise root contracts
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/8_root_initialisation.js
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/8_root_initialisation.js 2>&1 | tee -a bootstrap.out
if [ $? -ne 0 ]; then
exit 1;
fi
2 changes: 1 addition & 1 deletion scripts/localdev/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ echo "Successfully setup root chain and child chain..."

if [ -z ${LOCAL_CHAIN_ONLY+x} ]; then
# Fund accounts
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/1_deployer_funding.js
SKIP_WAIT_FOR_CONFIRMATION=true node ../bootstrap/1_deployer_funding.js 2>&1 | tee bootstrap.out
if [ $? -ne 0 ]; then
./stop.sh
echo "Fail to run 1_deployer_funding.js"
Expand Down

0 comments on commit b0fc86b

Please sign in to comment.