From da5ef62d26bf9b1d593ce4ce67761633c3c609c1 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 19 Nov 2020 13:01:28 +0100 Subject: [PATCH] scripts: Get wasmd init.sh script working --- scripts/wasmd/init.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/scripts/wasmd/init.sh b/scripts/wasmd/init.sh index 71c404a4..bc42a415 100755 --- a/scripts/wasmd/init.sh +++ b/scripts/wasmd/init.sh @@ -6,8 +6,12 @@ echo "Waiting for blockchain and REST server to be available ..." timeout 60 bash -c "until curl -s http://localhost:1319/node_info > /dev/null; do sleep 0.5; done" # The chain is unreliable in the first second of its existence (https://gist.github.com/webmaster128/8175692d4af5e6c572fddda7a9ef437c) sleep 1 +echo "Waiting for height to be > 1 ..." +sleep 10 +# timeout 20 bash -c "until test $(curl -s localhost:1319/blocks/latest | jq -r '.block.header.height // 0') -gt 1; do sleep 0.5; done" echo "Okay, thank you for your patience." + SCRIPT_DIR="$(realpath "$(dirname "$0")")" @@ -16,15 +20,15 @@ SCRIPT_DIR="$(realpath "$(dirname "$0")")" # "$SCRIPT_DIR/send_first.js" -# -# CosmWasm init -# -( - echo "Ensuring contracts' checksums are correct ..." - cd "$SCRIPT_DIR/contracts" - sha256sum --check checksums.sha256 -) -"$SCRIPT_DIR/deploy_hackatom.js" -"$SCRIPT_DIR/deploy_erc20.js" -"$SCRIPT_DIR/deploy_cw3.js" -# "$SCRIPT_DIR/deploy_nameservice.js" +# # +# # CosmWasm init +# # +# ( +# echo "Ensuring contracts' checksums are correct ..." +# cd "$SCRIPT_DIR/contracts" +# sha256sum --check checksums.sha256 +# ) +# "$SCRIPT_DIR/deploy_hackatom.js" +# "$SCRIPT_DIR/deploy_erc20.js" +# "$SCRIPT_DIR/deploy_cw3.js" +# # "$SCRIPT_DIR/deploy_nameservice.js"