From b0fc86bbe9aaab0cf956c299d4789430e037822a Mon Sep 17 00:00:00 2001 From: wcgcyx Date: Wed, 22 Nov 2023 18:18:48 +1000 Subject: [PATCH] Output to file --- .gitignore | 2 ++ scripts/bootstrap/README.md | 20 ++++++++++---------- scripts/localdev/deploy.sh | 14 +++++++------- scripts/localdev/start.sh | 2 +- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index c520f268..c21b7087 100644 --- a/.gitignore +++ b/.gitignore @@ -34,5 +34,7 @@ node_modules/ # Bootstrap output files scripts/bootstrap/*.contracts.json scripts/localdev/*.contracts.json +bootstrap.out + # MacOS .DS_Store diff --git a/scripts/bootstrap/README.md b/scripts/bootstrap/README.md index 190aacf4..e5ca044e 100644 --- a/scripts/bootstrap/README.md +++ b/scripts/bootstrap/README.md @@ -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 @@ -156,32 +156,32 @@ 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 ``` @@ -189,5 +189,5 @@ 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 ``` \ No newline at end of file diff --git a/scripts/localdev/deploy.sh b/scripts/localdev/deploy.sh index 06abf03c..1b947acc 100755 --- a/scripts/localdev/deploy.sh +++ b/scripts/localdev/deploy.sh @@ -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 \ No newline at end of file diff --git a/scripts/localdev/start.sh b/scripts/localdev/start.sh index 5b60174d..e2f4db9a 100755 --- a/scripts/localdev/start.sh +++ b/scripts/localdev/start.sh @@ -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"