2020-11-18 16:34:18 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -o errexit -o nounset -o pipefail
|
2020-12-08 09:03:14 +01:00
|
|
|
command -v shellcheck >/dev/null && shellcheck "$0"
|
2020-11-18 16:34:18 +01:00
|
|
|
|
2023-06-13 08:33:45 +02:00
|
|
|
echo "Waiting for blockchain and Tendermint RPC server to be available ..."
|
|
|
|
timeout 60 bash -c "until curl -s http://localhost:26659/health > /dev/null; do sleep 0.5; done"
|
2020-11-18 16:34:18 +01:00
|
|
|
# The chain is unreliable in the first second of its existence (https://gist.github.com/webmaster128/8175692d4af5e6c572fddda7a9ef437c)
|
2020-12-09 12:37:27 +00:00
|
|
|
sleep 2
|
2020-11-19 14:50:11 +01:00
|
|
|
echo "Waiting for height to be >= 1 ..."
|
2023-06-13 08:33:45 +02:00
|
|
|
timeout 20 bash -c "until [ \"\$( curl -s http://localhost:26659/status | jq -r '.result.sync_info.latest_block_height // 0' )\" -ge 1 ]; do sleep 0.5; done"
|
2020-11-18 16:34:18 +01:00
|
|
|
echo "Okay, thank you for your patience."
|
|
|
|
|
|
|
|
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
|
|
|
|
|
|
|
|
#
|
|
|
|
# Cosmos SDK init
|
|
|
|
#
|
|
|
|
"$SCRIPT_DIR/send_first.js"
|
|
|
|
|
2020-12-02 14:50:06 +00:00
|
|
|
#
|
|
|
|
# CosmWasm init
|
|
|
|
#
|
|
|
|
(
|
|
|
|
echo "Ensuring contracts' checksums are correct ..."
|
|
|
|
cd "$SCRIPT_DIR/contracts"
|
|
|
|
sha256sum --check checksums.sha256
|
|
|
|
)
|
2020-12-09 12:37:27 +00:00
|
|
|
"$SCRIPT_DIR/deploy_hackatom.js"
|
2021-07-25 00:08:16 +02:00
|
|
|
"$SCRIPT_DIR/deploy_ibc_reflect.js"
|