From 0f04d8e453e4aa15eba56939bdf283cfc4a2c6a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Augusto=20Elesb=C3=A3o?= Date: Wed, 23 Oct 2024 14:50:27 +0200 Subject: [PATCH] build: update container image to v9.0.0 --- docker-compose.yaml | 11 +++++------ scripts/docker-entrypoint.sh | 10 +++++----- scripts/faucet.sh | 2 +- scripts/start-local-node.sh | 6 +++--- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 27be11c..3d3b3a9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,12 +1,12 @@ services: node: - image: archwaynetwork/archwayd:v6.0.0 + image: ghcr.io/archway-network/archwayd-dev:v9.0.0 command: start --x-crisis-skip-assert-invariants entrypoint: /docker-entrypoint.sh ports: - - 1317:1317 # API - - 9090:9090 # gRPC - - 9091:9091 # gRPC-web + - 1317:1317 # API + - 9090:9090 # gRPC + - 9091:9091 # gRPC-web - 26656:26656 # p2p - 26657:26657 # RPC volumes: @@ -14,8 +14,7 @@ services: - ./scripts/contracts:/contracts:ro - data:/root/.archway healthcheck: - test: - curl --retry 5 --retry-delay 1 --retry-all-errors -sf 'http://localhost:26657/status' | + test: curl --retry 5 --retry-delay 1 --retry-all-errors -sf 'http://localhost:26657/status' | jq -e '.result.sync_info | (.latest_block_height > 0 and .catching_up == false)' interval: 5s timeout: 30s diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh index 77b6b33..f839879 100755 --- a/scripts/docker-entrypoint.sh +++ b/scripts/docker-entrypoint.sh @@ -4,7 +4,7 @@ # It will initialize the node if it's not configured yet. # -set -eu +set -eux ARCHWAY_HOME="${ARCHWAY_HOME:-$HOME/.archway}" @@ -42,10 +42,10 @@ if [ ! -f "${GENESIS_FILE}" ]; then echo "Initializing the node ${MONIKER} on chain ${CHAIN_ID}..." archwayd init --chain-id "${CHAIN_ID}" "${MONIKER}" | jq . - archwayd config chain-id "${CHAIN_ID}" - archwayd config node "tcp://node:26657" - archwayd config keyring-backend test - archwayd config output json + archwayd config set client chain-id "${CHAIN_ID}" + archwayd config set client node "tcp://node:26657" + archwayd config set client keyring-backend test + archwayd config set client output json echo "Creating validator key..." echo "${VALIDATOR_MNEMONIC}" | archwayd keys add validator --recover diff --git a/scripts/faucet.sh b/scripts/faucet.sh index ec22222..225521c 100755 --- a/scripts/faucet.sh +++ b/scripts/faucet.sh @@ -18,7 +18,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" source "${SCRIPT_DIR}/_shared.sh" amount="${2:-10}$(printf "%018d" 0)" -denom="$(archwayd q staking params | jq -r '.bond_denom')" +denom="$(archwayd q staking params | jq -r '.params.bond_denom')" echo "Requesting ${amount}${denom} for ${ADDRESS}..." diff --git a/scripts/start-local-node.sh b/scripts/start-local-node.sh index aef7114..0ff6923 100755 --- a/scripts/start-local-node.sh +++ b/scripts/start-local-node.sh @@ -29,7 +29,7 @@ function store-contract() { if [[ -z "${code_id}" ]]; then tx_result="$(archwayd-tx --from validator wasm store /"${wasm}")" tx_hash="$(jq -r '.txhash' <<<"${tx_result}")" - code_id="$(jq -r '.logs[].events[] | select(.type == "store_code") | .attributes[] | select(.key == "code_id") | .value' <<<"${tx_result}")" + code_id="$(jq -r '.events[] | select(.type == "store_code") | .attributes[] | select(.key == "code_id") | .value' <<<"${tx_result}")" fi jq --null-input \ @@ -95,7 +95,7 @@ function instantiate-contract() { "${salt}" )" tx_hash="$(jq -r '.txhash' <<<"${tx_result}")" - tx_contract_address="$(jq -r '.logs[].events[] | select(.type == "instantiate") | .attributes[] | select(.key == "_contract_address") | .value' <<<"${tx_result}")" + tx_contract_address="$(jq -r '.events[] | select(.type == "instantiate") | .attributes[] | select(.key == "_contract_address") | .value' <<<"${tx_result}")" [[ "${contract_address}" == "${tx_contract_address}" ]] || error "contract address mismatch: expected ${contract_address}, got ${tx_contract_address}" fi @@ -206,7 +206,7 @@ done topic "Deploying voter contract" # Source: https://github.com/archway-network/archway/tree/main/contracts/go/voter -denom="$(archwayd q staking params | jq -r '.bond_denom')" +denom="$(archwayd q staking params | jq -r '.params.bond_denom')" dotenv-add DENOM "${denom}" action "storing"