-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve naming inconsistencies and update configurations #11
Changes from all commits
b1f3ccd
9410b57
4e991d2
7b4a90b
ac78665
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -6,16 +6,16 @@ | |||
echo "#################################################" | ||||
echo "" | ||||
|
||||
BINARY=eved | ||||
BINARY=hyperiad | ||||
CHAIN_DIR=$(pwd)/data | ||||
|
||||
AMOUNT_TO_DELEGATE=10000000000 | ||||
UWHALE_DENOM=uwhale | ||||
UHYPE_DENOM=uhype | ||||
VAL_WALLET_1=$($BINARY keys show val1 -a --keyring-backend test --home $CHAIN_DIR/test-1) | ||||
VAL_WALLET_2=$($BINARY keys show val2 -a --keyring-backend test --home $CHAIN_DIR/test-2) | ||||
|
||||
echo "Sending tokens from validator wallet on test-1 to validator wallet on test-2" | ||||
IBC_TRANSFER=$($BINARY tx ibc-transfer transfer transfer channel-0 $VAL_WALLET_2 $AMOUNT_TO_DELEGATE$UWHALE_DENOM --chain-id test-1 --from $VAL_WALLET_1 --home $CHAIN_DIR/test-1 --fees 60000$UWHALE_DENOM --node tcp://localhost:16657 --keyring-backend test -y -o json | jq -r '.raw_log' ) | ||||
IBC_TRANSFER=$($BINARY tx ibc-transfer transfer transfer channel-0 $VAL_WALLET_2 $AMOUNT_TO_DELEGATE$UHYPE_DENOM --chain-id test-1 --from $VAL_WALLET_1 --home $CHAIN_DIR/test-1 --fees 60000$UHYPE_DENOM --node tcp://localhost:16657 --keyring-backend test -y -o json | jq -r '.raw_log' ) | ||||
Check notice Code scanning / devskim Accessing localhost could indicate debug code, or could hinder scaling. Note test
Do not leave debug code in production
|
||||
|
||||
if [[ "$IBC_TRANSFER" == "failed to execute message"* ]]; then | ||||
echo "Error: IBC transfer failed, with error: $IBC_TRANSFER" | ||||
|
@@ -29,7 +29,7 @@ | |||
IBC_QUERY=$($BINARY q bank balances $VAL_WALLET_2 --chain-id test-2 --node tcp://localhost:26657 -o json) | ||||
|
||||
echo $IBC_QUERY | ||||
if [ "$IBC_DENOM" != "$UWHALE_DENOM" ]; then | ||||
if [ "$IBC_DENOM" != "$UHYPE_DENOM" ]; then | ||||
ACCOUNT_BALANCE=$($BINARY q bank balances $VAL_WALLET_2 --chain-id test-2 --node tcp://localhost:26657 -o json | jq -r '.balances[0].amount') | ||||
fi | ||||
sleep 2 | ||||
|
@@ -53,22 +53,22 @@ | |||
} | ||||
], | ||||
"metadata": "", | ||||
"deposit": "25000000000'$UWHALE_DENOM'", | ||||
"deposit": "25000000000'$UHYPE_DENOM'", | ||||
"title": "Create an Alliance!", | ||||
"summary": "Source Code Version https://github.com/terra-money/core" | ||||
}' > $CHAIN_DIR/create-alliance.json | ||||
|
||||
|
||||
echo "Creating an alliance with the denom $IBC_DENOM" | ||||
|
||||
PROPOSAL_HEIGHT=$($BINARY tx gov submit-proposal $CHAIN_DIR/create-alliance.json --from=$VAL_WALLET_2 --home $CHAIN_DIR/test-2 --node tcp://localhost:26657 -o json --keyring-backend test --fees 600000$UWHALE_DENOM --gas 500000 -y -o json | jq -r '.height') | ||||
PROPOSAL_HEIGHT=$($BINARY tx gov submit-proposal $CHAIN_DIR/create-alliance.json --from=$VAL_WALLET_2 --home $CHAIN_DIR/test-2 --node tcp://localhost:26657 -o json --keyring-backend test --fees 600000$UHYPE_DENOM --gas 500000 -y -o json | jq -r '.height') | ||||
Check notice Code scanning / devskim Accessing localhost could indicate debug code, or could hinder scaling. Note test
Do not leave debug code in production
|
||||
sleep 3 | ||||
|
||||
|
||||
PROPOSAL_ID=$($BINARY query gov proposals --home $CHAIN_DIR/test-2 --count-total --node tcp://localhost:26657 -o json --output json --chain-id=test-2 | jq .proposals[-1].id -r) | ||||
|
||||
|
||||
VOTE_RES=$($BINARY tx gov vote $PROPOSAL_ID yes --from=$VAL_WALLET_2 --home $CHAIN_DIR/test-2 --keyring-backend=test --fees 60000$UWHALE_DENOM --chain-id=test-2 --node tcp://localhost:26657 -o json -y) | ||||
VOTE_RES=$($BINARY tx gov vote $PROPOSAL_ID yes --from=$VAL_WALLET_2 --home $CHAIN_DIR/test-2 --keyring-backend=test --fees 60000$UHYPE_DENOM --chain-id=test-2 --node tcp://localhost:26657 -o json -y) | ||||
Check notice Code scanning / devskim Accessing localhost could indicate debug code, or could hinder scaling. Note test
Do not leave debug code in production
|
||||
echo "Vote res: $VOTE_RES" | ||||
|
||||
ALLIANCE="null" | ||||
|
@@ -83,7 +83,7 @@ | |||
|
||||
echo "Delegating $AMOUNT_TO_DELEGATE to the alliance $IBC_DENOM" | ||||
VAL_ADDR=$($BINARY query staking validators --output json | jq .validators[0].operator_address --raw-output) | ||||
DELEGATE_RES=$($BINARY tx alliance delegate $VAL_ADDR $AMOUNT_TO_DELEGATE$IBC_DENOM --from=node0 --from=$VAL_WALLET_2 --home $CHAIN_DIR/test-2 --keyring-backend=test --fees 600000$UWHALE_DENOM --gas 500000 --chain-id=test-2 -o json -y) | ||||
DELEGATE_RES=$($BINARY tx alliance delegate $VAL_ADDR $AMOUNT_TO_DELEGATE$IBC_DENOM --from=node0 --from=$VAL_WALLET_2 --home $CHAIN_DIR/test-2 --keyring-backend=test --fees 600000$UHYPE_DENOM --gas 500000 --chain-id=test-2 -o json -y) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove unused variable. The - DELEGATE_RES=$($BINARY tx alliance delegate $VAL_ADDR $AMOUNT_TO_DELEGATE$IBC_DENOM --from=node0 --from=$VAL_WALLET_2 --home $CHAIN_DIR/test-2 --keyring-backend=test --fees 600000$UHYPE_DENOM --gas 500000 --chain-id=test-2 -o json -y) Committable suggestion
Suggested change
ToolsShellcheck
|
||||
sleep 3 | ||||
DELEGATIONS=$($BINARY query alliance delegation $VAL_WALLET_2 $VAL_ADDR $IBC_DENOM --chain-id test-2 --node tcp://localhost:26657 -o json | jq -r '.delegation.balance.amount') | ||||
if [[ "$DELEGATIONS" == "0" ]]; then | ||||
|
@@ -92,13 +92,13 @@ | |||
fi | ||||
|
||||
echo "Query bank balance after alliance creation" | ||||
TOTAL_SUPPLY_BEFORE_ALLIANCE=$($BINARY query bank total --denom $UWHALE_DENOM --height $PROPOSAL_HEIGHT -o json | jq -r '.amount') | ||||
TOTAL_SUPPLY_AFTER_ALLIANCE=$($BINARY query bank total --denom $UWHALE_DENOM -o json | jq -r '.amount') | ||||
TOTAL_SUPPLY_BEFORE_ALLIANCE=$($BINARY query bank total --denom $UHYPE_DENOM --height $PROPOSAL_HEIGHT -o json | jq -r '.amount') | ||||
TOTAL_SUPPLY_AFTER_ALLIANCE=$($BINARY query bank total --denom $UHYPE_DENOM -o json | jq -r '.amount') | ||||
TOTAL_SUPPLY_INCREMENT=$(($TOTAL_SUPPLY_BEFORE_ALLIANCE - $TOTAL_SUPPLY_AFTER_ALLIANCE)) | ||||
|
||||
|
||||
if [ "$TOTAL_SUPPLY_INCREMENT" -gt 100000 ] && [ "$TOTAL_SUPPLY_INCREMENT" -lt 1000000 ]; then | ||||
echo "Error: Something went wrong, total supply of $UWHALE_DENOM has increased out of range 100_000 between 1_000_000. current value $TOTAL_SUPPLY_INCREMENT" | ||||
echo "Error: Something went wrong, total supply of $UHYPE_DENOM has increased out of range 100_000 between 1_000_000. current value $TOTAL_SUPPLY_INCREMENT" | ||||
exit 1 | ||||
fi | ||||
|
||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
VERSION="v0.16.0" | ||
VERSION="v2.0.0" | ||
CONTRACTS="cw20_base" | ||
|
||
for CONTRACT in $CONTRACTS; do | ||
|
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note