From 44db964e91a20206c85a2820ef9c12308c191f29 Mon Sep 17 00:00:00 2001 From: Marko Date: Mon, 30 Oct 2023 20:07:58 +0100 Subject: [PATCH] test: add counter module (#18272) --- api/cosmos/counter/v1/tx.pulsar.go | 64 ++--- client/fuzz_test.go | 19 +- client/grpc_query_test.go | 114 ++------- client/tx/aux_builder_test.go | 9 +- client/tx/legacy_test.go | 6 +- client/tx/tx_test.go | 19 +- client/v2/go.mod | 2 +- client/v2/go.sum | 4 +- codec/bench_test.go | 40 ++- codec/proto_codec_test.go | 18 +- collections/README.md | 22 +- go.mod | 4 +- go.sum | 4 +- proto/cosmos/counter/v1/tx.proto | 2 + simapp/go.mod | 3 +- simapp/go.sum | 2 - simapp/gomod2nix.toml | 3 - tests/go.mod | 4 +- tests/go.sum | 4 +- .../integration/example}/example_test.go | 0 tests/starship/tests/go.mod | 2 +- tests/starship/tests/go.sum | 4 +- testutil/integration/doc.go | 1 + types/mempool/mempool_test.go | 10 +- x/authz/go.mod | 2 +- x/authz/go.sum | 4 +- x/bank/go.mod | 2 +- x/bank/go.sum | 4 +- x/circuit/go.mod | 2 +- x/circuit/go.sum | 4 +- x/circuit/keeper/genesis_test.go | 2 +- x/circuit/types/keys.go | 3 - x/counter/README.md | 7 + x/counter/keeper/keeper.go | 81 +++++++ x/counter/module.go | 106 ++++++++ x/counter/testutil/expected_keepers_mocks.go | 228 ++++++++++++++++++ x/counter/types/codec.go | 16 ++ x/counter/types/keys.go | 9 + x/counter/types/tx.pb.go | 35 +-- x/distribution/go.mod | 2 +- x/distribution/go.sum | 4 +- x/evidence/go.mod | 2 +- x/evidence/go.sum | 4 +- x/feegrant/go.mod | 2 +- x/feegrant/go.sum | 4 +- x/gov/go.mod | 2 +- x/gov/go.sum | 4 +- x/group/go.mod | 2 +- x/group/go.sum | 4 +- x/mint/go.mod | 2 +- x/mint/go.sum | 4 +- x/nft/go.mod | 2 +- x/nft/go.sum | 4 +- x/params/go.mod | 2 +- x/params/go.sum | 4 +- x/protocolpool/go.mod | 2 +- x/protocolpool/go.sum | 4 +- x/slashing/go.mod | 2 +- x/slashing/go.sum | 4 +- x/staking/go.mod | 2 +- x/staking/go.sum | 4 +- x/upgrade/go.mod | 2 +- x/upgrade/go.sum | 4 +- 63 files changed, 653 insertions(+), 284 deletions(-) rename {testutil/integration => tests/integration/example}/example_test.go (100%) create mode 100644 x/counter/README.md create mode 100644 x/counter/keeper/keeper.go create mode 100644 x/counter/module.go create mode 100644 x/counter/testutil/expected_keepers_mocks.go create mode 100644 x/counter/types/codec.go create mode 100644 x/counter/types/keys.go diff --git a/api/cosmos/counter/v1/tx.pulsar.go b/api/cosmos/counter/v1/tx.pulsar.go index 0bac1a4f14..8ca3213e0e 100644 --- a/api/cosmos/counter/v1/tx.pulsar.go +++ b/api/cosmos/counter/v1/tx.pulsar.go @@ -2,6 +2,7 @@ package counterv1 import ( + _ "cosmossdk.io/api/amino" _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" @@ -991,36 +992,39 @@ var file_cosmos_counter_v1_tx_proto_rawDesc = []byte{ 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x69, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, - 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x37, - 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, - 0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6e, - 0x65, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x71, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x63, - 0x0a, 0x0d, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, - 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb4, 0x01, 0x0a, 0x15, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x43, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x49, 0x6e, + 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x30, 0x0a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x2b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x22, 0x37, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, + 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x71, 0x0a, 0x03, 0x4d, + 0x73, 0x67, 0x12, 0x63, 0x0a, 0x0d, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x63, 0x72, 0x65, + 0x61, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb4, + 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/client/fuzz_test.go b/client/fuzz_test.go index 21d8cc5bd2..e8053c2d19 100644 --- a/client/fuzz_test.go +++ b/client/fuzz_test.go @@ -7,17 +7,15 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" - "cosmossdk.io/x/bank/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/counter/types" ) type fuzzSuite struct { IntegrationTestSuite } -func (fz *fuzzSuite) FuzzQueryBalance(f *testing.F) { +func (fz *fuzzSuite) FuzzQuery(f *testing.F) { if testing.Short() { f.Skip("In -short mode") } @@ -28,24 +26,21 @@ func (fz *fuzzSuite) FuzzQueryBalance(f *testing.F) { fz.Require().Equal("hello", testRes.Message) // 1. Generate some seeds. - bz, err := fz.cdc.Marshal(&types.QueryBalanceRequest{ - Address: fz.genesisAccount.GetAddress().String(), - Denom: sdk.DefaultBondDenom, - }) + bz, err := fz.cdc.Marshal(&types.QueryGetCountRequest{}) fz.Require().NoError(err) f.Add(bz) // 2. Now fuzz it and ensure that we don't get any panics. ctx := context.Background() f.Fuzz(func(t *testing.T, in []byte) { - qbReq := new(types.QueryBalanceRequest) + qbReq := new(types.QueryGetCountRequest) if err := fz.cdc.Unmarshal(in, qbReq); err != nil { return } // gRPC query to bank service should work var header metadata.MD - _, _ = fz.bankClient.Balance( + _, _ = fz.counterClient.GetCount( ctx, qbReq, grpc.Header(&header), @@ -53,9 +48,9 @@ func (fz *fuzzSuite) FuzzQueryBalance(f *testing.F) { }) } -func FuzzQueryBalance(f *testing.F) { +func FuzzQuery(f *testing.F) { fzs := new(fuzzSuite) fzs.SetT(new(testing.T)) fzs.SetupSuite() - fzs.FuzzQueryBalance(f) + fzs.FuzzQuery(f) } diff --git a/client/grpc_query_test.go b/client/grpc_query_test.go index dad9d83bec..f63c3f52f9 100644 --- a/client/grpc_query_test.go +++ b/client/grpc_query_test.go @@ -4,110 +4,52 @@ import ( "context" "testing" - abci "github.com/cometbft/cometbft/abci/types" - cmtjson "github.com/cometbft/cometbft/libs/json" - dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/suite" "google.golang.org/grpc" "google.golang.org/grpc/metadata" - "cosmossdk.io/depinject" "cosmossdk.io/log" - "cosmossdk.io/math" - bankkeeper "cosmossdk.io/x/bank/keeper" - "cosmossdk.io/x/bank/types" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/runtime" - "github.com/cosmos/cosmos-sdk/testutil/sims" + "github.com/cosmos/cosmos-sdk/testutil/integration" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/testutil" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/counter" + counterkeeper "github.com/cosmos/cosmos-sdk/x/counter/keeper" + countertypes "github.com/cosmos/cosmos-sdk/x/counter/types" ) type IntegrationTestSuite struct { suite.Suite - ctx sdk.Context - cdc codec.Codec - genesisAccount *authtypes.BaseAccount - bankClient types.QueryClient - testClient testdata.QueryClient - genesisAccountBalance int64 + ctx sdk.Context + cdc codec.Codec + counterClient countertypes.QueryClient + testClient testdata.QueryClient } func (s *IntegrationTestSuite) SetupSuite() { s.T().Log("setting up integration test suite") - var ( - interfaceRegistry codectypes.InterfaceRegistry - bankKeeper bankkeeper.BaseKeeper - appBuilder *runtime.AppBuilder - cdc codec.Codec - ) - // TODO duplicated from testutils/sims/app_helpers.go - // need more composable startup options for simapp, this test needed a handle to the closed over genesis account - // to query balances - err := depinject.Inject( - depinject.Configs( - testutil.AppConfig, - depinject.Supply(log.NewNopLogger()), - ), - &interfaceRegistry, &bankKeeper, &appBuilder, &cdc) - s.NoError(err) + logger := log.NewNopLogger() + keys := storetypes.NewKVStoreKeys(countertypes.StoreKey) + cms := integration.CreateMultiStore(keys, logger) + s.ctx = sdk.NewContext(cms, true, logger) + cfg := moduletestutil.MakeTestEncodingConfig(counter.AppModuleBasic{}) + s.cdc = cfg.Codec - app := appBuilder.Build(dbm.NewMemDB(), nil) - err = app.Load(true) - s.NoError(err) - - valSet, err := sims.CreateRandomValidatorSet() - s.NoError(err) - - // generate genesis account - s.genesisAccountBalance = 100000000000000 - senderPrivKey := secp256k1.GenPrivKey() - acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) - balance := types.Balance{ - Address: acc.GetAddress().String(), - Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(s.genesisAccountBalance))), - } - - genesisState, err := sims.GenesisStateWithValSet(cdc, app.DefaultGenesis(), valSet, []authtypes.GenesisAccount{acc}, balance) - s.NoError(err) - - stateBytes, err := cmtjson.MarshalIndent(genesisState, "", " ") - s.NoError(err) - - // init chain will set the validator set and initialize the genesis accounts - _, err = app.InitChain(&abci.RequestInitChain{ - Validators: []abci.ValidatorUpdate{}, - ConsensusParams: sims.DefaultConsensusParams, - AppStateBytes: stateBytes, - }, - ) - s.NoError(err) - - _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{ - Height: app.LastBlockHeight() + 1, - Hash: app.LastCommitID().Hash, - NextValidatorsHash: valSet.Hash(), - }) - s.NoError(err) - - // end of app init - - s.ctx = app.BaseApp.NewContext(false) - s.cdc = cdc - queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, interfaceRegistry) - types.RegisterQueryServer(queryHelper, bankKeeper) + queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, cfg.InterfaceRegistry) testdata.RegisterQueryServer(queryHelper, testdata.QueryImpl{}) - s.bankClient = types.NewQueryClient(queryHelper) s.testClient = testdata.NewQueryClient(queryHelper) - s.genesisAccount = acc + + kvs := runtime.NewKVStoreService(keys[countertypes.StoreKey]) + counterKeeper := counterkeeper.NewKeeper(kvs, runtime.EventService{}) + countertypes.RegisterQueryServer(queryHelper, counterKeeper) + s.counterClient = countertypes.NewQueryClient(queryHelper) } func (s *IntegrationTestSuite) TearDownSuite() { @@ -115,23 +57,15 @@ func (s *IntegrationTestSuite) TearDownSuite() { } func (s *IntegrationTestSuite) TestGRPCQuery() { - denom := sdk.DefaultBondDenom - // gRPC query to test service should work testRes, err := s.testClient.Echo(context.Background(), &testdata.EchoRequest{Message: "hello"}) s.Require().NoError(err) s.Require().Equal("hello", testRes.Message) - // gRPC query to bank service should work var header metadata.MD - res, err := s.bankClient.Balance( - context.Background(), - &types.QueryBalanceRequest{Address: s.genesisAccount.GetAddress().String(), Denom: denom}, - grpc.Header(&header), // Also fetch grpc header - ) + res, err := s.counterClient.GetCount(s.ctx, &countertypes.QueryGetCountRequest{}, grpc.Header(&header)) s.Require().NoError(err) - bal := res.GetBalance() - s.Equal(sdk.NewCoin(denom, math.NewInt(s.genesisAccountBalance)), *bal) + s.Require().Equal(int64(0), res.TotalCount) } func TestIntegrationTestSuite(t *testing.T) { diff --git a/client/tx/aux_builder_test.go b/client/tx/aux_builder_test.go index 66f17b7922..4758247f9e 100644 --- a/client/tx/aux_builder_test.go +++ b/client/tx/aux_builder_test.go @@ -5,8 +5,6 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/x/bank" - "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -16,16 +14,17 @@ import ( moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" typestx "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/counter" ) func TestAuxTxBuilder(t *testing.T) { - bankModule := bank.AppModuleBasic{} - cdc := moduletestutil.MakeTestEncodingConfig(bankModule).Codec + counterModule := counter.AppModuleBasic{} + cdc := moduletestutil.MakeTestEncodingConfig(counterModule).Codec reg := codectypes.NewInterfaceRegistry() testdata.RegisterInterfaces(reg) // required for test case: "GetAuxSignerData works for DIRECT_AUX" - bankModule.RegisterInterfaces(reg) + counterModule.RegisterInterfaces(reg) var b tx.AuxTxBuilder diff --git a/client/tx/legacy_test.go b/client/tx/legacy_test.go index 0d399ab2d8..15aac03152 100644 --- a/client/tx/legacy_test.go +++ b/client/tx/legacy_test.go @@ -1,10 +1,8 @@ package tx_test import ( - banktypes "cosmossdk.io/x/bank/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - "github.com/cosmos/cosmos-sdk/types" + countertypes "github.com/cosmos/cosmos-sdk/x/counter/types" ) const ( @@ -16,7 +14,7 @@ var ( _, pub1, addr1 = testdata.KeyTestPubAddr() _, _, addr2 = testdata.KeyTestPubAddr() rawSig = []byte("dummy") - msg1 = banktypes.NewMsgSend(addr1, addr2, types.NewCoins(types.NewInt64Coin("wack", 2))) + msg1 = &countertypes.MsgIncreaseCounter{Signer: addr1.String(), Count: 1} chainID = "test-chain" ) diff --git a/client/tx/tx_test.go b/client/tx/tx_test.go index 25f571d459..7b2b4b7f0d 100644 --- a/client/tx/tx_test.go +++ b/client/tx/tx_test.go @@ -9,8 +9,6 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" - banktypes "cosmossdk.io/x/bank/types" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/codec" @@ -26,6 +24,7 @@ import ( ante "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + countertypes "github.com/cosmos/cosmos-sdk/x/counter/types" ) func newTestTxConfig() (client.TxConfig, codec.Codec) { @@ -127,7 +126,7 @@ func TestBuildSimTx(t *testing.T) { require.NoError(t, err) txf := mockTxFactory(txCfg).WithSignMode(defaultSignMode).WithKeybase(kb) - msg := banktypes.NewMsgSend(sdk.AccAddress("from"), sdk.AccAddress("to"), nil) + msg := &countertypes.MsgIncreaseCounter{Signer: sdk.AccAddress("from").String(), Count: 1} bz, err := txf.BuildSimTx(msg) require.NoError(t, err) require.NotNil(t, bz) @@ -143,7 +142,7 @@ func TestBuildUnsignedTx(t *testing.T) { _, _, err = kb.NewMnemonic("test_key1", keyring.English, path, keyring.DefaultBIP39Passphrase, hd.Secp256k1) require.NoError(t, err) txf := mockTxFactory(txConfig).WithKeybase(kb) - msg := banktypes.NewMsgSend(sdk.AccAddress("from"), sdk.AccAddress("to"), nil) + msg := &countertypes.MsgIncreaseCounter{Signer: sdk.AccAddress("from").String(), Count: 1} tx, err := txf.BuildUnsignedTx(msg) require.NoError(t, err) require.NotNil(t, tx) @@ -162,7 +161,7 @@ func TestBuildUnsignedTxWithWithExtensionOptions(t *testing.T) { }, } txf := mockTxFactory(txCfg).WithExtensionOptions(extOpts...) - msg := banktypes.NewMsgSend(sdk.AccAddress("from"), sdk.AccAddress("to"), nil) + msg := &countertypes.MsgIncreaseCounter{Signer: sdk.AccAddress("from").String(), Count: 1} tx, err := txf.BuildUnsignedTx(msg) require.NoError(t, err) require.NotNil(t, tx) @@ -205,7 +204,7 @@ func TestMnemonicInMemo(t *testing.T) { WithChainID("test-chain"). WithKeybase(kb) - msg := banktypes.NewMsgSend(sdk.AccAddress("from"), sdk.AccAddress("to"), nil) + msg := &countertypes.MsgIncreaseCounter{Signer: sdk.AccAddress("from").String(), Count: 1} tx, err := txf.BuildUnsignedTx(msg) if tc.error { require.Error(t, err) @@ -256,8 +255,8 @@ func TestSign(t *testing.T) { requireT.NoError(err) addr2, err := k2.GetAddress() requireT.NoError(err) - msg1 := banktypes.NewMsgSend(addr1, sdk.AccAddress("to"), nil) - msg2 := banktypes.NewMsgSend(addr2, sdk.AccAddress("to"), nil) + msg1 := &countertypes.MsgIncreaseCounter{Signer: addr1.String(), Count: 1} + msg2 := &countertypes.MsgIncreaseCounter{Signer: addr2.String(), Count: 1} txb, err := txfNoKeybase.BuildUnsignedTx(msg1, msg2) requireT.NoError(err) txb2, err := txfNoKeybase.BuildUnsignedTx(msg1, msg2) @@ -404,8 +403,8 @@ func TestPreprocessHook(t *testing.T) { addr1, err := kr.GetAddress() requireT.NoError(err) - msg1 := banktypes.NewMsgSend(addr1, sdk.AccAddress("to"), nil) - msg2 := banktypes.NewMsgSend(addr2, sdk.AccAddress("to"), nil) + msg1 := &countertypes.MsgIncreaseCounter{Signer: addr1.String(), Count: 1} + msg2 := &countertypes.MsgIncreaseCounter{Signer: addr2.String(), Count: 1} txb, err := txfDirect.BuildUnsignedTx(msg1, msg2) requireT.NoError(err) diff --git a/client/v2/go.mod b/client/v2/go.mod index 3bef062da4..baf6851585 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/client/v2 go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 diff --git a/client/v2/go.sum b/client/v2/go.sum index 56febcb731..66328b566c 100644 --- a/client/v2/go.sum +++ b/client/v2/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/codec/bench_test.go b/codec/bench_test.go index 4ffb2bbc38..b52135a951 100644 --- a/codec/bench_test.go +++ b/codec/bench_test.go @@ -7,30 +7,29 @@ import ( protov2 "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/dynamicpb" - bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" - banktypes "cosmossdk.io/x/bank/types" + counterv1 "cosmossdk.io/api/cosmos/counter/v1" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" + countertypes "github.com/cosmos/cosmos-sdk/x/counter/types" ) -type bankSendWrapper struct { - *banktypes.MsgSend +type msgCounterWrapper struct { + *countertypes.MsgIncreaseCounter } -func (msg bankSendWrapper) GetSigners() []sdk.AccAddress { - fromAddress, _ := sdk.AccAddressFromBech32(msg.FromAddress) +func (msg msgCounterWrapper) GetSigners() []sdk.AccAddress { + fromAddress, _ := sdk.AccAddressFromBech32(msg.Signer) return []sdk.AccAddress{fromAddress} } func BenchmarkLegacyGetSigners(b *testing.B) { _, _, addr := testdata.KeyTestPubAddr() - msg := bankSendWrapper{&banktypes.MsgSend{ - FromAddress: addr.String(), - ToAddress: "", - Amount: nil, + msg := msgCounterWrapper{&countertypes.MsgIncreaseCounter{ + Signer: addr.String(), + Count: 2, }} b.ResetTimer() @@ -44,10 +43,9 @@ func BenchmarkProtoreflectGetSigners(b *testing.B) { signingCtx := cdc.InterfaceRegistry().SigningContext() _, _, addr := testdata.KeyTestPubAddr() // use a pulsar message - msg := &bankv1beta1.MsgSend{ - FromAddress: addr.String(), - ToAddress: "", - Amount: nil, + msg := &counterv1.MsgIncreaseCounter{ + Signer: addr.String(), + Count: 1, } b.ResetTimer() @@ -63,10 +61,9 @@ func BenchmarkProtoreflectGetSignersWithUnmarshal(b *testing.B) { cdc := codectestutil.CodecOptions{}.NewCodec() _, _, addr := testdata.KeyTestPubAddr() // start with a protoreflect message - msg := &banktypes.MsgSend{ - FromAddress: addr.String(), - ToAddress: "", - Amount: nil, + msg := &countertypes.MsgIncreaseCounter{ + Signer: addr.String(), + Count: 1, } // marshal to an any first because this is what we get from the wire a, err := codectypes.NewAnyWithValue(msg) @@ -85,10 +82,9 @@ func BenchmarkProtoreflectGetSignersDynamicpb(b *testing.B) { cdc := codectestutil.CodecOptions{}.NewCodec() signingCtx := cdc.InterfaceRegistry().SigningContext() _, _, addr := testdata.KeyTestPubAddr() - msg := &bankv1beta1.MsgSend{ - FromAddress: addr.String(), - ToAddress: "", - Amount: nil, + msg := &counterv1.MsgIncreaseCounter{ + Signer: addr.String(), + Count: 1, } bz, err := protov2.Marshal(msg) require.NoError(b, err) diff --git a/codec/proto_codec_test.go b/codec/proto_codec_test.go index c674437cef..d4d6d12bac 100644 --- a/codec/proto_codec_test.go +++ b/codec/proto_codec_test.go @@ -13,16 +13,14 @@ import ( protov2 "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoregistry" - bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" - basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - sdkmath "cosmossdk.io/math" - banktypes "cosmossdk.io/x/bank/types" + counterv1 "cosmossdk.io/api/cosmos/counter/v1" "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" + countertypes "github.com/cosmos/cosmos-sdk/x/counter/types" ) func createTestInterfaceRegistry() types.InterfaceRegistry { @@ -113,7 +111,7 @@ func TestProtoCodecMarshal(t *testing.T) { require.NoError(t, err) // test typed nil input shouldn't panic - var v *banktypes.QueryBalanceResponse + var v *countertypes.QueryGetCountRequest bz, err = grpcServerEncode(cartoonCdc.GRPCCodec(), v) require.NoError(t, err) require.Empty(t, bz) @@ -189,15 +187,9 @@ func TestGetSigners(t *testing.T) { cdc := codec.NewProtoCodec(interfaceRegistry) testAddr := sdk.AccAddress("test") testAddrStr := testAddr.String() - testAddr2 := sdk.AccAddress("test2") - testAddrStr2 := testAddr2.String() - msgSendV1 := banktypes.NewMsgSend(testAddr, testAddr2, sdk.NewCoins(sdk.NewCoin("foo", sdkmath.NewInt(1)))) - msgSendV2 := &bankv1beta1.MsgSend{ - FromAddress: testAddrStr, - ToAddress: testAddrStr2, - Amount: []*basev1beta1.Coin{{Denom: "foo", Amount: "1"}}, - } + msgSendV1 := &countertypes.MsgIncreaseCounter{Signer: testAddrStr, Count: 1} + msgSendV2 := &counterv1.MsgIncreaseCounter{Signer: testAddrStr, Count: 1} signers, msgSendV2Copy, err := cdc.GetMsgV1Signers(msgSendV1) require.NoError(t, err) diff --git a/collections/README.md b/collections/README.md index 0210a9466a..842881648d 100644 --- a/collections/README.md +++ b/collections/README.md @@ -23,11 +23,12 @@ go get cosmossdk.io/collections ## Core types Collections offers 5 different APIs to work with state, which will be explored in the next sections, these APIs are: -- ``Map``: to work with typed arbitrary KV pairings. -- ``KeySet``: to work with just typed keys -- ``Item``: to work with just one typed value -- ``Sequence``: which is a monotonically increasing number. -- ``IndexedMap``: which combines ``Map`` and `KeySet` to provide a `Map` with indexing capabilities. + +* ``Map``: to work with typed arbitrary KV pairings. +* ``KeySet``: to work with just typed keys +* ``Item``: to work with just one typed value +* ``Sequence``: which is a monotonically increasing number. +* ``IndexedMap``: which combines ``Map`` and `KeySet` to provide a `Map` with indexing capabilities. ## Preliminary components @@ -82,8 +83,9 @@ The second argument passed to our ``KeySet`` is a `collections.Prefix`, a prefix where all the state of a specific collection will be saved. Since a module can have multiple collections, the following is expected: -- module params will become a `collections.Item` -- the `AllowList` is a `collections.KeySet` + +* module params will become a `collections.Item` +* the `AllowList` is a `collections.KeySet` We don't want a collection to write over the state of the other collection so we pass it a prefix, which defines a storage partition owned by the collection. @@ -91,6 +93,7 @@ partition owned by the collection. If you already built modules, the prefix translates to the items you were creating in your ``types/keys.go`` file, example: https://github.com/cosmos/cosmos-sdk/blob/main/x/feegrant/key.go#L27 your old: + ```go var ( // FeeAllowanceKeyPrefix is the set of the kvstore for fee allowance data @@ -102,7 +105,9 @@ var ( FeeAllowanceQueueKeyPrefix = []byte{0x01} ) ``` + becomes: + ```go var ( // FeeAllowanceKeyPrefix is the set of the kvstore for fee allowance data @@ -130,6 +135,7 @@ prefix2 := collections.NewPrefix("prefix") // THIS IS BAD! prefix1 := collections.NewPrefix("a") prefix2 := collections.NewPrefix("aa") // prefix2 starts with the same as prefix1: BAD!!! ``` + ### Human-Readable Name The third parameter we pass to a collection is a string, which is a human-readable name. @@ -390,6 +396,7 @@ func (k Keeper) RemoveValidator(ctx sdk.Context, validator sdk.ValAddress) error return nil } ``` + The first difference we notice is that `KeySet` needs use to specify only one type parameter: the key (`sdk.ValAddress` in this case). The second difference we notice is that `KeySet` in its `NewKeySet` function does not require us to specify a `ValueCodec` but only a `KeyCodec`. This is because a `KeySet` only saves keys and not values. @@ -679,6 +686,7 @@ func NewKeeper(storeKey *storetypes.KVStoreKey) Keeper { #### The Map Key definition First of all we can see that in order to define a composite key of two elements we use the `collections.Pair` type: + ````go collections.Map[collections.Pair[sdk.AccAddress, string], math.Int] ```` diff --git a/go.mod b/go.mod index 5b98f0ec91..c2d7a6bf85 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ go 1.21 module github.com/cosmos/cosmos-sdk require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 @@ -12,7 +12,6 @@ require ( cosmossdk.io/math v1.1.3-rc.1 cosmossdk.io/store v1.0.0-rc.0 cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/distribution v0.0.0-20230925135524-a1bc045b3190 cosmossdk.io/x/gov v0.0.0-20230925135524-a1bc045b3190 cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 @@ -66,7 +65,6 @@ require ( ) require ( - cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/DataDog/zstd v1.5.5 // indirect diff --git a/go.sum b/go.sum index c703d0515d..314636e940 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/proto/cosmos/counter/v1/tx.proto b/proto/cosmos/counter/v1/tx.proto index 0a733e05c1..0d4a2ef480 100644 --- a/proto/cosmos/counter/v1/tx.proto +++ b/proto/cosmos/counter/v1/tx.proto @@ -4,6 +4,7 @@ package cosmos.counter.v1; import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; +import "amino/amino.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/counter/types"; @@ -17,6 +18,7 @@ service Msg { // MsgIncreaseCounter defines a count Msg service counter. message MsgIncreaseCounter { + option (amino.name) = "cosmos-sdk/increase_counter"; // TODO: remove amino option (cosmos.msg.v1.signer) = "signer"; // signer is the address that controls the module (defaults to x/gov unless overwritten). diff --git a/simapp/go.mod b/simapp/go.mod index 70a5e8a318..30e08346b3 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/simapp go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 @@ -213,6 +213,7 @@ require ( // SimApp on main always tests the latest extracted SDK modules importing the sdk replace ( + cosmossdk.io/api => ../api cosmossdk.io/client/v2 => ../client/v2 cosmossdk.io/tools/confix => ../tools/confix cosmossdk.io/x/authz => ../x/authz diff --git a/simapp/go.sum b/simapp/go.sum index b5f41857b1..16354abe7c 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -187,8 +187,6 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/simapp/gomod2nix.toml b/simapp/gomod2nix.toml index d4962a77a6..2cded1b220 100644 --- a/simapp/gomod2nix.toml +++ b/simapp/gomod2nix.toml @@ -16,9 +16,6 @@ schema = 3 [mod."cloud.google.com/go/storage"] version = "v1.33.0" hash = "sha256-oW2OubL84ZHjw7/XD6Pjl6pdUPkAqtFS2bXQKVUec6A=" - [mod."cosmossdk.io/api"] - version = "v0.7.2" - hash = "sha256-iJOdaqOqjXHZtfUOrUxJAYP5bUshIOMMaXcZ5ZFy2ZA=" [mod."cosmossdk.io/collections"] version = "v0.4.0" hash = "sha256-minFyzgO/D+Oda4E3B1qvOAN5qd65SjS6nmjca4cp/8=" diff --git a/tests/go.mod b/tests/go.mod index 8f7df4e310..2588ec8f60 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -3,7 +3,7 @@ module github.com/cosmos/cosmos-sdk/tests go 1.21 require ( - cosmossdk.io/api v0.7.3-0.20231018072017-35c402025504 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 @@ -42,6 +42,7 @@ require ( cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000 cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 + github.com/google/go-cmp v0.6.0 ) require ( @@ -104,7 +105,6 @@ require ( github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.3.1 // indirect diff --git a/tests/go.sum b/tests/go.sum index 72202ee425..c9ed9a7a6e 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -187,8 +187,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.3-0.20231018072017-35c402025504 h1:DrOuHptmmjB+jIsOG/eLq9cLdb5BZy3y70E60gnZINw= -cosmossdk.io/api v0.7.3-0.20231018072017-35c402025504/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/testutil/integration/example_test.go b/tests/integration/example/example_test.go similarity index 100% rename from testutil/integration/example_test.go rename to tests/integration/example/example_test.go diff --git a/tests/starship/tests/go.mod b/tests/starship/tests/go.mod index 190ea5535a..c8603b141f 100644 --- a/tests/starship/tests/go.mod +++ b/tests/starship/tests/go.mod @@ -48,7 +48,7 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.3 // indirect cloud.google.com/go/storage v1.33.0 // indirect - cosmossdk.io/api v0.7.2 // indirect + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 // indirect cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/core v0.12.0 // indirect diff --git a/tests/starship/tests/go.sum b/tests/starship/tests/go.sum index 1f9b9c9a22..aa62d8c731 100644 --- a/tests/starship/tests/go.sum +++ b/tests/starship/tests/go.sum @@ -187,8 +187,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/testutil/integration/doc.go b/testutil/integration/doc.go index 9bb3feef40..c1b9902d7c 100644 --- a/testutil/integration/doc.go +++ b/testutil/integration/doc.go @@ -1,2 +1,3 @@ // Integration contains the integration test setup used for SDK modules. +// To see how to use this, check the tests/integration/example_test.go file. package integration diff --git a/types/mempool/mempool_test.go b/types/mempool/mempool_test.go index 4901a33974..4f0906bd20 100644 --- a/types/mempool/mempool_test.go +++ b/types/mempool/mempool_test.go @@ -10,7 +10,6 @@ import ( protov2 "google.golang.org/protobuf/proto" "cosmossdk.io/log" - "cosmossdk.io/x/distribution" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -19,6 +18,7 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" txsigning "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/cosmos/cosmos-sdk/x/counter" ) // testPubKey is a dummy implementation of PubKey used for testing. @@ -226,16 +226,16 @@ func (s *MempoolTestSuite) TestSampleTxs() { t := s.T() s.resetMempool() mp := s.mempool - delegatorTx, err := unmarshalTx(msgWithdrawDelegatorReward) + countTx, err := unmarshalTx(msgCounter) require.NoError(t, err) - require.NoError(t, mp.Insert(ctxt, delegatorTx)) + require.NoError(t, mp.Insert(ctxt, countTx)) require.Equal(t, 1, mp.CountTx()) } func unmarshalTx(txBytes []byte) (sdk.Tx, error) { - cfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + cfg := moduletestutil.MakeTestEncodingConfig(counter.AppModuleBasic{}) return cfg.TxConfig.TxJSONDecoder()(txBytes) } -var msgWithdrawDelegatorReward = []byte("{\"body\":{\"messages\":[{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1lzhlnpahvznwfv4jmay2tgaha5kmz5qxerarrl\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc4n4ef9u2lcnj0\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper196ax4vc0lwpxndu9dyhvca7jhxp70rmcvrj90c\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1k2d9ed9vgfuk2m58a2d80q9u6qljkh4vfaqjfq\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1vygmh344ldv9qefss9ek7ggsnxparljlmj56q5\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1ej2es5fjztqjcd4pwa0zyvaevtjd2y5wxxp9gd\"}],\"memo\":\"\",\"timeout_height\":\"0\",\"extension_options\":[],\"non_critical_extension_options\":[]},\"auth_info\":{\"signer_infos\":[{\"public_key\":{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AmbXAy10a0SerEefTYQzqyGQdX5kiTEWJZ1PZKX1oswX\"},\"mode_info\":{\"single\":{\"mode\":\"SIGN_MODE_LEGACY_AMINO_JSON\"}},\"sequence\":\"119\"}],\"fee\":{\"amount\":[{\"denom\":\"uatom\",\"amount\":\"15968\"}],\"gas_limit\":\"638717\",\"payer\":\"\",\"granter\":\"\"}},\"signatures\":[\"ji+inUo4xGlN9piRQLdLCeJWa7irwnqzrMVPcmzJyG5y6NPc+ZuNaIc3uvk5NLDJytRB8AHX0GqNETR\\/Q8fz4Q==\"]}") +var msgCounter = []byte("{\"body\":{\"messages\":[{\"@type\":\"\\/cosmos.counter.v1.MsgIncreaseCounter\",\"signer\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"count\":\"1\"}],\"memo\":\"\",\"timeout_height\":\"0\",\"extension_options\":[],\"non_critical_extension_options\":[]},\"auth_info\":{\"signer_infos\":[{\"public_key\":{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AmbXAy10a0SerEefTYQzqyGQdX5kiTEWJZ1PZKX1oswX\"},\"mode_info\":{\"single\":{\"mode\":\"SIGN_MODE_LEGACY_AMINO_JSON\"}},\"sequence\":\"119\"}],\"fee\":{\"amount\":[{\"denom\":\"uatom\",\"amount\":\"15968\"}],\"gas_limit\":\"638717\",\"payer\":\"\",\"granter\":\"\"}},\"signatures\":[\"ji+inUo4xGlN9piRQLdLCeJWa7irwnqzrMVPcmzJyG5y6NPc+ZuNaIc3uvk5NLDJytRB8AHX0GqNETR\\/Q8fz4Q==\"]}") diff --git a/x/authz/go.mod b/x/authz/go.mod index ecdebea7f7..646d139c47 100644 --- a/x/authz/go.mod +++ b/x/authz/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/authz go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0 diff --git a/x/authz/go.sum b/x/authz/go.sum index e564d4efe0..ea9506fe96 100644 --- a/x/authz/go.sum +++ b/x/authz/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/bank/go.mod b/x/bank/go.mod index b7add03d1d..b4f76f6bed 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/bank go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/bank/go.sum b/x/bank/go.sum index 26066029c2..5fbe99f7b4 100644 --- a/x/bank/go.sum +++ b/x/bank/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/circuit/go.mod b/x/circuit/go.mod index 4306c48c63..0224f95808 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/circuit go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/circuit/go.sum b/x/circuit/go.sum index 56febcb731..66328b566c 100644 --- a/x/circuit/go.sum +++ b/x/circuit/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/circuit/keeper/genesis_test.go b/x/circuit/keeper/genesis_test.go index e85f3f2868..595330b06b 100644 --- a/x/circuit/keeper/genesis_test.go +++ b/x/circuit/keeper/genesis_test.go @@ -34,7 +34,7 @@ func TestGenesisTestSuite(t *testing.T) { } func (s *GenesisTestSuite) SetupTest() { - key := storetypes.NewKVStoreKey(types.StoreKey) + key := storetypes.NewKVStoreKey(types.ModuleName) testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) encCfg := moduletestutil.MakeTestEncodingConfig(circuit.AppModuleBasic{}) diff --git a/x/circuit/types/keys.go b/x/circuit/types/keys.go index db4e1dc620..5a63f2b5b0 100644 --- a/x/circuit/types/keys.go +++ b/x/circuit/types/keys.go @@ -8,9 +8,6 @@ const ( // StoreKey defines the primary module store key StoreKey = ModuleName - - // RouterKey defines the module's message routing key - RouterKey = ModuleName ) // KVStore keys diff --git a/x/counter/README.md b/x/counter/README.md new file mode 100644 index 0000000000..82c1941336 --- /dev/null +++ b/x/counter/README.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 1 +--- + +# `x/counter` + +Counter is a module used for testing purposes within the Cosmos SDK. diff --git a/x/counter/keeper/keeper.go b/x/counter/keeper/keeper.go new file mode 100644 index 0000000000..8fc152fa3e --- /dev/null +++ b/x/counter/keeper/keeper.go @@ -0,0 +1,81 @@ +package keeper + +import ( + "context" + "errors" + "fmt" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "cosmossdk.io/collections" + "cosmossdk.io/core/event" + storetypes "cosmossdk.io/core/store" + + "github.com/cosmos/cosmos-sdk/x/counter/types" +) + +var StoreKey = "Counter" + +type Keeper struct { + event event.Service + + CountStore collections.Item[int64] +} + +func NewKeeper(storeService storetypes.KVStoreService, em event.Service) Keeper { + sb := collections.NewSchemaBuilder(storeService) + return Keeper{ + event: em, + CountStore: collections.NewItem(sb, collections.NewPrefix(0), "count", collections.Int64Value), + } +} + +// Querier + +var _ types.QueryServer = Keeper{} + +// Params queries params of consensus module +func (k Keeper) GetCount(ctx context.Context, _ *types.QueryGetCountRequest) (*types.QueryGetCountResponse, error) { + count, err := k.CountStore.Get(ctx) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return &types.QueryGetCountResponse{TotalCount: 0}, nil + } else { + return nil, status.Error(codes.Internal, err.Error()) + } + } + + return &types.QueryGetCountResponse{TotalCount: count}, nil +} + +// MsgServer + +var _ types.MsgServer = Keeper{} + +func (k Keeper) IncreaseCount(ctx context.Context, msg *types.MsgIncreaseCounter) (*types.MsgIncreaseCountResponse, error) { + var num int64 + num, err := k.CountStore.Get(ctx) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + num = 0 + } else { + return nil, err + } + } + if err := k.CountStore.Set(ctx, num+msg.Count); err != nil { + return nil, err + } + + if err := k.event.EventManager(ctx).EmitKV( + ctx, + "increase_counter", + event.Attribute{Key: "signer", Value: msg.Signer}, + event.Attribute{Key: "new count", Value: fmt.Sprint(num + msg.Count)}); err != nil { + return nil, err + } + + return &types.MsgIncreaseCountResponse{ + NewCount: num + msg.Count, + }, nil +} diff --git a/x/counter/module.go b/x/counter/module.go new file mode 100644 index 0000000000..6c14ff2e5a --- /dev/null +++ b/x/counter/module.go @@ -0,0 +1,106 @@ +package counter + +import ( + gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" + "google.golang.org/grpc" + + modulev1 "cosmossdk.io/api/cosmos/counter/module/v1" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/event" + storetypes "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/x/counter/keeper" + "github.com/cosmos/cosmos-sdk/x/counter/types" +) + +var ( + _ module.AppModuleBasic = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasServices = AppModule{} +) + +// AppModuleBasic defines the basic application module used by the consensus module. +type AppModuleBasic struct{} + +// Name returns the consensus module's name. +func (AppModuleBasic) Name() string { return types.ModuleName } + +// RegisterLegacyAminoCodec registers the consensus module's types on the LegacyAmino codec. +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} + +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) {} + +// RegisterInterfaces registers interfaces and implementations of the bank module. +func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { + types.RegisterInterfaces(registry) +} + +// AppModule implements an application module +type AppModule struct { + AppModuleBasic + + keeper keeper.Keeper +} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// RegisterServices registers module services. +func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { + types.RegisterMsgServer(registrar, am.keeper) + types.RegisterQueryServer(registrar, am.keeper) + return nil +} + +// NewAppModule creates a new AppModule object +func NewAppModule(keeper keeper.Keeper) AppModule { + return AppModule{ + AppModuleBasic: AppModuleBasic{}, + keeper: keeper, + } +} + +// ConsensusVersion implements AppModule/ConsensusVersion. +func (AppModule) ConsensusVersion() uint64 { return 1 } + +func init() { + appmodule.Register( + &modulev1.Module{}, + appmodule.Provide(ProvideModule), + ) +} + +type ModuleInputs struct { + depinject.In + + Config *modulev1.Module + StoreService storetypes.KVStoreService + EventManager event.Service +} + +type ModuleOutputs struct { + depinject.Out + + Keeper keeper.Keeper + Module appmodule.AppModule +} + +func ProvideModule(in ModuleInputs) ModuleOutputs { + k := keeper.NewKeeper(in.StoreService, in.EventManager) + m := NewAppModule(k) + + return ModuleOutputs{ + Keeper: k, + Module: m, + } +} diff --git a/x/counter/testutil/expected_keepers_mocks.go b/x/counter/testutil/expected_keepers_mocks.go new file mode 100644 index 0000000000..35929b606d --- /dev/null +++ b/x/counter/testutil/expected_keepers_mocks.go @@ -0,0 +1,228 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: x/bank/types/expected_keepers.go + +// Package testutil is a generated GoMock package. +package testutil + +import ( + reflect "reflect" + + types "github.com/cosmos/cosmos-sdk/types" + types0 "github.com/cosmos/cosmos-sdk/x/auth/types" + gomock "github.com/golang/mock/gomock" +) + +// MockAccountKeeper is a mock of AccountKeeper interface. +type MockAccountKeeper struct { + ctrl *gomock.Controller + recorder *MockAccountKeeperMockRecorder +} + +// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper. +type MockAccountKeeperMockRecorder struct { + mock *MockAccountKeeper +} + +// NewMockAccountKeeper creates a new mock instance. +func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper { + mock := &MockAccountKeeper{ctrl: ctrl} + mock.recorder = &MockAccountKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { + return m.recorder +} + +// GetAccount mocks base method. +func (m *MockAccountKeeper) GetAccount(ctx types.Context, addr types.AccAddress) types.AccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAccount", ctx, addr) + ret0, _ := ret[0].(types.AccountI) + return ret0 +} + +// GetAccount indicates an expected call of GetAccount. +func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr) +} + +// GetAllAccounts mocks base method. +func (m *MockAccountKeeper) GetAllAccounts(ctx types.Context) []types.AccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllAccounts", ctx) + ret0, _ := ret[0].([]types.AccountI) + return ret0 +} + +// GetAllAccounts indicates an expected call of GetAllAccounts. +func (mr *MockAccountKeeperMockRecorder) GetAllAccounts(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllAccounts", reflect.TypeOf((*MockAccountKeeper)(nil).GetAllAccounts), ctx) +} + +// GetModuleAccount mocks base method. +func (m *MockAccountKeeper) GetModuleAccount(ctx types.Context, moduleName string) types0.ModuleAccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAccount", ctx, moduleName) + ret0, _ := ret[0].(types0.ModuleAccountI) + return ret0 +} + +// GetModuleAccount indicates an expected call of GetModuleAccount. +func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, moduleName) +} + +// GetModuleAccountAndPermissions mocks base method. +func (m *MockAccountKeeper) GetModuleAccountAndPermissions(ctx types.Context, moduleName string) (types0.ModuleAccountI, []string) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAccountAndPermissions", ctx, moduleName) + ret0, _ := ret[0].(types0.ModuleAccountI) + ret1, _ := ret[1].([]string) + return ret0, ret1 +} + +// GetModuleAccountAndPermissions indicates an expected call of GetModuleAccountAndPermissions. +func (mr *MockAccountKeeperMockRecorder) GetModuleAccountAndPermissions(ctx, moduleName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccountAndPermissions", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccountAndPermissions), ctx, moduleName) +} + +// GetModuleAddress mocks base method. +func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types.AccAddress { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAddress", moduleName) + ret0, _ := ret[0].(types.AccAddress) + return ret0 +} + +// GetModuleAddress indicates an expected call of GetModuleAddress. +func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), moduleName) +} + +// GetModuleAddressAndPermissions mocks base method. +func (m *MockAccountKeeper) GetModuleAddressAndPermissions(moduleName string) (types.AccAddress, []string) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAddressAndPermissions", moduleName) + ret0, _ := ret[0].(types.AccAddress) + ret1, _ := ret[1].([]string) + return ret0, ret1 +} + +// GetModuleAddressAndPermissions indicates an expected call of GetModuleAddressAndPermissions. +func (mr *MockAccountKeeperMockRecorder) GetModuleAddressAndPermissions(moduleName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddressAndPermissions", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddressAndPermissions), moduleName) +} + +// GetModulePermissions mocks base method. +func (m *MockAccountKeeper) GetModulePermissions() map[string]types0.PermissionsForAddress { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModulePermissions") + ret0, _ := ret[0].(map[string]types0.PermissionsForAddress) + return ret0 +} + +// GetModulePermissions indicates an expected call of GetModulePermissions. +func (mr *MockAccountKeeperMockRecorder) GetModulePermissions() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModulePermissions", reflect.TypeOf((*MockAccountKeeper)(nil).GetModulePermissions)) +} + +// HasAccount mocks base method. +func (m *MockAccountKeeper) HasAccount(ctx types.Context, addr types.AccAddress) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "HasAccount", ctx, addr) + ret0, _ := ret[0].(bool) + return ret0 +} + +// HasAccount indicates an expected call of HasAccount. +func (mr *MockAccountKeeperMockRecorder) HasAccount(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasAccount", reflect.TypeOf((*MockAccountKeeper)(nil).HasAccount), ctx, addr) +} + +// IterateAccounts mocks base method. +func (m *MockAccountKeeper) IterateAccounts(ctx types.Context, process func(types.AccountI) bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IterateAccounts", ctx, process) +} + +// IterateAccounts indicates an expected call of IterateAccounts. +func (mr *MockAccountKeeperMockRecorder) IterateAccounts(ctx, process interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAccounts", reflect.TypeOf((*MockAccountKeeper)(nil).IterateAccounts), ctx, process) +} + +// NewAccount mocks base method. +func (m *MockAccountKeeper) NewAccount(arg0 types.Context, arg1 types.AccountI) types.AccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NewAccount", arg0, arg1) + ret0, _ := ret[0].(types.AccountI) + return ret0 +} + +// NewAccount indicates an expected call of NewAccount. +func (mr *MockAccountKeeperMockRecorder) NewAccount(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccount", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccount), arg0, arg1) +} + +// NewAccountWithAddress mocks base method. +func (m *MockAccountKeeper) NewAccountWithAddress(ctx types.Context, addr types.AccAddress) types.AccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NewAccountWithAddress", ctx, addr) + ret0, _ := ret[0].(types.AccountI) + return ret0 +} + +// NewAccountWithAddress indicates an expected call of NewAccountWithAddress. +func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccountWithAddress", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccountWithAddress), ctx, addr) +} + +// SetAccount mocks base method. +func (m *MockAccountKeeper) SetAccount(ctx types.Context, acc types.AccountI) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetAccount", ctx, acc) +} + +// SetAccount indicates an expected call of SetAccount. +func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), ctx, acc) +} + +// SetModuleAccount mocks base method. +func (m *MockAccountKeeper) SetModuleAccount(ctx types.Context, macc types0.ModuleAccountI) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetModuleAccount", ctx, macc) +} + +// SetModuleAccount indicates an expected call of SetModuleAccount. +func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(ctx, macc interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), ctx, macc) +} + +// ValidatePermissions mocks base method. +func (m *MockAccountKeeper) ValidatePermissions(macc types0.ModuleAccountI) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidatePermissions", macc) + ret0, _ := ret[0].(error) + return ret0 +} + +// ValidatePermissions indicates an expected call of ValidatePermissions. +func (mr *MockAccountKeeperMockRecorder) ValidatePermissions(macc interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatePermissions", reflect.TypeOf((*MockAccountKeeper)(nil).ValidatePermissions), macc) +} diff --git a/x/counter/types/codec.go b/x/counter/types/codec.go new file mode 100644 index 0000000000..36f13df3b9 --- /dev/null +++ b/x/counter/types/codec.go @@ -0,0 +1,16 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgIncreaseCounter{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/counter/types/keys.go b/x/counter/types/keys.go new file mode 100644 index 0000000000..a1a1cbc2fb --- /dev/null +++ b/x/counter/types/keys.go @@ -0,0 +1,9 @@ +package types + +const ( + // ModuleName defines the name of the x/consensus module. + ModuleName = "counter" + + // StoreKey defines the module's store key. + StoreKey = ModuleName +) diff --git a/x/counter/types/tx.pb.go b/x/counter/types/tx.pb.go index 4b50ec60d2..d3b3f9cbf8 100644 --- a/x/counter/types/tx.pb.go +++ b/x/counter/types/tx.pb.go @@ -8,6 +8,7 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" @@ -138,26 +139,28 @@ func init() { func init() { proto.RegisterFile("cosmos/counter/v1/tx.proto", fileDescriptor_16b86a09a73a7eb5) } var fileDescriptor_16b86a09a73a7eb5 = []byte{ - // 302 bytes of a gzipped FileDescriptorProto + // 328 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0xce, 0x2f, 0xcd, 0x2b, 0x49, 0x2d, 0xd2, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x84, 0xc8, 0xe9, 0x41, 0xe5, 0xf4, 0xca, 0x0c, 0xa5, 0x24, 0x21, 0x42, 0xf1, 0x60, 0x05, 0xfa, 0x50, 0x79, 0x30, 0x47, 0x4a, 0x1c, 0x6a, 0x52, - 0x6e, 0x71, 0x3a, 0xc8, 0x94, 0xdc, 0xe2, 0x74, 0x88, 0x84, 0x52, 0x26, 0x97, 0x90, 0x6f, 0x71, - 0xba, 0x67, 0x5e, 0x72, 0x51, 0x6a, 0x62, 0x71, 0xaa, 0x33, 0xc4, 0x30, 0x21, 0x03, 0x2e, 0xb6, - 0xe2, 0xcc, 0xf4, 0xbc, 0xd4, 0x22, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0x89, 0x4b, 0x5b, - 0x74, 0x45, 0xa0, 0x06, 0x3a, 0xa6, 0xa4, 0x14, 0xa5, 0x16, 0x17, 0x07, 0x97, 0x14, 0x65, 0xe6, - 0xa5, 0x07, 0x41, 0xd5, 0x09, 0x89, 0x70, 0xb1, 0x82, 0x5d, 0x22, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, - 0x1c, 0x04, 0xe1, 0x58, 0x71, 0x37, 0x3d, 0xdf, 0xa0, 0x05, 0x55, 0xa2, 0x64, 0xce, 0x25, 0x81, - 0x6e, 0x55, 0x50, 0x6a, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x90, 0x34, 0x17, 0x67, 0x5e, 0x6a, - 0x79, 0x3c, 0xc4, 0x08, 0x46, 0xb0, 0x11, 0x1c, 0x79, 0xa9, 0xe5, 0x60, 0x45, 0x46, 0x85, 0x5c, - 0xcc, 0xbe, 0xc5, 0xe9, 0x42, 0xc9, 0x5c, 0xbc, 0x28, 0x9a, 0x85, 0x54, 0xf5, 0x30, 0xc2, 0x40, - 0x0f, 0xd3, 0x33, 0x52, 0xda, 0x44, 0x28, 0x83, 0x39, 0x44, 0x8a, 0xb5, 0xe1, 0xf9, 0x06, 0x2d, - 0x46, 0x27, 0xb7, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, - 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0x49, 0xcf, - 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, 0x47, 0x0f, 0x88, 0xd2, 0x2d, 0x4e, - 0xc9, 0xd6, 0xaf, 0x80, 0xc7, 0x55, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x94, 0x8d, - 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8d, 0x8f, 0x77, 0x03, 0xca, 0x01, 0x00, 0x00, + 0x6e, 0x71, 0x3a, 0xc8, 0x94, 0xdc, 0xe2, 0x74, 0xa8, 0x84, 0x60, 0x62, 0x6e, 0x66, 0x5e, 0xbe, + 0x3e, 0x98, 0x84, 0x08, 0x29, 0x75, 0x32, 0x72, 0x09, 0xf9, 0x16, 0xa7, 0x7b, 0xe6, 0x25, 0x17, + 0xa5, 0x26, 0x16, 0xa7, 0x3a, 0x43, 0x2c, 0x10, 0x32, 0xe0, 0x62, 0x2b, 0xce, 0x4c, 0xcf, 0x4b, + 0x2d, 0x92, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x92, 0xb8, 0xb4, 0x45, 0x57, 0x04, 0x6a, 0x89, + 0x63, 0x4a, 0x4a, 0x51, 0x6a, 0x71, 0x71, 0x70, 0x49, 0x51, 0x66, 0x5e, 0x7a, 0x10, 0x54, 0x9d, + 0x90, 0x08, 0x17, 0x2b, 0xd8, 0x75, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x10, 0x8e, 0x95, + 0x76, 0xd3, 0xf3, 0x0d, 0x5a, 0x50, 0x25, 0x5d, 0xcf, 0x37, 0x68, 0x49, 0x43, 0xcc, 0xd0, 0x2d, + 0x4e, 0xc9, 0xd6, 0xcf, 0x84, 0xda, 0x19, 0x0f, 0xf5, 0x95, 0x92, 0x39, 0x97, 0x04, 0xba, 0x53, + 0x82, 0x52, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0xa4, 0xb9, 0x38, 0xf3, 0x52, 0xcb, 0x21, + 0x4a, 0xc1, 0x6e, 0x62, 0x0e, 0xe2, 0xc8, 0x4b, 0x2d, 0x07, 0x2b, 0x32, 0x2a, 0xe4, 0x62, 0xf6, + 0x2d, 0x4e, 0x17, 0x4a, 0xe6, 0xe2, 0x45, 0xd1, 0x2c, 0xa4, 0xaa, 0x87, 0x11, 0x6e, 0x7a, 0x98, + 0x9e, 0x95, 0xd2, 0x26, 0x42, 0x19, 0xcc, 0x21, 0x52, 0xac, 0x0d, 0xcf, 0x37, 0x68, 0x31, 0x3a, + 0xb9, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, + 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x4e, 0x7a, 0x66, 0x49, + 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x3c, 0x4a, 0xe1, 0x9e, 0xae, 0x80, 0xc7, 0x6f, + 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x1a, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x6a, 0x52, 0x30, 0x21, 0xfe, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/distribution/go.mod b/x/distribution/go.mod index efcfa1718c..8c62f6868d 100644 --- a/x/distribution/go.mod +++ b/x/distribution/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/distribution go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/distribution/go.sum b/x/distribution/go.sum index a3605a03a8..15ea85ec51 100644 --- a/x/distribution/go.sum +++ b/x/distribution/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/evidence/go.mod b/x/evidence/go.mod index 4bb8133671..985b378583 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/evidence go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/evidence/go.sum b/x/evidence/go.sum index 56febcb731..66328b566c 100644 --- a/x/evidence/go.sum +++ b/x/evidence/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index 10bee23345..cd66e2ead2 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/feegrant go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/feegrant/go.sum b/x/feegrant/go.sum index bfcc48e28f..cf0fb6006b 100644 --- a/x/feegrant/go.sum +++ b/x/feegrant/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/gov/go.mod b/x/gov/go.mod index a269456a87..a81760a998 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/gov go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/gov/go.sum b/x/gov/go.sum index e564d4efe0..ea9506fe96 100644 --- a/x/gov/go.sum +++ b/x/gov/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/group/go.mod b/x/group/go.mod index e332da0347..3468a048c5 100644 --- a/x/group/go.mod +++ b/x/group/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/group go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0 diff --git a/x/group/go.sum b/x/group/go.sum index 1018d3dbbe..f30bc68b3d 100644 --- a/x/group/go.sum +++ b/x/group/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/mint/go.mod b/x/mint/go.mod index 2be7fbf2f4..41c6990139 100644 --- a/x/mint/go.mod +++ b/x/mint/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/mint go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/mint/go.sum b/x/mint/go.sum index 26066029c2..5fbe99f7b4 100644 --- a/x/mint/go.sum +++ b/x/mint/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/nft/go.mod b/x/nft/go.mod index a1d7200eb3..64169b4206 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/nft go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0 diff --git a/x/nft/go.sum b/x/nft/go.sum index 56febcb731..66328b566c 100644 --- a/x/nft/go.sum +++ b/x/nft/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/params/go.mod b/x/params/go.mod index c4b119ffce..dfac162f62 100644 --- a/x/params/go.mod +++ b/x/params/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/params go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0 diff --git a/x/params/go.sum b/x/params/go.sum index 56febcb731..66328b566c 100644 --- a/x/params/go.sum +++ b/x/params/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index aa3e71650d..767bf474e7 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/protocolpool go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0 diff --git a/x/protocolpool/go.sum b/x/protocolpool/go.sum index e564d4efe0..ea9506fe96 100644 --- a/x/protocolpool/go.sum +++ b/x/protocolpool/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/slashing/go.mod b/x/slashing/go.mod index 0c196cc3db..02554147f2 100644 --- a/x/slashing/go.mod +++ b/x/slashing/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/slashing go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/slashing/go.sum b/x/slashing/go.sum index a3605a03a8..15ea85ec51 100644 --- a/x/slashing/go.sum +++ b/x/slashing/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/staking/go.mod b/x/staking/go.mod index 921321817a..4a597a52f7 100644 --- a/x/staking/go.mod +++ b/x/staking/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/staking go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 diff --git a/x/staking/go.sum b/x/staking/go.sum index a3605a03a8..15ea85ec51 100644 --- a/x/staking/go.sum +++ b/x/staking/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU= diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index 616addfdd3..f9f67a9d79 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/x/upgrade go 1.21 require ( - cosmossdk.io/api v0.7.2 + cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0 diff --git a/x/upgrade/go.sum b/x/upgrade/go.sum index 4c68854641..105088e08c 100644 --- a/x/upgrade/go.sum +++ b/x/upgrade/go.sum @@ -187,8 +187,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54 h1:c7kl5S1ME0q2g/7cdxngOAZr6N/5L7vVibmrmQZrQ0U= +cosmossdk.io/api v0.7.3-0.20231029200940-6af7f30bfd54/go.mod h1:7B/5XWh1HYwJk3DzWeNoxOSI+nGx1m5UyYfHLFuKzkw= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU=