From 09413ef3f1b599d9afd81f828e0e0e4d9f105f39 Mon Sep 17 00:00:00 2001 From: Matthew Witkowski <mwitkowski@figure.com> Date: Tue, 20 Dec 2022 11:19:26 -0500 Subject: [PATCH 1/8] Updated dependencies to ibc-go v6.1 and sdk46.7 --- app/app.go | 30 +++++------ app/sim_test.go | 2 +- app/upgrades.go | 8 +-- app/upgrades_test.go | 2 +- client/docs/swagger-ui/swagger.yaml | 3 ++ go.mod | 30 +++++------ go.sum | 51 ++++++++++--------- proto/provenance/marker/v1/tx.proto | 2 +- scripts/proto-update-deps.sh | 2 +- .../cosmos/base/store/v1beta1/listening.proto | 18 +++++++ .../proto/ibc/applications/fee/v1/ack.proto | 2 +- .../proto/ibc/applications/fee/v1/fee.proto | 2 +- .../ibc/applications/fee/v1/genesis.proto | 2 +- .../ibc/applications/fee/v1/metadata.proto | 2 +- .../proto/ibc/applications/fee/v1/query.proto | 2 +- .../proto/ibc/applications/fee/v1/tx.proto | 2 +- .../controller/v1/controller.proto | 2 +- .../controller/v1/query.proto | 2 +- .../controller/v1/tx.proto | 50 ++++++++++++++++++ .../{ => genesis}/v1/genesis.proto | 14 ++--- .../interchain_accounts/host/v1/host.proto | 2 +- .../interchain_accounts/host/v1/query.proto | 2 +- .../interchain_accounts/v1/account.proto | 2 +- .../interchain_accounts/v1/metadata.proto | 2 +- .../interchain_accounts/v1/packet.proto | 2 +- .../applications/transfer/v1/genesis.proto | 2 +- .../ibc/applications/transfer/v1/query.proto | 2 +- .../applications/transfer/v1/transfer.proto | 2 +- .../ibc/applications/transfer/v1/tx.proto | 9 +++- .../ibc/applications/transfer/v2/packet.proto | 4 +- .../proto/ibc/core/channel/v1/channel.proto | 2 +- .../proto/ibc/core/channel/v1/genesis.proto | 2 +- .../proto/ibc/core/channel/v1/query.proto | 2 +- .../proto/ibc/core/channel/v1/tx.proto | 2 +- .../proto/ibc/core/client/v1/client.proto | 2 +- .../proto/ibc/core/client/v1/genesis.proto | 2 +- .../proto/ibc/core/client/v1/query.proto | 6 +-- third_party/proto/ibc/core/client/v1/tx.proto | 2 +- .../ibc/core/commitment/v1/commitment.proto | 2 +- .../ibc/core/connection/v1/connection.proto | 2 +- .../ibc/core/connection/v1/genesis.proto | 2 +- .../proto/ibc/core/connection/v1/query.proto | 16 +++++- .../proto/ibc/core/connection/v1/tx.proto | 2 +- .../proto/ibc/core/types/v1/genesis.proto | 2 +- .../lightclients/localhost/v1/localhost.proto | 2 +- .../solomachine/v1/solomachine.proto | 2 +- .../solomachine/v2/solomachine.proto | 2 +- .../tendermint/v1/tendermint.proto | 2 +- x/marker/client/cli/tx.go | 4 +- x/marker/keeper/keeper.go | 2 +- x/marker/keeper/marker.go | 4 +- x/marker/keeper/msg_server.go | 4 +- x/marker/types/msg.go | 4 +- x/marker/types/msg_test.go | 2 +- x/marker/types/tx.pb.go | 10 ++-- 55 files changed, 217 insertions(+), 124 deletions(-) create mode 100644 third_party/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto rename third_party/proto/ibc/applications/interchain_accounts/{ => genesis}/v1/genesis.proto (78%) diff --git a/app/app.go b/app/app.go index f9fe1cddd..4f9cff4b7 100644 --- a/app/app.go +++ b/app/app.go @@ -91,23 +91,23 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" // ICA - ica "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts" - icahost "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + ica "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts" + icahost "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types" // IBC - "github.com/cosmos/ibc-go/v5/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v5/modules/core" - ibcclient "github.com/cosmos/ibc-go/v5/modules/core/02-client" - ibcclientclient "github.com/cosmos/ibc-go/v5/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper" + "github.com/cosmos/ibc-go/v6/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v6/modules/core" + ibcclient "github.com/cosmos/ibc-go/v6/modules/core/02-client" + ibcclientclient "github.com/cosmos/ibc-go/v6/modules/core/02-client/client" + ibcclienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types" + ibchost "github.com/cosmos/ibc-go/v6/modules/core/24-host" + ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper" // PROVENANCE appparams "github.com/provenance-io/provenance/app/params" diff --git a/app/sim_test.go b/app/sim_test.go index 9cfd7d732..3eabf655a 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -41,7 +41,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/simulation" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types" cmdconfig "github.com/provenance-io/provenance/cmd/provenanced/config" "github.com/provenance-io/provenance/internal/pioconfig" diff --git a/app/upgrades.go b/app/upgrades.go index 3ba626cc2..328d494e2 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -11,10 +11,10 @@ import ( "github.com/cosmos/cosmos-sdk/x/group" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ica "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts" - icacontrollertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + ica "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts" + icacontrollertypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types" + icahosttypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types" rewardtypes "github.com/provenance-io/provenance/x/reward/types" ) diff --git a/app/upgrades_test.go b/app/upgrades_test.go index 9ea2e61af..94b14fe67 100644 --- a/app/upgrades_test.go +++ b/app/upgrades_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 5f1c86f02..541e16737 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -67027,6 +67027,9 @@ definitions: description: |- Timeout timestamp in absolute nanoseconds since unix epoch. The timeout is disabled when set to 0. + memo: + type: string + title: optional memo title: >- MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between diff --git a/go.mod b/go.mod index cbe42828b..8ea797bd8 100644 --- a/go.mod +++ b/go.mod @@ -9,9 +9,9 @@ require ( github.com/armon/go-metrics v0.4.1 github.com/btcsuite/btcd v0.22.3 github.com/cosmos/cosmos-proto v1.0.0-alpha8 - github.com/cosmos/cosmos-sdk v0.46.4 + github.com/cosmos/cosmos-sdk v0.46.7 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/ibc-go/v5 v5.0.0 + github.com/cosmos/ibc-go/v6 v6.1.0 github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.2 github.com/google/uuid v1.3.0 @@ -27,7 +27,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.14.0 github.com/stretchr/testify v1.8.1 - github.com/tendermint/tendermint v0.34.23 + github.com/tendermint/tendermint v0.34.24 github.com/tendermint/tm-db v0.6.7 golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e golang.org/x/text v0.5.0 @@ -59,13 +59,13 @@ require ( github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect - github.com/confio/ics23/go v0.7.0 // indirect - github.com/cosmos/btcutil v1.0.4 // indirect + github.com/confio/ics23/go v0.9.0 // indirect + github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/gogoproto v1.4.2 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect github.com/cosmos/iavl v0.19.4 // indirect - github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect - github.com/cosmos/ledger-go v0.9.2 // indirect + github.com/cosmos/ibc-go/v5 v5.0.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -145,14 +145,15 @@ require ( github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/ulikunitz/xz v0.5.8 // indirect - github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect + github.com/zondax/hid v0.9.1 // indirect + github.com/zondax/ledger-go v0.14.0 // indirect go.etcd.io/bbolt v1.3.6 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/crypto v0.1.0 // indirect - golang.org/x/net v0.1.0 // indirect + golang.org/x/crypto v0.2.0 // indirect + golang.org/x/net v0.2.0 // indirect golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect - golang.org/x/sys v0.1.0 // indirect - golang.org/x/term v0.1.0 // indirect + golang.org/x/sys v0.2.0 // indirect + golang.org/x/term v0.2.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.102.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -164,7 +165,7 @@ require ( replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 -replace github.com/cosmos/cosmos-sdk => github.com/provenance-io/cosmos-sdk v0.46.6-pio-1 +replace github.com/cosmos/cosmos-sdk => github.com/provenance-io/cosmos-sdk v0.46.7-pio-1 // Part of dragonberry fix. // TODO: Remove (and bump ics23 above) once github.com/confio/ics23/go releases a fixed version. @@ -181,6 +182,3 @@ replace github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 // TODO: Required for v1.13.x: Remove this and update the require line above to have the new version once it's out. https://github.com/provenance-io/provenance/issues/1015 replace github.com/CosmWasm/wasmd => github.com/provenance-io/wasmd v0.29.0-pio-1 - -// TODO: Required for IBC Transfer Module. Remove this when they patch it to include our changes. https://github.com/provenance-io/provenance/issues/1100 -replace github.com/cosmos/ibc-go/v5 => github.com/provenance-io/ibc-go/v5 v5.0.0-pio-2 diff --git a/go.sum b/go.sum index 9f167f7f2..b4c31220a 100644 --- a/go.sum +++ b/go.sum @@ -154,7 +154,6 @@ github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= @@ -162,11 +161,11 @@ github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/i github.com/btcsuite/btcd v0.22.3 h1:kYNaWFvOw6xvqP0vR20RP1Zq1DVMBxEO8QN5d1/EfNg= github.com/btcsuite/btcd v0.22.3/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= @@ -233,8 +232,8 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= -github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= +github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= +github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-alpha8 h1:d3pCRuMYYvGA5bM0ZbbjKn+AoQD4A7dyNG2wzwWalUw= github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 h1:iKclrn3YEOwk4jQHT2ulgzuXyxmzmPczUalMwW4XH9k= @@ -248,13 +247,15 @@ github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4 github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok= github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= +github.com/cosmos/ibc-go/v5 v5.0.0 h1:MkObdarpoICPHXoRg/Ne9NRix4j7eQlJZq74/uzH3Zc= +github.com/cosmos/ibc-go/v5 v5.0.0/go.mod h1:Wqsguq98Iuns8tgTv8+xaGYbC+Q8zJfbpjzT6IgMJbs= +github.com/cosmos/ibc-go/v6 v6.1.0 h1:o7oXws2vKkKfOFzJI+oNylRn44PCNt5wzHd/zKQKbvQ= +github.com/cosmos/ibc-go/v6 v6.1.0/go.mod h1:CY3zh2HLfetRiW8LY6kVHMATe90Wj/UOoY8T6cuB0is= github.com/cosmos/interchain-accounts v0.3.2 h1:7S5rSndahpjkzUvG00kKZrTZsEuVHuVC9a7p0qDVcF8= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8= -github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= -github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= -github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= -github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= +github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= +github.com/cosmos/ledger-cosmos-go v0.12.1/go.mod h1:dhO6kj+Y+AHIOgAe4L9HL/6NDdyyth4q238I9yFpD2g= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -273,6 +274,7 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= @@ -871,10 +873,8 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/provenance-io/cosmos-sdk v0.46.6-pio-1 h1:R8JnSdRH6sWx5HJAH7HXilKdy3tuxq7cDTtABr1yZHw= -github.com/provenance-io/cosmos-sdk v0.46.6-pio-1/go.mod h1:vhrWBQ1bSSyuGfbS6BD1H4lJbnZwBcDbQhBQTmZxiSs= -github.com/provenance-io/ibc-go/v5 v5.0.0-pio-2 h1:c8JQupz4x+TyI6iYfJS/UCP8Kfl03PkV65Ivpg8OdE8= -github.com/provenance-io/ibc-go/v5 v5.0.0-pio-2/go.mod h1:Wqsguq98Iuns8tgTv8+xaGYbC+Q8zJfbpjzT6IgMJbs= +github.com/provenance-io/cosmos-sdk v0.46.7-pio-1 h1:FMeycDNAaRNXKVJuvzkmuzHJHUCqlCdfzx34hPKpPSo= +github.com/provenance-io/cosmos-sdk v0.46.7-pio-1/go.mod h1:uxCT2FsYd0v3xFY1DLnASsKftIGahc0kKZq5Sn2hRd0= github.com/provenance-io/wasmd v0.29.0-pio-1 h1:vH7tyRf+SjZl/jHBnmcXaXtWpGenfDa6in2yKdREnEs= github.com/provenance-io/wasmd v0.29.0-pio-1/go.mod h1:7GcVWVZIP2hmXuDJEFkofF3P1Ax48foYmknQvl0H8dU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= @@ -975,8 +975,8 @@ github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RM github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/tendermint v0.34.23 h1:JZYsdc59aOiT5efou+BHILJv8x6FlRyvlor84Xq9Tb0= -github.com/tendermint/tendermint v0.34.23/go.mod h1:rXVrl4OYzmIa1I91av3iLv2HS0fGSiucyW9J4aMTpKI= +github.com/tendermint/tendermint v0.34.24 h1:879MKKJWYYPJEMMKME+DWUTY4V9f/FBpnZDI82ky+4k= +github.com/tendermint/tendermint v0.34.24/go.mod h1:rXVrl4OYzmIa1I91av3iLv2HS0fGSiucyW9J4aMTpKI= github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -1018,9 +1018,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 h1:O9XLFXGkVswDFmH9LaYpqu+r/AAFWqr0DL6V00KEVFg= -github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= +github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.0 h1:dlMC7aO8Wss1CxBq2I96kZ69Nh1ligzbs8UWOtq/AsA= +github.com/zondax/ledger-go v0.14.0/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= @@ -1067,8 +1068,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.2.0 h1:BRXPfhNivWL5Yq0BGQ39a2sW6t44aODpfxkWjYdzewE= +golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1174,8 +1175,8 @@ golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1316,13 +1317,13 @@ golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0 h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/proto/provenance/marker/v1/tx.proto b/proto/provenance/marker/v1/tx.proto index a5764ba62..96db8b40a 100644 --- a/proto/provenance/marker/v1/tx.proto +++ b/proto/provenance/marker/v1/tx.proto @@ -177,7 +177,7 @@ message MsgTransferResponse {} message MsgIbcTransferRequest { ibc.applications.transfer.v1.MsgTransfer transfer = 1 [ (gogoproto.nullable) = false, - (gogoproto.customtype) = "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types.MsgTransfer" + (gogoproto.customtype) = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types.MsgTransfer" ]; string administrator = 2; } diff --git a/scripts/proto-update-deps.sh b/scripts/proto-update-deps.sh index fbb8b97e5..a85b8b29a 100755 --- a/scripts/proto-update-deps.sh +++ b/scripts/proto-update-deps.sh @@ -28,7 +28,7 @@ COSMOS_PROTO_URL="raw.githubusercontent.com/cosmos/cosmos-proto/$( go list -m gi COSMWASM_V1BETA1_TARBALL_URL='github.com/CosmWasm/wasmd/tarball/v0.17.0' # Backwards compatibility. Needed to serialize/deserialize older wasmd protos. COSMWASM_CUR_TARBALL_URL="$( go list -m github.com/CosmWasm/wasmd | sed 's:.* => ::; s: :/tarball/:;' )" IBC_PORT_V1_QUERY_URL='https://raw.githubusercontent.com/cosmos/ibc-go/v2.3.1/proto/ibc/core/port/v1/query.proto' # Backwards compatibility. -IBC_GO_TARBALL_URL="$( go list -m github.com/cosmos/ibc-go/v5 | sed 's:.* => ::; s: :/tarball/:; s:/v5::;')" +IBC_GO_TARBALL_URL="$( go list -m github.com/cosmos/ibc-go/v6 | sed 's:.* => ::; s: :/tarball/:; s:/v6::;')" COSMOS_TARBALL_URL="$( go list -m github.com/cosmos/cosmos-sdk | sed 's:.* => ::; s: :/tarball/:;' )" TM_TARBALL_URL="$( go list -m github.com/tendermint/tendermint | sed 's:.* => ::; s: :/tarball/:;' )" diff --git a/third_party/proto/cosmos/base/store/v1beta1/listening.proto b/third_party/proto/cosmos/base/store/v1beta1/listening.proto index 359997109..753f7c165 100644 --- a/third_party/proto/cosmos/base/store/v1beta1/listening.proto +++ b/third_party/proto/cosmos/base/store/v1beta1/listening.proto @@ -1,6 +1,8 @@ syntax = "proto3"; package cosmos.base.store.v1beta1; +import "tendermint/abci/types.proto"; + option go_package = "github.com/cosmos/cosmos-sdk/store/types"; // StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) @@ -14,3 +16,19 @@ message StoreKVPair { bytes key = 3; bytes value = 4; } + +// BlockMetadata contains all the abci event data of a block +// the file streamer dump them into files together with the state changes. +message BlockMetadata { + // DeliverTx encapulate deliver tx request and response. + message DeliverTx { + tendermint.abci.RequestDeliverTx request = 1; + tendermint.abci.ResponseDeliverTx response = 2; + } + tendermint.abci.RequestBeginBlock request_begin_block = 1; + tendermint.abci.ResponseBeginBlock response_begin_block = 2; + repeated DeliverTx deliver_txs = 3; + tendermint.abci.RequestEndBlock request_end_block = 4; + tendermint.abci.ResponseEndBlock response_end_block = 5; + tendermint.abci.ResponseCommit response_commit = 6; +} diff --git a/third_party/proto/ibc/applications/fee/v1/ack.proto b/third_party/proto/ibc/applications/fee/v1/ack.proto index 6c3ee3189..be0d74a40 100644 --- a/third_party/proto/ibc/applications/fee/v1/ack.proto +++ b/third_party/proto/ibc/applications/fee/v1/ack.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.fee.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/fee/v1/fee.proto b/third_party/proto/ibc/applications/fee/v1/fee.proto index e39d1e7b7..b38ae9d6e 100644 --- a/third_party/proto/ibc/applications/fee/v1/fee.proto +++ b/third_party/proto/ibc/applications/fee/v1/fee.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.fee.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/fee/v1/genesis.proto b/third_party/proto/ibc/applications/fee/v1/genesis.proto index 463b35cf4..8f52be195 100644 --- a/third_party/proto/ibc/applications/fee/v1/genesis.proto +++ b/third_party/proto/ibc/applications/fee/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.fee.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; import "gogoproto/gogo.proto"; import "ibc/applications/fee/v1/fee.proto"; diff --git a/third_party/proto/ibc/applications/fee/v1/metadata.proto b/third_party/proto/ibc/applications/fee/v1/metadata.proto index ba47374fd..3afdba164 100644 --- a/third_party/proto/ibc/applications/fee/v1/metadata.proto +++ b/third_party/proto/ibc/applications/fee/v1/metadata.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.fee.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/fee/v1/query.proto b/third_party/proto/ibc/applications/fee/v1/query.proto index 8c3a9fdc0..3153051c8 100644 --- a/third_party/proto/ibc/applications/fee/v1/query.proto +++ b/third_party/proto/ibc/applications/fee/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.fee.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; diff --git a/third_party/proto/ibc/applications/fee/v1/tx.proto b/third_party/proto/ibc/applications/fee/v1/tx.proto index f2d69d231..b099b5eed 100644 --- a/third_party/proto/ibc/applications/fee/v1/tx.proto +++ b/third_party/proto/ibc/applications/fee/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.fee.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; import "gogoproto/gogo.proto"; import "ibc/applications/fee/v1/fee.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto b/third_party/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto index 99f007e08..072d2617c 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.controller.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/controller/v1/query.proto b/third_party/proto/ibc/applications/interchain_accounts/controller/v1/query.proto index 4bc7ffe4d..db7e888bf 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/controller/v1/query.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/controller/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.controller.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types"; import "ibc/applications/interchain_accounts/controller/v1/controller.proto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto b/third_party/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto new file mode 100644 index 000000000..31de5e7e8 --- /dev/null +++ b/third_party/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; + +package ibc.applications.interchain_accounts.controller.v1; + +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types"; + +import "gogoproto/gogo.proto"; +import "ibc/applications/interchain_accounts/v1/packet.proto"; + +// Msg defines the 27-interchain-accounts/controller Msg service. +service Msg { + // RegisterInterchainAccount defines a rpc handler for MsgRegisterInterchainAccount. + rpc RegisterInterchainAccount(MsgRegisterInterchainAccount) returns (MsgRegisterInterchainAccountResponse); + // SendTx defines a rpc handler for MsgSendTx. + rpc SendTx(MsgSendTx) returns (MsgSendTxResponse); +} + +// MsgRegisterInterchainAccount defines the payload for Msg/MsgRegisterInterchainAccount +message MsgRegisterInterchainAccount { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string owner = 1; + string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + string version = 3; +} + +// MsgRegisterInterchainAccountResponse defines the response for Msg/MsgRegisterInterchainAccountResponse +message MsgRegisterInterchainAccountResponse { + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; +} + +// MsgSendTx defines the payload for Msg/SendTx +message MsgSendTx { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string owner = 1; + string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + ibc.applications.interchain_accounts.v1.InterchainAccountPacketData packet_data = 3 + [(gogoproto.moretags) = "yaml:\"packet_data\"", (gogoproto.nullable) = false]; + // Relative timeout timestamp provided will be added to the current block time during transaction execution. + // The timeout timestamp must be non-zero. + uint64 relative_timeout = 4 [(gogoproto.moretags) = "yaml:\"relative_timeout\""]; +} + +// MsgSendTxResponse defines the response for MsgSendTx +message MsgSendTxResponse { + uint64 sequence = 1; +} diff --git a/third_party/proto/ibc/applications/interchain_accounts/v1/genesis.proto b/third_party/proto/ibc/applications/interchain_accounts/genesis/v1/genesis.proto similarity index 78% rename from third_party/proto/ibc/applications/interchain_accounts/v1/genesis.proto rename to third_party/proto/ibc/applications/interchain_accounts/genesis/v1/genesis.proto index 068700319..c52bab732 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/v1/genesis.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/genesis/v1/genesis.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package ibc.applications.interchain_accounts.v1; +package ibc.applications.interchain_accounts.genesis.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/genesis/types"; import "gogoproto/gogo.proto"; import "ibc/applications/interchain_accounts/controller/v1/controller.proto"; @@ -36,11 +36,13 @@ message HostGenesisState { ibc.applications.interchain_accounts.host.v1.Params params = 4 [(gogoproto.nullable) = false]; } -// ActiveChannel contains a connection ID, port ID and associated active channel ID +// ActiveChannel contains a connection ID, port ID and associated active channel ID, as well as a boolean flag to +// indicate if the channel is middleware enabled message ActiveChannel { - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - string port_id = 2 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 3 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + string port_id = 2 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 3 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + bool is_middleware_enabled = 4 [(gogoproto.moretags) = "yaml:\"is_middleware_enabled\""]; } // RegisteredInterchainAccount contains a connection ID, port ID and associated interchain account address diff --git a/third_party/proto/ibc/applications/interchain_accounts/host/v1/host.proto b/third_party/proto/ibc/applications/interchain_accounts/host/v1/host.proto index 3e0316680..e5baae5d6 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/host/v1/host.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/host/v1/host.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.host.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/host/v1/query.proto b/third_party/proto/ibc/applications/interchain_accounts/host/v1/query.proto index 8e3c22cf6..4b7739173 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/host/v1/query.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/host/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.host.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types"; import "google/api/annotations.proto"; import "ibc/applications/interchain_accounts/host/v1/host.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/v1/account.proto b/third_party/proto/ibc/applications/interchain_accounts/v1/account.proto index ae98b9cfa..56ea941e7 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/v1/account.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/v1/account.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/v1/metadata.proto b/third_party/proto/ibc/applications/interchain_accounts/v1/metadata.proto index fc8722289..eba844f95 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/v1/metadata.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/v1/metadata.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/v1/packet.proto b/third_party/proto/ibc/applications/interchain_accounts/v1/packet.proto index f66130f24..ac337fd59 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/v1/packet.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/v1/packet.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"; import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/transfer/v1/genesis.proto b/third_party/proto/ibc/applications/transfer/v1/genesis.proto index e1b653bb7..71d3f383c 100644 --- a/third_party/proto/ibc/applications/transfer/v1/genesis.proto +++ b/third_party/proto/ibc/applications/transfer/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; import "ibc/applications/transfer/v1/transfer.proto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/transfer/v1/query.proto b/third_party/proto/ibc/applications/transfer/v1/query.proto index 5b8778324..cf8896fea 100644 --- a/third_party/proto/ibc/applications/transfer/v1/query.proto +++ b/third_party/proto/ibc/applications/transfer/v1/query.proto @@ -7,7 +7,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/applications/transfer/v1/transfer.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; // Query provides defines the gRPC querier service. service Query { diff --git a/third_party/proto/ibc/applications/transfer/v1/transfer.proto b/third_party/proto/ibc/applications/transfer/v1/transfer.proto index 4c51c2b9e..9c60ad65d 100644 --- a/third_party/proto/ibc/applications/transfer/v1/transfer.proto +++ b/third_party/proto/ibc/applications/transfer/v1/transfer.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/transfer/v1/tx.proto b/third_party/proto/ibc/applications/transfer/v1/tx.proto index 3747f9e5f..7504a905a 100644 --- a/third_party/proto/ibc/applications/transfer/v1/tx.proto +++ b/third_party/proto/ibc/applications/transfer/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; @@ -38,7 +38,12 @@ message MsgTransfer { // Timeout timestamp in absolute nanoseconds since unix epoch. // The timeout is disabled when set to 0. uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; + // optional memo + string memo = 8; } // MsgTransferResponse defines the Msg/Transfer response type. -message MsgTransferResponse {} +message MsgTransferResponse { + // sequence number of the transfer packet sent + uint64 sequence = 1; +} diff --git a/third_party/proto/ibc/applications/transfer/v2/packet.proto b/third_party/proto/ibc/applications/transfer/v2/packet.proto index 386004652..5b3b004c6 100644 --- a/third_party/proto/ibc/applications/transfer/v2/packet.proto +++ b/third_party/proto/ibc/applications/transfer/v2/packet.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.transfer.v2; -option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; // FungibleTokenPacketData defines a struct for the packet payload // See FungibleTokenPacketData spec: @@ -16,4 +16,6 @@ message FungibleTokenPacketData { string sender = 3; // the recipient address on the destination chain string receiver = 4; + // optional memo + string memo = 5; } diff --git a/third_party/proto/ibc/core/channel/v1/channel.proto b/third_party/proto/ibc/core/channel/v1/channel.proto index 27547d629..2d301af2f 100644 --- a/third_party/proto/ibc/core/channel/v1/channel.proto +++ b/third_party/proto/ibc/core/channel/v1/channel.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.channel.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; diff --git a/third_party/proto/ibc/core/channel/v1/genesis.proto b/third_party/proto/ibc/core/channel/v1/genesis.proto index cf106a425..ef0e51482 100644 --- a/third_party/proto/ibc/core/channel/v1/genesis.proto +++ b/third_party/proto/ibc/core/channel/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.channel.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/channel/v1/channel.proto"; diff --git a/third_party/proto/ibc/core/channel/v1/query.proto b/third_party/proto/ibc/core/channel/v1/query.proto index 2165df8c7..f22a3753e 100644 --- a/third_party/proto/ibc/core/channel/v1/query.proto +++ b/third_party/proto/ibc/core/channel/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.channel.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"; import "ibc/core/client/v1/client.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; diff --git a/third_party/proto/ibc/core/channel/v1/tx.proto b/third_party/proto/ibc/core/channel/v1/tx.proto index 4f10ee747..eba65f1eb 100644 --- a/third_party/proto/ibc/core/channel/v1/tx.proto +++ b/third_party/proto/ibc/core/channel/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.channel.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; diff --git a/third_party/proto/ibc/core/client/v1/client.proto b/third_party/proto/ibc/core/client/v1/client.proto index 0c42ce7b0..0f1e6ab2c 100644 --- a/third_party/proto/ibc/core/client/v1/client.proto +++ b/third_party/proto/ibc/core/client/v1/client.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.client.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; diff --git a/third_party/proto/ibc/core/client/v1/genesis.proto b/third_party/proto/ibc/core/client/v1/genesis.proto index da92918df..02bafd813 100644 --- a/third_party/proto/ibc/core/client/v1/genesis.proto +++ b/third_party/proto/ibc/core/client/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.client.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"; import "ibc/core/client/v1/client.proto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/core/client/v1/query.proto b/third_party/proto/ibc/core/client/v1/query.proto index ceb0a6f97..de16d9175 100644 --- a/third_party/proto/ibc/core/client/v1/query.proto +++ b/third_party/proto/ibc/core/client/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.client.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"; import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/core/client/v1/client.proto"; @@ -46,9 +46,9 @@ service Query { option (google.api.http).get = "/ibc/core/client/v1/client_status/{client_id}"; } - // ClientParams queries all parameters of the ibc client. + // ClientParams queries all parameters of the ibc client submodule. rpc ClientParams(QueryClientParamsRequest) returns (QueryClientParamsResponse) { - option (google.api.http).get = "/ibc/client/v1/params"; + option (google.api.http).get = "/ibc/core/client/v1/params"; } // UpgradedClientState queries an Upgraded IBC light client. diff --git a/third_party/proto/ibc/core/client/v1/tx.proto b/third_party/proto/ibc/core/client/v1/tx.proto index 8e716226d..74ad6d9d7 100644 --- a/third_party/proto/ibc/core/client/v1/tx.proto +++ b/third_party/proto/ibc/core/client/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.client.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; diff --git a/third_party/proto/ibc/core/commitment/v1/commitment.proto b/third_party/proto/ibc/core/commitment/v1/commitment.proto index 5667f20de..385266245 100644 --- a/third_party/proto/ibc/core/commitment/v1/commitment.proto +++ b/third_party/proto/ibc/core/commitment/v1/commitment.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.commitment.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/23-commitment/types"; import "gogoproto/gogo.proto"; import "proofs.proto"; diff --git a/third_party/proto/ibc/core/connection/v1/connection.proto b/third_party/proto/ibc/core/connection/v1/connection.proto index 9defdcb8b..8ec7a00a1 100644 --- a/third_party/proto/ibc/core/connection/v1/connection.proto +++ b/third_party/proto/ibc/core/connection/v1/connection.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.connection.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "ibc/core/commitment/v1/commitment.proto"; diff --git a/third_party/proto/ibc/core/connection/v1/genesis.proto b/third_party/proto/ibc/core/connection/v1/genesis.proto index b0860737a..c9d460814 100644 --- a/third_party/proto/ibc/core/connection/v1/genesis.proto +++ b/third_party/proto/ibc/core/connection/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.connection.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "ibc/core/connection/v1/connection.proto"; diff --git a/third_party/proto/ibc/core/connection/v1/query.proto b/third_party/proto/ibc/core/connection/v1/query.proto index 30bae901a..04d7c3ea7 100644 --- a/third_party/proto/ibc/core/connection/v1/query.proto +++ b/third_party/proto/ibc/core/connection/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.connection.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; @@ -41,6 +41,11 @@ service Query { option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}/consensus_state/" "revision/{revision_number}/height/{revision_height}"; } + + // ConnectionParams queries all parameters of the ibc connection submodule. + rpc ConnectionParams(QueryConnectionParamsRequest) returns (QueryConnectionParamsResponse) { + option (google.api.http).get = "/ibc/core/connection/v1/params"; + } } // QueryConnectionRequest is the request type for the Query/Connection RPC @@ -136,3 +141,12 @@ message QueryConnectionConsensusStateResponse { // height at which the proof was retrieved ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; } + +// QueryConnectionParamsRequest is the request type for the Query/ConnectionParams RPC method. +message QueryConnectionParamsRequest {} + +// QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method. +message QueryConnectionParamsResponse { + // params defines the parameters of the module. + Params params = 1; +} \ No newline at end of file diff --git a/third_party/proto/ibc/core/connection/v1/tx.proto b/third_party/proto/ibc/core/connection/v1/tx.proto index b681bce6e..94d676bbc 100644 --- a/third_party/proto/ibc/core/connection/v1/tx.proto +++ b/third_party/proto/ibc/core/connection/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.connection.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; diff --git a/third_party/proto/ibc/core/types/v1/genesis.proto b/third_party/proto/ibc/core/types/v1/genesis.proto index 09deaf618..dd389d412 100644 --- a/third_party/proto/ibc/core/types/v1/genesis.proto +++ b/third_party/proto/ibc/core/types/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.types.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/genesis.proto"; diff --git a/third_party/proto/ibc/lightclients/localhost/v1/localhost.proto b/third_party/proto/ibc/lightclients/localhost/v1/localhost.proto index 909c4ebce..ad0141afb 100644 --- a/third_party/proto/ibc/lightclients/localhost/v1/localhost.proto +++ b/third_party/proto/ibc/lightclients/localhost/v1/localhost.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.localhost.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/light-clients/09-localhost/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/light-clients/09-localhost/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; diff --git a/third_party/proto/ibc/lightclients/solomachine/v1/solomachine.proto b/third_party/proto/ibc/lightclients/solomachine/v1/solomachine.proto index 8be12dab8..46d102bbb 100644 --- a/third_party/proto/ibc/lightclients/solomachine/v1/solomachine.proto +++ b/third_party/proto/ibc/lightclients/solomachine/v1/solomachine.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.solomachine.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/core/02-client/legacy/v100"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/legacy/v100"; import "ibc/core/connection/v1/connection.proto"; import "ibc/core/channel/v1/channel.proto"; diff --git a/third_party/proto/ibc/lightclients/solomachine/v2/solomachine.proto b/third_party/proto/ibc/lightclients/solomachine/v2/solomachine.proto index 61dcc45b2..ea5cb89d8 100644 --- a/third_party/proto/ibc/lightclients/solomachine/v2/solomachine.proto +++ b/third_party/proto/ibc/lightclients/solomachine/v2/solomachine.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.solomachine.v2; -option go_package = "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/light-clients/06-solomachine/types"; import "ibc/core/connection/v1/connection.proto"; import "ibc/core/channel/v1/channel.proto"; diff --git a/third_party/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/third_party/proto/ibc/lightclients/tendermint/v1/tendermint.proto index 48b47aee6..cb0544b58 100644 --- a/third_party/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/third_party/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.tendermint.v1; -option go_package = "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/light-clients/07-tendermint/types"; import "tendermint/types/validator.proto"; import "tendermint/types/types.proto"; diff --git a/x/marker/client/cli/tx.go b/x/marker/client/cli/tx.go index 1910bff1e..2c22839e8 100644 --- a/x/marker/client/cli/tx.go +++ b/x/marker/client/cli/tx.go @@ -22,8 +22,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/feegrant" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" - channelutils "github.com/cosmos/ibc-go/v5/modules/core/04-channel/client/utils" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + channelutils "github.com/cosmos/ibc-go/v6/modules/core/04-channel/client/utils" "github.com/spf13/cobra" ) diff --git a/x/marker/keeper/keeper.go b/x/marker/keeper/keeper.go index 460490b18..ae25bfac1 100644 --- a/x/marker/keeper/keeper.go +++ b/x/marker/keeper/keeper.go @@ -14,7 +14,7 @@ import ( feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - ibckeeper "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper" + ibckeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" "github.com/provenance-io/provenance/x/marker/types" ) diff --git a/x/marker/keeper/marker.go b/x/marker/keeper/marker.go index e9d96ae63..d89bb9bae 100644 --- a/x/marker/keeper/marker.go +++ b/x/marker/keeper/marker.go @@ -9,8 +9,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - ibckeeper "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper" - clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + ibckeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" "github.com/provenance-io/provenance/x/marker/types" ) diff --git a/x/marker/keeper/msg_server.go b/x/marker/keeper/msg_server.go index 5ea2d8c95..68666fe64 100644 --- a/x/marker/keeper/msg_server.go +++ b/x/marker/keeper/msg_server.go @@ -10,8 +10,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - ibckeeper "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper" - ibctypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + ibckeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" + ibctypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" "github.com/provenance-io/provenance/x/marker/types" ) diff --git a/x/marker/types/msg.go b/x/marker/types/msg.go index 88604502f..f8a81c2d7 100644 --- a/x/marker/types/msg.go +++ b/x/marker/types/msg.go @@ -13,8 +13,8 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" feegranttypes "github.com/cosmos/cosmos-sdk/x/feegrant" - ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" ) const ( diff --git a/x/marker/types/msg_test.go b/x/marker/types/msg_test.go index 19ff1a8f7..270ab50da 100644 --- a/x/marker/types/msg_test.go +++ b/x/marker/types/msg_test.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/feegrant" - clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" ) func TestMsgGrantAllowance(t *testing.T) { diff --git a/x/marker/types/tx.pb.go b/x/marker/types/tx.pb.go index 248065971..9a4a86bc3 100644 --- a/x/marker/types/tx.pb.go +++ b/x/marker/types/tx.pb.go @@ -12,8 +12,8 @@ import ( types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/x/bank/types" github_com_cosmos_cosmos_sdk_x_bank_types "github.com/cosmos/cosmos-sdk/x/bank/types" - _ "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" - github_com_cosmos_ibc_go_v5_modules_apps_transfer_types "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + _ "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + github_com_cosmos_ibc_go_v6_modules_apps_transfer_types "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" @@ -1205,7 +1205,7 @@ var xxx_messageInfo_MsgTransferResponse proto.InternalMessageInfo // MsgIbcTransferRequest defines the Msg/IbcTransfer request type for markers. type MsgIbcTransferRequest struct { - Transfer github_com_cosmos_ibc_go_v5_modules_apps_transfer_types.MsgTransfer `protobuf:"bytes,1,opt,name=transfer,proto3,customtype=github.com/cosmos/ibc-go/v5/modules/apps/transfer/types.MsgTransfer" json:"transfer"` + Transfer github_com_cosmos_ibc_go_v6_modules_apps_transfer_types.MsgTransfer `protobuf:"bytes,1,opt,name=transfer,proto3,customtype=github.com/cosmos/ibc-go/v6/modules/apps/transfer/types.MsgTransfer" json:"transfer"` Administrator string `protobuf:"bytes,2,opt,name=administrator,proto3" json:"administrator,omitempty"` } @@ -1406,7 +1406,7 @@ var fileDescriptor_bcb203fb73175ed3 = []byte{ // 1252 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xdd, 0x6e, 0x1b, 0xc5, 0x17, 0xcf, 0xfe, 0x9d, 0xba, 0xf1, 0xb8, 0x4d, 0x9b, 0x69, 0x9a, 0x6e, 0x5c, 0xc5, 0x71, 0xac, - 0xb6, 0x71, 0xff, 0x34, 0xbb, 0x8d, 0x11, 0x12, 0xea, 0x0d, 0xb2, 0x53, 0x52, 0x2a, 0x58, 0x54, + 0xb6, 0x71, 0xff, 0x34, 0xbb, 0x8d, 0x91, 0x10, 0xea, 0x0d, 0xb2, 0x53, 0x52, 0x2a, 0x58, 0x54, 0x39, 0x95, 0x10, 0xdc, 0x58, 0xe3, 0xdd, 0xc9, 0x66, 0x15, 0xef, 0x8e, 0xbb, 0x33, 0x76, 0x12, 0x24, 0xde, 0x01, 0xf5, 0x92, 0x47, 0xe0, 0x1a, 0x09, 0xf1, 0x06, 0x15, 0x57, 0x15, 0xe2, 0x02, 0x21, 0x54, 0xaa, 0xe4, 0x15, 0x78, 0x00, 0xb4, 0x33, 0xb3, 0x9f, 0xb1, 0x37, 0xae, 0x64, 0x01, @@ -1481,7 +1481,7 @@ var fileDescriptor_bcb203fb73175ed3 = []byte{ 0xfd, 0xea, 0xb4, 0xaa, 0xbc, 0x3e, 0xad, 0x2a, 0x6f, 0x4f, 0xab, 0xca, 0xb7, 0x67, 0xd5, 0xb9, 0xd7, 0x67, 0xd5, 0xb9, 0xdf, 0xce, 0xaa, 0x73, 0xe0, 0x96, 0x43, 0xc6, 0x2a, 0x7b, 0xa6, 0x7c, 0x95, 0x1c, 0x17, 0x31, 0xcb, 0x96, 0x43, 0x12, 0x27, 0xfd, 0x38, 0xfc, 0x62, 0xc1, 0xe7, 0x46, - 0xaf, 0xc8, 0x3f, 0x0a, 0xbc, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x85, 0xd4, 0xbc, 0x93, + 0xaf, 0xc8, 0x3f, 0x0a, 0xbc, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x47, 0x74, 0x50, 0xf5, 0xde, 0x11, 0x00, 0x00, } From b89228653d2abc3362e7f4a748cdde1783fa52d8 Mon Sep 17 00:00:00 2001 From: Matthew Witkowski <mwitkowski@figure.com> Date: Tue, 20 Dec 2022 16:49:22 -0500 Subject: [PATCH 2/8] Updated marker module to use the TransferMsg since sendTransfer is no longer exposed. Need to still update app.go. --- x/marker/keeper/marker.go | 28 +++++++++++++--------------- x/marker/keeper/msg_server.go | 15 +-------------- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/x/marker/keeper/marker.go b/x/marker/keeper/marker.go index d89bb9bae..f11b108cb 100644 --- a/x/marker/keeper/marker.go +++ b/x/marker/keeper/marker.go @@ -9,9 +9,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - ibckeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" + transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" - "github.com/provenance-io/provenance/x/marker/types" ) @@ -709,8 +708,7 @@ func (k Keeper) IbcTransferCoin( sender, admin sdk.AccAddress, receiver string, timeoutHeight clienttypes.Height, - timeoutTimestamp uint64, - checkRestrictionsHandler ibckeeper.CheckRestrictionsHandler) error { + timeoutTimestamp uint64) error { m, err := k.GetMarkerByDenom(ctx, token.Denom) if err != nil { return fmt.Errorf("marker not found for %s: %w", token.Denom, err) @@ -732,17 +730,17 @@ func (k Keeper) IbcTransferCoin( } } - err = k.ibcKeeper.SendTransfer( - ctx, - sourcePort, - sourceChannel, - token, - sender, - receiver, - timeoutHeight, - timeoutTimestamp, - checkRestrictionsHandler, - ) + msg := transfertypes.MsgTransfer{ + SourcePort: sourcePort, + SourceChannel: sourceChannel, + Token: token, + Sender: sender.String(), + Receiver: receiver, + TimeoutHeight: timeoutHeight, + TimeoutTimestamp: timeoutTimestamp, + } + + _, err = k.ibcKeeper.Transfer(ctx, &msg) if err != nil { return err } diff --git a/x/marker/keeper/msg_server.go b/x/marker/keeper/msg_server.go index 68666fe64..da8d8528a 100644 --- a/x/marker/keeper/msg_server.go +++ b/x/marker/keeper/msg_server.go @@ -10,9 +10,6 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - ibckeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" - ibctypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" - "github.com/provenance-io/provenance/x/marker/types" ) @@ -465,17 +462,7 @@ func (k msgServer) IbcTransfer(goCtx context.Context, msg *types.MsgIbcTransferR return nil, err } - err = k.IbcTransferCoin(ctx, msg.Transfer.SourcePort, msg.Transfer.SourceChannel, msg.Transfer.Token, from, admin, msg.Transfer.Receiver, msg.Transfer.TimeoutHeight, msg.Transfer.TimeoutTimestamp, func(ctx sdk.Context, ibcKeeper ibckeeper.Keeper, sender sdk.AccAddress, token sdk.Coin) (canTransfer bool, err error) { - if !ibcKeeper.GetSendEnabled(ctx) { - return false, ibctypes.ErrSendDisabled - } - - if ibcKeeper.BankKeeper.BlockedAddr(sender) { - return false, sdkerrors.ErrUnauthorized.Wrapf("%s is not allowed to send funds", sender) - } - - return true, nil - }) + err = k.IbcTransferCoin(ctx, msg.Transfer.SourcePort, msg.Transfer.SourceChannel, msg.Transfer.Token, from, admin, msg.Transfer.Receiver, msg.Transfer.TimeoutHeight, msg.Transfer.TimeoutTimestamp) if err != nil { return nil, err } From 2f03336a7a592a9d70d8d46928a8185c45a46892 Mon Sep 17 00:00:00 2001 From: Matthew Witkowski <mwitkowski@figure.com> Date: Thu, 22 Dec 2022 11:08:40 -0500 Subject: [PATCH 3/8] Updated dependencies to use new wasmd. --- go.mod | 9 +++++---- go.sum | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 8ea797bd8..a00995336 100644 --- a/go.mod +++ b/go.mod @@ -64,7 +64,6 @@ require ( github.com/cosmos/gogoproto v1.4.2 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect github.com/cosmos/iavl v0.19.4 // indirect - github.com/cosmos/ibc-go/v5 v5.0.0 // indirect github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect @@ -73,6 +72,7 @@ require ( github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/docker/distribution v2.8.1+incompatible // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect @@ -126,12 +126,13 @@ require ( github.com/mitchellh/go-testing-interface v1.0.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.13.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/client_golang v1.14.0 // indirect + github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect @@ -181,4 +182,4 @@ replace github.com/tecbot/gorocksdb => github.com/cosmos/gorocksdb v1.1.1 replace github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 // TODO: Required for v1.13.x: Remove this and update the require line above to have the new version once it's out. https://github.com/provenance-io/provenance/issues/1015 -replace github.com/CosmWasm/wasmd => github.com/provenance-io/wasmd v0.29.0-pio-1 +replace github.com/CosmWasm/wasmd => github.com/provenance-io/wasmd v0.30.0-pio-1-rc1 diff --git a/go.sum b/go.sum index b4c31220a..c448ea7f1 100644 --- a/go.sum +++ b/go.sum @@ -247,11 +247,9 @@ github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4 github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok= github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v5 v5.0.0 h1:MkObdarpoICPHXoRg/Ne9NRix4j7eQlJZq74/uzH3Zc= -github.com/cosmos/ibc-go/v5 v5.0.0/go.mod h1:Wqsguq98Iuns8tgTv8+xaGYbC+Q8zJfbpjzT6IgMJbs= github.com/cosmos/ibc-go/v6 v6.1.0 h1:o7oXws2vKkKfOFzJI+oNylRn44PCNt5wzHd/zKQKbvQ= github.com/cosmos/ibc-go/v6 v6.1.0/go.mod h1:CY3zh2HLfetRiW8LY6kVHMATe90Wj/UOoY8T6cuB0is= -github.com/cosmos/interchain-accounts v0.3.2 h1:7S5rSndahpjkzUvG00kKZrTZsEuVHuVC9a7p0qDVcF8= +github.com/cosmos/interchain-accounts v0.4.2 h1:BxdzY22uouwe9wGK7h/HbzPNIH89JJ/4+V6n02l3cG4= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8= github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= @@ -296,6 +294,8 @@ github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8 github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= +github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -784,6 +784,7 @@ github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= @@ -841,15 +842,16 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -875,8 +877,8 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/provenance-io/cosmos-sdk v0.46.7-pio-1 h1:FMeycDNAaRNXKVJuvzkmuzHJHUCqlCdfzx34hPKpPSo= github.com/provenance-io/cosmos-sdk v0.46.7-pio-1/go.mod h1:uxCT2FsYd0v3xFY1DLnASsKftIGahc0kKZq5Sn2hRd0= -github.com/provenance-io/wasmd v0.29.0-pio-1 h1:vH7tyRf+SjZl/jHBnmcXaXtWpGenfDa6in2yKdREnEs= -github.com/provenance-io/wasmd v0.29.0-pio-1/go.mod h1:7GcVWVZIP2hmXuDJEFkofF3P1Ax48foYmknQvl0H8dU= +github.com/provenance-io/wasmd v0.30.0-pio-1-rc1 h1:4drlThWx7e3QwbQE93VU8zkP+/F5H4F4o/fBoEICjr8= +github.com/provenance-io/wasmd v0.30.0-pio-1-rc1/go.mod h1:sXwFDt9N/vZ0ni3W1M3oH69DUmza4nnsZw+GeSWCuK4= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= From 85dd94b139a4a032e357f8dab10d29f4b1c1c2f6 Mon Sep 17 00:00:00 2001 From: Matthew Witkowski <mwitkowski@figure.com> Date: Thu, 22 Dec 2022 11:19:58 -0500 Subject: [PATCH 4/8] Added missing arg for updated wasm keeper. --- app/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index 4f9cff4b7..38d8c1963 100644 --- a/app/app.go +++ b/app/app.go @@ -547,7 +547,7 @@ func New( // Create static IBC router, add transfer route, then set and seal it ibcRouter := porttypes.NewRouter() ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferIBCModule). - AddRoute(wasm.ModuleName, wasm.NewIBCHandler(app.WasmKeeper, app.IBCKeeper.ChannelKeeper)). + AddRoute(wasm.ModuleName, wasm.NewIBCHandler(app.WasmKeeper, app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper)). AddRoute(icahosttypes.SubModuleName, icaHostIBCModule) app.IBCKeeper.SetRouter(ibcRouter) From 8a1e317ceecbc401904dec95e6b0b2b0ac2bc7e8 Mon Sep 17 00:00:00 2001 From: Matthew Witkowski <mwitkowski@figure.com> Date: Fri, 23 Dec 2022 11:57:35 -0500 Subject: [PATCH 5/8] Updated go.mod and go.sum with the new dependencies. Updated sim_test to have new location of DefaultGenesis. Added memo to marker ibc transfer. --- app/sim_test.go | 3 ++- go.mod | 3 +++ go.sum | 4 ++-- x/marker/client/cli/tx.go | 8 ++++++++ x/marker/keeper/marker.go | 29 ++++++++++++++++------------- x/marker/keeper/msg_server.go | 14 +++++++++++++- x/marker/types/msg.go | 2 ++ x/marker/types/msg_test.go | 3 +++ 8 files changed, 49 insertions(+), 17 deletions(-) diff --git a/app/sim_test.go b/app/sim_test.go index 3eabf655a..8321d64db 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -41,6 +41,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/simulation" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + icagenesistypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/genesis/types" icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types" cmdconfig "github.com/provenance-io/provenance/cmd/provenanced/config" @@ -81,7 +82,7 @@ func appStateWithICA(appState json.RawMessage, cdc codec.JSONCodec) json.RawMess } icaGenJSON, icaGenFound := rawState[icatypes.ModuleName] if !icaGenFound || len(icaGenJSON) == 0 { - icaGenState := icatypes.DefaultGenesis() + icaGenState := icagenesistypes.DefaultGenesis() rawState[icatypes.ModuleName] = cdc.MustMarshalJSON(icaGenState) appState, err = json.Marshal(rawState) if err != nil { diff --git a/go.mod b/go.mod index a00995336..7682c4079 100644 --- a/go.mod +++ b/go.mod @@ -183,3 +183,6 @@ replace github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 // TODO: Required for v1.13.x: Remove this and update the require line above to have the new version once it's out. https://github.com/provenance-io/provenance/issues/1015 replace github.com/CosmWasm/wasmd => github.com/provenance-io/wasmd v0.30.0-pio-1-rc1 + +// TODO: Required for IBC Transfer Module. Remove this when they patch it to include our changes. https://github.com/provenance-io/provenance/issues/1100 +replace github.com/cosmos/ibc-go/v6 => github.com/provenance-io/ibc-go/v6 v6.1.0-pio-1 diff --git a/go.sum b/go.sum index c448ea7f1..e2495ef37 100644 --- a/go.sum +++ b/go.sum @@ -247,8 +247,6 @@ github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4 github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok= github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v6 v6.1.0 h1:o7oXws2vKkKfOFzJI+oNylRn44PCNt5wzHd/zKQKbvQ= -github.com/cosmos/ibc-go/v6 v6.1.0/go.mod h1:CY3zh2HLfetRiW8LY6kVHMATe90Wj/UOoY8T6cuB0is= github.com/cosmos/interchain-accounts v0.4.2 h1:BxdzY22uouwe9wGK7h/HbzPNIH89JJ/4+V6n02l3cG4= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8= @@ -877,6 +875,8 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/provenance-io/cosmos-sdk v0.46.7-pio-1 h1:FMeycDNAaRNXKVJuvzkmuzHJHUCqlCdfzx34hPKpPSo= github.com/provenance-io/cosmos-sdk v0.46.7-pio-1/go.mod h1:uxCT2FsYd0v3xFY1DLnASsKftIGahc0kKZq5Sn2hRd0= +github.com/provenance-io/ibc-go/v6 v6.1.0-pio-1 h1:2R9CS/FFGaOoPsdH+/8u+voFNmZqqkD6NuKsmnxMXLo= +github.com/provenance-io/ibc-go/v6 v6.1.0-pio-1/go.mod h1:CY3zh2HLfetRiW8LY6kVHMATe90Wj/UOoY8T6cuB0is= github.com/provenance-io/wasmd v0.30.0-pio-1-rc1 h1:4drlThWx7e3QwbQE93VU8zkP+/F5H4F4o/fBoEICjr8= github.com/provenance-io/wasmd v0.30.0-pio-1-rc1/go.mod h1:sXwFDt9N/vZ0ni3W1M3oH69DUmza4nnsZw+GeSWCuK4= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= diff --git a/x/marker/client/cli/tx.go b/x/marker/client/cli/tx.go index 2c22839e8..6df0a33bb 100644 --- a/x/marker/client/cli/tx.go +++ b/x/marker/client/cli/tx.go @@ -42,6 +42,7 @@ const ( FlagPacketTimeoutHeight = "packet-timeout-height" FlagPacketTimeoutTimestamp = "packet-timeout-timestamp" FlagAbsoluteTimeouts = "absolute-timeouts" + FlagMemo = "memo" ) // NewTxCmd returns the top-level command for marker CLI transactions. @@ -588,6 +589,11 @@ corresponding to the counterparty channel. Any timeout set to 0 is disabled.`), return err } + memo, err := cmd.Flags().GetString(FlagMemo) + if err != nil { + return err + } + // if the timeouts are not absolute, retrieve latest block height and block timestamp // for the consensus state connected to the destination port/channel if !absoluteTimeouts { @@ -626,6 +632,7 @@ corresponding to the counterparty channel. Any timeout set to 0 is disabled.`), sourcePort, sourceChannel, token, sender, receiver, timeoutHeight, timeoutTimestamp, + memo, ) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, @@ -634,6 +641,7 @@ corresponding to the counterparty channel. Any timeout set to 0 is disabled.`), cmd.Flags().String(FlagPacketTimeoutHeight, "0-1000", "Packet timeout block height. The timeout is disabled when set to 0-0.") cmd.Flags().Uint64(FlagPacketTimeoutTimestamp, uint64((time.Duration(10) * time.Minute).Nanoseconds()), "Packet timeout timestamp in nanoseconds from now. Default is 10 minutes. The timeout is disabled when set to 0.") cmd.Flags().Bool(FlagAbsoluteTimeouts, false, "Timeout flags are used as absolute timeouts.") + cmd.Flags().String(FlagMemo, "", "Memo to be sent along with the packet.") flags.AddTxFlagsToCmd(cmd) return cmd diff --git a/x/marker/keeper/marker.go b/x/marker/keeper/marker.go index f11b108cb..4c9d2c421 100644 --- a/x/marker/keeper/marker.go +++ b/x/marker/keeper/marker.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + ibckeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" "github.com/provenance-io/provenance/x/marker/types" ) @@ -708,7 +708,9 @@ func (k Keeper) IbcTransferCoin( sender, admin sdk.AccAddress, receiver string, timeoutHeight clienttypes.Height, - timeoutTimestamp uint64) error { + timeoutTimestamp uint64, + memo string, + checkRestrictionsHandler ibckeeper.CheckRestrictionsHandler) error { m, err := k.GetMarkerByDenom(ctx, token.Denom) if err != nil { return fmt.Errorf("marker not found for %s: %w", token.Denom, err) @@ -730,17 +732,18 @@ func (k Keeper) IbcTransferCoin( } } - msg := transfertypes.MsgTransfer{ - SourcePort: sourcePort, - SourceChannel: sourceChannel, - Token: token, - Sender: sender.String(), - Receiver: receiver, - TimeoutHeight: timeoutHeight, - TimeoutTimestamp: timeoutTimestamp, - } - - _, err = k.ibcKeeper.Transfer(ctx, &msg) + _, err = k.ibcKeeper.SendTransfer( + ctx, + sourcePort, + sourceChannel, + token, + sender, + receiver, + timeoutHeight, + timeoutTimestamp, + memo, + checkRestrictionsHandler, + ) if err != nil { return err } diff --git a/x/marker/keeper/msg_server.go b/x/marker/keeper/msg_server.go index da8d8528a..288b499ba 100644 --- a/x/marker/keeper/msg_server.go +++ b/x/marker/keeper/msg_server.go @@ -9,6 +9,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + ibckeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" + ibctypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" "github.com/provenance-io/provenance/x/marker/types" ) @@ -462,7 +464,17 @@ func (k msgServer) IbcTransfer(goCtx context.Context, msg *types.MsgIbcTransferR return nil, err } - err = k.IbcTransferCoin(ctx, msg.Transfer.SourcePort, msg.Transfer.SourceChannel, msg.Transfer.Token, from, admin, msg.Transfer.Receiver, msg.Transfer.TimeoutHeight, msg.Transfer.TimeoutTimestamp) + err = k.IbcTransferCoin(ctx, msg.Transfer.SourcePort, msg.Transfer.SourceChannel, msg.Transfer.Token, from, admin, msg.Transfer.Receiver, msg.Transfer.TimeoutHeight, msg.Transfer.TimeoutTimestamp, msg.Transfer.Memo, func(ctx sdk.Context, ibcKeeper ibckeeper.Keeper, sender sdk.AccAddress, token sdk.Coin) (canTransfer bool, err error) { + if !ibcKeeper.GetSendEnabled(ctx) { + return false, ibctypes.ErrSendDisabled + } + + if ibcKeeper.BankKeeper.BlockedAddr(sender) { + return false, sdkerrors.ErrUnauthorized.Wrapf("%s is not allowed to send funds", sender) + } + + return true, nil + }) if err != nil { return nil, err } diff --git a/x/marker/types/msg.go b/x/marker/types/msg.go index f8a81c2d7..3c17f6072 100644 --- a/x/marker/types/msg.go +++ b/x/marker/types/msg.go @@ -497,6 +497,7 @@ func NewIbcMsgTransferRequest( receiver string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, //nolint:interfacer + memo string, ) *MsgIbcTransferRequest { return &MsgIbcTransferRequest{ Administrator: administrator, @@ -508,6 +509,7 @@ func NewIbcMsgTransferRequest( Receiver: receiver, TimeoutHeight: timeoutHeight, TimeoutTimestamp: timeoutTimestamp, + Memo: memo, }, } } diff --git a/x/marker/types/msg_test.go b/x/marker/types/msg_test.go index 270ab50da..7dc9f193d 100644 --- a/x/marker/types/msg_test.go +++ b/x/marker/types/msg_test.go @@ -111,6 +111,7 @@ func TestMsgAssessCustomMsgFeeValidateBasic(t *testing.T) { validAddress, clienttypes.NewHeight(1, 1), 1000, + "", ), "decoding bech32 failed: invalid separator index -1", }, @@ -125,6 +126,7 @@ func TestMsgAssessCustomMsgFeeValidateBasic(t *testing.T) { validAddress, clienttypes.NewHeight(1, 1), 1000, + "", ), "string could not be parsed as address: decoding bech32 failed: invalid separator index -1: invalid address", }, @@ -139,6 +141,7 @@ func TestMsgAssessCustomMsgFeeValidateBasic(t *testing.T) { validAddress, clienttypes.NewHeight(1, 1), 1000, + "", ), "", }, From d78919c51a9e558bb7d4c55e49967303d3d56d20 Mon Sep 17 00:00:00 2001 From: Matthew Witkowski <mwitkowski@figure.com> Date: Fri, 23 Dec 2022 12:14:34 -0500 Subject: [PATCH 6/8] Added tests for optional memo flag. --- x/marker/client/cli/cli_test.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/x/marker/client/cli/cli_test.go b/x/marker/client/cli/cli_test.go index a5249f59c..e2b3392a1 100644 --- a/x/marker/client/cli/cli_test.go +++ b/x/marker/client/cli/cli_test.go @@ -851,6 +851,7 @@ func (s *IntegrationTestSuite) TestMarkerIbcTransfer() { flagPacketTimeoutHeight string flagPacketTimeoutTimestamp string flagAbsoluteTimeouts string + flagMemo string expectedErr string }{ { @@ -882,6 +883,25 @@ func (s *IntegrationTestSuite) TestMarkerIbcTransfer() { flagAbsoluteTimeouts: "not-a-bool", expectedErr: `invalid argument "not-a-bool" for "--absolute-timeouts" flag: strconv.ParseBool: parsing "not-a-bool": invalid syntax`, }, + { + name: "should pass basic validation with optional flag memo", + srcPort: "port", + srcChannel: "channel-1", + sender: "sender", + receiver: "receiver", + amount: "10jackthecat", + flagMemo: "testing", + expectedErr: `rpc error: code = NotFound desc = rpc error: code = NotFound desc = port-id: port, channel-id: channel-1: channel not found: key not found`, + }, + { + name: "should pass basic validation without optional flag memo", + srcPort: "port", + srcChannel: "channel-1", + sender: "sender", + receiver: "receiver", + amount: "10jackthecat", + expectedErr: `rpc error: code = NotFound desc = rpc error: code = NotFound desc = port-id: port, channel-id: channel-1: channel not found: key not found`, + }, } for _, tc := range testCases { @@ -906,6 +926,9 @@ func (s *IntegrationTestSuite) TestMarkerIbcTransfer() { if len(tc.flagAbsoluteTimeouts) > 0 { args = append(args, fmt.Sprintf("--%s=%s", markercli.FlagAbsoluteTimeouts, tc.flagAbsoluteTimeouts)) } + if len(tc.flagMemo) > 0 { + args = append(args, fmt.Sprintf("--%s=%s", markercli.FlagMemo, tc.flagMemo)) + } _, err := clitestutil.ExecTestCLICmd(clientCtx, markercli.GetIbcTransferTxCmd(), args) if len(tc.expectedErr) > 0 { s.Assert().EqualError(err, tc.expectedErr) From 80679c826ac97ba28e2f5615c6e4d7747e0d6ddb Mon Sep 17 00:00:00 2001 From: Matthew Witkowski <mwitkowski@figure.com> Date: Fri, 23 Dec 2022 14:27:23 -0500 Subject: [PATCH 7/8] Updated proto dependencies. --- .../proto/cosmwasm/wasm/v1/authz.proto | 109 ++++++++++++++++++ .../proto/cosmwasm/wasm/v1/genesis.proto | 2 + .../proto/cosmwasm/wasm/v1/proposal.proto | 44 +++++++ .../proto/cosmwasm/wasm/v1/query.proto | 25 ++++ .../proto/cosmwasm/wasm/v1/types.proto | 2 - 5 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 third_party/proto/cosmwasm/wasm/v1/authz.proto diff --git a/third_party/proto/cosmwasm/wasm/v1/authz.proto b/third_party/proto/cosmwasm/wasm/v1/authz.proto new file mode 100644 index 000000000..96ecbfb38 --- /dev/null +++ b/third_party/proto/cosmwasm/wasm/v1/authz.proto @@ -0,0 +1,109 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; +option (gogoproto.goproto_getters_all) = false; + +// ContractExecutionAuthorization defines authorization for wasm execute. +// Since: wasmd 0.30 +message ContractExecutionAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + // Grants for contract executions + repeated ContractGrant grants = 1 [ (gogoproto.nullable) = false ]; +} + +// ContractMigrationAuthorization defines authorization for wasm contract +// migration. Since: wasmd 0.30 +message ContractMigrationAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + // Grants for contract migrations + repeated ContractGrant grants = 1 [ (gogoproto.nullable) = false ]; +} + +// ContractGrant a granted permission for a single contract +// Since: wasmd 0.30 +message ContractGrant { + // Contract is the bech32 address of the smart contract + string contract = 1; + + // Limit defines execution limits that are enforced and updated when the grant + // is applied. When the limit lapsed the grant is removed. + google.protobuf.Any limit = 2 + [ (cosmos_proto.accepts_interface) = "ContractAuthzLimitX" ]; + + // Filter define more fine-grained control on the message payload passed + // to the contract in the operation. When no filter applies on execution, the + // operation is prohibited. + google.protobuf.Any filter = 3 + [ (cosmos_proto.accepts_interface) = "ContractAuthzFilterX" ]; +} + +// MaxCallsLimit limited number of calls to the contract. No funds transferable. +// Since: wasmd 0.30 +message MaxCallsLimit { + option (cosmos_proto.implements_interface) = "ContractAuthzLimitX"; + + // Remaining number that is decremented on each execution + uint64 remaining = 1; +} + +// MaxFundsLimit defines the maximal amounts that can be sent to the contract. +// Since: wasmd 0.30 +message MaxFundsLimit { + option (cosmos_proto.implements_interface) = "ContractAuthzLimitX"; + + // Amounts is the maximal amount of tokens transferable to the contract. + repeated cosmos.base.v1beta1.Coin amounts = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// CombinedLimit defines the maximal amounts that can be sent to a contract and +// the maximal number of calls executable. Both need to remain >0 to be valid. +// Since: wasmd 0.30 +message CombinedLimit { + option (cosmos_proto.implements_interface) = "ContractAuthzLimitX"; + + // Remaining number that is decremented on each execution + uint64 calls_remaining = 1; + // Amounts is the maximal amount of tokens transferable to the contract. + repeated cosmos.base.v1beta1.Coin amounts = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// AllowAllMessagesFilter is a wildcard to allow any type of contract payload +// message. +// Since: wasmd 0.30 +message AllowAllMessagesFilter { + option (cosmos_proto.implements_interface) = "ContractAuthzFilterX"; +} + +// AcceptedMessageKeysFilter accept only the specific contract message keys in +// the json object to be executed. +// Since: wasmd 0.30 +message AcceptedMessageKeysFilter { + option (cosmos_proto.implements_interface) = "ContractAuthzFilterX"; + + // Messages is the list of unique keys + repeated string keys = 1; +} + +// AcceptedMessagesFilter accept only the specific raw contract messages to be +// executed. +// Since: wasmd 0.30 +message AcceptedMessagesFilter { + option (cosmos_proto.implements_interface) = "ContractAuthzFilterX"; + + // Messages is the list of raw contract messages + repeated bytes messages = 1 [ (gogoproto.casttype) = "RawContractMessage" ]; +} diff --git a/third_party/proto/cosmwasm/wasm/v1/genesis.proto b/third_party/proto/cosmwasm/wasm/v1/genesis.proto index 87373e18d..b7622c206 100644 --- a/third_party/proto/cosmwasm/wasm/v1/genesis.proto +++ b/third_party/proto/cosmwasm/wasm/v1/genesis.proto @@ -53,6 +53,8 @@ message Contract { string contract_address = 1; ContractInfo contract_info = 2 [ (gogoproto.nullable) = false ]; repeated Model contract_state = 3 [ (gogoproto.nullable) = false ]; + repeated ContractCodeHistoryEntry contract_code_history = 4 + [ (gogoproto.nullable) = false ]; } // Sequence key and value of an id generation counter diff --git a/third_party/proto/cosmwasm/wasm/v1/proposal.proto b/third_party/proto/cosmwasm/wasm/v1/proposal.proto index 25bf2700b..b8a143b67 100644 --- a/third_party/proto/cosmwasm/wasm/v1/proposal.proto +++ b/third_party/proto/cosmwasm/wasm/v1/proposal.proto @@ -26,6 +26,14 @@ message StoreCodeProposal { AccessConfig instantiate_permission = 7; // UnpinCode code on upload, optional bool unpin_code = 8; + // Source is the URL where the code is hosted + string source = 9; + // Builder is the docker image used to build the code deterministically, used + // for smart contract verification + string builder = 10; + // CodeHash is the SHA256 sum of the code outputted by builder, used for smart + // contract verification + bytes code_hash = 11; } // InstantiateContractProposal gov proposal content type to instantiate a @@ -172,3 +180,39 @@ message UpdateInstantiateConfigProposal { repeated AccessConfigUpdate access_config_updates = 3 [ (gogoproto.nullable) = false ]; } + +// StoreAndInstantiateContractProposal gov proposal content type to store +// and instantiate the contract. +message StoreAndInstantiateContractProposal { + // Title is a short summary + string title = 1; + // Description is a human readable text + string description = 2; + // RunAs is the address that is passed to the contract's environment as sender + string run_as = 3; + // WASMByteCode can be raw or gzip compressed + bytes wasm_byte_code = 4 [ (gogoproto.customname) = "WASMByteCode" ]; + // InstantiatePermission to apply on contract creation, optional + AccessConfig instantiate_permission = 5; + // UnpinCode code on upload, optional + bool unpin_code = 6; + // Admin is an optional address that can execute migrations + string admin = 7; + // Label is optional metadata to be stored with a constract instance. + string label = 8; + // Msg json encoded message to be passed to the contract on instantiation + bytes msg = 9 [ (gogoproto.casttype) = "RawContractMessage" ]; + // Funds coins that are transferred to the contract on instantiation + repeated cosmos.base.v1beta1.Coin funds = 10 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // Source is the URL where the code is hosted + string source = 11; + // Builder is the docker image used to build the code deterministically, used + // for smart contract verification + string builder = 12; + // CodeHash is the SHA256 sum of the code outputted by builder, used for smart + // contract verification + bytes code_hash = 13; +} diff --git a/third_party/proto/cosmwasm/wasm/v1/query.proto b/third_party/proto/cosmwasm/wasm/v1/query.proto index 41d959d80..ffe48d242 100644 --- a/third_party/proto/cosmwasm/wasm/v1/query.proto +++ b/third_party/proto/cosmwasm/wasm/v1/query.proto @@ -63,6 +63,13 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/cosmwasm/wasm/v1/codes/params"; } + + // ContractsByCreator gets the contracts by creator + rpc ContractsByCreator(QueryContractsByCreatorRequest) + returns (QueryContractsByCreatorResponse) { + option (google.api.http).get = + "/cosmwasm/wasm/v1/contracts/creator/{creator_address}"; + } } // QueryContractInfoRequest is the request type for the Query/ContractInfo RPC @@ -236,3 +243,21 @@ message QueryParamsResponse { // params defines the parameters of the module. Params params = 1 [ (gogoproto.nullable) = false ]; } + +// QueryContractsByCreatorRequest is the request type for the +// Query/ContractsByCreator RPC method. +message QueryContractsByCreatorRequest { + // CreatorAddress is the address of contract creator + string creator_address = 1; + // Pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryContractsByCreatorResponse is the response type for the +// Query/ContractsByCreator RPC method. +message QueryContractsByCreatorResponse { + // ContractAddresses result set + repeated string contract_addresses = 1; + // Pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} \ No newline at end of file diff --git a/third_party/proto/cosmwasm/wasm/v1/types.proto b/third_party/proto/cosmwasm/wasm/v1/types.proto index 8d140248a..216b24e3b 100644 --- a/third_party/proto/cosmwasm/wasm/v1/types.proto +++ b/third_party/proto/cosmwasm/wasm/v1/types.proto @@ -84,8 +84,6 @@ message ContractInfo { // Label is optional metadata to be stored with a contract instance. string label = 4; // Created Tx position when the contract was instantiated. - // This data should kept internal and not be exposed via query results. Just - // use for sorting AbsoluteTxPosition created = 5; string ibc_port_id = 6 [ (gogoproto.customname) = "IBCPortID" ]; From c6c882dc193fc9c1dfa66080eb05a47f73aad1e3 Mon Sep 17 00:00:00 2001 From: Matthew Witkowski <mwitkowski@figure.com> Date: Tue, 3 Jan 2023 09:26:35 -0500 Subject: [PATCH 8/8] Updated changelog with ibc-go entry. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65ebe2b7e..9a9c95b2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * Added assess msg fees spec documentation [#1172](https://github.com/provenance-io/provenance/issues/1172). * Build dbmigrate and include it as an artifact with releases [#1264](https://github.com/provenance-io/provenance/issues/1264). * Removed, MsgFees Module 50/50 Fee Split on MsgAssessCustomMsgFeeRequest [#1263](https://github.com/provenance-io/provenance/issues/1263). +* Updated ibc-go to v6.1 [#1273](https://github.com/provenance-io/provenance/issues/1273). --- ## [v1.13.0](https://github.com/provenance-io/provenance/releases/tag/v1.13.0) - 2022-11-28