Skip to content

Commit

Permalink
refactor: SIGN_BROADCAST_OPTS in prepare_zero
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Mar 21, 2024
1 parent cc9bfbb commit da2e1ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions proposals/16:upgrade-8/use.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit da2e1ce

Please sign in to comment.