diff --git a/packages/synthetic-chain/public/upgrade-test-scripts/env_setup.sh b/packages/synthetic-chain/public/upgrade-test-scripts/env_setup.sh index e8622b2a..a594036a 100755 --- a/packages/synthetic-chain/public/upgrade-test-scripts/env_setup.sh +++ b/packages/synthetic-chain/public/upgrade-test-scripts/env_setup.sh @@ -197,16 +197,19 @@ export SUBMIT_PROPOSAL_OPTS="--keyring-backend=test --chain-id=$CHAINID \ --yes --broadcast-mode block --from validator" voteLatestProposalAndWait() { + echo "start voteLatestProposalAndWait()" waitForBlock proposal=$($binary q gov proposals -o json | jq -r '.proposals | last | if .proposal_id == null then .id else .proposal_id end') + echo "Latest proposal: $proposal" waitForBlock - $binary tx -bblock gov deposit $proposal 50000000ubld --from=validator --chain-id="$CHAINID" --yes --keyring-backend test + $binary tx -bblock gov deposit "$proposal" 50000000ubld --from=validator --chain-id="$CHAINID" --yes --keyring-backend test waitForBlock - $binary tx -bblock gov vote $proposal yes --from=validator --chain-id="$CHAINID" --yes --keyring-backend test + $binary tx -bblock gov vote "$proposal" yes --from=validator --chain-id="$CHAINID" --yes --keyring-backend test waitForBlock + echo "Voted in proposal $proposal" while true; do - json=$($binary q gov proposal $proposal -ojson) + json=$($binary q gov proposal "$proposal" -ojson) status=$(echo "$json" | jq -r .status) case $status in PROPOSAL_STATUS_PASSED)