From e0c908688c076ca7a0ee766e90255e906a406b38 Mon Sep 17 00:00:00 2001 From: kienn6034 Date: Wed, 22 May 2024 15:23:29 +0700 Subject: [PATCH] deps: bump to version 08-wasm that do not use gov cli --- app/keepers/keepers.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- scripts/50/migrate-wasm-code.sh | 27 ++++++++++++----------- scripts/50/store-wasm-code.sh | 38 +++++++++++++++++---------------- 5 files changed, 38 insertions(+), 35 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 4d5c1a9b..80ab9db6 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -488,7 +488,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appCodec, runtime.NewKVStoreService(appKeepers.keys[wasm08types.StoreKey]), &appKeepers.IBCKeeper.ClientKeeper, - govModAddress, + authorityAddress, vm, bApp.GRPCQueryRouter(), ) diff --git a/go.mod b/go.mod index 44008aae..9ffc0741 100644 --- a/go.mod +++ b/go.mod @@ -362,7 +362,7 @@ replace ( github.com/cosmos/cosmos-sdk => github.com/notional-labs/cosmos-sdk v0.50.5-patch-validators-trim-tag github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 => github.com/notional-labs/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.0-20240508031447-347412725653 - github.com/cosmos/ibc-go/modules/light-clients/08-wasm => github.com/notional-labs/ibc-go/modules/light-clients/08-wasm v0.0.0-20240520132306-15e6ed1d5f00 + github.com/cosmos/ibc-go/modules/light-clients/08-wasm => github.com/notional-labs/ibc-go/modules/light-clients/08-wasm v0.0.0-20240522081622-85c49c80dc29 //github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 => github.com/notional-labs/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.0-20240504082418-e4d8c9cb7044 github.com/cosmos/ibc-go/v8 => github.com/notional-labs/ibc-go/v8 v8.0.0-alpha.1.0.20240515181700-c058e14324e8 diff --git a/go.sum b/go.sum index 73648774..87bdaa29 100644 --- a/go.sum +++ b/go.sum @@ -1385,8 +1385,8 @@ github.com/notional-labs/cosmos-sdk v0.50.5-patch-validators-trim-tag h1:lnMn2O2 github.com/notional-labs/cosmos-sdk v0.50.5-patch-validators-trim-tag/go.mod h1:oV/k6GJgXV9QPoM2fsYDPPsyPBgQbdotv532O6Mz1OQ= github.com/notional-labs/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.0-20240508031447-347412725653 h1:P7Chh5O10Jtv+vvfaVpG72fv5LKVWQLEtCKQrMtbBdw= github.com/notional-labs/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.0-20240508031447-347412725653/go.mod h1:NS+Ooc0vOyr1mAgAbt/HS8Dpes2dV7/YgOc+WxD63O4= -github.com/notional-labs/ibc-go/modules/light-clients/08-wasm v0.0.0-20240520132306-15e6ed1d5f00 h1:3H//l+PgIoPqLMNq+nbZx9Sebu1LxbSuIBKxwfKcCyU= -github.com/notional-labs/ibc-go/modules/light-clients/08-wasm v0.0.0-20240520132306-15e6ed1d5f00/go.mod h1:u2FXNcSxzzn5IwjWBA51HKMwiYMRK6/G35VmSJULhP0= +github.com/notional-labs/ibc-go/modules/light-clients/08-wasm v0.0.0-20240522081622-85c49c80dc29 h1:h+EVIIwTI9iBtUhgBay5dJs+bUCnTHDOaXT0uujm6Zs= +github.com/notional-labs/ibc-go/modules/light-clients/08-wasm v0.0.0-20240522081622-85c49c80dc29/go.mod h1:u2FXNcSxzzn5IwjWBA51HKMwiYMRK6/G35VmSJULhP0= github.com/notional-labs/ibc-go/v8 v8.0.0-alpha.1.0.20240515181700-c058e14324e8 h1:RkivXDi3NoRZEjdbO0ueSykCnb7FPaBR0F8sWn5DlFM= github.com/notional-labs/ibc-go/v8 v8.0.0-alpha.1.0.20240515181700-c058e14324e8/go.mod h1:x024D7fnWnTL6wNeoHbe0+JSjDaoQ3CNvJY8o9F4imE= github.com/nunnatsa/ginkgolinter v0.9.0 h1:Sm0zX5QfjJzkeCjEp+t6d3Ha0jwvoDjleP9XCsrEzOA= diff --git a/scripts/50/migrate-wasm-code.sh b/scripts/50/migrate-wasm-code.sh index 31d7d698..5fec7112 100755 --- a/scripts/50/migrate-wasm-code.sh +++ b/scripts/50/migrate-wasm-code.sh @@ -17,22 +17,23 @@ RAW_CHECKSUM=$(echo "$HEX_CHECKSUM" | xxd -r -p) BASE64_CHECKSUM=$(echo -n "$RAW_CHECKSUM" | base64) echo "Base 64 check sum is: $BASE64_CHECKSUM" -$BINARY tx ibc-wasm migrate-contract $WASM_CLIENT_ID $HEX_CHECKSUM {} --title "migrate wasm code" --summary "none" --from $KEY --keyring-backend test --chain-id $CHAINID --deposit 10000000000${DENOM} --home $HOME_DIR --gas 20002152622 --fees 20020166${DENOM} -y +$BINARY tx ibc-wasm migrate-contract $WASM_CLIENT_ID $HEX_CHECKSUM {} --from $KEY --keyring-backend test --chain-id $CHAINID --home $HOME_DIR --gas 20002152622 --fees 20020166${DENOM} -y -sleep 6 -# $BINARY query gov proposals -o json > /tmp/proposals.json -PROPOSAL_ID=5 -echo "Proposal ID is: $PROPOSAL_ID" +# exit 0 +# sleep 6 +# # $BINARY query gov proposals -o json > /tmp/proposals.json +# PROPOSAL_ID=5 +# echo "Proposal ID is: $PROPOSAL_ID" -# Validator vote yes -$BINARY tx gov vote $PROPOSAL_ID yes --from $KEY --fees 100000${DENOM} --keyring-backend test --home $HOME_DIR --chain-id $CHAINID -y +# # Validator vote yes +# $BINARY tx gov vote $PROPOSAL_ID yes --from $KEY --fees 100000${DENOM} --keyring-backend test --home $HOME_DIR --chain-id $CHAINID -y -#Voting time is 20s, check in localnode.sh -sleep 20 +# #Voting time is 20s, check in localnode.sh +# sleep 20 -# Check the status -$BINARY query gov proposal $PROPOSAL_ID -o json > /tmp/proposal.json -STATUS=$(jq -r '.proposal.status' /tmp/proposal.json) -echo "Proposal status is: $STATUS" +# # Check the status +# $BINARY query gov proposal $PROPOSAL_ID -o json > /tmp/proposal.json +# STATUS=$(jq -r '.proposal.status' /tmp/proposal.json) +# echo "Proposal status is: $STATUS" diff --git a/scripts/50/store-wasm-code.sh b/scripts/50/store-wasm-code.sh index 69da6db2..5200a01a 100755 --- a/scripts/50/store-wasm-code.sh +++ b/scripts/50/store-wasm-code.sh @@ -8,27 +8,29 @@ WASM_CONTRACT_PATH="$PWD/bin/ics10_grandpa_cw.wasm" # Wait for chain to start echo "Waiting for chain to start..." -sleep 10 -$BINARY tx ibc-wasm store-code $WASM_CONTRACT_PATH --title "store new wasm code" --summary "none" --from $KEY --keyring-backend test --chain-id $CHAINID --home $HOME_DIR --deposit 10000000000${DENOM} --gas 20002152622 --fees 20020166${DENOM} -y +picad keys show mykey --keyring-backend test --home mytestnet -# Fetch proposal id -sleep 6 -# $BINARY query gov proposals -o json > /tmp/proposals.json -# PROPOSAL_ID=$(jq -r '.proposals[-1].id' /tmp/proposals.json) -PROPOSAL_ID=3 ## fix this -echo "Proposal ID is: $PROPOSAL_ID" +$BINARY tx ibc-wasm store-code $WASM_CONTRACT_PATH --from mykey --keyring-backend test --chain-id $CHAINID --home $HOME_DIR --gas 20002152622 --fees 20020166${DENOM} -y -# Validator vote yes -$BINARY tx gov vote $PROPOSAL_ID yes --from $KEY --fees 100000${DENOM} --keyring-backend test --home $HOME_DIR --chain-id $CHAINID -y +# exit 0 +# # Fetch proposal id +# sleep 6 +# # $BINARY query gov proposals -o json > /tmp/proposals.json +# # PROPOSAL_ID=$(jq -r '.proposals[-1].id' /tmp/proposals.json) +# PROPOSAL_ID=3 ## fix this +# echo "Proposal ID is: $PROPOSAL_ID" -#Voting time is 20s, check in localnode.sh -sleep 20 +# # Validator vote yes +# $BINARY tx gov vote $PROPOSAL_ID yes --from $KEY --fees 100000${DENOM} --keyring-backend test --home $HOME_DIR --chain-id $CHAINID -y -# Check the status -$BINARY query gov proposal $PROPOSAL_ID -o json > /tmp/proposal.json -STATUS=$(jq -r '.proposal.status' /tmp/proposal.json) -echo "Proposal status is: $STATUS" +# #Voting time is 20s, check in localnode.sh +# sleep 20 -# Query wasm checksums -$BINARY query ibc-wasm checksums +# # Check the status +# $BINARY query gov proposal $PROPOSAL_ID -o json > /tmp/proposal.json +# STATUS=$(jq -r '.proposal.status' /tmp/proposal.json) +# echo "Proposal status is: $STATUS" + +# # Query wasm checksums +# $BINARY query ibc-wasm checksums