Skip to content

Commit

Permalink
build: update container image to v9.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aelesbao committed Oct 25, 2024
1 parent 71ac260 commit 0f04d8e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
11 changes: 5 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
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:
- ./scripts/docker-entrypoint.sh:/docker-entrypoint.sh:ro
- ./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
Expand Down
10 changes: 5 additions & 5 deletions scripts/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/faucet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}..."

Expand Down
6 changes: 3 additions & 3 deletions scripts/start-local-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 0f04d8e

Please sign in to comment.