diff --git a/scripts/localnode.sh b/scripts/localnode.sh index b9ff6767..05eb3bfd 100755 --- a/scripts/localnode.sh +++ b/scripts/localnode.sh @@ -2,7 +2,7 @@ KEY="mykey" KEY1="mykey1" -CHAINID="centauri-dev" +CHAINID="localpica" MONIKER="localtestnet" KEYALGO="secp256k1" KEYRING="test" @@ -15,6 +15,10 @@ TRACE="" HOME_DIR=mytestnet DENOM=ppica +KEY00="test0" +KEY11="test1" +KEY22="test2" + if [ "$CONTINUE" == "true" ]; then echo "\n ->> continuing from previous state" @@ -31,6 +35,10 @@ rm -rf $HOME_DIR # if $KEY exists it should be deleted echo "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry" | $BINARY keys add $KEY --keyring-backend $KEYRING --algo $KEYALGO --recover --home $HOME_DIR echo "bottom loan skill merry east cradle onion journey palm apology verb edit desert impose absurd oil bubble sweet glove shallow size build burst effort" | $BINARY keys add $KEY1 --keyring-backend $KEYRING --algo $KEYALGO --recover --home $HOME_DIR + +$BINARY keys add $KEY00 --keyring-backend $KEYRING --home $HOME_DIR +$BINARY keys add $KEY11 --keyring-backend $KEYRING --home $HOME_DIR +$BINARY keys add $KEY22 --keyring-backend $KEYRING --home $HOME_DIR $BINARY init $CHAINID --chain-id $CHAINID --default-denom "ppica" --home $HOME_DIR update_test_genesis () { @@ -41,6 +49,10 @@ update_test_genesis () { # Allocate genesis accounts (cosmos formatted addresses) $BINARY add-genesis-account $KEY 100000000000000000000000000ppica --keyring-backend $KEYRING --home $HOME_DIR $BINARY add-genesis-account $KEY1 100000000000000000000000000ppica --keyring-backend $KEYRING --home $HOME_DIR +$BINARY add-genesis-account $KEY00 "1000000000000000000000${DENOM}" --keyring-backend $KEYRING --home $HOME_DIR +$BINARY add-genesis-account $KEY11 "1000000000000000000000${DENOM}" --keyring-backend $KEYRING --home $HOME_DIR +$BINARY add-genesis-account $KEY22 "1000000000000000000000${DENOM}" --keyring-backend $KEYRING --home $HOME_DIR + # Sign genesis transaction $BINARY gentx $KEY 10030009994127689ppica --keyring-backend $KEYRING --chain-id $CHAINID --home $HOME_DIR @@ -67,4 +79,4 @@ sed -i'' -e 's/max_tx_bytes = 1048576/max_tx_bytes = 10000000/g' $HOME_DIR/confi sed -i'' -e 's/timeout_commit = "5s"/timeout_commit = "1s"/' $HOME_DIR/config/config.toml -$BINARY start --rpc.unsafe --rpc.laddr tcp://0.0.0.0:26657 --pruning=nothing --minimum-gas-prices=0.001ppica --home=$HOME_DIR --log_level trace --trace --with-tendermint=true --transport=socket --grpc.enable=true --grpc-web.enable=false --api.enable=true --p2p.pex=false --p2p.upnp=false \ No newline at end of file +$BINARY start --rpc.unsafe --rpc.laddr tcp://0.0.0.0:26657 --pruning=nothing --minimum-gas-prices=0.000ppica --home=$HOME_DIR --log_level trace --trace --with-tendermint=true --transport=socket --grpc.enable=true --grpc-web.enable=false --api.enable=true --p2p.pex=false --p2p.upnp=false \ No newline at end of file diff --git a/scripts/run-node.sh b/scripts/run-node.sh index c544a639..f1108ed6 100755 --- a/scripts/run-node.sh +++ b/scripts/run-node.sh @@ -14,7 +14,7 @@ rm -rf mytestnet pkill centaurid # check DENOM is set. If not, set to upica -DENOM=${2:-upica} +DENOM=${2:-ppica} COMMISSION_RATE=0.01 COMMISSION_MAX_RATE=0.02 @@ -71,7 +71,7 @@ update_test_genesis '.app_state["staking"]["params"]["bond_denom"]="'$DENOM'"' $SED_BINARY -i '0,/enable = false/s//enable = true/' $HOME_DIR/config/app.toml $SED_BINARY -i 's/swagger = false/swagger = true/' $HOME_DIR/config/app.toml $SED_BINARY -i -e 's/enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' $HOME_DIR/config/app.toml -$SED_BINARY -i 's/minimum-gas-prices = "0.25upica"/minimum-gas-prices = "0.0upica"/' $HOME_DIR/config/app.toml +$SED_BINARY -i 's/minimum-gas-prices = "0.25ppica"/minimum-gas-prices = "0.0ppica"/' $HOME_DIR/config/app.toml # Sign genesis transaction diff --git a/scripts/test-upgrade.sh b/scripts/test-upgrade.sh index 826c4fb5..fdab04f0 100755 --- a/scripts/test-upgrade.sh +++ b/scripts/test-upgrade.sh @@ -3,11 +3,11 @@ # the upgrade is a fork, "true" otherwise FORK=${FORK:-"false"} -OLD_VERSION=v6.5.4 +OLD_VERSION=v6.5.41 UPGRADE_WAIT=${UPGRADE_WAIT:-20} HOME=mytestnet ROOT=$(pwd) -DENOM=upica +DENOM=ppica CHAIN_ID=localpica SOFTWARE_UPGRADE_NAME="v6_6_0" ADDITIONAL_PRE_SCRIPTS="./scripts/upgrade/v_6_4_8/pre-script.sh" @@ -106,7 +106,7 @@ run_upgrade () { }') - ./_build/old/centaurid tx gov submit-legacy-proposal software-upgrade "$SOFTWARE_UPGRADE_NAME" --upgrade-height $UPGRADE_HEIGHT --upgrade-info "$UPGRADE_INFO" --title "upgrade" --description "upgrade" --from test1 --keyring-backend test --chain-id $CHAIN_ID --home $HOME -y > /dev/null + ./_build/old/centaurid tx gov submit-legacy-proposal software-upgrade "$SOFTWARE_UPGRADE_NAME" --upgrade-height $UPGRADE_HEIGHT --upgrade-info "$UPGRADE_INFO" --title "upgrade" --description "upgrade" --from test1 --keyring-backend test --chain-id $CHAIN_ID --home $HOME -y sleep $SLEEP_TIME @@ -114,11 +114,11 @@ run_upgrade () { sleep $SLEEP_TIME - ./_build/old/centaurid tx gov vote 1 yes --from test0 --keyring-backend test --chain-id $CHAIN_ID --home $HOME -y > /dev/null + ./_build/old/centaurid tx gov vote 1 yes --from mykey --keyring-backend test --chain-id $CHAIN_ID --home $HOME -y sleep $SLEEP_TIME - ./_build/old/centaurid tx gov vote 1 yes --from test1 --keyring-backend test --chain-id $CHAIN_ID --home $HOME -y > /dev/null + ./_build/old/centaurid tx gov vote 1 yes --from test1 --keyring-backend test --chain-id $CHAIN_ID --home $HOME -y sleep $SLEEP_TIME diff --git a/scripts/upgrade/v_6_4_8/post-script.sh b/scripts/upgrade/v_6_4_8/post-script.sh index 1846344f..266c6f6e 100644 --- a/scripts/upgrade/v_6_4_8/post-script.sh +++ b/scripts/upgrade/v_6_4_8/post-script.sh @@ -1,7 +1,7 @@ echo -e "\n ********** Running Post-Scripts **********" BINARY=$1 -DENOM=${2:-upica} +DENOM=${2:-ppica} CHAIN_DIR=$(pwd)/mytestnet KEY="test0" diff --git a/scripts/upgrade/v_6_4_8/pre-script.sh b/scripts/upgrade/v_6_4_8/pre-script.sh index 75eec84f..1ba1e916 100644 --- a/scripts/upgrade/v_6_4_8/pre-script.sh +++ b/scripts/upgrade/v_6_4_8/pre-script.sh @@ -1,7 +1,7 @@ echo -e "\n ********** Running Pre-Scripts **********" BINARY=$1 -DENOM=${2:-upica} +DENOM=${2:-ppica} CHAIN_DIR=$(pwd)/mytestnet KEY="test0" @@ -24,7 +24,9 @@ echo "wallet 1: $WALLET_1 - balance: $BALANCE_1" ############ Settingup WASM environment ############ ### Create a counter contract, then increment the counter to 1 #### -## Deploy the counter contract +## Deploy the counter contract +TX_RESULT=$($BINARY tx wasm store $COUNTER_CONTRACT_DIR --from $KEY1 $DEFAULT_ENV_FLAG $DEFAULT_GAS_FLAG -y -o json) +echo $TX_RESULT TX_HASH=$($BINARY tx wasm store $COUNTER_CONTRACT_DIR --from $KEY1 $DEFAULT_ENV_FLAG $DEFAULT_GAS_FLAG -y -o json | jq -r '.txhash') ## Get CODE ID