From 783d94c0f57cd8f5feb609b4c415818968a2447a Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 8 Mar 2024 12:39:20 -0800 Subject: [PATCH] refactor: SIGN_BROADCAST_OPTS in prepare_zero --- .../public/upgrade-test-scripts/run_prepare_zero.sh | 9 ++++----- proposals/16:upgrade-8/use.sh | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/synthetic-chain/public/upgrade-test-scripts/run_prepare_zero.sh b/packages/synthetic-chain/public/upgrade-test-scripts/run_prepare_zero.sh index 72403797..8a52b913 100755 --- a/packages/synthetic-chain/public/upgrade-test-scripts/run_prepare_zero.sh +++ b/packages/synthetic-chain/public/upgrade-test-scripts/run_prepare_zero.sh @@ -8,8 +8,7 @@ agd() { ag0 ${1+"$@"} } -export CHAINID=agoriclocal -agd init localnet --chain-id "$CHAINID" +agd init localnet --chain-id agoriclocal allaccounts=("gov1" "gov2" "gov3" "user1" "validator") for i in "${allaccounts[@]}"; do @@ -72,11 +71,11 @@ else echo "Upgrade info is not valid JSON: $info" exit $status fi -agd tx -bblock gov submit-proposal software-upgrade "$UPGRADE_TO" \ +# shellcheck disable=SC2086 +agd tx gov submit-proposal software-upgrade "$UPGRADE_TO" \ --upgrade-height="$height" --upgrade-info="$info" \ --title="Upgrade to ${UPGRADE_TO}" --description="upgrades" \ - --from=validator --chain-id="$CHAINID" \ - --yes --keyring-backend=test + ${SIGN_BROADCAST_OPTS="--missing-env-setup"} waitForBlock voteLatestProposalAndWait diff --git a/proposals/16:upgrade-8/use.sh b/proposals/16:upgrade-8/use.sh index 984c9785..2516eb48 100755 --- a/proposals/16:upgrade-8/use.sh +++ b/proposals/16:upgrade-8/use.sh @@ -109,8 +109,8 @@ agd query vstorage data published.psm.${PSM_PAIR}.governance # but it parses the vstorage in mainnet v11, not v8 ugh # test_val "$(agd query vstorage data published.psm.${PSM_PAIR}.governance | jq -r ".value|fromjson.values[0]|fromjson.body" | tr "#" " " | jq -r .current.MintLimit.value.value)" "+133337000000" "PSM MintLimit set correctly" +BLD_PRE=$(agd q bank balances "$GOV1ADDR" --output=json --denom ubld | jq -r .amount) test_val "$(agd q bank balances "$GOV1ADDR" --output=json --denom uist | jq -r .amount)" "250000" "pre-swap: validate IST" -test_val "$(agd q bank balances "$GOV1ADDR" --output=json --denom ubld | jq -r .amount)" "190000000" "pre-swap: validate BLD balance" test_val "$(agd q bank balances "$GOV1ADDR" --output=json --denom ${USDC_DENOM} | jq -r .amount)" "100000000" "pre-swap: validate USDC balance" echo DEBUG execute PSM swap @@ -119,8 +119,8 @@ agops psm swap --pair ${PSM_PAIR} --wantMinted 10.00 --feePct 0.10 >|"$SWAP_OFFE agops perf satisfaction --from $GOV1ADDR --executeOffer "$SWAP_OFFER" --keyring-backend=test test_val "$(agd q bank balances "$GOV1ADDR" --output=json --denom uist | jq -r .amount)" "10260011" "post-swap: validate IST" -test_val "$(agd q bank balances "$GOV1ADDR" --output=json --denom ubld | jq -r .amount)" "190000000" "post-swap: validate BLD balance" test_val "$(agd q bank balances "$GOV1ADDR" --output=json --denom ${USDC_DENOM} | jq -r .amount)" "89989989" "post-swap: validate USDC balance" +test_val "$(agd q bank balances "$GOV1ADDR" --output=json --denom ubld | jq -r .amount)" "$BLD_PRE" "post-swap: validate BLD balance" waitForBlock 3