From 9db63b709508c544cd461f6bae13aa1b026e70e2 Mon Sep 17 00:00:00 2001 From: Marko Date: Tue, 3 Sep 2024 23:12:21 +0200 Subject: [PATCH] refactor: revert auth extraction (#21507) (cherry picked from commit 70488a89a87ab212377d98025ac1212fb635d34c) # Conflicts: # api/cosmos/auth/module/v1/module.pulsar.go # api/cosmos/tx/config/v1/config.pulsar.go # client/v2/go.mod # collections/README.md # collections/collections.go # collections/indexing.go # depinject/appconfig/README.md # go.mod # server/v2/cometbft/go.mod # x/accounts/defaults/lockup/go.mod # x/accounts/defaults/multisig/go.mod # x/auth/go.mod # x/auth/go.sum # x/authz/go.mod # x/bank/go.mod # x/circuit/go.mod # x/consensus/go.mod # x/distribution/go.mod # x/epochs/go.mod # x/evidence/go.mod # x/feegrant/go.mod # x/gov/go.mod # x/mint/go.mod # x/nft/go.mod # x/params/go.mod # x/protocolpool/go.mod # x/slashing/go.mod # x/staking/go.mod # x/upgrade/go.mod --- .github/workflows/test.yml | 31 - CHANGELOG.md | 1 - README.md | 1 - UPGRADING.md | 2 +- api/cosmos/auth/module/v1/module.pulsar.go | 1417 +++++++++++++++++ api/cosmos/tx/config/v1/config.pulsar.go | 635 ++++++++ baseapp/abci_test.go | 2 +- baseapp/abci_utils_test.go | 2 +- baseapp/baseapp_test.go | 2 +- baseapp/msg_service_router_test.go | 4 +- baseapp/utils_test.go | 6 +- client/tx/tx.go | 3 +- client/tx/tx_test.go | 7 +- client/tx_config.go | 2 +- client/v2/autocli/msg.go | 2 +- client/v2/go.mod | 11 + collections/README.md | 1210 ++++++++++++++ collections/collections.go | 180 +++ collections/indexing.go | 181 +++ crypto/keyring/autocli.go | 2 +- crypto/keys/multisig/multisig_test.go | 2 +- depinject/appconfig/README.md | 232 +++ .../adr-011-generalize-genesis-accounts.md | 2 +- docs/architecture/adr-057-app-wiring.md | 2 +- go.mod | 12 + proto/cosmos/tx/config/v1/config.proto | 2 +- runtime/app.go | 4 +- runtime/builder.go | 2 +- server/cmt_cmds.go | 2 +- server/mock/tx.go | 2 +- server/v2/cometbft/config.go | 1 - server/v2/cometbft/go.mod | 14 + simapp/ante.go | 4 +- simapp/app.go | 24 +- simapp/app_config.go | 8 +- simapp/app_di.go | 12 +- simapp/app_test.go | 4 +- simapp/genesis_account.go | 3 +- simapp/genesis_account_test.go | 2 +- simapp/go.mod | 2 - simapp/mint_fn.go | 2 +- simapp/simd/cmd/commands.go | 2 +- simapp/simd/cmd/root.go | 6 +- simapp/simd/cmd/root_di.go | 6 +- simapp/simd/cmd/testnet.go | 2 +- simapp/simd/cmd/testnet_test.go | 2 +- simapp/test_helpers.go | 2 +- simapp/upgrades.go | 2 +- simapp/upgrades_test.go | 5 +- simapp/v2/app_config.go | 10 +- simapp/v2/app_di.go | 2 +- simapp/v2/app_test.go | 2 +- simapp/v2/genesis_account.go | 3 +- simapp/v2/genesis_account_test.go | 2 +- simapp/v2/go.mod | 2 - simapp/v2/simdv2/cmd/commands.go | 2 +- simapp/v2/simdv2/cmd/root_di.go | 6 +- simapp/v2/simdv2/cmd/testnet.go | 2 +- .../e2e/auth/keeper/account_retriever_test.go | 3 +- tests/e2e/auth/keeper/app_config.go | 16 +- tests/e2e/auth/keeper/keeper_bench_test.go | 2 +- tests/e2e/auth/keeper/module_test.go | 4 +- tests/e2e/auth/suite.go | 4 +- tests/e2e/authz/tx.go | 2 +- tests/e2e/baseapp/block_gas_test.go | 2 +- tests/e2e/baseapp/utils.go | 6 +- tests/e2e/gov/tx.go | 2 +- tests/e2e/tx/benchmarks_test.go | 2 +- tests/e2e/tx/service_test.go | 6 +- tests/go.mod | 4 +- .../integration/auth/client/cli/suite_test.go | 6 +- .../auth/keeper/msg_server_test.go | 8 +- tests/integration/bank/app_test.go | 6 +- tests/integration/bank/bench_test.go | 2 +- .../bank/keeper/deterministic_test.go | 12 +- tests/integration/distribution/appconfig.go | 20 +- .../distribution/keeper/msg_server_test.go | 10 +- tests/integration/distribution/module_test.go | 4 +- tests/integration/evidence/app_config.go | 18 +- .../evidence/keeper/infraction_test.go | 10 +- tests/integration/example/example_test.go | 10 +- tests/integration/gov/abci_test.go | 2 +- tests/integration/gov/common_test.go | 4 +- tests/integration/gov/genesis_test.go | 6 +- tests/integration/gov/keeper/common_test.go | 2 +- tests/integration/gov/keeper/keeper_test.go | 10 +- tests/integration/gov/module_test.go | 4 +- tests/integration/mint/app_config.go | 16 +- tests/integration/mint/module_test.go | 4 +- tests/integration/protocolpool/app_config.go | 20 +- tests/integration/protocolpool/module_test.go | 4 +- tests/integration/rapidgen/rapidgen.go | 4 +- tests/integration/runtime/query_test.go | 4 +- .../server/grpc/out_of_gas_test.go | 4 +- tests/integration/server/grpc/server_test.go | 6 +- tests/integration/slashing/abci_test.go | 2 +- tests/integration/slashing/app_config.go | 22 +- .../slashing/keeper/keeper_test.go | 8 +- .../keeper/slash_redelegation_test.go | 2 +- tests/integration/slashing/slashing_test.go | 2 +- tests/integration/staking/app_config.go | 22 +- .../integration/staking/keeper/common_test.go | 10 +- .../staking/keeper/deterministic_test.go | 10 +- .../integration/staking/keeper/slash_test.go | 2 +- tests/integration/staking/module_test.go | 4 +- .../staking/simulation/operations_test.go | 4 +- .../tx/aminojson/aminojson_test.go | 14 +- tests/integration/tx/decode_test.go | 6 +- tests/integration/types/pagination_test.go | 4 +- tests/sims/authz/operations_test.go | 8 +- tests/sims/bank/operations_test.go | 4 +- tests/sims/distribution/app_config.go | 20 +- tests/sims/distribution/operations_test.go | 2 +- tests/sims/feegrant/operations_test.go | 6 +- tests/sims/gov/operations_test.go | 6 +- tests/sims/nft/app_config.go | 18 +- tests/sims/nft/operations_test.go | 2 +- tests/sims/protocolpool/app_config.go | 20 +- tests/sims/protocolpool/operations_test.go | 2 +- tests/sims/slashing/app_config.go | 22 +- tests/sims/slashing/operations_test.go | 2 +- testutil/cli/tx.go | 3 +- testutil/integration/router.go | 4 +- testutil/network/network.go | 2 +- testutil/network/util.go | 2 +- testutil/sims/app_helpers.go | 2 +- testutil/sims/state_helpers.go | 2 +- testutil/sims/tx_helpers.go | 2 +- .../testutil/expected_keepers_mocks.go | 2 +- types/mempool/mempool_test.go | 2 +- types/mempool/priority_nonce_test.go | 2 +- types/mempool/sender_nonce.go | 3 +- types/mempool/sender_nonce_property_test.go | 2 +- types/mempool/signer_extraction_adapter.go | 3 +- types/module/module_test.go | 2 +- types/module/testutil/codec.go | 3 +- x/accounts/defaults/lockup/go.mod | 5 +- x/accounts/defaults/multisig/go.mod | 5 +- x/accounts/go.mod | 2 - x/auth/ante/ante.go | 4 +- x/auth/ante/ante_test.go | 4 +- x/auth/ante/basic.go | 4 +- x/auth/ante/basic_test.go | 2 +- x/auth/ante/expected_keepers.go | 2 +- x/auth/ante/ext_test.go | 5 +- x/auth/ante/fee.go | 2 +- x/auth/ante/fee_test.go | 4 +- x/auth/ante/feegrant_test.go | 11 +- x/auth/ante/setup_test.go | 2 +- x/auth/ante/sigverify.go | 4 +- x/auth/ante/sigverify_internal_test.go | 6 +- x/auth/ante/sigverify_test.go | 12 +- .../ante/testutil/expected_keepers_mocks.go | 30 +- x/auth/ante/testutil_test.go | 18 +- x/auth/ante/unordered.go | 2 +- x/auth/ante/unordered_test.go | 4 +- x/auth/ante/unorderedtx/manager_test.go | 2 +- x/auth/ante/unorderedtx/snapshotter_test.go | 2 +- x/auth/client/cli/broadcast.go | 3 +- x/auth/client/cli/encode.go | 3 +- x/auth/client/cli/encode_test.go | 5 +- x/auth/client/cli/query.go | 3 +- x/auth/client/cli/query_test.go | 2 +- x/auth/client/cli/tx_multisign.go | 4 +- x/auth/client/cli/tx_sign.go | 4 +- x/auth/client/cli/tx_simulate.go | 3 +- x/auth/client/cli/validate_sigs.go | 4 +- x/auth/client/testutil/helpers.go | 3 +- x/auth/client/tx_test.go | 5 +- x/auth/depinject.go | 8 +- x/auth/keeper/deterministic_test.go | 10 +- x/auth/keeper/genesis.go | 3 +- x/auth/keeper/grpc_query.go | 3 +- x/auth/keeper/grpc_query_test.go | 3 +- x/auth/keeper/keeper.go | 2 +- x/auth/keeper/keeper_test.go | 10 +- x/auth/keeper/migrations.go | 5 +- x/auth/keeper/msg_server.go | 3 +- x/auth/keeper/msg_server_test.go | 3 +- x/auth/migrations/legacytx/stdsig_test.go | 3 +- x/auth/module.go | 8 +- .../proto/cosmos/auth/module/v1/module.proto | 2 +- x/auth/proto/cosmos/auth/v1beta1/auth.proto | 2 +- .../proto/cosmos/auth/v1beta1/genesis.proto | 2 +- x/auth/proto/cosmos/auth/v1beta1/query.proto | 2 +- x/auth/proto/cosmos/auth/v1beta1/tx.proto | 2 +- x/auth/signing/adapter_test.go | 3 +- x/auth/simulation/genesis.go | 5 +- x/auth/simulation/genesis_test.go | 4 +- x/auth/simulation/proposals.go | 2 +- x/auth/simulation/proposals_test.go | 5 +- x/auth/tx/aux_test.go | 3 +- x/auth/tx/builder.go | 2 +- x/auth/tx/config/depinject.go | 10 +- x/auth/tx/config/module.go | 3 +- x/auth/tx/config_test.go | 4 +- x/auth/tx/gogotx.go | 4 +- x/auth/tx/legacy_amino_json.go | 4 +- x/auth/tx/service.go | 3 +- x/auth/tx/testutil/suite.go | 2 +- x/auth/types/account_test.go | 3 +- x/auth/types/auth.pb.go | 96 +- x/auth/types/codec.go | 2 +- x/auth/types/credentials_test.go | 3 +- x/auth/types/genesis.pb.go | 12 +- x/auth/types/genesis_test.go | 5 +- x/auth/types/params_test.go | 2 +- x/auth/types/query.pb.go | 146 +- x/auth/types/tx.pb.go | 71 +- x/auth/vesting/depinject.go | 5 +- x/auth/vesting/module.go | 5 +- .../cosmos/vesting/module/v1/module.proto | 4 +- .../cosmos/vesting/v1beta1/vesting.proto | 2 +- x/auth/vesting/types/codec.go | 4 +- x/auth/vesting/types/expected_keepers.go | 3 +- x/auth/vesting/types/genesis_test.go | 3 +- x/auth/vesting/types/vesting.pb.go | 2 +- x/auth/vesting/types/vesting_account.go | 4 +- x/auth/vesting/types/vesting_account_test.go | 12 +- x/authz/client/cli/tx.go | 2 +- x/authz/go.mod | 13 + x/authz/keeper/msg_server_test.go | 2 +- x/authz/module/abci_test.go | 2 +- x/authz/msgs_test.go | 2 +- x/bank/depinject.go | 2 +- x/bank/go.mod | 11 + x/bank/keeper/collections_test.go | 2 +- x/bank/keeper/grpc_query_test.go | 4 +- x/bank/keeper/keeper.go | 2 +- x/bank/keeper/keeper_test.go | 4 +- x/bank/keeper/msg_server_test.go | 2 +- x/bank/testutil/expected_keepers_mocks.go | 44 +- x/bank/types/expected_keepers.go | 2 +- x/circuit/ante/circuit_test.go | 2 +- x/circuit/depinject.go | 2 +- x/circuit/go.mod | 12 + x/circuit/keeper/genesis_test.go | 2 +- x/circuit/keeper/keeper_test.go | 2 +- x/consensus/go.mod | 8 +- x/distribution/depinject.go | 2 +- x/distribution/go.mod | 11 + x/distribution/keeper/allocation_test.go | 2 +- x/distribution/keeper/common_test.go | 2 +- x/distribution/keeper/delegation_test.go | 2 +- x/distribution/keeper/grpc_query_test.go | 2 +- x/distribution/keeper/keeper_test.go | 2 +- x/distribution/keeper/msg_server_test.go | 2 +- .../migrations/v4/migrate_funds_test.go | 8 +- x/epochs/go.mod | 10 + x/evidence/go.mod | 8 +- x/feegrant/go.mod | 9 +- x/feegrant/keeper/genesis_test.go | 2 +- x/feegrant/keeper/keeper.go | 2 +- x/feegrant/keeper/keeper_test.go | 2 +- x/feegrant/keeper/msg_server_test.go | 2 +- x/feegrant/module/abci_test.go | 2 +- x/feegrant/msgs_test.go | 2 +- x/genutil/client/cli/genaccount_test.go | 2 +- x/genutil/client/cli/gentx.go | 2 +- x/genutil/genaccounts.go | 4 +- x/gov/client/cli/prompt.go | 2 +- x/gov/client/cli/tx_test.go | 2 +- x/gov/client/utils/query.go | 2 +- x/gov/depinject.go | 2 +- x/gov/go.mod | 12 + x/gov/keeper/common_test.go | 2 +- x/gov/keeper/deposit_test.go | 2 +- x/group/go.mod | 2 - x/group/keeper/genesis_test.go | 2 +- x/group/keeper/grpc_query_test.go | 2 +- x/group/keeper/keeper_test.go | 2 +- x/group/keeper/msg_server.go | 2 +- x/group/migrations/v2/gen_state.go | 2 +- x/group/migrations/v2/gen_state_test.go | 2 +- x/group/migrations/v2/migrate.go | 2 +- x/group/migrations/v2/migrate_test.go | 8 +- x/group/simulation/operations_test.go | 2 +- x/group/testutil/app_config.go | 20 +- x/mint/depinject.go | 2 +- x/mint/go.mod | 8 +- x/mint/keeper/genesis_test.go | 2 +- x/mint/keeper/grpc_query_test.go | 2 +- x/mint/keeper/keeper_test.go | 2 +- x/mint/module_test.go | 2 +- x/nft/go.mod | 8 +- x/params/go.mod | 8 +- x/protocolpool/depinject.go | 2 +- x/protocolpool/go.mod | 11 + x/protocolpool/keeper/keeper_test.go | 2 +- x/slashing/depinject.go | 2 +- x/slashing/go.mod | 11 + x/slashing/keeper/keeper_test.go | 2 +- x/staking/depinject.go | 2 +- x/staking/go.mod | 11 + x/staking/keeper/cons_pubkey_test.go | 2 +- x/staking/keeper/keeper_test.go | 2 +- x/staking/keeper/msg_server_test.go | 2 +- x/staking/keeper/validator_test.go | 2 +- x/upgrade/depinject.go | 2 +- x/upgrade/go.mod | 11 + x/upgrade/keeper/abci_test.go | 2 +- x/upgrade/keeper/grpc_query_test.go | 2 +- x/upgrade/keeper/keeper_test.go | 2 +- 303 files changed, 4818 insertions(+), 844 deletions(-) create mode 100644 api/cosmos/auth/module/v1/module.pulsar.go create mode 100644 api/cosmos/tx/config/v1/config.pulsar.go create mode 100644 collections/README.md create mode 100644 collections/collections.go create mode 100644 collections/indexing.go create mode 100644 depinject/appconfig/README.md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2783f7c9d8b..626738f77b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1352,37 +1352,6 @@ jobs: with: projectBaseDir: x/staking/ - test-x-auth: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - check-latest: true - cache: true - cache-dependency-path: x/auth/go.sum - - uses: technote-space/get-diff-action@v6.1.2 - id: git_diff - with: - PATTERNS: | - x/auth/**/*.go - x/auth/go.mod - x/auth/go.sum - - name: tests - if: env.GIT_DIFF - run: | - cd x/auth - go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./... - - name: sonarcloud - if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }} - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - projectBaseDir: x/auth/ - test-x-authz: runs-on: ubuntu-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 791e403f0d4..8c4b040c53c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -160,7 +160,6 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (x/authz) [#18265](https://github.com/cosmos/cosmos-sdk/pull/18265) Authz module was moved to its own go.mod `cosmossdk.io/x/authz` * (x/mint) [#18283](https://github.com/cosmos/cosmos-sdk/pull/18283) Mint module was moved to its own go.mod `cosmossdk.io/x/mint` * (server) [#18303](https://github.com/cosmos/cosmos-sdk/pull/18303) `x/genutil` now handles the application export. `server.AddCommands` does not take an `AppExporter` but instead `genutilcli.Commands` does. -* (x/auth) [#18351](https://github.com/cosmos/cosmos-sdk/pull/18351) Auth module was moved to its own go.mod `cosmossdk.io/x/auth` * (types) [#18372](https://github.com/cosmos/cosmos-sdk/pull/18372) Removed global configuration for coin type and purpose. Setters and getters should be removed and access directly to defined types. * (types) [#18607](https://github.com/cosmos/cosmos-sdk/pull/18607) Removed address verifier from global config, moved verifier function to bech32 codec. * (types) [#18695](https://github.com/cosmos/cosmos-sdk/pull/18695) Removed global configuration for txEncoder. diff --git a/README.md b/README.md index da3187c8856..108c49357c7 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,6 @@ Module Dependencies are the modules that an application may depend on and which | Cosmos SDK | 0.50.z | 0.52.z | | --------------------------- | ------ | ------ | -| cosmossdk.io/x/auth | X | 0.2.z | | cosmossdk.io/x/accounts | N/A | 0.2.z | | cosmossdk.io/x/bank | X | 0.2.z | | cosmossdk.io/x/circuit | 0.1.z | 0.2.z | diff --git a/UPGRADING.md b/UPGRADING.md index c902f9b5613..fc8d2ab3efb 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -387,7 +387,7 @@ For modules that have migrated, verify you are checking against `collections.Err Accounts's AccountNumber will be used as a global account number tracking replacing Auth legacy AccountNumber. Must set accounts's AccountNumber with auth's AccountNumber value in upgrade handler. This is done through auth keeper MigrateAccountNumber function. ```go -import authkeeper "cosmossdk.io/x/auth/keeper" +import authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ... err := authkeeper.MigrateAccountNumberUnsafe(ctx, &app.AuthKeeper) if err != nil { diff --git a/api/cosmos/auth/module/v1/module.pulsar.go b/api/cosmos/auth/module/v1/module.pulsar.go new file mode 100644 index 00000000000..2ba0bff52d4 --- /dev/null +++ b/api/cosmos/auth/module/v1/module.pulsar.go @@ -0,0 +1,1417 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package modulev1 + +import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_Module_2_list)(nil) + +type _Module_2_list struct { + list *[]*ModuleAccountPermission +} + +func (x *_Module_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Module_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Module_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ModuleAccountPermission) + (*x.list)[i] = concreteValue +} + +func (x *_Module_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ModuleAccountPermission) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Module_2_list) AppendMutable() protoreflect.Value { + v := new(ModuleAccountPermission) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Module_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Module_2_list) NewElement() protoreflect.Value { + v := new(ModuleAccountPermission) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Module_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Module protoreflect.MessageDescriptor + fd_Module_bech32_prefix protoreflect.FieldDescriptor + fd_Module_module_account_permissions protoreflect.FieldDescriptor + fd_Module_authority protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_module_v1_module_proto_init() + md_Module = File_cosmos_auth_module_v1_module_proto.Messages().ByName("Module") + fd_Module_bech32_prefix = md_Module.Fields().ByName("bech32_prefix") + fd_Module_module_account_permissions = md_Module.Fields().ByName("module_account_permissions") + fd_Module_authority = md_Module.Fields().ByName("authority") +} + +var _ protoreflect.Message = (*fastReflection_Module)(nil) + +type fastReflection_Module Module + +func (x *Module) ProtoReflect() protoreflect.Message { + return (*fastReflection_Module)(x) +} + +func (x *Module) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_module_v1_module_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Module_messageType fastReflection_Module_messageType +var _ protoreflect.MessageType = fastReflection_Module_messageType{} + +type fastReflection_Module_messageType struct{} + +func (x fastReflection_Module_messageType) Zero() protoreflect.Message { + return (*fastReflection_Module)(nil) +} +func (x fastReflection_Module_messageType) New() protoreflect.Message { + return new(fastReflection_Module) +} +func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Module) Type() protoreflect.MessageType { + return _fastReflection_Module_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Module) New() protoreflect.Message { + return new(fastReflection_Module) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { + return (*Module)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Bech32Prefix != "" { + value := protoreflect.ValueOfString(x.Bech32Prefix) + if !f(fd_Module_bech32_prefix, value) { + return + } + } + if len(x.ModuleAccountPermissions) != 0 { + value := protoreflect.ValueOfList(&_Module_2_list{list: &x.ModuleAccountPermissions}) + if !f(fd_Module_module_account_permissions, value) { + return + } + } + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_Module_authority, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.module.v1.Module.bech32_prefix": + return x.Bech32Prefix != "" + case "cosmos.auth.module.v1.Module.module_account_permissions": + return len(x.ModuleAccountPermissions) != 0 + case "cosmos.auth.module.v1.Module.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.module.v1.Module")) + } + panic(fmt.Errorf("message cosmos.auth.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.module.v1.Module.bech32_prefix": + x.Bech32Prefix = "" + case "cosmos.auth.module.v1.Module.module_account_permissions": + x.ModuleAccountPermissions = nil + case "cosmos.auth.module.v1.Module.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.module.v1.Module")) + } + panic(fmt.Errorf("message cosmos.auth.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.module.v1.Module.bech32_prefix": + value := x.Bech32Prefix + return protoreflect.ValueOfString(value) + case "cosmos.auth.module.v1.Module.module_account_permissions": + if len(x.ModuleAccountPermissions) == 0 { + return protoreflect.ValueOfList(&_Module_2_list{}) + } + listValue := &_Module_2_list{list: &x.ModuleAccountPermissions} + return protoreflect.ValueOfList(listValue) + case "cosmos.auth.module.v1.Module.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.module.v1.Module")) + } + panic(fmt.Errorf("message cosmos.auth.module.v1.Module does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.module.v1.Module.bech32_prefix": + x.Bech32Prefix = value.Interface().(string) + case "cosmos.auth.module.v1.Module.module_account_permissions": + lv := value.List() + clv := lv.(*_Module_2_list) + x.ModuleAccountPermissions = *clv.list + case "cosmos.auth.module.v1.Module.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.module.v1.Module")) + } + panic(fmt.Errorf("message cosmos.auth.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.module.v1.Module.module_account_permissions": + if x.ModuleAccountPermissions == nil { + x.ModuleAccountPermissions = []*ModuleAccountPermission{} + } + value := &_Module_2_list{list: &x.ModuleAccountPermissions} + return protoreflect.ValueOfList(value) + case "cosmos.auth.module.v1.Module.bech32_prefix": + panic(fmt.Errorf("field bech32_prefix of message cosmos.auth.module.v1.Module is not mutable")) + case "cosmos.auth.module.v1.Module.authority": + panic(fmt.Errorf("field authority of message cosmos.auth.module.v1.Module is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.module.v1.Module")) + } + panic(fmt.Errorf("message cosmos.auth.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.module.v1.Module.bech32_prefix": + return protoreflect.ValueOfString("") + case "cosmos.auth.module.v1.Module.module_account_permissions": + list := []*ModuleAccountPermission{} + return protoreflect.ValueOfList(&_Module_2_list{list: &list}) + case "cosmos.auth.module.v1.Module.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.module.v1.Module")) + } + panic(fmt.Errorf("message cosmos.auth.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.module.v1.Module", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Module) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Bech32Prefix) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.ModuleAccountPermissions) > 0 { + for _, e := range x.ModuleAccountPermissions { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0x1a + } + if len(x.ModuleAccountPermissions) > 0 { + for iNdEx := len(x.ModuleAccountPermissions) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ModuleAccountPermissions[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Bech32Prefix) > 0 { + i -= len(x.Bech32Prefix) + copy(dAtA[i:], x.Bech32Prefix) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32Prefix))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Bech32Prefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ModuleAccountPermissions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ModuleAccountPermissions = append(x.ModuleAccountPermissions, &ModuleAccountPermission{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ModuleAccountPermissions[len(x.ModuleAccountPermissions)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ModuleAccountPermission_2_list)(nil) + +type _ModuleAccountPermission_2_list struct { + list *[]string +} + +func (x *_ModuleAccountPermission_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ModuleAccountPermission_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_ModuleAccountPermission_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_ModuleAccountPermission_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_ModuleAccountPermission_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message ModuleAccountPermission at list field Permissions as it is not of Message kind")) +} + +func (x *_ModuleAccountPermission_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_ModuleAccountPermission_2_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_ModuleAccountPermission_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ModuleAccountPermission protoreflect.MessageDescriptor + fd_ModuleAccountPermission_account protoreflect.FieldDescriptor + fd_ModuleAccountPermission_permissions protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_module_v1_module_proto_init() + md_ModuleAccountPermission = File_cosmos_auth_module_v1_module_proto.Messages().ByName("ModuleAccountPermission") + fd_ModuleAccountPermission_account = md_ModuleAccountPermission.Fields().ByName("account") + fd_ModuleAccountPermission_permissions = md_ModuleAccountPermission.Fields().ByName("permissions") +} + +var _ protoreflect.Message = (*fastReflection_ModuleAccountPermission)(nil) + +type fastReflection_ModuleAccountPermission ModuleAccountPermission + +func (x *ModuleAccountPermission) ProtoReflect() protoreflect.Message { + return (*fastReflection_ModuleAccountPermission)(x) +} + +func (x *ModuleAccountPermission) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_module_v1_module_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ModuleAccountPermission_messageType fastReflection_ModuleAccountPermission_messageType +var _ protoreflect.MessageType = fastReflection_ModuleAccountPermission_messageType{} + +type fastReflection_ModuleAccountPermission_messageType struct{} + +func (x fastReflection_ModuleAccountPermission_messageType) Zero() protoreflect.Message { + return (*fastReflection_ModuleAccountPermission)(nil) +} +func (x fastReflection_ModuleAccountPermission_messageType) New() protoreflect.Message { + return new(fastReflection_ModuleAccountPermission) +} +func (x fastReflection_ModuleAccountPermission_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ModuleAccountPermission +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ModuleAccountPermission) Descriptor() protoreflect.MessageDescriptor { + return md_ModuleAccountPermission +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ModuleAccountPermission) Type() protoreflect.MessageType { + return _fastReflection_ModuleAccountPermission_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ModuleAccountPermission) New() protoreflect.Message { + return new(fastReflection_ModuleAccountPermission) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ModuleAccountPermission) Interface() protoreflect.ProtoMessage { + return (*ModuleAccountPermission)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ModuleAccountPermission) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Account != "" { + value := protoreflect.ValueOfString(x.Account) + if !f(fd_ModuleAccountPermission_account, value) { + return + } + } + if len(x.Permissions) != 0 { + value := protoreflect.ValueOfList(&_ModuleAccountPermission_2_list{list: &x.Permissions}) + if !f(fd_ModuleAccountPermission_permissions, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ModuleAccountPermission) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.module.v1.ModuleAccountPermission.account": + return x.Account != "" + case "cosmos.auth.module.v1.ModuleAccountPermission.permissions": + return len(x.Permissions) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.module.v1.ModuleAccountPermission")) + } + panic(fmt.Errorf("message cosmos.auth.module.v1.ModuleAccountPermission does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ModuleAccountPermission) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.module.v1.ModuleAccountPermission.account": + x.Account = "" + case "cosmos.auth.module.v1.ModuleAccountPermission.permissions": + x.Permissions = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.module.v1.ModuleAccountPermission")) + } + panic(fmt.Errorf("message cosmos.auth.module.v1.ModuleAccountPermission does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ModuleAccountPermission) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.module.v1.ModuleAccountPermission.account": + value := x.Account + return protoreflect.ValueOfString(value) + case "cosmos.auth.module.v1.ModuleAccountPermission.permissions": + if len(x.Permissions) == 0 { + return protoreflect.ValueOfList(&_ModuleAccountPermission_2_list{}) + } + listValue := &_ModuleAccountPermission_2_list{list: &x.Permissions} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.module.v1.ModuleAccountPermission")) + } + panic(fmt.Errorf("message cosmos.auth.module.v1.ModuleAccountPermission does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ModuleAccountPermission) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.module.v1.ModuleAccountPermission.account": + x.Account = value.Interface().(string) + case "cosmos.auth.module.v1.ModuleAccountPermission.permissions": + lv := value.List() + clv := lv.(*_ModuleAccountPermission_2_list) + x.Permissions = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.module.v1.ModuleAccountPermission")) + } + panic(fmt.Errorf("message cosmos.auth.module.v1.ModuleAccountPermission does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ModuleAccountPermission) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.module.v1.ModuleAccountPermission.permissions": + if x.Permissions == nil { + x.Permissions = []string{} + } + value := &_ModuleAccountPermission_2_list{list: &x.Permissions} + return protoreflect.ValueOfList(value) + case "cosmos.auth.module.v1.ModuleAccountPermission.account": + panic(fmt.Errorf("field account of message cosmos.auth.module.v1.ModuleAccountPermission is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.module.v1.ModuleAccountPermission")) + } + panic(fmt.Errorf("message cosmos.auth.module.v1.ModuleAccountPermission does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ModuleAccountPermission) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.module.v1.ModuleAccountPermission.account": + return protoreflect.ValueOfString("") + case "cosmos.auth.module.v1.ModuleAccountPermission.permissions": + list := []string{} + return protoreflect.ValueOfList(&_ModuleAccountPermission_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.module.v1.ModuleAccountPermission")) + } + panic(fmt.Errorf("message cosmos.auth.module.v1.ModuleAccountPermission does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ModuleAccountPermission) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.module.v1.ModuleAccountPermission", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ModuleAccountPermission) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ModuleAccountPermission) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ModuleAccountPermission) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ModuleAccountPermission) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ModuleAccountPermission) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Account) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Permissions) > 0 { + for _, s := range x.Permissions { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ModuleAccountPermission) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Permissions) > 0 { + for iNdEx := len(x.Permissions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Permissions[iNdEx]) + copy(dAtA[i:], x.Permissions[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Permissions[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Account) > 0 { + i -= len(x.Account) + copy(dAtA[i:], x.Account) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Account))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ModuleAccountPermission) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModuleAccountPermission: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModuleAccountPermission: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Permissions = append(x.Permissions, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/auth/module/v1/module.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Module is the config object for the auth module. +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // bech32_prefix is the bech32 account prefix for the app. + Bech32Prefix string `protobuf:"bytes,1,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` + // module_account_permissions are module account permissions. + ModuleAccountPermissions []*ModuleAccountPermission `protobuf:"bytes,2,rep,name=module_account_permissions,json=moduleAccountPermissions,proto3" json:"module_account_permissions,omitempty"` + // authority defines the custom module authority. If not set, defaults to the governance module. + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_module_v1_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module) ProtoMessage() {} + +// Deprecated: Use Module.ProtoReflect.Descriptor instead. +func (*Module) Descriptor() ([]byte, []int) { + return file_cosmos_auth_module_v1_module_proto_rawDescGZIP(), []int{0} +} + +func (x *Module) GetBech32Prefix() string { + if x != nil { + return x.Bech32Prefix + } + return "" +} + +func (x *Module) GetModuleAccountPermissions() []*ModuleAccountPermission { + if x != nil { + return x.ModuleAccountPermissions + } + return nil +} + +func (x *Module) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +// ModuleAccountPermission represents permissions for a module account. +type ModuleAccountPermission struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // account is the name of the module. + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // permissions are the permissions this module has. Currently recognized + // values are minter, burner and staking. + Permissions []string `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty"` +} + +func (x *ModuleAccountPermission) Reset() { + *x = ModuleAccountPermission{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_module_v1_module_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ModuleAccountPermission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleAccountPermission) ProtoMessage() {} + +// Deprecated: Use ModuleAccountPermission.ProtoReflect.Descriptor instead. +func (*ModuleAccountPermission) Descriptor() ([]byte, []int) { + return file_cosmos_auth_module_v1_module_proto_rawDescGZIP(), []int{1} +} + +func (x *ModuleAccountPermission) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *ModuleAccountPermission) GetPermissions() []string { + if x != nil { + return x.Permissions + } + return nil +} + +var File_cosmos_auth_module_v1_module_proto protoreflect.FileDescriptor + +var file_cosmos_auth_module_v1_module_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x01, + 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x63, 0x68, + 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x6c, 0x0a, + 0x1a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x18, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x2b, 0xba, 0xc0, 0x96, 0xda, 0x01, + 0x25, 0x0a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, + 0x78, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x22, 0x55, 0x0a, 0x17, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xd0, 0x01, + 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, + 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, + 0x4d, 0xaa, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_auth_module_v1_module_proto_rawDescOnce sync.Once + file_cosmos_auth_module_v1_module_proto_rawDescData = file_cosmos_auth_module_v1_module_proto_rawDesc +) + +func file_cosmos_auth_module_v1_module_proto_rawDescGZIP() []byte { + file_cosmos_auth_module_v1_module_proto_rawDescOnce.Do(func() { + file_cosmos_auth_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_auth_module_v1_module_proto_rawDescData) + }) + return file_cosmos_auth_module_v1_module_proto_rawDescData +} + +var file_cosmos_auth_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cosmos_auth_module_v1_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: cosmos.auth.module.v1.Module + (*ModuleAccountPermission)(nil), // 1: cosmos.auth.module.v1.ModuleAccountPermission +} +var file_cosmos_auth_module_v1_module_proto_depIdxs = []int32{ + 1, // 0: cosmos.auth.module.v1.Module.module_account_permissions:type_name -> cosmos.auth.module.v1.ModuleAccountPermission + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_cosmos_auth_module_v1_module_proto_init() } +func file_cosmos_auth_module_v1_module_proto_init() { + if File_cosmos_auth_module_v1_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_auth_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_module_v1_module_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModuleAccountPermission); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_auth_module_v1_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_auth_module_v1_module_proto_goTypes, + DependencyIndexes: file_cosmos_auth_module_v1_module_proto_depIdxs, + MessageInfos: file_cosmos_auth_module_v1_module_proto_msgTypes, + }.Build() + File_cosmos_auth_module_v1_module_proto = out.File + file_cosmos_auth_module_v1_module_proto_rawDesc = nil + file_cosmos_auth_module_v1_module_proto_goTypes = nil + file_cosmos_auth_module_v1_module_proto_depIdxs = nil +} diff --git a/api/cosmos/tx/config/v1/config.pulsar.go b/api/cosmos/tx/config/v1/config.pulsar.go new file mode 100644 index 00000000000..c0b353c4367 --- /dev/null +++ b/api/cosmos/tx/config/v1/config.pulsar.go @@ -0,0 +1,635 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package configv1 + +import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Config protoreflect.MessageDescriptor + fd_Config_skip_ante_handler protoreflect.FieldDescriptor + fd_Config_skip_post_handler protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_tx_config_v1_config_proto_init() + md_Config = File_cosmos_tx_config_v1_config_proto.Messages().ByName("Config") + fd_Config_skip_ante_handler = md_Config.Fields().ByName("skip_ante_handler") + fd_Config_skip_post_handler = md_Config.Fields().ByName("skip_post_handler") +} + +var _ protoreflect.Message = (*fastReflection_Config)(nil) + +type fastReflection_Config Config + +func (x *Config) ProtoReflect() protoreflect.Message { + return (*fastReflection_Config)(x) +} + +func (x *Config) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_tx_config_v1_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Config_messageType fastReflection_Config_messageType +var _ protoreflect.MessageType = fastReflection_Config_messageType{} + +type fastReflection_Config_messageType struct{} + +func (x fastReflection_Config_messageType) Zero() protoreflect.Message { + return (*fastReflection_Config)(nil) +} +func (x fastReflection_Config_messageType) New() protoreflect.Message { + return new(fastReflection_Config) +} +func (x fastReflection_Config_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Config +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Config) Descriptor() protoreflect.MessageDescriptor { + return md_Config +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Config) Type() protoreflect.MessageType { + return _fastReflection_Config_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Config) New() protoreflect.Message { + return new(fastReflection_Config) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Config) Interface() protoreflect.ProtoMessage { + return (*Config)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Config) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SkipAnteHandler != false { + value := protoreflect.ValueOfBool(x.SkipAnteHandler) + if !f(fd_Config_skip_ante_handler, value) { + return + } + } + if x.SkipPostHandler != false { + value := protoreflect.ValueOfBool(x.SkipPostHandler) + if !f(fd_Config_skip_post_handler, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Config) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.tx.config.v1.Config.skip_ante_handler": + return x.SkipAnteHandler != false + case "cosmos.tx.config.v1.Config.skip_post_handler": + return x.SkipPostHandler != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.config.v1.Config")) + } + panic(fmt.Errorf("message cosmos.tx.config.v1.Config does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Config) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.tx.config.v1.Config.skip_ante_handler": + x.SkipAnteHandler = false + case "cosmos.tx.config.v1.Config.skip_post_handler": + x.SkipPostHandler = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.config.v1.Config")) + } + panic(fmt.Errorf("message cosmos.tx.config.v1.Config does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Config) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.tx.config.v1.Config.skip_ante_handler": + value := x.SkipAnteHandler + return protoreflect.ValueOfBool(value) + case "cosmos.tx.config.v1.Config.skip_post_handler": + value := x.SkipPostHandler + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.config.v1.Config")) + } + panic(fmt.Errorf("message cosmos.tx.config.v1.Config does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Config) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.tx.config.v1.Config.skip_ante_handler": + x.SkipAnteHandler = value.Bool() + case "cosmos.tx.config.v1.Config.skip_post_handler": + x.SkipPostHandler = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.config.v1.Config")) + } + panic(fmt.Errorf("message cosmos.tx.config.v1.Config does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Config) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.tx.config.v1.Config.skip_ante_handler": + panic(fmt.Errorf("field skip_ante_handler of message cosmos.tx.config.v1.Config is not mutable")) + case "cosmos.tx.config.v1.Config.skip_post_handler": + panic(fmt.Errorf("field skip_post_handler of message cosmos.tx.config.v1.Config is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.config.v1.Config")) + } + panic(fmt.Errorf("message cosmos.tx.config.v1.Config does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Config) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.tx.config.v1.Config.skip_ante_handler": + return protoreflect.ValueOfBool(false) + case "cosmos.tx.config.v1.Config.skip_post_handler": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.config.v1.Config")) + } + panic(fmt.Errorf("message cosmos.tx.config.v1.Config does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Config) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.config.v1.Config", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Config) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Config) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Config) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Config) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Config) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.SkipAnteHandler { + n += 2 + } + if x.SkipPostHandler { + n += 2 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Config) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.SkipPostHandler { + i-- + if x.SkipPostHandler { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if x.SkipAnteHandler { + i-- + if x.SkipAnteHandler { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Config) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Config: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Config: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SkipAnteHandler", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.SkipAnteHandler = bool(v != 0) + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SkipPostHandler", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.SkipPostHandler = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/tx/config/v1/config.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Config is the config object of the x/auth/tx package. +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // skip_ante_handler defines whether the ante handler registration should be skipped in case an app wants to override + // this functionality. + SkipAnteHandler bool `protobuf:"varint,1,opt,name=skip_ante_handler,json=skipAnteHandler,proto3" json:"skip_ante_handler,omitempty"` + // skip_post_handler defines whether the post handler registration should be skipped in case an app wants to override + // this functionality. + SkipPostHandler bool `protobuf:"varint,2,opt,name=skip_post_handler,json=skipPostHandler,proto3" json:"skip_post_handler,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_tx_config_v1_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_cosmos_tx_config_v1_config_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetSkipAnteHandler() bool { + if x != nil { + return x.SkipAnteHandler + } + return false +} + +func (x *Config) GetSkipPostHandler() bool { + if x != nil { + return x.SkipPostHandler + } + return false +} + +var File_cosmos_tx_config_v1_config_proto protoreflect.FileDescriptor + +var file_cosmos_tx_config_v1_config_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x06, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x61, 0x6e, 0x74, + 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x41, 0x6e, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, + 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x68, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x6b, 0x69, + 0x70, 0x50, 0x6f, 0x73, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x3a, 0x2e, 0xba, 0xc0, + 0x96, 0xda, 0x01, 0x28, 0x0a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x78, 0x42, 0xc4, 0x01, 0x0a, + 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x74, 0x78, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x54, 0x43, 0xaa, 0x02, 0x13, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x54, 0x78, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_tx_config_v1_config_proto_rawDescOnce sync.Once + file_cosmos_tx_config_v1_config_proto_rawDescData = file_cosmos_tx_config_v1_config_proto_rawDesc +) + +func file_cosmos_tx_config_v1_config_proto_rawDescGZIP() []byte { + file_cosmos_tx_config_v1_config_proto_rawDescOnce.Do(func() { + file_cosmos_tx_config_v1_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_tx_config_v1_config_proto_rawDescData) + }) + return file_cosmos_tx_config_v1_config_proto_rawDescData +} + +var file_cosmos_tx_config_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_cosmos_tx_config_v1_config_proto_goTypes = []interface{}{ + (*Config)(nil), // 0: cosmos.tx.config.v1.Config +} +var file_cosmos_tx_config_v1_config_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_cosmos_tx_config_v1_config_proto_init() } +func file_cosmos_tx_config_v1_config_proto_init() { + if File_cosmos_tx_config_v1_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_tx_config_v1_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_tx_config_v1_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_tx_config_v1_config_proto_goTypes, + DependencyIndexes: file_cosmos_tx_config_v1_config_proto_depIdxs, + MessageInfos: file_cosmos_tx_config_v1_config_proto_msgTypes, + }.Build() + File_cosmos_tx_config_v1_config_proto = out.File + file_cosmos_tx_config_v1_config_proto_rawDesc = nil + file_cosmos_tx_config_v1_config_proto_goTypes = nil + file_cosmos_tx_config_v1_config_proto_depIdxs = nil +} diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index 8183c454dca..a10117ee86c 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -33,7 +33,6 @@ import ( "cosmossdk.io/store/snapshots" snapshottypes "cosmossdk.io/store/snapshots/types" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth/signing" "github.com/cosmos/cosmos-sdk/baseapp" baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" @@ -44,6 +43,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) const ( diff --git a/baseapp/abci_utils_test.go b/baseapp/abci_utils_test.go index ded20c2b698..65e4e0ec1a7 100644 --- a/baseapp/abci_utils_test.go +++ b/baseapp/abci_utils_test.go @@ -21,7 +21,6 @@ import ( "cosmossdk.io/core/comet" "cosmossdk.io/core/header" "cosmossdk.io/log" - authtx "cosmossdk.io/x/auth/tx" "github.com/cosmos/cosmos-sdk/baseapp" baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" @@ -34,6 +33,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" ) const ( diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index aa5060ae724..aaa88b3abfa 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -22,7 +22,6 @@ import ( "cosmossdk.io/store/snapshots" snapshottypes "cosmossdk.io/store/snapshots/types" storetypes "cosmossdk.io/store/types" - authtx "cosmossdk.io/x/auth/tx" "github.com/cosmos/cosmos-sdk/baseapp" baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" @@ -32,6 +31,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" ) var ( diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go index 85b233c71d9..84862c76f89 100644 --- a/baseapp/msg_service_router_test.go +++ b/baseapp/msg_service_router_test.go @@ -10,8 +10,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" - authsigning "cosmossdk.io/x/auth/signing" - authtx "cosmossdk.io/x/auth/tx" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/codec" @@ -19,6 +17,8 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/testdata" "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" ) func TestRegisterMsgService(t *testing.T) { diff --git a/baseapp/utils_test.go b/baseapp/utils_test.go index f95ac16c9f7..9a47fde242d 100644 --- a/baseapp/utils_test.go +++ b/baseapp/utils_test.go @@ -24,9 +24,6 @@ import ( "cosmossdk.io/depinject/appconfig" errorsmod "cosmossdk.io/errors" storetypes "cosmossdk.io/store/types" - _ "cosmossdk.io/x/auth" - "cosmossdk.io/x/auth/signing" - _ "cosmossdk.io/x/auth/tx/config" "github.com/cosmos/cosmos-sdk/baseapp" baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" @@ -38,6 +35,9 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/mempool" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + _ "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/signing" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" ) var ParamStoreKey = []byte("paramstore") diff --git a/client/tx/tx.go b/client/tx/tx.go index 87f00c654c3..4aa34b0a931 100644 --- a/client/tx/tx.go +++ b/client/tx/tx.go @@ -11,8 +11,6 @@ import ( gogogrpc "github.com/cosmos/gogoproto/grpc" "github.com/spf13/pflag" - authsigning "cosmossdk.io/x/auth/signing" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/input" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -20,6 +18,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) // GenerateOrBroadcastTxCLI will either generate and print an unsigned transaction diff --git a/client/tx/tx_test.go b/client/tx/tx_test.go index f654767ddaa..ad819386aa7 100644 --- a/client/tx/tx_test.go +++ b/client/tx/tx_test.go @@ -9,10 +9,6 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" - "cosmossdk.io/x/auth/ante" - "cosmossdk.io/x/auth/signing" - authtx "cosmossdk.io/x/auth/tx" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" @@ -27,6 +23,9 @@ import ( moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" txtypes "github.com/cosmos/cosmos-sdk/types/tx" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + "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" ) var ac = testutil.CodecOptions{}.GetAddressCodec() diff --git a/client/tx_config.go b/client/tx_config.go index c41d3de6389..44e07cdd768 100644 --- a/client/tx_config.go +++ b/client/tx_config.go @@ -3,13 +3,13 @@ package client import ( "time" - "cosmossdk.io/x/auth/signing" txsigning "cosmossdk.io/x/tx/signing" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) type ( diff --git a/client/v2/autocli/msg.go b/client/v2/autocli/msg.go index 68a19ab6906..b19aabc95ba 100644 --- a/client/v2/autocli/msg.go +++ b/client/v2/autocli/msg.go @@ -18,9 +18,9 @@ import ( // the following will be extracted to a separate module // https://github.com/cosmos/cosmos-sdk/issues/14403 - authtypes "cosmossdk.io/x/auth/types" govcli "cosmossdk.io/x/gov/client/cli" govtypes "cosmossdk.io/x/gov/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/client" clienttx "github.com/cosmos/cosmos-sdk/client/tx" diff --git a/client/v2/go.mod b/client/v2/go.mod index 1333e4cb7c1..3eeca7917ed 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -26,9 +26,13 @@ require ( cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/log v1.4.1 // indirect cosmossdk.io/math v1.3.0 +<<<<<<< HEAD cosmossdk.io/schema v0.2.0 // indirect cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 +======= + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc // indirect +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect filippo.io/edwards25519 v1.1.0 // indirect @@ -176,6 +180,7 @@ replace github.com/cosmos/cosmos-sdk => ./../../ // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -183,6 +188,12 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ./../../x/auth +======= + cosmossdk.io/api => ./../../api + cosmossdk.io/core => ./../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ./../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ./../../x/bank cosmossdk.io/x/consensus => ./../../x/consensus cosmossdk.io/x/distribution => ./../../x/distribution diff --git a/collections/README.md b/collections/README.md new file mode 100644 index 00000000000..421bc255d1c --- /dev/null +++ b/collections/README.md @@ -0,0 +1,1210 @@ +# Collections + +Collections is a library meant to simplify the experience with respect to module state handling. + +Cosmos SDK modules handle their state using the `KVStore` interface. The problem with working with +`KVStore` is that it forces you to think of state as a bytes KV pairings when in reality the majority of +state comes from complex concrete golang objects (strings, ints, structs, etc.). + +Collections allows you to work with state as if they were normal golang objects and removes the need +for you to think of your state as raw bytes in your code. + +It also allows you to migrate your existing state without causing any state breakage that forces you into +tedious and complex chain state migrations. + +## Installation + +To install collections in your cosmos-sdk chain project, run the following command: + +```shell +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. + +## Preliminary components + +Before exploring the different collections types and their capability it is necessary to introduce +the three components that every collection shares. In fact when instantiating a collection type by doing, for example, +```collections.NewMap/collections.NewItem/...``` you will find yourself having to pass them some common arguments. + +For example, in code: + +```go +package collections + +import ( + "cosmossdk.io/collections" + storetypes "cosmossdk.io/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var AllowListPrefix = collections.NewPrefix(0) + +type Keeper struct { + Schema collections.Schema + AllowList collections.KeySet[string] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + + return Keeper{ + AllowList: collections.NewKeySet(sb, AllowListPrefix, "allow_list", collections.StringKey), + } +} + +``` + +Let's analyse the shared arguments, what they do, and why we need them. + +### SchemaBuilder + +The first argument passed is the ``SchemaBuilder`` + +`SchemaBuilder` is a structure that keeps track of all the state of a module, it is not required by the collections + to deal with state but it offers a dynamic and reflective way for clients to explore a module's state. + +We instantiate a ``SchemaBuilder`` by passing it a function that given the modules store key returns the module's specific store. + +We then need to pass the schema builder to every collection type we instantiate in our keeper, in our case the `AllowList`. + +### Prefix + +The second argument passed to our ``KeySet`` is a `collections.Prefix`, a prefix represents a partition of the module's `KVStore` +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` + +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. + +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 + // - 0x00: allowance + FeeAllowanceKeyPrefix = []byte{0x00} + + // FeeAllowanceQueueKeyPrefix is the set of the kvstore for fee allowance keys data + // - 0x01: + FeeAllowanceQueueKeyPrefix = []byte{0x01} +) +``` + +becomes: + +```go +var ( + // FeeAllowanceKeyPrefix is the set of the kvstore for fee allowance data + // - 0x00: allowance + FeeAllowanceKeyPrefix = collections.NewPrefix(0) + + // FeeAllowanceQueueKeyPrefix is the set of the kvstore for fee allowance keys data + // - 0x01: + FeeAllowanceQueueKeyPrefix = collections.NewPrefix(1) +) +``` + +#### Rules + +``collections.NewPrefix`` accepts either `uint8`, `string` or `[]bytes` it's good practice to use an always increasing `uint8`for disk space efficiency. + +A collection **MUST NOT** share the same prefix as another collection in the same module, and a collection prefix **MUST NEVER** start with the same prefix as another, examples: + +```go +prefix1 := collections.NewPrefix("prefix") +prefix2 := collections.NewPrefix("prefix") // THIS IS BAD! +``` + +```go +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. +It is needed to make the role of a collection understandable by clients who have no clue about +what a module is storing in state. + +#### Rules + +Each collection in a module **MUST** have a unique humanised name. + +## Key and Value Codecs + +A collection is generic over the type you can use as keys or values. +This makes collections dumb, but also means that hypothetically we can store everything +that can be a go type into a collection. We are not bounded to any type of encoding (be it proto, json or whatever) + +So a collection needs to be given a way to understand how to convert your keys and values to bytes. +This is achieved through ``KeyCodec`` and `ValueCodec`, which are arguments that you pass to your +collections when you're instantiating them using the ```collections.NewMap/collections.NewItem/...``` +instantiation functions. + +NOTE: Generally speaking you will never be required to implement your own ``Key/ValueCodec`` as +the SDK and collections libraries already come with default, safe and fast implementation of those. +You might need to implement them only if you're migrating to collections and there are state layout incompatibilities. + +Let's explore an example: + +````go +package collections + +import ( + "cosmossdk.io/collections" + storetypes "cosmossdk.io/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var IDsPrefix = collections.NewPrefix(0) + +type Keeper struct { + Schema collections.Schema + IDs collections.Map[string, uint64] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + + return Keeper{ + IDs: collections.NewMap(sb, IDsPrefix, "ids", collections.StringKey, collections.Uint64Value), + } +} +```` + +We're now instantiating a map where the key is string and the value is `uint64`. +We already know the first three arguments of the ``NewMap`` function. + +The fourth parameter is our `KeyCodec`, we know that the ``Map`` has `string` as key so we pass it a `KeyCodec` that handles strings as keys. + +The fifth parameter is our `ValueCodec`, we know that the `Map` has a `uint64` as value so we pass it a `ValueCodec` that handles uint64. + +Collections already comes with all the required implementations for golang primitive types. + +Let's make another example, this falls closer to what we build using cosmos SDK, let's say we want +to create a `collections.Map` that maps account addresses to their base account. So we want to map an `sdk.AccAddress` to an `auth.BaseAccount` (which is a proto): + +```go +package collections + +import ( + "cosmossdk.io/collections" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +var AccountsPrefix = collections.NewPrefix(0) + +type Keeper struct { + Schema collections.Schema + Accounts collections.Map[sdk.AccAddress, authtypes.BaseAccount] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey, cdc codec.BinaryCodec) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + return Keeper{ + Accounts: collections.NewMap(sb, AccountsPrefix, "accounts", + sdk.AccAddressKey, codec.CollValue[authtypes.BaseAccount](cdc)), + } +} +``` + +As we can see here since our `collections.Map` maps `sdk.AccAddress` to `authtypes.BaseAccount`, +we use the `sdk.AccAddressKey` which is the `KeyCodec` implementation for `AccAddress` and we use `codec.CollValue` to +encode our proto type `BaseAccount`. + +Generally speaking you will always find the respective key and value codecs for types in the `go.mod` path you're using +to import that type. If you want to encode proto values refer to the codec `codec.CollValue` function, which allows you +to encode any type implement the `proto.Message` interface. + +## Map + +We analyse the first and most important collection type, the ``collections.Map``. +This is the type that everything else builds on top of. + +### Use case + +A `collections.Map` is used to map arbitrary keys with arbitrary values. + +### Example + +It's easier to explain a `collections.Map` capabilities through an example: + +```go +package collections + +import ( + "cosmossdk.io/collections" + storetypes "cosmossdk.io/store/types" + "fmt" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +var AccountsPrefix = collections.NewPrefix(0) + +type Keeper struct { + Schema collections.Schema + Accounts collections.Map[sdk.AccAddress, authtypes.BaseAccount] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey, cdc codec.BinaryCodec) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + return Keeper{ + Accounts: collections.NewMap(sb, AccountsPrefix, "accounts", + sdk.AccAddressKey, codec.CollValue[authtypes.BaseAccount](cdc)), + } +} + +func (k Keeper) CreateAccount(ctx sdk.Context, addr sdk.AccAddress, account authtypes.BaseAccount) error { + has, err := k.Accounts.Has(ctx, addr) + if err != nil { + return err + } + if has { + return fmt.Errorf("account already exists: %s", addr) + } + + err = k.Accounts.Set(ctx, addr, account) + if err != nil { + return err + } + return nil +} + +func (k Keeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) (authtypes.BaseAccount, error) { + acc, err := k.Accounts.Get(ctx, addr) + if err != nil { + return authtypes.BaseAccount{}, err + } + + return acc, nil +} + +func (k Keeper) RemoveAccount(ctx sdk.Context, addr sdk.AccAddress) error { + err := k.Accounts.Remove(ctx, addr) + if err != nil { + return err + } + return nil +} +``` + +#### Set method + +Set maps with the provided `AccAddress` (the key) to the `auth.BaseAccount` (the value). + +Under the hood the `collections.Map` will convert the key and value to bytes using the [key and value codec](README.md#key-and-value-codecs). +It will prepend to our bytes key the [prefix](README.md#prefix) and store it in the KVStore of the module. + +#### Has method + +The has method reports if the provided key exists in the store. + +#### Get method + +The get method accepts the `AccAddress` and returns the associated `auth.BaseAccount` if it exists, otherwise it errors. + +#### Remove method + +The remove method accepts the `AccAddress` and removes it from the store. It won't report errors +if it does not exist, to check for existence before removal use the ``Has`` method. + +#### Iteration + +Iteration has a separate section. + +## KeySet + +The second type of collection is `collections.KeySet`, as the word suggests it maintains +only a set of keys without values. + +#### Implementation curiosity + +A `collections.KeySet` is just a `collections.Map` with a `key` but no value. +The value internally is always the same and is represented as an empty byte slice ```[]byte{}```. + +### Example + +As always we explore the collection type through an example: + +```go +package collections + +import ( + "cosmossdk.io/collections" + storetypes "cosmossdk.io/store/types" + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var ValidatorsSetPrefix = collections.NewPrefix(0) + +type Keeper struct { + Schema collections.Schema + ValidatorsSet collections.KeySet[sdk.ValAddress] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + return Keeper{ + ValidatorsSet: collections.NewKeySet(sb, ValidatorsSetPrefix, "validators_set", sdk.ValAddressKey), + } +} + +func (k Keeper) AddValidator(ctx sdk.Context, validator sdk.ValAddress) error { + has, err := k.ValidatorsSet.Has(ctx, validator) + if err != nil { + return err + } + if has { + return fmt.Errorf("validator already in set: %s", validator) + } + + err = k.ValidatorsSet.Set(ctx, validator) + if err != nil { + return err + } + + return nil +} + +func (k Keeper) RemoveValidator(ctx sdk.Context, validator sdk.ValAddress) error { + err := k.ValidatorsSet.Remove(ctx, validator) + if err != nil { + return err + } + 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. + +Let's explore the methods. + +#### Has method + +Has allows us to understand if a key is present in the `collections.KeySet` or not, functions in the same way as `collections.Map.Has +` + +#### Set method + +Set inserts the provided key in the `KeySet`. + +#### Remove method + +Remove removes the provided key from the `KeySet`, it does not error if the key does not exist, +if existence check before removal is required it needs to be coupled with the `Has` method. + +## Item + +The third type of collection is the `collections.Item`. +It stores only one single item, it's useful for example for parameters, there's only one instance +of parameters in state always. + +#### implementation curiosity + +A `collections.Item` is just a `collections.Map` with no key but just a value. +The key is the prefix of the collection! + +### Example + +```go +package collections + +import ( + "cosmossdk.io/collections" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "cosmossdk.io/x/staking/types" +) + +var ParamsPrefix = collections.NewPrefix(0) + +type Keeper struct { + Schema collections.Schema + Params collections.Item[stakingtypes.Params] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey, cdc codec.BinaryCodec) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + return Keeper{ + Params: collections.NewItem(sb, ParamsPrefix, "params", codec.CollValue[stakingtypes.Params](cdc)), + } +} + +func (k Keeper) UpdateParams(ctx sdk.Context, params stakingtypes.Params) error { + err := k.Params.Set(ctx, params) + if err != nil { + return err + } + return nil +} + +func (k Keeper) GetParams(ctx sdk.Context) (stakingtypes.Params, error) { + return k.Params.Get(ctx) +} +``` + +The first key difference we notice is that we specify only one type parameter, which is the value we're storing. +The second key difference is that we don't specify the `KeyCodec`, since we store only one item we already know the key +and the fact that it is constant. + +## Iteration + +One of the key features of the ``KVStore`` is iterating over keys. + +Collections which deal with keys (so `Map`, `KeySet` and `IndexedMap`) allow you to iterate +over keys in a safe and typed way. They all share the same API, the only difference being +that ``KeySet`` returns a different type of `Iterator` because `KeySet` only deals with keys. + +:::note + +Every collection shares the same `Iterator` semantics. + +::: + +Let's have a look at the `Map.Iterate` method: + +```go +func (m Map[K, V]) Iterate(ctx context.Context, ranger Ranger[K]) (Iterator[K, V], error) +``` + +It accepts a `collections.Ranger[K]`, which is an API that instructs map on how to iterate over keys. +As always we don't need to implement anything here as `collections` already provides some generic `Ranger` implementers +that expose all you need to work with ranges. + +### Example + +We have a `collections.Map` that maps accounts using `uint64` IDs. + +```go +package collections + +import ( + "cosmossdk.io/collections" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +var AccountsPrefix = collections.NewPrefix(0) + +type Keeper struct { + Schema collections.Schema + Accounts collections.Map[uint64, authtypes.BaseAccount] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey, cdc codec.BinaryCodec) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + return Keeper{ + Accounts: collections.NewMap(sb, AccountsPrefix, "accounts", collections.Uint64Key, codec.CollValue[authtypes.BaseAccount](cdc)), + } +} + +func (k Keeper) GetAllAccounts(ctx sdk.Context) ([]authtypes.BaseAccount, error) { + // passing a nil Ranger equals to: iterate over every possible key + iter, err := k.Accounts.Iterate(ctx, nil) + if err != nil { + return nil, err + } + accounts, err := iter.Values() + if err != nil { + return nil, err + } + + return accounts, err +} + +func (k Keeper) IterateAccountsBetween(ctx sdk.Context, start, end uint64) ([]authtypes.BaseAccount, error) { + // The collections.Range API offers a lot of capabilities + // like defining where the iteration starts or ends. + rng := new(collections.Range[uint64]). + StartInclusive(start). + EndExclusive(end). + Descending() + + iter, err := k.Accounts.Iterate(ctx, rng) + if err != nil { + return nil, err + } + accounts, err := iter.Values() + if err != nil { + return nil, err + } + + return accounts, nil +} + +func (k Keeper) IterateAccounts(ctx sdk.Context, do func(id uint64, acc authtypes.BaseAccount) (stop bool)) error { + iter, err := k.Accounts.Iterate(ctx, nil) + if err != nil { + return err + } + defer iter.Close() + + for ; iter.Valid(); iter.Next() { + kv, err := iter.KeyValue() + if err != nil { + return err + } + + if do(kv.Key, kv.Value) { + break + } + } + return nil +} +``` + +Let's analyse each method in the example and how it makes use of the `Iterate` and the returned `Iterator` API. + +#### GetAllAccounts + +In `GetAllAccounts` we pass to our `Iterate` a nil `Ranger`. This means that the returned `Iterator` will include +all the existing keys within the collection. + +Then we use the `Values` method from the returned `Iterator` API to collect all the values into a slice. + +`Iterator` offers other methods such as `Keys()` to collect only the keys and not the values and `KeyValues` to collect +all the keys and values. + + +#### IterateAccountsBetween + +Here we make use of the `collections.Range` helper to specialise our range. +We make it start in a point through `StartInclusive` and end in the other with `EndExclusive`, then +we instruct it to report us results in reverse order through `Descending` + +Then we pass the range instruction to `Iterate` and get an `Iterator`, which will contain only the results +we specified in the range. + +Then we use again the `Values` method of the `Iterator` to collect all the results. + +`collections.Range` also offers a `Prefix` API which is not applicable to all keys types, +for example uint64 cannot be prefix because it is of constant size, but a `string` key +can be prefixed. + +#### IterateAccounts + +Here we showcase how to lazily collect values from an Iterator. + +:::note + +`Keys/Values/KeyValues` fully consume and close the `Iterator`, here we need to explicitly do a `defer iterator.Close()` call. + +::: + +`Iterator` also exposes a `Value` and `Key` method to collect only the current value or key, if collecting both is not needed. + +:::note + +For this `callback` pattern, collections expose a `Walk` API. + +::: + +## Composite keys + +So far we've worked only with simple keys, like `uint64`, the account address, etc. +There are some more complex cases in, which we need to deal with composite keys. + +A key is composite when it is composed of multiple keys, for example bank balances as stored as the composite key +`(AccAddress, string)` where the first part is the address holding the coins and the second part is the denom. + +Example, let's say address `BOB` holds `10atom,15osmo`, this is how it is stored in state: + +``` +(bob, atom) => 10 +(bob, osmos) => 15 +``` + +Now this allows to efficiently get a specific denom balance of an address, by simply `getting` `(address, denom)`, or getting all the balances +of an address by prefixing over `(address)`. + +Let's see now how we can work with composite keys using collections. + +### Example + +In our example we will show-case how we can use collections when we are dealing with balances, similar to bank, +a balance is a mapping between `(address, denom) => math.Int` the composite key in our case is `(address, denom)`. + +## Instantiation of a composite key collection + +```go +package collections + +import ( + "cosmossdk.io/collections" + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + + +var BalancesPrefix = collections.NewPrefix(1) + +type Keeper struct { + Schema collections.Schema + Balances collections.Map[collections.Pair[sdk.AccAddress, string], math.Int] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + return Keeper{ + Balances: collections.NewMap( + sb, BalancesPrefix, "balances", + collections.PairKeyCodec(sdk.AccAddressKey, collections.StringKey), + sdk.IntValue, + ), + } +} +``` + +#### 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] +```` + +`collections.Pair` defines a key composed of two other keys, in our case the first part is `sdk.AccAddress`, the second +part is `string`. + +#### The Key Codec instantiation + +The arguments to instantiate are always the same, the only thing that changes is how we instantiate +the ``KeyCodec``, since this key is composed of two keys we use `collections.PairKeyCodec`, which generates +a `KeyCodec` composed of two key codecs. The first one will encode the first part of the key, the second one will +encode the second part of the key. + + +### Working with composite key collections + +Let's expand on the example we used before: + +````go +var BalancesPrefix = collections.NewPrefix(1) + +type Keeper struct { + Schema collections.Schema + Balances collections.Map[collections.Pair[sdk.AccAddress, string], math.Int] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + return Keeper{ + Balances: collections.NewMap( + sb, BalancesPrefix, "balances", + collections.PairKeyCodec(sdk.AccAddressKey, collections.StringKey), + sdk.IntValue, + ), + } +} + +func (k Keeper) SetBalance(ctx sdk.Context, address sdk.AccAddress, denom string, amount math.Int) error { + key := collections.Join(address, denom) + return k.Balances.Set(ctx, key, amount) +} + +func (k Keeper) GetBalance(ctx sdk.Context, address sdk.AccAddress, denom string) (math.Int, error) { + return k.Balances.Get(ctx, collections.Join(address, denom)) +} + +func (k Keeper) GetAllAddressBalances(ctx sdk.Context, address sdk.AccAddress) (sdk.Coins, error) { + balances := sdk.NewCoins() + + rng := collections.NewPrefixedPairRange[sdk.AccAddress, string](address) + + iter, err := k.Balances.Iterate(ctx, rng) + if err != nil { + return nil, err + } + + kvs, err := iter.KeyValues() + if err != nil { + return nil, err + } + + for _, kv := range kvs { + balances = balances.Add(sdk.NewCoin(kv.Key.K2(), kv.Value)) + } + return balances, nil +} + +func (k Keeper) GetAllAddressBalancesBetween(ctx sdk.Context, address sdk.AccAddress, startDenom, endDenom string) (sdk.Coins, error) { + rng := collections.NewPrefixedPairRange[sdk.AccAddress, string](address). + StartInclusive(startDenom). + EndInclusive(endDenom) + + iter, err := k.Balances.Iterate(ctx, rng) + if err != nil { + return nil, err + } + ... +} +```` + +#### SetBalance + +As we can see here we're setting the balance of an address for a specific denom. +We use the `collections.Join` function to generate the composite key. +`collections.Join` returns a `collections.Pair` (which is the key of our `collections.Map`) + +`collections.Pair` contains the two keys we have joined, it also exposes two methods: `K1` to fetch the 1st part of the +key and `K2` to fetch the second part. + +As always, we use the `collections.Map.Set` method to map the composite key to our value (`math.Int` in this case) + +#### GetBalance + +To get a value in composite key collection, we simply use `collections.Join` to compose the key. + +#### GetAllAddressBalances + +We use `collections.PrefixedPairRange` to iterate over all the keys starting with the provided address. +Concretely the iteration will report all the balances belonging to the provided address. + +The first part is that we instantiate a `PrefixedPairRange`, which is a `Ranger` implementer aimed to help +in `Pair` keys iterations. + +```go + rng := collections.NewPrefixedPairRange[sdk.AccAddress, string](address) +``` + +As we can see here we're passing the type parameters of the `collections.Pair` because golang type inference +with respect to generics is not as permissive as other languages, so we need to explicitly say what are the types of the pair key. + +#### GetAllAddressesBalancesBetween + +This showcases how we can further specialise our range to limit the results further, by specifying +the range between the second part of the key (in our case the denoms, which are strings). + +## IndexedMap + +`collections.IndexedMap` is a collection that uses under the hood a `collections.Map`, and has a struct, which contains the indexes that we need to define. + +### Example + +Let's say we have an `auth.BaseAccount` struct which looks like the following: + +```go +type BaseAccount struct { + AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` +} +``` + +First of all, when we save our accounts in state we map them using a primary key `sdk.AccAddress`. +If it were to be a `collections.Map` it would be `collections.Map[sdk.AccAddres, authtypes.BaseAccount]`. + +Then we also want to be able to get an account not only by its `sdk.AccAddress`, but also by its `AccountNumber`. + +So we can say we want to create an `Index` that maps our `BaseAccount` to its `AccountNumber`. + +We also know that this `Index` is unique. Unique means that there can only be one `BaseAccount` that maps to a specific +`AccountNumber`. + +First of all, we start by defining the object that contains our index: + +```go +var AccountsNumberIndexPrefix = collections.NewPrefix(1) + +type AccountsIndexes struct { + Number *indexes.Unique[uint64, sdk.AccAddress, authtypes.BaseAccount] +} + +func NewAccountIndexes(sb *collections.SchemaBuilder) AccountsIndexes { + return AccountsIndexes{ + Number: indexes.NewUnique( + sb, AccountsNumberIndexPrefix, "accounts_by_number", + collections.Uint64Key, sdk.AccAddressKey, + func(_ sdk.AccAddress, v authtypes.BaseAccount) (uint64, error) { + return v.AccountNumber, nil + }, + ), + } +} +``` + +We create an `AccountIndexes` struct which contains a field: `Number`. This field represents our `AccountNumber` index. +`AccountNumber` is a field of `authtypes.BaseAccount` and it's a `uint64`. + +Then we can see in our `AccountIndexes` struct the `Number` field is defined as: + +```go +*indexes.Unique[uint64, sdk.AccAddress, authtypes.BaseAccount] +``` + +Where the first type parameter is `uint64`, which is the field type of our index. +The second type parameter is the primary key `sdk.AccAddress`. +And the third type parameter is the actual object we're storing `authtypes.BaseAccount`. + +Then we create a `NewAccountIndexes` function that instantiates and returns the `AccountsIndexes` struct. + +The function takes a `SchemaBuilder`. Then we instantiate our `indexes.Unique`, let's analyse the arguments we pass to +`indexes.NewUnique`. + +#### NOTE: indexes list + +The `AccountsIndexes` struct contains the indexes, the `NewIndexedMap` function will infer the indexes form that struct +using reflection, this happens only at init and is not computationally expensive. In case you want to explicitly declare +indexes: implement the `Indexes` interface in the `AccountsIndexes` struct: + +```go +func (a AccountsIndexes) IndexesList() []collections.Index[sdk.AccAddress, authtypes.BaseAccount] { + return []collections.Index[sdk.AccAddress, authtypes.BaseAccount]{a.Number} +} +``` + +#### Instantiating a `indexes.Unique` + +The first three arguments, we already know them, they are: `SchemaBuilder`, `Prefix` which is our index prefix (the partition +where index keys relationship for the `Number` index will be maintained), and the human name for the `Number` index. + +The second argument is a `collections.Uint64Key` which is a key codec to deal with `uint64` keys, we pass that because +the key we're trying to index is a `uint64` key (the account number), and then we pass as fifth argument the primary key codec, +which in our case is `sdk.AccAddress` (remember: we're mapping `sdk.AccAddress` => `BaseAccount`). + +Then as last parameter we pass a function that: given the `BaseAccount` returns its `AccountNumber`. + +After this we can proceed instantiating our `IndexedMap`. + +```go +var AccountsPrefix = collections.NewPrefix(0) + +type Keeper struct { + Schema collections.Schema + Accounts *collections.IndexedMap[sdk.AccAddress, authtypes.BaseAccount, AccountsIndexes] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey, cdc codec.BinaryCodec) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + return Keeper{ + Accounts: collections.NewIndexedMap( + sb, AccountsPrefix, "accounts", + sdk.AccAddressKey, codec.CollValue[authtypes.BaseAccount](cdc), + NewAccountIndexes(sb), + ), + } +} +``` + +As we can see here what we do, for now, is the same thing as we did for `collections.Map`. +We pass it the `SchemaBuilder`, the `Prefix` where we plan to store the mapping between `sdk.AccAddress` and `authtypes.BaseAccount`, +the human name and the respective `sdk.AccAddress` key codec and `authtypes.BaseAccount` value codec. + +Then we pass the instantiation of our `AccountIndexes` through `NewAccountIndexes`. + +Full example: + +```go +package docs + +import ( + "cosmossdk.io/collections" + "cosmossdk.io/collections/indexes" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +var AccountsNumberIndexPrefix = collections.NewPrefix(1) + +type AccountsIndexes struct { + Number *indexes.Unique[uint64, sdk.AccAddress, authtypes.BaseAccount] +} + +func (a AccountsIndexes) IndexesList() []collections.Index[sdk.AccAddress, authtypes.BaseAccount] { + return []collections.Index[sdk.AccAddress, authtypes.BaseAccount]{a.Number} +} + +func NewAccountIndexes(sb *collections.SchemaBuilder) AccountsIndexes { + return AccountsIndexes{ + Number: indexes.NewUnique( + sb, AccountsNumberIndexPrefix, "accounts_by_number", + collections.Uint64Key, sdk.AccAddressKey, + func(_ sdk.AccAddress, v authtypes.BaseAccount) (uint64, error) { + return v.AccountNumber, nil + }, + ), + } +} + +var AccountsPrefix = collections.NewPrefix(0) + +type Keeper struct { + Schema collections.Schema + Accounts *collections.IndexedMap[sdk.AccAddress, authtypes.BaseAccount, AccountsIndexes] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey, cdc codec.BinaryCodec) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + return Keeper{ + Accounts: collections.NewIndexedMap( + sb, AccountsPrefix, "accounts", + sdk.AccAddressKey, codec.CollValue[authtypes.BaseAccount](cdc), + NewAccountIndexes(sb), + ), + } +} +``` + +### Working with IndexedMaps + +Whilst instantiating `collections.IndexedMap` is tedious, working with them is extremely smooth. + +Let's take the full example, and expand it with some use-cases. + +```go +package docs + +import ( + "cosmossdk.io/collections" + "cosmossdk.io/collections/indexes" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +var AccountsNumberIndexPrefix = collections.NewPrefix(1) + +type AccountsIndexes struct { + Number *indexes.Unique[uint64, sdk.AccAddress, authtypes.BaseAccount] +} + +func (a AccountsIndexes) IndexesList() []collections.Index[sdk.AccAddress, authtypes.BaseAccount] { + return []collections.Index[sdk.AccAddress, authtypes.BaseAccount]{a.Number} +} + +func NewAccountIndexes(sb *collections.SchemaBuilder) AccountsIndexes { + return AccountsIndexes{ + Number: indexes.NewUnique( + sb, AccountsNumberIndexPrefix, "accounts_by_number", + collections.Uint64Key, sdk.AccAddressKey, + func(_ sdk.AccAddress, v authtypes.BaseAccount) (uint64, error) { + return v.AccountNumber, nil + }, + ), + } +} + +var AccountsPrefix = collections.NewPrefix(0) + +type Keeper struct { + Schema collections.Schema + Accounts *collections.IndexedMap[sdk.AccAddress, authtypes.BaseAccount, AccountsIndexes] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey, cdc codec.BinaryCodec) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + return Keeper{ + Accounts: collections.NewIndexedMap( + sb, AccountsPrefix, "accounts", + sdk.AccAddressKey, codec.CollValue[authtypes.BaseAccount](cdc), + NewAccountIndexes(sb), + ), + } +} + +func (k Keeper) CreateAccount(ctx sdk.Context, addr sdk.AccAddress) error { + nextAccountNumber := k.getNextAccountNumber() + + newAcc := authtypes.BaseAccount{ + AccountNumber: nextAccountNumber, + Sequence: 0, + } + + return k.Accounts.Set(ctx, addr, newAcc) +} + +func (k Keeper) RemoveAccount(ctx sdk.Context, addr sdk.AccAddress) error { + return k.Accounts.Remove(ctx, addr) +} + +func (k Keeper) GetAccountByNumber(ctx sdk.Context, accNumber uint64) (sdk.AccAddress, authtypes.BaseAccount, error) { + accAddress, err := k.Accounts.Indexes.Number.MatchExact(ctx, accNumber) + if err != nil { + return nil, authtypes.BaseAccount{}, err + } + + acc, err := k.Accounts.Get(ctx, accAddress) + return accAddress, acc, nil +} + +func (k Keeper) GetAccountsByNumber(ctx sdk.Context, startAccNum, endAccNum uint64) ([]authtypes.BaseAccount, error) { + rng := new(collections.Range[uint64]). + StartInclusive(startAccNum). + EndInclusive(endAccNum) + + iter, err := k.Accounts.Indexes.Number.Iterate(ctx, rng) + if err != nil { + return nil, err + } + + return indexes.CollectValues(ctx, k.Accounts, iter) +} + + +func (k Keeper) getNextAccountNumber() uint64 { + return 0 +} +``` + +## Collections with interfaces as values + +Although cosmos-sdk is shifting away from the usage of interface registry, there are still some places where it is used. +In order to support old code, we have to support collections with interface values. + +The generic `codec.CollValue` is not able to handle interface values, so we need to use a special type `codec.CollValueInterface`. +`codec.CollValueInterface` takes a `codec.BinaryCodec` as an argument, and uses it to marshal and unmarshal values as interfaces. +The `codec.CollValueInterface` lives in the `codec` package, whose import path is `github.com/cosmos/cosmos-sdk/codec`. + +### Instantiating Collections with interface values + +In order to instantiate a collection with interface values, we need to use `codec.CollValueInterface` instead of `codec.CollValue`. + +```go +package example + +import ( + "cosmossdk.io/collections" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +var AccountsPrefix = collections.NewPrefix(0) + +type Keeper struct { + Schema collections.Schema + Accounts *collections.Map[sdk.AccAddress, sdk.AccountI] +} + +func NewKeeper(cdc codec.BinaryCodec, storeKey *storetypes.KVStoreKey) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + return Keeper{ + Accounts: collections.NewMap( + sb, AccountsPrefix, "accounts", + sdk.AccAddressKey, codec.CollInterfaceValue[sdk.AccountI](cdc), + ), + } +} + +func (k Keeper) SaveBaseAccount(ctx sdk.Context, account authtypes.BaseAccount) error { + return k.Accounts.Set(ctx, account.GetAddress(), account) +} + +func (k Keeper) SaveModuleAccount(ctx sdk.Context, account authtypes.ModuleAccount) error { + return k.Accounts.Set(ctx, account.GetAddress(), account) +} + +func (k Keeper) GetAccount(ctx sdk.context, addr sdk.AccAddress) (sdk.AccountI, error) { + return k.Accounts.Get(ctx, addr) +} +``` + +## Triple key + +The `collections.Triple` is a special type of key composed of three keys, it's identical to `collections.Pair`. + +Let's see an example. + +```go +package example + +import ( + "context" + + "cosmossdk.io/collections" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" +) + +type AccAddress = string +type ValAddress = string + +type Keeper struct { + // let's simulate we have redelegations which are stored as a triple key composed of + // the delegator, the source validator and the destination validator. + Redelegations collections.KeySet[collections.Triple[AccAddress, ValAddress, ValAddress]] +} + +func NewKeeper(storeKey *storetypes.KVStoreKey) Keeper { + sb := collections.NewSchemaBuilder(sdk.OpenKVStore(storeKey)) + return Keeper{ + Redelegations: collections.NewKeySet(sb, collections.NewPrefix(0), "redelegations", collections.TripleKeyCodec(collections.StringKey, collections.StringKey, collections.StringKey) + } +} + +// RedelegationsByDelegator iterates over all the redelegations of a given delegator and calls onResult providing +// each redelegation from source validator towards the destination validator. +func (k Keeper) RedelegationsByDelegator(ctx context.Context, delegator AccAddress, onResult func(src, dst ValAddress) (stop bool, err error)) error { + rng := collections.NewPrefixedTripleRange[AccAddress, ValAddress, ValAddress](delegator) + return k.Redelegations.Walk(ctx, rng, func(key collections.Triple[AccAddress, ValAddress, ValAddress]) (stop bool, err error) { + return onResult(key.K2(), key.K3()) + }) +} + +// RedelegationsByDelegatorAndValidator iterates over all the redelegations of a given delegator and its source validator and calls onResult for each +// destination validator. +func (k Keeper) RedelegationsByDelegatorAndValidator(ctx context.Context, delegator AccAddress, validator ValAddress, onResult func(dst ValAddress) (stop bool, err error)) error { + rng := collections.NewSuperPrefixedTripleRange[AccAddress, ValAddress, ValAddress](delegator, validator) + return k.Redelegations.Walk(ctx, rng, func(key collections.Triple[AccAddress, ValAddress, ValAddress]) (stop bool, err error) { + return onResult(key.K3()) + }) +} +``` + +## Advanced Usages + +### Alternative Value Codec + +The `codec.AltValueCodec` allows a collection to decode values using a different codec than the one used to encode them. +Basically it enables to decode two different byte representations of the same concrete value. +It can be used to lazily migrate values from one bytes representation to another, as long as the new representation is +not able to decode the old one. + +A concrete example can be found in `x/bank` where the balance was initially stored as `Coin` and then migrated to `Int`. + +```go + +var BankBalanceValueCodec = codec.NewAltValueCodec(sdk.IntValue, func(b []byte) (sdk.Int, error) { + coin := sdk.Coin{} + err := coin.Unmarshal(b) + if err != nil { + return sdk.Int{}, err + } + return coin.Amount, nil +}) +``` + +The above example shows how to create an `AltValueCodec` that can decode both `sdk.Int` and `sdk.Coin` values. The provided +decoder function will be used as a fallback in case the default decoder fails. When the value will be encoded back into state +it will use the default encoder. This allows to lazily migrate values to a new bytes representation. diff --git a/collections/collections.go b/collections/collections.go new file mode 100644 index 00000000000..c6631b28c14 --- /dev/null +++ b/collections/collections.go @@ -0,0 +1,180 @@ +package collections + +import ( + "context" + "errors" + "io" + "math" + + "cosmossdk.io/collections/codec" + "cosmossdk.io/schema" +) + +var ( + // ErrNotFound is returned when the provided key is not present in the StorageProvider. + ErrNotFound = errors.New("collections: not found") + // ErrEncoding is returned when something fails during key or value encoding/decoding. + ErrEncoding = codec.ErrEncoding + // ErrConflict is returned when there are conflicts, for example in UniqueIndex. + ErrConflict = errors.New("collections: conflict") +) + +// KEYS + +var ( + // Uint16Key can be used to encode uint16 keys. Encoding is big endian to retain ordering. + Uint16Key = codec.NewUint16Key[uint16]() + // Uint32Key can be used to encode uint32 keys. Encoding is big endian to retain ordering. + Uint32Key = codec.NewUint32Key[uint32]() + // Uint64Key can be used to encode uint64 keys. Encoding is big endian to retain ordering. + Uint64Key = codec.NewUint64Key[uint64]() + // Int32Key can be used to encode int32 keys. Encoding retains ordering by toggling the MSB. + Int32Key = codec.NewInt32Key[int32]() + // Int64Key can be used to encode int64 keys. Encoding retains ordering by toggling the MSB. + Int64Key = codec.NewInt64Key[int64]() + // StringKey can be used to encode string keys. The encoding just converts the string + // to bytes. + // Non-terminality in multipart keys is handled by appending the StringDelimiter, + // this means that a string key when used as the non final part of a multipart key cannot + // contain the StringDelimiter. + // Lexicographical ordering is retained both in non and multipart keys. + StringKey = codec.NewStringKeyCodec[string]() + // BytesKey can be used to encode bytes keys. The encoding will just use + // the provided bytes. + // When used as the non-terminal part of a multipart key, we prefix the bytes key + // with a single byte representing the length of the key. This means two things: + // 1. When used in multipart keys the length can be at maximum 255 (max number that + // can be represented with a single byte). + // 2. When used in multipart keys the lexicographical ordering is lost due to the + // length prefixing. + // JSON encoding represents a bytes key as a hex encoded string. + BytesKey = codec.NewBytesKey[[]byte]() + // BoolKey can be used to encode booleans. It uses a single byte to represent the boolean. + // 0x0 is used to represent false, and 0x1 is used to represent true. + BoolKey = codec.NewBoolKey[bool]() +) + +// VALUES + +var ( + // BoolValue implements a ValueCodec for bool. + BoolValue = codec.KeyToValueCodec(BoolKey) + // Uint16Value implements a ValueCodec for uint16. + Uint16Value = codec.KeyToValueCodec(Uint16Key) + // Uint32Value implements a ValueCodec for uint32. + Uint32Value = codec.KeyToValueCodec(Uint32Key) + // Uint64Value implements a ValueCodec for uint64. + Uint64Value = codec.KeyToValueCodec(Uint64Key) + // Int32Value implements a ValueCodec for int32. + Int32Value = codec.KeyToValueCodec(Int32Key) + // Int64Value implements a ValueCodec for int64. + Int64Value = codec.KeyToValueCodec(Int64Key) + // StringValue implements a ValueCodec for string. + StringValue = codec.KeyToValueCodec(StringKey) + // BytesValue implements a ValueCodec for bytes. + BytesValue = codec.KeyToValueCodec(BytesKey) +) + +// Collection is the interface that all collections implement. It will eventually +// include methods for importing/exporting genesis data and schema +// reflection for clients. +// NOTE: Unstable. +type Collection interface { + // GetName is the unique name of the collection within a schema. It must + // match format specified by NameRegex. + GetName() string + + // GetPrefix is the unique prefix of the collection within a schema. + GetPrefix() []byte + + // ValueCodec returns the codec used to encode/decode values of the collection. + ValueCodec() codec.UntypedValueCodec + + genesisHandler + + // collectionSchemaCodec returns the schema codec for this collection. + schemaCodec() (*collectionSchemaCodec, error) + + // isSecondaryIndex indicates that this collection represents a secondary index + // in the schema and should be excluded from the module's user facing schema. + isSecondaryIndex() bool +} + +// collectionSchemaCodec maps a collection to a schema object type and provides +// decoders and encoders to and from schema values and raw kv-store bytes. +type collectionSchemaCodec struct { + coll Collection + objectType schema.ObjectType + keyDecoder func([]byte) (any, error) + valueDecoder func([]byte) (any, error) + keyEncoder func(any) ([]byte, error) + valueEncoder func(any) ([]byte, error) +} + +// Prefix defines a segregation bytes namespace for specific collections objects. +type Prefix []byte + +// Bytes returns the raw Prefix bytes. +func (n Prefix) Bytes() []byte { return n } + +// NewPrefix returns a Prefix given the provided namespace identifier. +// In the same module, no prefixes should share the same starting bytes +// meaning that having two namespaces whose bytes representation is: +// p1 := []byte("prefix") +// p2 := []byte("prefix1") +// yields to iterations of p1 overlapping over p2. +// If a numeric prefix is provided, it must be between 0 and 255 (uint8). +// If out of bounds this function will panic. +// Reason for which this function is constrained to `int` instead of `uint8` is for +// API ergonomics, golang's type inference will infer int properly but not uint8 +// meaning that developers would need to write NewPrefix(uint8(number)) for numeric +// prefixes. +func NewPrefix[T interface{ int | string | []byte }](identifier T) Prefix { + i := any(identifier) + var prefix []byte + switch c := i.(type) { + case int: + if c > math.MaxUint8 || c < 0 { + panic("invalid integer prefix value: must be between 0 and 255") + } + prefix = []byte{uint8(c)} + case string: + prefix = []byte(c) + case []byte: + identifierCopy := make([]byte, len(c)) + copy(identifierCopy, c) + prefix = identifierCopy + } + return prefix +} + +var _ Collection = (*collectionImpl[string, string])(nil) + +// collectionImpl wraps a Map and implements Collection. This properly splits +// the generic and untyped Collection interface from the typed Map, which every +// collection builds on. +type collectionImpl[K, V any] struct { + m Map[K, V] +} + +func (c collectionImpl[K, V]) ValueCodec() codec.UntypedValueCodec { + return codec.NewUntypedValueCodec(c.m.vc) +} + +func (c collectionImpl[K, V]) GetName() string { return c.m.name } + +func (c collectionImpl[K, V]) GetPrefix() []byte { return NewPrefix(c.m.prefix) } + +func (c collectionImpl[K, V]) validateGenesis(r io.Reader) error { return c.m.validateGenesis(r) } + +func (c collectionImpl[K, V]) importGenesis(ctx context.Context, r io.Reader) error { + return c.m.importGenesis(ctx, r) +} + +func (c collectionImpl[K, V]) exportGenesis(ctx context.Context, w io.Writer) error { + return c.m.exportGenesis(ctx, w) +} + +func (c collectionImpl[K, V]) defaultGenesis(w io.Writer) error { return c.m.defaultGenesis(w) } + +func (c collectionImpl[K, V]) isSecondaryIndex() bool { return c.m.isSecondaryIndex } diff --git a/collections/indexing.go b/collections/indexing.go new file mode 100644 index 00000000000..f7750ff2733 --- /dev/null +++ b/collections/indexing.go @@ -0,0 +1,181 @@ +package collections + +import ( + "bytes" + "fmt" + "strings" + + "github.com/tidwall/btree" + + "cosmossdk.io/collections/codec" + "cosmossdk.io/schema" +) + +// IndexingOptions are indexing options for the collections schema. +type IndexingOptions struct { + // RetainDeletionsFor is the list of collections to retain deletions for. + RetainDeletionsFor []string +} + +// ModuleCodec returns the ModuleCodec for this schema for the provided options. +func (s Schema) ModuleCodec(opts IndexingOptions) (schema.ModuleCodec, error) { + decoder := moduleDecoder{ + collectionLookup: &btree.Map[string, *collectionSchemaCodec]{}, + } + + retainDeletions := make(map[string]bool) + for _, collName := range opts.RetainDeletionsFor { + retainDeletions[collName] = true + } + + var types []schema.Type + for _, collName := range s.collectionsOrdered { + coll := s.collectionsByName[collName] + + // skip secondary indexes + if coll.isSecondaryIndex() { + continue + } + + cdc, err := coll.schemaCodec() + if err != nil { + return schema.ModuleCodec{}, err + } + + if retainDeletions[coll.GetName()] { + cdc.objectType.RetainDeletions = true + } + + types = append(types, cdc.objectType) + + decoder.collectionLookup.Set(string(coll.GetPrefix()), cdc) + } + + modSchema, err := schema.CompileModuleSchema(types...) + if err != nil { + return schema.ModuleCodec{}, err + } + + return schema.ModuleCodec{ + Schema: modSchema, + KVDecoder: decoder.decodeKV, + }, nil +} + +type moduleDecoder struct { + // collectionLookup lets us efficiently look the correct collection based on raw key bytes + collectionLookup *btree.Map[string, *collectionSchemaCodec] +} + +func (m moduleDecoder) decodeKV(update schema.KVPairUpdate) ([]schema.ObjectUpdate, error) { + key := update.Key + ks := string(key) + var cd *collectionSchemaCodec + // we look for the collection whose prefix is less than this key + m.collectionLookup.Descend(ks, func(prefix string, cur *collectionSchemaCodec) bool { + bytesPrefix := cur.coll.GetPrefix() + if bytes.HasPrefix(key, bytesPrefix) { + cd = cur + return true + } + return false + }) + if cd == nil { + return nil, nil + } + + return cd.decodeKVPair(update) +} + +func (c collectionSchemaCodec) decodeKVPair(update schema.KVPairUpdate) ([]schema.ObjectUpdate, error) { + // strip prefix + key := update.Key + key = key[len(c.coll.GetPrefix()):] + + k, err := c.keyDecoder(key) + if err != nil { + return []schema.ObjectUpdate{ + {TypeName: c.coll.GetName()}, + }, err + } + + if update.Remove { + return []schema.ObjectUpdate{ + {TypeName: c.coll.GetName(), Key: k, Delete: true}, + }, nil + } + + v, err := c.valueDecoder(update.Value) + if err != nil { + return []schema.ObjectUpdate{ + {TypeName: c.coll.GetName(), Key: k}, + }, err + } + + return []schema.ObjectUpdate{ + {TypeName: c.coll.GetName(), Key: k, Value: v}, + }, nil +} + +func (c collectionImpl[K, V]) schemaCodec() (*collectionSchemaCodec, error) { + res := &collectionSchemaCodec{ + coll: c, + } + res.objectType.Name = c.GetName() + + keyDecoder, err := codec.KeySchemaCodec(c.m.kc) + if err != nil { + return nil, err + } + res.objectType.KeyFields = keyDecoder.Fields + res.keyDecoder = func(i []byte) (any, error) { + _, x, err := c.m.kc.Decode(i) + if err != nil { + return nil, err + } + return keyDecoder.ToSchemaType(x) + } + ensureFieldNames(c.m.kc, "key", res.objectType.KeyFields) + + valueDecoder, err := codec.ValueSchemaCodec(c.m.vc) + if err != nil { + return nil, err + } + res.objectType.ValueFields = valueDecoder.Fields + res.valueDecoder = func(i []byte) (any, error) { + x, err := c.m.vc.Decode(i) + if err != nil { + return nil, err + } + return valueDecoder.ToSchemaType(x) + } + ensureFieldNames(c.m.vc, "value", res.objectType.ValueFields) + + return res, nil +} + +// ensureFieldNames makes sure that all fields have valid names - either the +// names were specified by user or they get filled +func ensureFieldNames(x any, defaultName string, cols []schema.Field) { + var names []string = nil + if hasName, ok := x.(interface{ Name() string }); ok { + name := hasName.Name() + if name != "" { + names = strings.Split(hasName.Name(), ",") + } + } + for i, col := range cols { + if names != nil && i < len(names) { + col.Name = names[i] + } else { + if col.Name == "" { + if i == 0 && len(cols) == 1 { + col.Name = defaultName + } else { + col.Name = fmt.Sprintf("%s%d", defaultName, i+1) + } + } + } + cols[i] = col + } +} diff --git a/crypto/keyring/autocli.go b/crypto/keyring/autocli.go index 51569f19170..0dd91ff60a4 100644 --- a/crypto/keyring/autocli.go +++ b/crypto/keyring/autocli.go @@ -2,9 +2,9 @@ package keyring import ( signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" - authsigning "cosmossdk.io/x/auth/signing" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) // autoCLIKeyring represents the keyring interface used by the AutoCLI. diff --git a/crypto/keys/multisig/multisig_test.go b/crypto/keys/multisig/multisig_test.go index e8e75a61ab0..abd56e4cdaa 100644 --- a/crypto/keys/multisig/multisig_test.go +++ b/crypto/keys/multisig/multisig_test.go @@ -9,7 +9,6 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/depinject" "cosmossdk.io/log" - "cosmossdk.io/x/auth/migrations/legacytx" "github.com/cosmos/cosmos-sdk/codec" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" @@ -23,6 +22,7 @@ import ( _ "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/configurator" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) func TestNewMultiSig(t *testing.T) { diff --git a/depinject/appconfig/README.md b/depinject/appconfig/README.md new file mode 100644 index 00000000000..2e8ace56497 --- /dev/null +++ b/depinject/appconfig/README.md @@ -0,0 +1,232 @@ +# Wiring up app modules for use with appconfig + +The `appconfig` framework allows Cosmos SDK modules to be composed declaratively using a configuration file without +requiring the app developer to understand the details of inter-module dependencies. + +## 1. Create a module config protobuf message + +The first step in creating a module that works with `appconfig`, is to create a protobuf message for the module configuration. The best practices for defining the module configuration message are: + +* Use a dedicated protobuf package for the module configuration message instead of placing it in the API protobuf package. For example, the module configuration for bank would go in `cosmos.bank.module.v1` instead of just `cosmos.bank.v1`. This decouples the state machine version from the API version. +* The module configuration message is usually called simply `Module`, ex. `cosmos.bank.module.v1.Module`. +* Create a new protobuf package and configuration message for each state machine breaking version of the module, ex. `cosmos.bank.module.v2.Module`, etc. + +The module configuration message should include any parameters which should be initialized at application startup. For example, the auth module needs to know the bech32 prefix of the app and the permissions of module accounts. + +In the future, it may be possible to update the app config through a governance proposal at runtime. + +All module configuration messages should define a module descriptor, using the `cosmos.app.v1alpha1.module` message option. + +Here is an example module configuration message for the `auth` module: + +```protobuf +package cosmos.auth.module.v1; + +import "cosmos/app/v1alpha1/module.proto"; + +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import: "github.com/cosmos/cosmos-sdk/x/auth" + }; + string bech32_prefix = 1; + repeated ModuleAccountPermission module_account_permissions = 2; +} +``` + +## 2. Register module depinject providers and invokers + +Once we have a module config object, we need to register depinject providers and invokers for the module using the `cosmossdk.io/core/appmodule` package. + +At the most basic level, we must define an `init` function in the package listed as the `go_import` in the module descriptor. This `init` function must call `appconfig.RegisterModule` with an empty instance of the config object and some options for initializing the module, ex: + +```go +func init() { + appconfig.RegisterModule(&modulev1.Module{}, + // options + ) +} +``` + +### `depinject` Provider and Invoker Basics + +A `depinject` "provider" is a function which takes dependencies from other modules as inputs and returns outputs for +other modules to use as dependencies. A `depinject` "invoker" is function which takes optional dependencies as inputs, +returns no outputs, and is run at the end of initializing the dependency graph. Providers are much more common than +invokers and should be the preferred method of wiring up modules when possible. Providers and invokers can be registered +for modules by using `appconfig.Provide` and `appconfig.Invoke` to create options which get passed +to `appconfig.RegisterModule` in the module `init` function, ex: + +```go +func init() { + appconfig.RegisterModule(&modulev1.Module{}, + appconfig.Provide(provideSomething, provideSomethingElse), + appconfig.Invoke(invokeSomething), + ) +} +``` + +### `depinject` Types + +`depinject` constructor functions support these classes of input and output parameter types: + +* regular golang types (with special treatment of interface types as input parameters) +* structs with `depinject.In` and `depinject.Out` embedded +* `depinject.OnePerModuleType`s +* `depinject.ManyPerContainerType`s +* `depinject.ModuleKey` (which can only be defined as an input type) +* `error` (which gets special treatment as an output type) + +#### Regular Golang Types + +Regular golang types (besides the special cases described above) can be provided as both input and output parameters +to providers and invokers. For `depinject` to match an output parameter of one provider to an input parameter of +another, there must be an exact match for the type unless the input parameter is an input type. For instance, if +a provider defines a dependency on `Foo` and some module provides `*Foo`, these two types will not match and there +will be an error. + +#### Interface Input Types + +When interfaces are used as input parameters to providers and invokers, `depinject` will search the container for +all types that implement this interface. If there is an unambiguously matching type, then this type will be used +to satisfy that interface. If there is a conflict between two types matching the interface, the app developer +can use `golang_bindings` options in their app config in order to resolve the conflict. + +#### Structs with embedded `depinject.In` and `depinject.Out` + +Structs that have `depinject.In` or `depinject.Out` as an embedded field are treated specially by `depinject`, where +all of these structs fields are treated as input or output parameters, respectively. These structs allow custom options +to be defined using struct field tags. Currently, the only supported custom option is `optional:"true"` which marks +a field as optional. + +#### `depinject.OnePerModuleType`s + +Any type which implements the `depinject.OnePerModuleType` interface can be provided at most once by every module. +These types can be collected as an input parameter to some provider or invoker by defining an input parameter which +is a map of module names as strings to this parameter type. For example if `Foo` is a `OnePerModuleType`, then +`map[string]Foo` can be declared as an input parameter by some provider (which obviously cannot provide an instance of +`Foo` itself because that would cause a circular dependency). + +`OnePerModuleType`s should be used whenever different modules may provide the type *and* there is a need to provide +an ordering of these types based on the module name. Generally, in blockchains there is always a need for deterministic +orderings so using module names to provide that ordering is generally a good strategy for this use case. Ordering based +on module names can either be done implicitly by sorting the module names or explicitly as a parameter in the module +configuration object. + +#### `depinject.ManyPerContainerType`s + +`ManyPerContainerType`s can be provided by as many providers in as many modules as the user would like. If a type `Bar` +is a `ManyPerContainerType`, a provider may define an output parameter of `Bar` or `[]Bar` to provide `Bar` instances +to the container. A provider may define an input parameter of `[]Bar` to get all of the `Bar` instances in the +container (such a provider may not also return `Bar` as that would cause a circular dependency). The ordering of `Bar` +instances in the `[]Bar` input type should be assumed to be deterministic. + +`ManyPerContainerType`s should be used only when 1) ordering is unimportant or 2) the ordering can be defined by +some parameter on the type. For instance, if `Bar` had a field `Name string`, that is supposed to be unique in the +container then that could be used to provide an ordering. An example of a type that could work as a +`ManyPerContainerType` in this way is a wrapper around `*cobra.Command`, ex. +`type QueryCommand struct {*cobra.Command}`. This could be used to collect all the query commands in an app and then +cobra would take care of ordering. If this type of ordering is not available, a `OnePerModuleType` is probably a better +bet. + +#### Module-scoped Providers/`depinject.ModuleKey` as an input + +If `depinject.ModuleKey` is used as input parameter for a provider, the provider function will be treated as a +"module-scoped provider" which means that the provider function will be called exactly once every time +one of its outputs is needed by a module so that the provider can provide a unique instance of the dependency to +each module. + +Module-scoped dependencies should be used to provide dependencies which are private and unique to each module. Examples +of these are store keys and param subspaces. + +#### `error` as an output parameter + +`error` can be used as the last output parameter on any provider or invoker. If a provider or invoker with an `error` +parameter returns a non-nil value for `error`, `depinject` will fail and propagate this error up to the caller. + +### Provider Invocation Details + +Providers are called lazily as they are needed and will be invoked at most once (except for "module-scoped providers" +described above) if and only if at least one of their outputs is needed somewhere in the dependency graph. Providers +will only get called if all of their non-optional inputs can successfully be resolved by some other module, otherwise an +error will occur. Modules should proactively mark dependencies as `optional` if the module can still be successfully +built without this dependency. + +### Invoker Invocation Details + +Invokers are called at the end of container initialization after all providers that were needed to build the graph +were called. All the dependencies of invokers are automatically marked as optional so invokers should `nil` check +every input parameter. Invokers may cause additional providers to get run if they have a dependency that wasn't built +yet. But if a dependency to an invoker cannot be provided for some reason, the invoker will still get called but with +`nil` for that input. This allows invokers to still work with the lazy invocation model of providers which only +builds things which are actually necessary as a dependency for some module or the caller. + +Invokers should generally be used sparingly to perform some initialization logic which can't be done in the initial +provider, usually because of a circular dependency, and which may be optional. + +### Best practices + +* make dependencies `optional` whenever possible! +* interface types should be used whenever possible to avoid tight couplings between two modules. +* `OnePerModuleType`s should be used when there is something occurs at most once per module and the module name is a +convenient way for providing a deterministic order. +* `ManyPerContainerType`s should be used only when there is an obvious way to create an ordering from the types or +when ordering *really* doesn't matter (which is rare). +* module-scoped providers should be used for private, module-scoped dependencies +* use different providers for unrelated or loosely components or to resolve circular dependencies (see below) +* use invokers sparingly and always `nil`-check the inputs. + +### Resolving Circular Dependencies + +Circular dependencies are inevitable to crop up and there are ways to avoid them. While `depinject` cannot handle +circular dependency graphs of providers, many of the above tools are designed to enable satisfying circular dependencies +between modules. + +One of the key tactics for resolving circular dependencies is to use different providers and/or invokers to allow a +circular dependency between components. For example, say the slashing keeper depends on the keeper module but the +staking keeper also depends on the staking module indirectly (in the form of "staking hooks"). The slashing module +can declare a dependency directly on the staking keeper (using an interface to avoid actually importing the staking +keeper package). It can also provide an instance of the slashing keeper wrapped as staking hooks in a `OnePerModuleType` +we'll call `StakingHooksWrapper`. Now, if the staking module directly depended on the staking hooks wrappers +(`map[string]StakingHooksWrapper`) we would have a circular dependency graph and `depinject` would fail. To fix this, +the staking module can define an invoker which depends on `map[string]StakingHooksWrapper` and the staking keeper +(which was provided by the staking module already in a separate provided). In this way `depinject` will be able to +satisfy this dependency graph which allows staking and slashing to depend on each other in this order: + +* provide staking keeper -> slashing keeper +* provide slashing keeper wrapped as `StakingHooksWrapper` +* get `map[string]StakingHooksWrapper` and the staking keeper and wire them together + +## 3. Testing and Debugging The Module + +In order to test and debug the module configuration, we need to build an app config, generally defined in a YAML file. +This configuration should be passed first to `appconfig.LoadYAML` to get an `depinject.Config` instance.Then the +`depinject.Config` can be passed to `depinject.Inject` and we can try to resolve dependencies in the app config. +Alternatively, the `depinject.Config` can be created via [pure Go code](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/simapp/app_config.go). + +Ex: + +```go +//go:embed app.yaml +var appConfig []byte + +var AppConfig = appconfig.LoadYAML(appConfig) + +func TestModule(t *testing.T) { + var keeper Keeper + assert.NilError(t, depinject.Inject(AppConfig, &keeper)) +} +``` + +### Debugging `depinject` Graphs + +Whenever there is an error in a `depinject` graph, by default `depinject` will dump a bunch of logging output to the +console, print the error message, and save the dependency graph in [GraphViz](https://graphviz.org) DOT format to +the file `debug_container.dot`. Inspecting the GraphViz output by converting it to an SVG and viewing it in a web +browser or using some other GraphViz tool is *highly recommended*. + +If `depinject` does not return an error but there is still some weird issue wiring up modules, inspecting the GraphViz +and logging output is still *highly recommended* and can be done using `depinject.InjectDebug` with the debug option +`depinject.Debug`. + +App developers should attempt to familiarize themselves with the GraphViz graph of their app to see which modules +depend on which other modules. diff --git a/docs/architecture/adr-011-generalize-genesis-accounts.md b/docs/architecture/adr-011-generalize-genesis-accounts.md index be4f9b37ef5..92a704ba6ea 100644 --- a/docs/architecture/adr-011-generalize-genesis-accounts.md +++ b/docs/architecture/adr-011-generalize-genesis-accounts.md @@ -63,7 +63,7 @@ The `auth` codec must have all custom account types registered to marshal them. An example custom account definition: ```go -import authtypes "cosmossdk.io/x/auth/types" +import authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" // Register the module account type with the auth module codec so it can decode module accounts stored in a genesis file func init() { diff --git a/docs/architecture/adr-057-app-wiring.md b/docs/architecture/adr-057-app-wiring.md index 239e7d52b35..d187cf2f8d0 100644 --- a/docs/architecture/adr-057-app-wiring.md +++ b/docs/architecture/adr-057-app-wiring.md @@ -226,7 +226,7 @@ package main import ( // Each go package which registers a module must be imported just for side-effects // so that module implementations are registered. - _ "cosmossdk.io/x/auth/module" + _ "github.com/cosmos/cosmos-sdk/x/auth/module" _ "cosmossdk.io/x/bank/module" _ "cosmossdk.io/x/staking/module" "github.com/cosmos/cosmos-sdk/core/app" diff --git a/go.mod b/go.mod index 3cd1abe298a..94532d120bf 100644 --- a/go.mod +++ b/go.mod @@ -13,8 +13,12 @@ require ( cosmossdk.io/log v1.4.1 cosmossdk.io/math v1.3.0 cosmossdk.io/schema v0.2.0 +<<<<<<< HEAD cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897 cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 +======= + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 @@ -184,6 +188,7 @@ require ( // ) // TODO remove after all modules have their own go.mods replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -191,6 +196,13 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ./x/auth +======= + cosmossdk.io/api => ./api + cosmossdk.io/collections => ./collections + cosmossdk.io/core => ./core + cosmossdk.io/core/testing => ./core/testing + cosmossdk.io/store => ./store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ./x/bank cosmossdk.io/x/consensus => ./x/consensus cosmossdk.io/x/staking => ./x/staking diff --git a/proto/cosmos/tx/config/v1/config.proto b/proto/cosmos/tx/config/v1/config.proto index ec3b3b1b244..65c6b6bbac8 100644 --- a/proto/cosmos/tx/config/v1/config.proto +++ b/proto/cosmos/tx/config/v1/config.proto @@ -7,7 +7,7 @@ import "cosmos/app/v1alpha1/module.proto"; // Config is the config object of the x/auth/tx package. message Config { option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/x/auth/tx" + go_import: "github.com/cosmos/cosmos-sdk/x/auth/tx" }; // skip_ante_handler defines whether the ante handler registration should be skipped in case an app wants to override diff --git a/runtime/app.go b/runtime/app.go index dd5da858077..c5533d79ce1 100644 --- a/runtime/app.go +++ b/runtime/app.go @@ -13,8 +13,6 @@ import ( "cosmossdk.io/core/legacy" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth/ante/unorderedtx" - authtx "cosmossdk.io/x/auth/tx" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" @@ -28,6 +26,8 @@ import ( servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" ) // App is a wrapper around BaseApp and ModuleManager that can be used in hybrid diff --git a/runtime/builder.go b/runtime/builder.go index 73fcb3f73f6..5f751a87cd5 100644 --- a/runtime/builder.go +++ b/runtime/builder.go @@ -10,13 +10,13 @@ import ( "github.com/spf13/cast" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth/ante/unorderedtx" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/flags" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/version" + "github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx" ) // AppBuilder is a type that is injected into a container by the runtime module diff --git a/server/cmt_cmds.go b/server/cmt_cmds.go index 4510cea20cb..08e70707a8a 100644 --- a/server/cmt_cmds.go +++ b/server/cmt_cmds.go @@ -17,7 +17,6 @@ import ( "sigs.k8s.io/yaml" "cosmossdk.io/log" - auth "cosmossdk.io/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -28,6 +27,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/version" + auth "github.com/cosmos/cosmos-sdk/x/auth/client/cli" ) // StatusCommand returns the command to return the status of the network. diff --git a/server/mock/tx.go b/server/mock/tx.go index f11ddd12a98..22a709452b0 100644 --- a/server/mock/tx.go +++ b/server/mock/tx.go @@ -9,12 +9,12 @@ import ( bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" "cosmossdk.io/core/transaction" errorsmod "cosmossdk.io/errors" - "cosmossdk.io/x/auth/signing" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" txsigning "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) // KVStoreTx is an sdk.Tx which is its own sdk.Msg. diff --git a/server/v2/cometbft/config.go b/server/v2/cometbft/config.go index 7cdc8bd0824..56860a78dda 100644 --- a/server/v2/cometbft/config.go +++ b/server/v2/cometbft/config.go @@ -64,4 +64,3 @@ func getConfigTomlFromViper(v *viper.Viper) *cmtcfg.Config { return conf.SetRoot(rootDir) } - diff --git a/server/v2/cometbft/go.mod b/server/v2/cometbft/go.mod index 45f1cb11196..b821b5aae7e 100644 --- a/server/v2/cometbft/go.mod +++ b/server/v2/cometbft/go.mod @@ -3,6 +3,7 @@ module cosmossdk.io/server/v2/cometbft go 1.23 replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -10,6 +11,15 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../../../x/auth +======= + cosmossdk.io/api => ../../../api + cosmossdk.io/core => ../../../core + cosmossdk.io/core/testing => ../../../core/testing + cosmossdk.io/server/v2 => ../ + cosmossdk.io/server/v2/appmanager => ../appmanager + cosmossdk.io/store => ../../../store + cosmossdk.io/store/v2 => ../../../store/v2 +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../../../x/bank cosmossdk.io/x/consensus => ../../../x/consensus cosmossdk.io/x/staking => ../../../x/staking @@ -48,8 +58,12 @@ require ( cosmossdk.io/depinject v1.0.0 // indirect cosmossdk.io/errors/v2 v2.0.0-20240731132947-df72853b3ca5 // indirect cosmossdk.io/math v1.3.0 // indirect +<<<<<<< HEAD cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect +======= + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc // indirect +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.4-0.20240815194237-858ec2fcb897 // indirect; main diff --git a/simapp/ante.go b/simapp/ante.go index 8fd68c61307..54bc40331ee 100644 --- a/simapp/ante.go +++ b/simapp/ante.go @@ -3,11 +3,11 @@ package simapp import ( "errors" - "cosmossdk.io/x/auth/ante" - "cosmossdk.io/x/auth/ante/unorderedtx" circuitante "cosmossdk.io/x/circuit/ante" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx" ) // HandlerOptions are the options required for constructing a default SDK AnteHandler. diff --git a/simapp/app.go b/simapp/app.go index ca344c90652..5fbbe8f7808 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -28,18 +28,6 @@ import ( lockup "cosmossdk.io/x/accounts/defaults/lockup" "cosmossdk.io/x/accounts/testing/account_abstraction" "cosmossdk.io/x/accounts/testing/counter" - "cosmossdk.io/x/auth" - "cosmossdk.io/x/auth/ante" - "cosmossdk.io/x/auth/ante/unorderedtx" - authcodec "cosmossdk.io/x/auth/codec" - authkeeper "cosmossdk.io/x/auth/keeper" - "cosmossdk.io/x/auth/posthandler" - authsims "cosmossdk.io/x/auth/simulation" - authtx "cosmossdk.io/x/auth/tx" - txmodule "cosmossdk.io/x/auth/tx/config" - authtypes "cosmossdk.io/x/auth/types" - "cosmossdk.io/x/auth/vesting" - vestingtypes "cosmossdk.io/x/auth/vesting/types" "cosmossdk.io/x/authz" authzkeeper "cosmossdk.io/x/authz/keeper" authzmodule "cosmossdk.io/x/authz/module" @@ -112,6 +100,18 @@ import ( "github.com/cosmos/cosmos-sdk/types/msgservice" sigtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/version" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + "github.com/cosmos/cosmos-sdk/x/auth/posthandler" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/auth/vesting" + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ) diff --git a/simapp/app_config.go b/simapp/app_config.go index 8d2172e44b4..d4c21d453c2 100644 --- a/simapp/app_config.go +++ b/simapp/app_config.go @@ -31,10 +31,6 @@ import ( vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" "cosmossdk.io/depinject/appconfig" "cosmossdk.io/x/accounts" - _ "cosmossdk.io/x/auth/tx/config" // import for side-effects - authtypes "cosmossdk.io/x/auth/types" - _ "cosmossdk.io/x/auth/vesting" // import for side-effects - vestingtypes "cosmossdk.io/x/auth/vesting/types" "cosmossdk.io/x/authz" _ "cosmossdk.io/x/authz/module" // import for side-effects _ "cosmossdk.io/x/bank" // import for side-effects @@ -71,6 +67,10 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" _ "github.com/cosmos/cosmos-sdk/testutil/x/counter" // import for side-effects countertypes "github.com/cosmos/cosmos-sdk/testutil/x/counter/types" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" // import for side-effects + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ) diff --git a/simapp/app_di.go b/simapp/app_di.go index 03315a4dd9d..0677e3c1315 100644 --- a/simapp/app_di.go +++ b/simapp/app_di.go @@ -16,12 +16,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" "cosmossdk.io/x/accounts" - "cosmossdk.io/x/auth" - "cosmossdk.io/x/auth/ante" - "cosmossdk.io/x/auth/ante/unorderedtx" - authkeeper "cosmossdk.io/x/auth/keeper" - authsims "cosmossdk.io/x/auth/simulation" - authtypes "cosmossdk.io/x/auth/types" authzkeeper "cosmossdk.io/x/authz/keeper" bankkeeper "cosmossdk.io/x/bank/keeper" circuitkeeper "cosmossdk.io/x/circuit/keeper" @@ -51,6 +45,12 @@ import ( servertypes "github.com/cosmos/cosmos-sdk/server/types" testdata_pulsar "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // DefaultNodeHome default home directories for the application daemon diff --git a/simapp/app_test.go b/simapp/app_test.go index 203ca2c5720..46fde529e13 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -16,8 +16,6 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/log" "cosmossdk.io/x/accounts" - "cosmossdk.io/x/auth" - "cosmossdk.io/x/auth/vesting" authzmodule "cosmossdk.io/x/authz/module" "cosmossdk.io/x/bank" banktypes "cosmossdk.io/x/bank/types" @@ -39,6 +37,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/types/msgservice" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/vesting" "github.com/cosmos/cosmos-sdk/x/genutil" ) diff --git a/simapp/genesis_account.go b/simapp/genesis_account.go index 61a8f6942f1..0ebb67d0393 100644 --- a/simapp/genesis_account.go +++ b/simapp/genesis_account.go @@ -3,9 +3,8 @@ package simapp import ( "errors" - authtypes "cosmossdk.io/x/auth/types" - sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ authtypes.GenesisAccount = (*SimGenesisAccount)(nil) diff --git a/simapp/genesis_account_test.go b/simapp/genesis_account_test.go index 0fe897c1074..d813e9ec7e3 100644 --- a/simapp/genesis_account_test.go +++ b/simapp/genesis_account_test.go @@ -8,10 +8,10 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/simapp" - authtypes "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestSimGenesisAccountValidate(t *testing.T) { diff --git a/simapp/go.mod b/simapp/go.mod index c392e75c224..826b50fdb4b 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -15,7 +15,6 @@ require ( cosmossdk.io/tools/confix v0.0.0-20230613133644-0a778132a60f cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 - cosmossdk.io/x/auth v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/circuit v0.0.0-20230613133644-0a778132a60f @@ -250,7 +249,6 @@ replace ( cosmossdk.io/x/accounts => ../x/accounts cosmossdk.io/x/accounts/defaults/lockup => ../x/accounts/defaults/lockup cosmossdk.io/x/accounts/defaults/multisig => ../x/accounts/defaults/multisig - cosmossdk.io/x/auth => ../x/auth cosmossdk.io/x/authz => ../x/authz cosmossdk.io/x/bank => ../x/bank cosmossdk.io/x/circuit => ../x/circuit diff --git a/simapp/mint_fn.go b/simapp/mint_fn.go index 1ed53166b34..f4542f7fb7c 100644 --- a/simapp/mint_fn.go +++ b/simapp/mint_fn.go @@ -8,12 +8,12 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/core/event" "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" minttypes "cosmossdk.io/x/mint/types" stakingtypes "cosmossdk.io/x/staking/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type MintBankKeeper interface { diff --git a/simapp/simd/cmd/commands.go b/simapp/simd/cmd/commands.go index b43ef6a7439..2986c58c942 100644 --- a/simapp/simd/cmd/commands.go +++ b/simapp/simd/cmd/commands.go @@ -12,7 +12,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/simapp" confixcmd "cosmossdk.io/tools/confix/cmd" - authcmd "cosmossdk.io/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/debug" @@ -24,6 +23,7 @@ import ( servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/genutil" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index 3743b1d1d9b..2f2e8000e13 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -11,9 +11,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/simapp" "cosmossdk.io/simapp/params" - "cosmossdk.io/x/auth/tx" - authtxconfig "cosmossdk.io/x/auth/tx/config" - "cosmossdk.io/x/auth/types" txsigning "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/client" @@ -24,6 +21,9 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // NewRootCmd creates a new root command for simd. It is called once in the diff --git a/simapp/simd/cmd/root_di.go b/simapp/simd/cmd/root_di.go index 863835f7d97..24373b0c959 100644 --- a/simapp/simd/cmd/root_di.go +++ b/simapp/simd/cmd/root_di.go @@ -16,9 +16,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" "cosmossdk.io/simapp" - "cosmossdk.io/x/auth/tx" - authtxconfig "cosmossdk.io/x/auth/tx/config" - "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" @@ -27,6 +24,9 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // NewRootCmd creates a new root command for simd. It is called once in the main function. diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index e51b67f38af..116307f63bf 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -17,7 +17,6 @@ import ( "cosmossdk.io/math" "cosmossdk.io/math/unsafe" "cosmossdk.io/simapp" - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" stakingtypes "cosmossdk.io/x/staking/types" @@ -34,6 +33,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/version" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ) diff --git a/simapp/simd/cmd/testnet_test.go b/simapp/simd/cmd/testnet_test.go index d79e60b42b4..2e2653c20e4 100644 --- a/simapp/simd/cmd/testnet_test.go +++ b/simapp/simd/cmd/testnet_test.go @@ -11,7 +11,6 @@ import ( corectx "cosmossdk.io/core/context" "cosmossdk.io/depinject" "cosmossdk.io/log" - "cosmossdk.io/x/auth" banktypes "cosmossdk.io/x/bank/types" "cosmossdk.io/x/staking" @@ -21,6 +20,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" "github.com/cosmos/cosmos-sdk/types/module" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" genutiltest "github.com/cosmos/cosmos-sdk/x/genutil/client/testutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ) diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 22b13fee013..8835e185e8b 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -15,7 +15,6 @@ import ( "cosmossdk.io/log" sdkmath "cosmossdk.io/math" pruningtypes "cosmossdk.io/store/pruning/types" - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" minttypes "cosmossdk.io/x/mint/types" @@ -30,6 +29,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // SetupOptions defines arguments that are passed into `Simapp` constructor. diff --git a/simapp/upgrades.go b/simapp/upgrades.go index 6262ee35ee3..36079956cc6 100644 --- a/simapp/upgrades.go +++ b/simapp/upgrades.go @@ -6,12 +6,12 @@ import ( "cosmossdk.io/core/appmodule" corestore "cosmossdk.io/core/store" "cosmossdk.io/x/accounts" - authkeeper "cosmossdk.io/x/auth/keeper" epochstypes "cosmossdk.io/x/epochs/types" protocolpooltypes "cosmossdk.io/x/protocolpool/types" upgradetypes "cosmossdk.io/x/upgrade/types" countertypes "github.com/cosmos/cosmos-sdk/testutil/x/counter/types" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) // UpgradeName defines the on-chain upgrade name for the sample SimApp upgrade diff --git a/simapp/upgrades_test.go b/simapp/upgrades_test.go index b70ee15c786..4ea93b6430c 100644 --- a/simapp/upgrades_test.go +++ b/simapp/upgrades_test.go @@ -7,8 +7,9 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/collections" - authkeeper "cosmossdk.io/x/auth/keeper" - authtypes "cosmossdk.io/x/auth/types" + + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // TestSyncAccountNumber tests if accounts module account number is set correctly with the value get from auth. diff --git a/simapp/v2/app_config.go b/simapp/v2/app_config.go index c126d1dcfa9..0cd6cac6b87 100644 --- a/simapp/v2/app_config.go +++ b/simapp/v2/app_config.go @@ -31,11 +31,6 @@ import ( vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" "cosmossdk.io/depinject/appconfig" "cosmossdk.io/x/accounts" - _ "cosmossdk.io/x/auth" // import for side-effects - _ "cosmossdk.io/x/auth/tx/config" // import for side-effects - authtypes "cosmossdk.io/x/auth/types" - _ "cosmossdk.io/x/auth/vesting" // import for side-effects - vestingtypes "cosmossdk.io/x/auth/vesting/types" "cosmossdk.io/x/authz" _ "cosmossdk.io/x/authz/module" // import for side-effects _ "cosmossdk.io/x/bank" // import for side-effects @@ -70,6 +65,11 @@ import ( upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/runtime" + _ "github.com/cosmos/cosmos-sdk/x/auth" // import for side-effects + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" // import for side-effects + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ) diff --git a/simapp/v2/app_di.go b/simapp/v2/app_di.go index 19796803af3..116c9644670 100644 --- a/simapp/v2/app_di.go +++ b/simapp/v2/app_di.go @@ -13,7 +13,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/runtime/v2" "cosmossdk.io/x/accounts" - authkeeper "cosmossdk.io/x/auth/keeper" authzkeeper "cosmossdk.io/x/authz/keeper" bankkeeper "cosmossdk.io/x/bank/keeper" circuitkeeper "cosmossdk.io/x/circuit/keeper" @@ -36,6 +35,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/std" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" _ "github.com/cosmos/cosmos-sdk/x/genutil" ) diff --git a/simapp/v2/app_test.go b/simapp/v2/app_test.go index 84accd3f2ed..a51354e4b3b 100644 --- a/simapp/v2/app_test.go +++ b/simapp/v2/app_test.go @@ -21,13 +21,13 @@ import ( serverv2 "cosmossdk.io/server/v2" comettypes "cosmossdk.io/server/v2/cometbft/types" "cosmossdk.io/store/v2/db" - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/testutil/mock" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func NewTestApp(t *testing.T) (*SimApp[transaction.Tx], context.Context) { diff --git a/simapp/v2/genesis_account.go b/simapp/v2/genesis_account.go index 61a8f6942f1..0ebb67d0393 100644 --- a/simapp/v2/genesis_account.go +++ b/simapp/v2/genesis_account.go @@ -3,9 +3,8 @@ package simapp import ( "errors" - authtypes "cosmossdk.io/x/auth/types" - sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ authtypes.GenesisAccount = (*SimGenesisAccount)(nil) diff --git a/simapp/v2/genesis_account_test.go b/simapp/v2/genesis_account_test.go index 9c21dc8a38e..5b8339b29c0 100644 --- a/simapp/v2/genesis_account_test.go +++ b/simapp/v2/genesis_account_test.go @@ -8,10 +8,10 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/simapp/v2" - authtypes "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestSimGenesisAccountValidate(t *testing.T) { diff --git a/simapp/v2/go.mod b/simapp/v2/go.mod index b30351cf75b..5bd15d69002 100644 --- a/simapp/v2/go.mod +++ b/simapp/v2/go.mod @@ -16,7 +16,6 @@ require ( cosmossdk.io/store/v2 v2.0.0-20240815194237-858ec2fcb897 // main cosmossdk.io/tools/confix v0.0.0-00010101000000-000000000000 cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/circuit v0.0.0-20230613133644-0a778132a60f @@ -260,7 +259,6 @@ replace ( cosmossdk.io/x/accounts => ../../x/accounts cosmossdk.io/x/accounts/defaults/lockup => ../../x/accounts/defaults/lockup cosmossdk.io/x/accounts/defaults/multisig => ../../x/accounts/defaults/multisig - cosmossdk.io/x/auth => ../../x/auth cosmossdk.io/x/authz => ../../x/authz cosmossdk.io/x/bank => ../../x/bank cosmossdk.io/x/circuit => ../../x/circuit diff --git a/simapp/v2/simdv2/cmd/commands.go b/simapp/v2/simdv2/cmd/commands.go index 41565ccc4a9..eaa3483d4ea 100644 --- a/simapp/v2/simdv2/cmd/commands.go +++ b/simapp/v2/simdv2/cmd/commands.go @@ -17,7 +17,6 @@ import ( "cosmossdk.io/server/v2/store" "cosmossdk.io/simapp/v2" confixcmd "cosmossdk.io/tools/confix/cmd" - authcmd "cosmossdk.io/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/debug" @@ -25,6 +24,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/server" sdk "github.com/cosmos/cosmos-sdk/types" + authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/genutil" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" diff --git a/simapp/v2/simdv2/cmd/root_di.go b/simapp/v2/simdv2/cmd/root_di.go index 539b50baf4f..a4646a705e5 100644 --- a/simapp/v2/simdv2/cmd/root_di.go +++ b/simapp/v2/simdv2/cmd/root_di.go @@ -14,9 +14,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/runtime/v2" "cosmossdk.io/simapp/v2" - "cosmossdk.io/x/auth/tx" - authtxconfig "cosmossdk.io/x/auth/tx/config" - "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" @@ -24,6 +21,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/std" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // NewRootCmd creates a new root command for simd. It is called once in the main function. diff --git a/simapp/v2/simdv2/cmd/testnet.go b/simapp/v2/simdv2/cmd/testnet.go index 9088febcb28..99dfb9459a1 100644 --- a/simapp/v2/simdv2/cmd/testnet.go +++ b/simapp/v2/simdv2/cmd/testnet.go @@ -23,7 +23,6 @@ import ( "cosmossdk.io/server/v2/api/grpc" "cosmossdk.io/server/v2/cometbft" "cosmossdk.io/server/v2/store" - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" stakingtypes "cosmossdk.io/x/staking/types" @@ -36,6 +35,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ) diff --git a/tests/e2e/auth/keeper/account_retriever_test.go b/tests/e2e/auth/keeper/account_retriever_test.go index 3a98cb9373d..7fcfcaa98c2 100644 --- a/tests/e2e/auth/keeper/account_retriever_test.go +++ b/tests/e2e/auth/keeper/account_retriever_test.go @@ -5,9 +5,8 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/x/auth/types" - "github.com/cosmos/cosmos-sdk/testutil/network" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestAccountRetriever(t *testing.T) { diff --git a/tests/e2e/auth/keeper/app_config.go b/tests/e2e/auth/keeper/app_config.go index 526d19acba9..7d761d63129 100644 --- a/tests/e2e/auth/keeper/app_config.go +++ b/tests/e2e/auth/keeper/app_config.go @@ -1,16 +1,16 @@ package keeper import ( - _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring`` - _ "cosmossdk.io/x/auth/vesting" // import as blank for app wiring - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/consensus" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // import as blank for app wiring + _ "cosmossdk.io/x/accounts" // import as blank for app wiring + _ "cosmossdk.io/x/bank" // import as blank for app wiring + _ "cosmossdk.io/x/consensus" // import as blank for app wiring + _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring`` + _ "github.com/cosmos/cosmos-sdk/x/auth/vesting" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/tests/e2e/auth/keeper/keeper_bench_test.go b/tests/e2e/auth/keeper/keeper_bench_test.go index a8c370ca3df..345c46ae9d5 100644 --- a/tests/e2e/auth/keeper/keeper_bench_test.go +++ b/tests/e2e/auth/keeper/keeper_bench_test.go @@ -7,10 +7,10 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" - "cosmossdk.io/x/auth/keeper" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) func BenchmarkAccountMapperGetAccountFound(b *testing.B) { diff --git a/tests/e2e/auth/keeper/module_test.go b/tests/e2e/auth/keeper/module_test.go index 7154aaac454..d9724bde626 100644 --- a/tests/e2e/auth/keeper/module_test.go +++ b/tests/e2e/auth/keeper/module_test.go @@ -7,10 +7,10 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" - "cosmossdk.io/x/auth/keeper" - "cosmossdk.io/x/auth/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + "github.com/cosmos/cosmos-sdk/x/auth/keeper" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { diff --git a/tests/e2e/auth/suite.go b/tests/e2e/auth/suite.go index ffc896810ee..544fef1683b 100644 --- a/tests/e2e/auth/suite.go +++ b/tests/e2e/auth/suite.go @@ -14,8 +14,6 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/depinject" "cosmossdk.io/math" - authcli "cosmossdk.io/x/auth/client/cli" - authclitestutil "cosmossdk.io/x/auth/client/testutil" banktypes "cosmossdk.io/x/bank/types" govtestutil "cosmossdk.io/x/gov/client/testutil" govtypes "cosmossdk.io/x/gov/types/v1beta1" @@ -35,6 +33,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + authcli "github.com/cosmos/cosmos-sdk/x/auth/client/cli" + authclitestutil "github.com/cosmos/cosmos-sdk/x/auth/client/testutil" "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" ) diff --git a/tests/e2e/authz/tx.go b/tests/e2e/authz/tx.go index fe3bc7131e3..811cdf51ded 100644 --- a/tests/e2e/authz/tx.go +++ b/tests/e2e/authz/tx.go @@ -10,7 +10,6 @@ import ( // without this import amino json encoding will fail when resolving any types _ "cosmossdk.io/api/cosmos/authz/v1beta1" "cosmossdk.io/math" - authcli "cosmossdk.io/x/auth/client/cli" "cosmossdk.io/x/authz" "cosmossdk.io/x/authz/client/cli" authzclitestutil "cosmossdk.io/x/authz/client/testutil" @@ -28,6 +27,7 @@ import ( clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" + authcli "github.com/cosmos/cosmos-sdk/x/auth/client/cli" ) type E2ETestSuite struct { diff --git a/tests/e2e/baseapp/block_gas_test.go b/tests/e2e/baseapp/block_gas_test.go index c8f9148b5bc..469e01a7499 100644 --- a/tests/e2e/baseapp/block_gas_test.go +++ b/tests/e2e/baseapp/block_gas_test.go @@ -18,7 +18,6 @@ import ( sdkmath "cosmossdk.io/math" store "cosmossdk.io/store/types" _ "cosmossdk.io/x/accounts" - xauthsigning "cosmossdk.io/x/auth/signing" baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" "github.com/cosmos/cosmos-sdk/client" @@ -36,6 +35,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) var blockMaxGas = uint64(simtestutil.DefaultConsensusParams.Block.MaxGas) diff --git a/tests/e2e/baseapp/utils.go b/tests/e2e/baseapp/utils.go index aa69a28e73e..3c49847c337 100644 --- a/tests/e2e/baseapp/utils.go +++ b/tests/e2e/baseapp/utils.go @@ -9,9 +9,6 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/math" - _ "cosmossdk.io/x/auth" - _ "cosmossdk.io/x/auth/tx/config" - authtypes "cosmossdk.io/x/auth/types" _ "cosmossdk.io/x/bank" banktypes "cosmossdk.io/x/bank/types" _ "cosmossdk.io/x/consensus" @@ -23,6 +20,9 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/mock" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/x/auth" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // GenesisStateWithSingleValidator initializes GenesisState with a single validator and genesis accounts diff --git a/tests/e2e/gov/tx.go b/tests/e2e/gov/tx.go index 9c7e5959db0..3806e54a882 100644 --- a/tests/e2e/gov/tx.go +++ b/tests/e2e/gov/tx.go @@ -8,7 +8,6 @@ import ( "github.com/stretchr/testify/suite" "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/gov/client/cli" govclitestutil "cosmossdk.io/x/gov/client/testutil" "cosmossdk.io/x/gov/types" @@ -20,6 +19,7 @@ import ( clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type E2ETestSuite struct { diff --git a/tests/e2e/tx/benchmarks_test.go b/tests/e2e/tx/benchmarks_test.go index 7cd0acae62b..e16850f6195 100644 --- a/tests/e2e/tx/benchmarks_test.go +++ b/tests/e2e/tx/benchmarks_test.go @@ -8,7 +8,6 @@ import ( sdkmath "cosmossdk.io/math" "cosmossdk.io/simapp" - authclient "cosmossdk.io/x/auth/client" banktypes "cosmossdk.io/x/bank/types" "github.com/cosmos/cosmos-sdk/client" @@ -19,6 +18,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" ) type E2EBenchmarkSuite struct { diff --git a/tests/e2e/tx/service_test.go b/tests/e2e/tx/service_test.go index b9c500cf53d..b9e875f1173 100644 --- a/tests/e2e/tx/service_test.go +++ b/tests/e2e/tx/service_test.go @@ -13,9 +13,6 @@ import ( "cosmossdk.io/math" "cosmossdk.io/simapp" - authclient "cosmossdk.io/x/auth/client" - authtest "cosmossdk.io/x/auth/client/testutil" - "cosmossdk.io/x/auth/migrations/legacytx" banktypes "cosmossdk.io/x/bank/types" "github.com/cosmos/cosmos-sdk/client" @@ -32,6 +29,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" + authtest "github.com/cosmos/cosmos-sdk/x/auth/client/testutil" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) var bankMsgSendEventAction = fmt.Sprintf("message.action='%s'", sdk.MsgTypeURL(&banktypes.MsgSend{})) diff --git a/tests/go.mod b/tests/go.mod index 50fcc855044..1cd9ac61b2d 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -7,7 +7,6 @@ require ( cosmossdk.io/collections v0.4.1-0.20240802064046-23fac2f1b8ab // main cosmossdk.io/core v1.0.0 // main cosmossdk.io/depinject v1.0.0 - cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/log v1.4.1 cosmossdk.io/math v1.3.0 cosmossdk.io/simapp v0.0.0-20230309163709-87da587416ba @@ -38,7 +37,6 @@ require ( cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 cosmossdk.io/x/accounts/defaults/multisig v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/auth v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 @@ -65,6 +63,7 @@ require ( cloud.google.com/go/iam v1.1.8 // indirect cloud.google.com/go/storage v1.42.0 // indirect cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 // indirect + cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/schema v0.2.0 // indirect cosmossdk.io/x/circuit v0.0.0-20230613133644-0a778132a60f // indirect cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 // indirect @@ -246,7 +245,6 @@ replace ( cosmossdk.io/x/accounts => ../x/accounts cosmossdk.io/x/accounts/defaults/lockup => ../x/accounts/defaults/lockup cosmossdk.io/x/accounts/defaults/multisig => ../x/accounts/defaults/multisig - cosmossdk.io/x/auth => ../x/auth cosmossdk.io/x/authz => ../x/authz cosmossdk.io/x/bank => ../x/bank cosmossdk.io/x/circuit => ../x/circuit diff --git a/tests/integration/auth/client/cli/suite_test.go b/tests/integration/auth/client/cli/suite_test.go index 2e59e947332..b16d469ec44 100644 --- a/tests/integration/auth/client/cli/suite_test.go +++ b/tests/integration/auth/client/cli/suite_test.go @@ -13,9 +13,6 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/math" - "cosmossdk.io/x/auth" - authcli "cosmossdk.io/x/auth/client/cli" - authtestutil "cosmossdk.io/x/auth/client/testutil" "cosmossdk.io/x/bank" banktypes "cosmossdk.io/x/bank/types" "cosmossdk.io/x/gov" @@ -36,6 +33,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/x/auth" + authcli "github.com/cosmos/cosmos-sdk/x/auth/client/cli" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/client/testutil" "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" ) diff --git a/tests/integration/auth/keeper/msg_server_test.go b/tests/integration/auth/keeper/msg_server_test.go index 5bb902c08b0..254ef6c5a03 100644 --- a/tests/integration/auth/keeper/msg_server_test.go +++ b/tests/integration/auth/keeper/msg_server_test.go @@ -15,10 +15,6 @@ import ( storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/accounts" baseaccount "cosmossdk.io/x/accounts/defaults/base" - "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - authsims "cosmossdk.io/x/auth/simulation" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/bank/testutil" @@ -36,6 +32,10 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type fixture struct { diff --git a/tests/integration/bank/app_test.go b/tests/integration/bank/app_test.go index b4478a3e1f3..6db4b4a0ff7 100644 --- a/tests/integration/bank/app_test.go +++ b/tests/integration/bank/app_test.go @@ -12,9 +12,6 @@ import ( "cosmossdk.io/log" sdkmath "cosmossdk.io/math" _ "cosmossdk.io/x/accounts" - _ "cosmossdk.io/x/auth" - _ "cosmossdk.io/x/auth/tx/config" - authtypes "cosmossdk.io/x/auth/types" bankkeeper "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/bank/testutil" "cosmossdk.io/x/bank/types" @@ -36,6 +33,9 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + _ "github.com/cosmos/cosmos-sdk/x/auth" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type ( diff --git a/tests/integration/bank/bench_test.go b/tests/integration/bank/bench_test.go index a52f7437351..12ea9daa67a 100644 --- a/tests/integration/bank/bench_test.go +++ b/tests/integration/bank/bench_test.go @@ -9,7 +9,6 @@ import ( abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/stretchr/testify/require" - authtypes "cosmossdk.io/x/auth/types" _ "cosmossdk.io/x/bank" "cosmossdk.io/x/bank/testutil" "cosmossdk.io/x/bank/types" @@ -21,6 +20,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var moduleAccAddr = authtypes.NewModuleAddress(stakingtypes.BondedPoolName) diff --git a/tests/integration/bank/keeper/deterministic_test.go b/tests/integration/bank/keeper/deterministic_test.go index 3ac15f3dfd8..de25231adbf 100644 --- a/tests/integration/bank/keeper/deterministic_test.go +++ b/tests/integration/bank/keeper/deterministic_test.go @@ -12,12 +12,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - authsims "cosmossdk.io/x/auth/simulation" - authtestutil "cosmossdk.io/x/auth/testutil" - _ "cosmossdk.io/x/auth/tx/config" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" @@ -34,6 +28,12 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/tests/integration/distribution/appconfig.go b/tests/integration/distribution/appconfig.go index a7f023f8106..62cf1fc57b4 100644 --- a/tests/integration/distribution/appconfig.go +++ b/tests/integration/distribution/appconfig.go @@ -1,18 +1,18 @@ package distribution_test import ( - _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/consensus" // import as blank for app wiring - _ "cosmossdk.io/x/distribution" // import as blank for app wiring - _ "cosmossdk.io/x/mint" // import as blank for app wiring - _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // import as blank for app wiring + _ "cosmossdk.io/x/accounts" // import as blank for app wiring + _ "cosmossdk.io/x/bank" // import as blank for app wiring + _ "cosmossdk.io/x/consensus" // import as blank for app wiring + _ "cosmossdk.io/x/distribution" // import as blank for app wiring + _ "cosmossdk.io/x/mint" // import as blank for app wiring + _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring + _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/tests/integration/distribution/keeper/msg_server_test.go b/tests/integration/distribution/keeper/msg_server_test.go index e0bd5b0548b..6b7e1243042 100644 --- a/tests/integration/distribution/keeper/msg_server_test.go +++ b/tests/integration/distribution/keeper/msg_server_test.go @@ -15,11 +15,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - authsims "cosmossdk.io/x/auth/simulation" - authtestutil "cosmossdk.io/x/auth/testutil" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktypes "cosmossdk.io/x/bank/types" @@ -43,6 +38,11 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/integration" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/tests/integration/distribution/module_test.go b/tests/integration/distribution/module_test.go index b1523a825e7..ce6e902c6b7 100644 --- a/tests/integration/distribution/module_test.go +++ b/tests/integration/distribution/module_test.go @@ -7,11 +7,11 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" - authkeeper "cosmossdk.io/x/auth/keeper" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/distribution/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { diff --git a/tests/integration/evidence/app_config.go b/tests/integration/evidence/app_config.go index def4a99d542..02640cf9a0b 100644 --- a/tests/integration/evidence/app_config.go +++ b/tests/integration/evidence/app_config.go @@ -1,17 +1,17 @@ package evidence_test import ( - _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/consensus" // import as blank for app wiring - _ "cosmossdk.io/x/evidence" // import as blank for app wiring - _ "cosmossdk.io/x/slashing" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // import as blank for app wiring + _ "cosmossdk.io/x/accounts" // import as blank for app wiring + _ "cosmossdk.io/x/bank" // import as blank for app wiring + _ "cosmossdk.io/x/consensus" // import as blank for app wiring + _ "cosmossdk.io/x/evidence" // import as blank for app wiring + _ "cosmossdk.io/x/slashing" // import as blank for app wiring + _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/tests/integration/evidence/keeper/infraction_test.go b/tests/integration/evidence/keeper/infraction_test.go index 62fa116ec07..b9a71a8c785 100644 --- a/tests/integration/evidence/keeper/infraction_test.go +++ b/tests/integration/evidence/keeper/infraction_test.go @@ -17,11 +17,6 @@ import ( "cosmossdk.io/core/header" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - authsims "cosmossdk.io/x/auth/simulation" - authtestutil "cosmossdk.io/x/auth/testutil" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktypes "cosmossdk.io/x/bank/types" @@ -52,6 +47,11 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/tests/integration/example/example_test.go b/tests/integration/example/example_test.go index d6a08721837..02b22a1a54f 100644 --- a/tests/integration/example/example_test.go +++ b/tests/integration/example/example_test.go @@ -12,11 +12,6 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - authsims "cosmossdk.io/x/auth/simulation" - authtestutil "cosmossdk.io/x/auth/testutil" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/mint" mintkeeper "cosmossdk.io/x/mint/keeper" minttypes "cosmossdk.io/x/mint/types" @@ -28,6 +23,11 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/integration" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // Example shows how to use the integration test framework to test the integration of SDK modules. diff --git a/tests/integration/gov/abci_test.go b/tests/integration/gov/abci_test.go index 733d7236f9b..ff1664ed4f0 100644 --- a/tests/integration/gov/abci_test.go +++ b/tests/integration/gov/abci_test.go @@ -8,7 +8,6 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" "cosmossdk.io/x/gov/keeper" "cosmossdk.io/x/gov/types" @@ -19,6 +18,7 @@ import ( addresscodec "github.com/cosmos/cosmos-sdk/codec/address" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestUnregisteredProposal_InactiveProposalFails(t *testing.T) { diff --git a/tests/integration/gov/common_test.go b/tests/integration/gov/common_test.go index 746ca2bc6c3..ced80fc6ad8 100644 --- a/tests/integration/gov/common_test.go +++ b/tests/integration/gov/common_test.go @@ -13,8 +13,6 @@ import ( sdklog "cosmossdk.io/log" "cosmossdk.io/math" _ "cosmossdk.io/x/accounts" - _ "cosmossdk.io/x/auth" - authtypes "cosmossdk.io/x/auth/types" _ "cosmossdk.io/x/bank" _ "cosmossdk.io/x/consensus" "cosmossdk.io/x/gov/types" @@ -29,6 +27,8 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/x/auth" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/tests/integration/gov/genesis_test.go b/tests/integration/gov/genesis_test.go index e54b3eb012a..9092b46bd49 100644 --- a/tests/integration/gov/genesis_test.go +++ b/tests/integration/gov/genesis_test.go @@ -14,9 +14,6 @@ import ( "cosmossdk.io/log" sdkmath "cosmossdk.io/math" _ "cosmossdk.io/x/accounts" - _ "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - authtypes "cosmossdk.io/x/auth/types" _ "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktypes "cosmossdk.io/x/bank/types" @@ -34,6 +31,9 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type suite struct { diff --git a/tests/integration/gov/keeper/common_test.go b/tests/integration/gov/keeper/common_test.go index 38d7b964f75..51b84406c14 100644 --- a/tests/integration/gov/keeper/common_test.go +++ b/tests/integration/gov/keeper/common_test.go @@ -6,7 +6,6 @@ import ( "gotest.tools/v3/assert" "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/gov/types" v1 "cosmossdk.io/x/gov/types/v1" "cosmossdk.io/x/gov/types/v1beta1" @@ -14,6 +13,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var TestProposal = getTestProposal() diff --git a/tests/integration/gov/keeper/keeper_test.go b/tests/integration/gov/keeper/keeper_test.go index 0fe367219ee..84df68e4cc5 100644 --- a/tests/integration/gov/keeper/keeper_test.go +++ b/tests/integration/gov/keeper/keeper_test.go @@ -10,11 +10,6 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - authsims "cosmossdk.io/x/auth/simulation" - authtestutil "cosmossdk.io/x/auth/testutil" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktypes "cosmossdk.io/x/bank/types" @@ -37,6 +32,11 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/integration" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type fixture struct { diff --git a/tests/integration/gov/module_test.go b/tests/integration/gov/module_test.go index c1d41a0b6cb..826f6a7d68d 100644 --- a/tests/integration/gov/module_test.go +++ b/tests/integration/gov/module_test.go @@ -8,14 +8,14 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" _ "cosmossdk.io/x/accounts" - authkeeper "cosmossdk.io/x/auth/keeper" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/gov/types" _ "cosmossdk.io/x/mint" _ "cosmossdk.io/x/protocolpool" "github.com/cosmos/cosmos-sdk/testutil/configurator" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { diff --git a/tests/integration/mint/app_config.go b/tests/integration/mint/app_config.go index 5c717ff9d37..438b652f4ca 100644 --- a/tests/integration/mint/app_config.go +++ b/tests/integration/mint/app_config.go @@ -1,16 +1,16 @@ package mint import ( - _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/consensus" // import as blank for app wiring - _ "cosmossdk.io/x/mint" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // import as blank for app wiring + _ "cosmossdk.io/x/accounts" // import as blank for app wiring + _ "cosmossdk.io/x/bank" // import as blank for app wiring + _ "cosmossdk.io/x/consensus" // import as blank for app wiring + _ "cosmossdk.io/x/mint" // import as blank for app wiring + _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/tests/integration/mint/module_test.go b/tests/integration/mint/module_test.go index 59a5c091a9f..e0d9896ac14 100644 --- a/tests/integration/mint/module_test.go +++ b/tests/integration/mint/module_test.go @@ -7,11 +7,11 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" - authkeeper "cosmossdk.io/x/auth/keeper" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/mint/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { diff --git a/tests/integration/protocolpool/app_config.go b/tests/integration/protocolpool/app_config.go index 15c814073e1..686a6b93dcd 100644 --- a/tests/integration/protocolpool/app_config.go +++ b/tests/integration/protocolpool/app_config.go @@ -1,18 +1,18 @@ package protocolpool import ( - _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/consensus" // import as blank for app wiring - _ "cosmossdk.io/x/distribution" // import as blank for app wiring - _ "cosmossdk.io/x/mint" // import as blank for app wiring - _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // import as blank for app wiring + _ "cosmossdk.io/x/accounts" // import as blank for app wiring + _ "cosmossdk.io/x/bank" // import as blank for app wiring + _ "cosmossdk.io/x/consensus" // import as blank for app wiring + _ "cosmossdk.io/x/distribution" // import as blank for app wiring + _ "cosmossdk.io/x/mint" // import as blank for app wiring + _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring + _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/tests/integration/protocolpool/module_test.go b/tests/integration/protocolpool/module_test.go index b8148be3710..8a7afd42791 100644 --- a/tests/integration/protocolpool/module_test.go +++ b/tests/integration/protocolpool/module_test.go @@ -11,8 +11,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" "cosmossdk.io/math" - authkeeper "cosmossdk.io/x/auth/keeper" - authtypes "cosmossdk.io/x/auth/types" bankkeeper "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/mint/types" protocolpoolkeeper "cosmossdk.io/x/protocolpool/keeper" @@ -21,6 +19,8 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // TestWithdrawAnytime tests if withdrawing funds many times vs withdrawing funds once diff --git a/tests/integration/rapidgen/rapidgen.go b/tests/integration/rapidgen/rapidgen.go index 86d3d988094..e33e794b00f 100644 --- a/tests/integration/rapidgen/rapidgen.go +++ b/tests/integration/rapidgen/rapidgen.go @@ -29,8 +29,6 @@ import ( stakingapi "cosmossdk.io/api/cosmos/staking/v1beta1" upgradeapi "cosmossdk.io/api/cosmos/upgrade/v1beta1" vestingapi "cosmossdk.io/api/cosmos/vesting/v1beta1" - authtypes "cosmossdk.io/x/auth/types" - vestingtypes "cosmossdk.io/x/auth/vesting/types" authztypes "cosmossdk.io/x/authz" banktypes "cosmossdk.io/x/bank/types" consensustypes "cosmossdk.io/x/consensus/types" @@ -46,6 +44,8 @@ import ( upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) type GeneratedType struct { diff --git a/tests/integration/runtime/query_test.go b/tests/integration/runtime/query_test.go index f06c27b3f01..22b261206c3 100644 --- a/tests/integration/runtime/query_test.go +++ b/tests/integration/runtime/query_test.go @@ -15,8 +15,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" _ "cosmossdk.io/x/accounts" - _ "cosmossdk.io/x/auth" - _ "cosmossdk.io/x/auth/tx/config" _ "cosmossdk.io/x/bank" _ "cosmossdk.io/x/consensus" _ "cosmossdk.io/x/staking" @@ -26,6 +24,8 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/x/auth" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" ) type fixture struct { diff --git a/tests/integration/server/grpc/out_of_gas_test.go b/tests/integration/server/grpc/out_of_gas_test.go index 4a91d3e0520..3e26d54c4f1 100644 --- a/tests/integration/server/grpc/out_of_gas_test.go +++ b/tests/integration/server/grpc/out_of_gas_test.go @@ -10,8 +10,6 @@ import ( "google.golang.org/grpc/metadata" _ "cosmossdk.io/x/accounts" - _ "cosmossdk.io/x/auth" - _ "cosmossdk.io/x/auth/tx/config" _ "cosmossdk.io/x/bank" banktypes "cosmossdk.io/x/bank/types" _ "cosmossdk.io/x/consensus" @@ -23,6 +21,8 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + _ "github.com/cosmos/cosmos-sdk/x/auth" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" ) type IntegrationTestOutOfGasSuite struct { diff --git a/tests/integration/server/grpc/server_test.go b/tests/integration/server/grpc/server_test.go index f22793c5692..c0cc8748a6b 100644 --- a/tests/integration/server/grpc/server_test.go +++ b/tests/integration/server/grpc/server_test.go @@ -13,9 +13,6 @@ import ( "google.golang.org/grpc/metadata" _ "cosmossdk.io/x/accounts" - _ "cosmossdk.io/x/auth" - authclient "cosmossdk.io/x/auth/client" - _ "cosmossdk.io/x/auth/tx/config" _ "cosmossdk.io/x/bank" banktypes "cosmossdk.io/x/bank/types" _ "cosmossdk.io/x/consensus" @@ -34,6 +31,9 @@ import ( grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + _ "github.com/cosmos/cosmos-sdk/x/auth" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" ) type IntegrationTestSuite struct { diff --git a/tests/integration/slashing/abci_test.go b/tests/integration/slashing/abci_test.go index 2d45d09b181..96e869743e5 100644 --- a/tests/integration/slashing/abci_test.go +++ b/tests/integration/slashing/abci_test.go @@ -10,7 +10,6 @@ import ( coreheader "cosmossdk.io/core/header" "cosmossdk.io/depinject" "cosmossdk.io/log" - authkeeper "cosmossdk.io/x/auth/keeper" bankkeeper "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/slashing" slashingkeeper "cosmossdk.io/x/slashing/keeper" @@ -22,6 +21,7 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) // TestBeginBlocker is a unit test function that tests the behavior of the BeginBlocker function. diff --git a/tests/integration/slashing/app_config.go b/tests/integration/slashing/app_config.go index 038672031f2..f649e196fb7 100644 --- a/tests/integration/slashing/app_config.go +++ b/tests/integration/slashing/app_config.go @@ -1,19 +1,19 @@ package slashing import ( - _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/consensus" // import as blank for app wiring - _ "cosmossdk.io/x/distribution" // import as blank for app wiring - _ "cosmossdk.io/x/mint" // import as blank for app wiring - _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring - _ "cosmossdk.io/x/slashing" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // import as blank for app wiring + _ "cosmossdk.io/x/accounts" // import as blank for app wiring + _ "cosmossdk.io/x/bank" // import as blank for app wiring + _ "cosmossdk.io/x/consensus" // import as blank for app wiring + _ "cosmossdk.io/x/distribution" // import as blank for app wiring + _ "cosmossdk.io/x/mint" // import as blank for app wiring + _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring + _ "cosmossdk.io/x/slashing" // import as blank for app wiring + _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/tests/integration/slashing/keeper/keeper_test.go b/tests/integration/slashing/keeper/keeper_test.go index 2e925d49c4e..8ca08ddffec 100644 --- a/tests/integration/slashing/keeper/keeper_test.go +++ b/tests/integration/slashing/keeper/keeper_test.go @@ -14,10 +14,6 @@ import ( coreheader "cosmossdk.io/core/header" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - authtestutil "cosmossdk.io/x/auth/testutil" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktypes "cosmossdk.io/x/bank/types" @@ -41,6 +37,10 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type fixture struct { diff --git a/tests/integration/slashing/keeper/slash_redelegation_test.go b/tests/integration/slashing/keeper/slash_redelegation_test.go index 96f6a50db08..b1a8ce85892 100644 --- a/tests/integration/slashing/keeper/slash_redelegation_test.go +++ b/tests/integration/slashing/keeper/slash_redelegation_test.go @@ -11,7 +11,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" "cosmossdk.io/math" - authkeeper "cosmossdk.io/x/auth/keeper" bankkeeper "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" distributionkeeper "cosmossdk.io/x/distribution/keeper" @@ -23,6 +22,7 @@ import ( "github.com/cosmos/cosmos-sdk/tests/integration/slashing" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) func TestSlashRedelegation(t *testing.T) { diff --git a/tests/integration/slashing/slashing_test.go b/tests/integration/slashing/slashing_test.go index 36d9ec53e49..035d013b369 100644 --- a/tests/integration/slashing/slashing_test.go +++ b/tests/integration/slashing/slashing_test.go @@ -10,7 +10,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" bankkeeper "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/slashing/keeper" "cosmossdk.io/x/slashing/types" @@ -24,6 +23,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/tests/integration/staking/app_config.go b/tests/integration/staking/app_config.go index 7f936c4b69b..9bfb400e6c0 100644 --- a/tests/integration/staking/app_config.go +++ b/tests/integration/staking/app_config.go @@ -1,19 +1,19 @@ package staking import ( - _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/consensus" // import as blank for app wiring - _ "cosmossdk.io/x/distribution" // import as blank for app wiring - _ "cosmossdk.io/x/mint" // import as blank for app wiring - _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring - _ "cosmossdk.io/x/slashing" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // import as blank for app wiring + _ "cosmossdk.io/x/accounts" // import as blank for app wiring + _ "cosmossdk.io/x/bank" // import as blank for app wiring + _ "cosmossdk.io/x/consensus" // import as blank for app wiring + _ "cosmossdk.io/x/distribution" // import as blank for app wiring + _ "cosmossdk.io/x/mint" // import as blank for app wiring + _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring + _ "cosmossdk.io/x/slashing" // import as blank for app wiring + _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/tests/integration/staking/keeper/common_test.go b/tests/integration/staking/keeper/common_test.go index d3fc1a18cd0..3558683b213 100644 --- a/tests/integration/staking/keeper/common_test.go +++ b/tests/integration/staking/keeper/common_test.go @@ -12,11 +12,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - authsims "cosmossdk.io/x/auth/simulation" - authtestutil "cosmossdk.io/x/auth/testutil" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktypes "cosmossdk.io/x/bank/types" @@ -37,6 +32,11 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var PKs = simtestutil.CreateTestPubKeys(500) diff --git a/tests/integration/staking/keeper/deterministic_test.go b/tests/integration/staking/keeper/deterministic_test.go index 6703025fe90..5d6f7c7d20d 100644 --- a/tests/integration/staking/keeper/deterministic_test.go +++ b/tests/integration/staking/keeper/deterministic_test.go @@ -13,11 +13,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - authsims "cosmossdk.io/x/auth/simulation" - authtestutil "cosmossdk.io/x/auth/testutil" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" @@ -39,6 +34,11 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/tests/integration/staking/keeper/slash_test.go b/tests/integration/staking/keeper/slash_test.go index 447cd8003b1..f9620b9e05c 100644 --- a/tests/integration/staking/keeper/slash_test.go +++ b/tests/integration/staking/keeper/slash_test.go @@ -14,7 +14,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/math" _ "cosmossdk.io/x/accounts" - authkeeper "cosmossdk.io/x/auth/keeper" bankkeeper "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" _ "cosmossdk.io/x/consensus" @@ -32,6 +31,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) // bootstrapSlashTest creates 3 validators and bootstrap the app. diff --git a/tests/integration/staking/module_test.go b/tests/integration/staking/module_test.go index cd864646062..4eaaefd0be3 100644 --- a/tests/integration/staking/module_test.go +++ b/tests/integration/staking/module_test.go @@ -7,11 +7,11 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" - authKeeper "cosmossdk.io/x/auth/keeper" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/staking/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + authKeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { diff --git a/tests/integration/staking/simulation/operations_test.go b/tests/integration/staking/simulation/operations_test.go index 023b050034e..a5a6fbc41e1 100644 --- a/tests/integration/staking/simulation/operations_test.go +++ b/tests/integration/staking/simulation/operations_test.go @@ -17,8 +17,6 @@ import ( "cosmossdk.io/depinject" sdklog "cosmossdk.io/log" "cosmossdk.io/math" - authkeeper "cosmossdk.io/x/auth/keeper" - authtypes "cosmossdk.io/x/auth/types" bankkeeper "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" distrkeeper "cosmossdk.io/x/distribution/keeper" @@ -40,6 +38,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type SimTestSuite struct { diff --git a/tests/integration/tx/aminojson/aminojson_test.go b/tests/integration/tx/aminojson/aminojson_test.go index 3fbbc33a8eb..ec218ca47da 100644 --- a/tests/integration/tx/aminojson/aminojson_test.go +++ b/tests/integration/tx/aminojson/aminojson_test.go @@ -33,13 +33,6 @@ import ( txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" vestingapi "cosmossdk.io/api/cosmos/vesting/v1beta1" "cosmossdk.io/math" - "cosmossdk.io/x/auth" - "cosmossdk.io/x/auth/migrations/legacytx" - "cosmossdk.io/x/auth/signing" - "cosmossdk.io/x/auth/tx" - authtypes "cosmossdk.io/x/auth/types" - "cosmossdk.io/x/auth/vesting" - vestingtypes "cosmossdk.io/x/auth/vesting/types" authztypes "cosmossdk.io/x/authz" authzmodule "cosmossdk.io/x/authz/module" "cosmossdk.io/x/bank" @@ -75,6 +68,13 @@ import ( "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/cosmos/cosmos-sdk/types/module/testutil" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/auth/vesting" + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) // TestAminoJSON_Equivalence tests that x/tx/Encoder encoding is equivalent to the legacy Encoder encoding. diff --git a/tests/integration/tx/decode_test.go b/tests/integration/tx/decode_test.go index e7c6b14e66c..3b58b5c829d 100644 --- a/tests/integration/tx/decode_test.go +++ b/tests/integration/tx/decode_test.go @@ -12,9 +12,6 @@ import ( msgv1 "cosmossdk.io/api/cosmos/msg/v1" "cosmossdk.io/math" - "cosmossdk.io/x/auth" - "cosmossdk.io/x/auth/migrations/legacytx" - "cosmossdk.io/x/auth/vesting" authzmodule "cosmossdk.io/x/authz/module" "cosmossdk.io/x/bank" "cosmossdk.io/x/consensus" @@ -39,6 +36,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/module/testutil" txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/vesting" ) // TestDecode tests that the tx decoder can decode all the txs in the test suite. diff --git a/tests/integration/types/pagination_test.go b/tests/integration/types/pagination_test.go index 7e7c53b3dfa..2ab998fd117 100644 --- a/tests/integration/types/pagination_test.go +++ b/tests/integration/types/pagination_test.go @@ -13,8 +13,6 @@ import ( "cosmossdk.io/math" "cosmossdk.io/store/prefix" _ "cosmossdk.io/x/accounts" - _ "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" _ "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/bank/testutil" @@ -31,6 +29,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) const ( diff --git a/tests/sims/authz/operations_test.go b/tests/sims/authz/operations_test.go index 7e59d00a827..3769d30c798 100644 --- a/tests/sims/authz/operations_test.go +++ b/tests/sims/authz/operations_test.go @@ -12,9 +12,6 @@ import ( coretesting "cosmossdk.io/core/testing" "cosmossdk.io/depinject" _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - authkeeper "cosmossdk.io/x/auth/keeper" - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring "cosmossdk.io/x/authz" authzkeeper "cosmossdk.io/x/authz/keeper" _ "cosmossdk.io/x/authz/module" // import as blank for app wiring @@ -36,7 +33,10 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/tests/sims/bank/operations_test.go b/tests/sims/bank/operations_test.go index 0243cf19dd4..e2177fb14a2 100644 --- a/tests/sims/bank/operations_test.go +++ b/tests/sims/bank/operations_test.go @@ -10,8 +10,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" _ "cosmossdk.io/x/accounts" - _ "cosmossdk.io/x/auth" - _ "cosmossdk.io/x/auth/tx/config" _ "cosmossdk.io/x/bank" "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/bank/simulation" @@ -27,6 +25,8 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + _ "github.com/cosmos/cosmos-sdk/x/auth" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" ) type SimTestSuite struct { diff --git a/tests/sims/distribution/app_config.go b/tests/sims/distribution/app_config.go index 8c97052076b..989d74b74f5 100644 --- a/tests/sims/distribution/app_config.go +++ b/tests/sims/distribution/app_config.go @@ -1,18 +1,18 @@ package distribution import ( - _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/consensus" // import as blank for app wiring - _ "cosmossdk.io/x/distribution" // import as blank for app wiring - _ "cosmossdk.io/x/mint" // import as blank for app wiring - _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // import as blank for app wiring + _ "cosmossdk.io/x/accounts" // import as blank for app wiring + _ "cosmossdk.io/x/bank" // import as blank for app wiring + _ "cosmossdk.io/x/consensus" // import as blank for app wiring + _ "cosmossdk.io/x/distribution" // import as blank for app wiring + _ "cosmossdk.io/x/mint" // import as blank for app wiring + _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring + _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/tests/sims/distribution/operations_test.go b/tests/sims/distribution/operations_test.go index a5451da0866..972217c6cf3 100644 --- a/tests/sims/distribution/operations_test.go +++ b/tests/sims/distribution/operations_test.go @@ -11,7 +11,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" "cosmossdk.io/math" - authkeeper "cosmossdk.io/x/auth/keeper" bankkeeper "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" "cosmossdk.io/x/distribution/keeper" @@ -27,6 +26,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) // TestWeightedOperations tests the weights of the operations. diff --git a/tests/sims/feegrant/operations_test.go b/tests/sims/feegrant/operations_test.go index 5477287d1c9..11b4f39615c 100644 --- a/tests/sims/feegrant/operations_test.go +++ b/tests/sims/feegrant/operations_test.go @@ -12,9 +12,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - _ "cosmossdk.io/x/auth/tx/config" _ "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" @@ -34,6 +31,9 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + _ "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" _ "github.com/cosmos/cosmos-sdk/x/genutil" ) diff --git a/tests/sims/gov/operations_test.go b/tests/sims/gov/operations_test.go index 93159e6f520..95f99f33ab1 100644 --- a/tests/sims/gov/operations_test.go +++ b/tests/sims/gov/operations_test.go @@ -15,9 +15,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" _ "cosmossdk.io/x/accounts" - _ "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - _ "cosmossdk.io/x/auth/tx/config" _ "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/bank/testutil" @@ -38,6 +35,9 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + _ "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" ) var ( diff --git a/tests/sims/nft/app_config.go b/tests/sims/nft/app_config.go index 83f60f874c0..7b3a4bb869b 100644 --- a/tests/sims/nft/app_config.go +++ b/tests/sims/nft/app_config.go @@ -1,17 +1,17 @@ package nft import ( - _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/consensus" // import as blank for app wiring - _ "cosmossdk.io/x/mint" // import as blank for app wiring - _ "cosmossdk.io/x/nft/module" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // import as blank for app wiring + _ "cosmossdk.io/x/accounts" // import as blank for app wiring + _ "cosmossdk.io/x/bank" // import as blank for app wiring + _ "cosmossdk.io/x/consensus" // import as blank for app wiring + _ "cosmossdk.io/x/mint" // import as blank for app wiring + _ "cosmossdk.io/x/nft/module" // import as blank for app wiring + _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/tests/sims/nft/operations_test.go b/tests/sims/nft/operations_test.go index ee2e9260364..1fc693200c8 100644 --- a/tests/sims/nft/operations_test.go +++ b/tests/sims/nft/operations_test.go @@ -11,7 +11,6 @@ import ( "cosmossdk.io/core/header" "cosmossdk.io/depinject" "cosmossdk.io/log" - authkeeper "cosmossdk.io/x/auth/keeper" bankkeeper "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" "cosmossdk.io/x/nft" @@ -26,6 +25,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) type SimTestSuite struct { diff --git a/tests/sims/protocolpool/app_config.go b/tests/sims/protocolpool/app_config.go index e388d4102e2..d8b1ace7526 100644 --- a/tests/sims/protocolpool/app_config.go +++ b/tests/sims/protocolpool/app_config.go @@ -1,18 +1,18 @@ package protocolpool import ( - _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/consensus" // import as blank for app wiring - _ "cosmossdk.io/x/distribution" // import as blank for app wiring - _ "cosmossdk.io/x/mint" // import as blank for app wiring - _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // import as blank for app wiring + _ "cosmossdk.io/x/accounts" // import as blank for app wiring + _ "cosmossdk.io/x/bank" // import as blank for app wiring + _ "cosmossdk.io/x/consensus" // import as blank for app wiring + _ "cosmossdk.io/x/distribution" // import as blank for app wiring + _ "cosmossdk.io/x/mint" // import as blank for app wiring + _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring + _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/tests/sims/protocolpool/operations_test.go b/tests/sims/protocolpool/operations_test.go index bdfaf0970c9..dffebefd97b 100644 --- a/tests/sims/protocolpool/operations_test.go +++ b/tests/sims/protocolpool/operations_test.go @@ -9,7 +9,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" - authkeeper "cosmossdk.io/x/auth/keeper" bankkeeper "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" "cosmossdk.io/x/protocolpool/keeper" @@ -23,6 +22,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) type suite struct { diff --git a/tests/sims/slashing/app_config.go b/tests/sims/slashing/app_config.go index 038672031f2..f649e196fb7 100644 --- a/tests/sims/slashing/app_config.go +++ b/tests/sims/slashing/app_config.go @@ -1,19 +1,19 @@ package slashing import ( - _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/consensus" // import as blank for app wiring - _ "cosmossdk.io/x/distribution" // import as blank for app wiring - _ "cosmossdk.io/x/mint" // import as blank for app wiring - _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring - _ "cosmossdk.io/x/slashing" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // import as blank for app wiring + _ "cosmossdk.io/x/accounts" // import as blank for app wiring + _ "cosmossdk.io/x/bank" // import as blank for app wiring + _ "cosmossdk.io/x/consensus" // import as blank for app wiring + _ "cosmossdk.io/x/distribution" // import as blank for app wiring + _ "cosmossdk.io/x/mint" // import as blank for app wiring + _ "cosmossdk.io/x/protocolpool" // import as blank for app wiring + _ "cosmossdk.io/x/slashing" // import as blank for app wiring + _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/tests/sims/slashing/operations_test.go b/tests/sims/slashing/operations_test.go index b0df7052dab..f4b6c31773b 100644 --- a/tests/sims/slashing/operations_test.go +++ b/tests/sims/slashing/operations_test.go @@ -16,7 +16,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" "cosmossdk.io/math" - authkeeper "cosmossdk.io/x/auth/keeper" bankkeeper "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" distributionkeeper "cosmossdk.io/x/distribution/keeper" @@ -37,6 +36,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) type SimTestSuite struct { diff --git a/testutil/cli/tx.go b/testutil/cli/tx.go index 1adf81bd0e0..73f0f886767 100644 --- a/testutil/cli/tx.go +++ b/testutil/cli/tx.go @@ -3,12 +3,11 @@ package cli import ( "fmt" - authcli "cosmossdk.io/x/auth/client/cli" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" + authcli "github.com/cosmos/cosmos-sdk/x/auth/client/cli" ) // CheckTxCode verifies that the transaction result returns a specific code diff --git a/testutil/integration/router.go b/testutil/integration/router.go index 952d371df19..02562a85517 100644 --- a/testutil/integration/router.go +++ b/testutil/integration/router.go @@ -15,8 +15,6 @@ import ( "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" - authtx "cosmossdk.io/x/auth/tx" - authtypes "cosmossdk.io/x/auth/types" consensusparamkeeper "cosmossdk.io/x/consensus/keeper" consensusparamtypes "cosmossdk.io/x/consensus/types" @@ -27,6 +25,8 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) const appName = "integration-app" diff --git a/testutil/network/network.go b/testutil/network/network.go index cd48119d59c..270c33811dd 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -29,7 +29,6 @@ import ( sdkmath "cosmossdk.io/math" "cosmossdk.io/math/unsafe" pruningtypes "cosmossdk.io/store/pruning/types" - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" stakingtypes "cosmossdk.io/x/staking/types" @@ -53,6 +52,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/genutil" ) diff --git a/testutil/network/util.go b/testutil/network/util.go index 4d9ebdacb94..415b687400f 100644 --- a/testutil/network/util.go +++ b/testutil/network/util.go @@ -18,7 +18,6 @@ import ( "golang.org/x/sync/errgroup" "cosmossdk.io/log" - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" "github.com/cosmos/cosmos-sdk/client" @@ -27,6 +26,7 @@ import ( servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" servercmtlog "github.com/cosmos/cosmos-sdk/server/log" "github.com/cosmos/cosmos-sdk/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltest "github.com/cosmos/cosmos-sdk/x/genutil/client/testutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" diff --git a/testutil/sims/app_helpers.go b/testutil/sims/app_helpers.go index 720713ca56a..cf6778c730f 100644 --- a/testutil/sims/app_helpers.go +++ b/testutil/sims/app_helpers.go @@ -14,7 +14,6 @@ import ( coreheader "cosmossdk.io/core/header" "cosmossdk.io/depinject" sdkmath "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" stakingtypes "cosmossdk.io/x/staking/types" @@ -27,6 +26,7 @@ import ( servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/testutil/mock" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) const DefaultGenTxGas = 10000000 diff --git a/testutil/sims/state_helpers.go b/testutil/sims/state_helpers.go index 8a3ce8a488a..465567c46a4 100644 --- a/testutil/sims/state_helpers.go +++ b/testutil/sims/state_helpers.go @@ -14,7 +14,6 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" stakingtypes "cosmossdk.io/x/staking/types" @@ -25,6 +24,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" ) diff --git a/testutil/sims/tx_helpers.go b/testutil/sims/tx_helpers.go index c681594b3f0..9f71f8aadb2 100644 --- a/testutil/sims/tx_helpers.go +++ b/testutil/sims/tx_helpers.go @@ -11,7 +11,6 @@ import ( "cosmossdk.io/core/header" "cosmossdk.io/errors" - authsign "cosmossdk.io/x/auth/signing" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" @@ -19,6 +18,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" ) // GenSignedMockTx generates a signed mock transaction. diff --git a/testutil/x/counter/testutil/expected_keepers_mocks.go b/testutil/x/counter/testutil/expected_keepers_mocks.go index 83c92ceeebc..528d1b2fddb 100644 --- a/testutil/x/counter/testutil/expected_keepers_mocks.go +++ b/testutil/x/counter/testutil/expected_keepers_mocks.go @@ -7,7 +7,7 @@ package testutil import ( reflect "reflect" - types0 "cosmossdk.io/x/auth/types" + types0 "github.com/cosmos/cosmos-sdk/x/auth/types" types "github.com/cosmos/cosmos-sdk/types" gomock "github.com/golang/mock/gomock" diff --git a/types/mempool/mempool_test.go b/types/mempool/mempool_test.go index c7db37c75a1..47a5bba2444 100644 --- a/types/mempool/mempool_test.go +++ b/types/mempool/mempool_test.go @@ -13,7 +13,6 @@ import ( _ "cosmossdk.io/api/cosmos/crypto/secp256k1" "cosmossdk.io/core/transaction" "cosmossdk.io/log" - "cosmossdk.io/x/auth/signing" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -23,6 +22,7 @@ import ( moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" 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" ) // testPubKey is a dummy implementation of PubKey used for testing. diff --git a/types/mempool/priority_nonce_test.go b/types/mempool/priority_nonce_test.go index a777ab1738f..4b1c27c1808 100644 --- a/types/mempool/priority_nonce_test.go +++ b/types/mempool/priority_nonce_test.go @@ -10,11 +10,11 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/log" - "cosmossdk.io/x/auth/signing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) func TestOutOfOrder(t *testing.T) { diff --git a/types/mempool/sender_nonce.go b/types/mempool/sender_nonce.go index 9e2b25e4e47..57cdb4dd4f9 100644 --- a/types/mempool/sender_nonce.go +++ b/types/mempool/sender_nonce.go @@ -10,9 +10,8 @@ import ( "github.com/huandu/skiplist" - "cosmossdk.io/x/auth/signing" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) var ( diff --git a/types/mempool/sender_nonce_property_test.go b/types/mempool/sender_nonce_property_test.go index 5ebda7d6f93..faf0eae86b6 100644 --- a/types/mempool/sender_nonce_property_test.go +++ b/types/mempool/sender_nonce_property_test.go @@ -7,11 +7,11 @@ import ( "pgregory.net/rapid" "cosmossdk.io/log" - "cosmossdk.io/x/auth/signing" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) var ( diff --git a/types/mempool/signer_extraction_adapter.go b/types/mempool/signer_extraction_adapter.go index f79d6c0693d..10718cb9ddd 100644 --- a/types/mempool/signer_extraction_adapter.go +++ b/types/mempool/signer_extraction_adapter.go @@ -3,9 +3,8 @@ package mempool import ( "fmt" - "cosmossdk.io/x/auth/signing" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) // SignerData contains canonical useful information about the signer of a transaction diff --git a/types/module/module_test.go b/types/module/module_test.go index 990dc0d2a71..fb2b5f74654 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -15,13 +15,13 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/log" - authtypes "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/mock" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var errFoo = errors.New("dummy") diff --git a/types/module/testutil/codec.go b/types/module/testutil/codec.go index c6753e6b271..2250b120855 100644 --- a/types/module/testutil/codec.go +++ b/types/module/testutil/codec.go @@ -1,14 +1,13 @@ package testutil import ( - "cosmossdk.io/x/auth/tx" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/std" "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/x/auth/tx" ) // TestEncodingConfig defines an encoding configuration that is used for testing diff --git a/x/accounts/defaults/lockup/go.mod b/x/accounts/defaults/lockup/go.mod index d2e8d4faf2b..2fb3a106e4c 100644 --- a/x/accounts/defaults/lockup/go.mod +++ b/x/accounts/defaults/lockup/go.mod @@ -22,8 +22,12 @@ require ( cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.4.1 cosmossdk.io/math v1.3.0 +<<<<<<< HEAD cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect +======= + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc // indirect +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.4-0.20240815194237-858ec2fcb897 // indirect; main filippo.io/edwards25519 v1.1.0 // indirect @@ -157,7 +161,6 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/accounts => ../../. - cosmossdk.io/x/auth => ../../../auth cosmossdk.io/x/bank => ../../../bank cosmossdk.io/x/consensus => ../../../consensus cosmossdk.io/x/distribution => ../../../distribution diff --git a/x/accounts/defaults/multisig/go.mod b/x/accounts/defaults/multisig/go.mod index a81d901a38c..6ab647922a6 100644 --- a/x/accounts/defaults/multisig/go.mod +++ b/x/accounts/defaults/multisig/go.mod @@ -24,8 +24,12 @@ require ( cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/log v1.4.1 // indirect cosmossdk.io/schema v0.2.0 // indirect +<<<<<<< HEAD cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect +======= + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc // indirect +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.4-0.20240815194237-858ec2fcb897 // indirect; main @@ -180,7 +184,6 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/accounts => ../../. - cosmossdk.io/x/auth => ../../../auth cosmossdk.io/x/bank => ../../../bank cosmossdk.io/x/consensus => ../../../consensus cosmossdk.io/x/gov => ../../../gov diff --git a/x/accounts/go.mod b/x/accounts/go.mod index a9683ab079c..1850718faf0 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -29,7 +29,6 @@ require ( cosmossdk.io/schema v0.2.0 // indirect cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897 // indirect cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/distribution v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect @@ -185,7 +184,6 @@ replace ( cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/accounts/defaults/lockup => ./defaults/lockup cosmossdk.io/x/accounts/defaults/multisig => ./defaults/multisig - cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/distribution => ../distribution diff --git a/x/auth/ante/ante.go b/x/auth/ante/ante.go index b052f943b62..779418e9665 100644 --- a/x/auth/ante/ante.go +++ b/x/auth/ante/ante.go @@ -4,13 +4,13 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/core/gas" errorsmod "cosmossdk.io/errors" - "cosmossdk.io/x/auth/ante/unorderedtx" - "cosmossdk.io/x/auth/types" txsigning "cosmossdk.io/x/tx/signing" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // HandlerOptions are the options required for constructing a default SDK AnteHandler. diff --git a/x/auth/ante/ante_test.go b/x/auth/ante/ante_test.go index 88592fe3417..638f6623b17 100644 --- a/x/auth/ante/ante_test.go +++ b/x/auth/ante/ante_test.go @@ -14,8 +14,6 @@ import ( "cosmossdk.io/core/header" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" - "cosmossdk.io/x/auth/ante" - authtypes "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" @@ -25,6 +23,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // Test that simulate transaction accurately estimates gas cost diff --git a/x/auth/ante/basic.go b/x/auth/ante/basic.go index 642230a6de3..6e568ab5c04 100644 --- a/x/auth/ante/basic.go +++ b/x/auth/ante/basic.go @@ -8,8 +8,6 @@ import ( "cosmossdk.io/core/transaction" errorsmod "cosmossdk.io/errors" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth/migrations/legacytx" - authsigning "cosmossdk.io/x/auth/signing" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" @@ -17,6 +15,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) // ValidateBasicDecorator will call tx.ValidateBasic and return any non-nil error. diff --git a/x/auth/ante/basic_test.go b/x/auth/ante/basic_test.go index 599fc653913..18af011dd52 100644 --- a/x/auth/ante/basic_test.go +++ b/x/auth/ante/basic_test.go @@ -11,7 +11,6 @@ import ( "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/header" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth/ante" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" @@ -19,6 +18,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" ) func TestValidateBasic(t *testing.T) { diff --git a/x/auth/ante/expected_keepers.go b/x/auth/ante/expected_keepers.go index 82fc9846a3a..2d83c384535 100644 --- a/x/auth/ante/expected_keepers.go +++ b/x/auth/ante/expected_keepers.go @@ -5,10 +5,10 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" - "cosmossdk.io/x/auth/types" consensustypes "cosmossdk.io/x/consensus/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // AccountKeeper defines the contract needed for AccountKeeper related APIs. diff --git a/x/auth/ante/ext_test.go b/x/auth/ante/ext_test.go index 229d62af37e..9181c7664a7 100644 --- a/x/auth/ante/ext_test.go +++ b/x/auth/ante/ext_test.go @@ -5,12 +5,11 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/x/auth/ante" - "cosmossdk.io/x/auth/tx" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/tx" ) func TestRejectExtensionOptionsDecorator(t *testing.T) { diff --git a/x/auth/ante/fee.go b/x/auth/ante/fee.go index 248d7163471..ddc33508b92 100644 --- a/x/auth/ante/fee.go +++ b/x/auth/ante/fee.go @@ -8,10 +8,10 @@ import ( "cosmossdk.io/core/event" "cosmossdk.io/core/transaction" errorsmod "cosmossdk.io/errors" - "cosmossdk.io/x/auth/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // TxFeeChecker checks if the provided fee is enough and returns the effective fee and tx priority. diff --git a/x/auth/ante/fee_test.go b/x/auth/ante/fee_test.go index 6736f17aed9..540f1d211f7 100644 --- a/x/auth/ante/fee_test.go +++ b/x/auth/ante/fee_test.go @@ -7,14 +7,14 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/math" - "cosmossdk.io/x/auth/ante" - authtypes "cosmossdk.io/x/auth/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestDeductFeeDecorator_ZeroGas(t *testing.T) { diff --git a/x/auth/ante/feegrant_test.go b/x/auth/ante/feegrant_test.go index 80f858b042f..234b7eadd7f 100644 --- a/x/auth/ante/feegrant_test.go +++ b/x/auth/ante/feegrant_test.go @@ -10,12 +10,6 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" - "cosmossdk.io/x/auth/ante" - authsign "cosmossdk.io/x/auth/signing" - "cosmossdk.io/x/auth/testutil" - "cosmossdk.io/x/auth/tx" - authtypes "cosmossdk.io/x/auth/types" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -24,6 +18,11 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/cosmos/cosmos-sdk/x/auth/testutil" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestDeductFeesNoDelegation(t *testing.T) { diff --git a/x/auth/ante/setup_test.go b/x/auth/ante/setup_test.go index c63fb02be85..8f3e64f89b0 100644 --- a/x/auth/ante/setup_test.go +++ b/x/auth/ante/setup_test.go @@ -6,13 +6,13 @@ import ( "github.com/stretchr/testify/require" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth/ante" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" ) func TestSetupDecorator_BlockMaxGas(t *testing.T) { diff --git a/x/auth/ante/sigverify.go b/x/auth/ante/sigverify.go index 5ec01498e1f..f5e5a862673 100644 --- a/x/auth/ante/sigverify.go +++ b/x/auth/ante/sigverify.go @@ -14,8 +14,6 @@ import ( "cosmossdk.io/core/gas" "cosmossdk.io/core/transaction" errorsmod "cosmossdk.io/errors" - authsigning "cosmossdk.io/x/auth/signing" - "cosmossdk.io/x/auth/types" txsigning "cosmossdk.io/x/tx/signing" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -29,6 +27,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/x/auth/ante/sigverify_internal_test.go b/x/auth/ante/sigverify_internal_test.go index 40fbe6746fc..e1937e5e7ed 100644 --- a/x/auth/ante/sigverify_internal_test.go +++ b/x/auth/ante/sigverify_internal_test.go @@ -8,12 +8,12 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/core/transaction" - "cosmossdk.io/x/auth/ante" - authcodec "cosmossdk.io/x/auth/codec" - authtypes "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type mockAccount struct { diff --git a/x/auth/ante/sigverify_test.go b/x/auth/ante/sigverify_test.go index 1c71e4ae0f7..00cbb6db605 100644 --- a/x/auth/ante/sigverify_test.go +++ b/x/auth/ante/sigverify_test.go @@ -12,12 +12,6 @@ import ( "cosmossdk.io/core/header" gastestutil "cosmossdk.io/core/testing/gas" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth/ante" - "cosmossdk.io/x/auth/migrations/legacytx" - authsign "cosmossdk.io/x/auth/signing" - authtx "cosmossdk.io/x/auth/tx" - txmodule "cosmossdk.io/x/auth/tx/config" - "cosmossdk.io/x/auth/types" txsigning "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/codec" @@ -30,6 +24,12 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestConsumeSignatureVerificationGas(t *testing.T) { diff --git a/x/auth/ante/testutil/expected_keepers_mocks.go b/x/auth/ante/testutil/expected_keepers_mocks.go index e848a52342c..cb2bac6de33 100644 --- a/x/auth/ante/testutil/expected_keepers_mocks.go +++ b/x/auth/ante/testutil/expected_keepers_mocks.go @@ -10,9 +10,9 @@ import ( address "cosmossdk.io/core/address" appmodule "cosmossdk.io/core/appmodule" - types "cosmossdk.io/x/auth/types" - types0 "cosmossdk.io/x/consensus/types" - types1 "github.com/cosmos/cosmos-sdk/types" + types "cosmossdk.io/x/consensus/types" + types0 "github.com/cosmos/cosmos-sdk/types" + types1 "github.com/cosmos/cosmos-sdk/x/auth/types" gomock "github.com/golang/mock/gomock" ) @@ -54,10 +54,10 @@ func (mr *MockAccountKeeperMockRecorder) AddressCodec() *gomock.Call { } // GetAccount mocks base method. -func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types1.AccAddress) types1.AccountI { +func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types0.AccAddress) types0.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAccount", ctx, addr) - ret0, _ := ret[0].(types1.AccountI) + ret0, _ := ret[0].(types0.AccountI) return ret0 } @@ -82,10 +82,10 @@ func (mr *MockAccountKeeperMockRecorder) GetEnvironment() *gomock.Call { } // GetModuleAddress mocks base method. -func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types1.AccAddress { +func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types0.AccAddress { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAddress", moduleName) - ret0, _ := ret[0].(types1.AccAddress) + ret0, _ := ret[0].(types0.AccAddress) return ret0 } @@ -96,10 +96,10 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName interface{} } // GetParams mocks base method. -func (m *MockAccountKeeper) GetParams(ctx context.Context) types.Params { +func (m *MockAccountKeeper) GetParams(ctx context.Context) types1.Params { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetParams", ctx) - ret0, _ := ret[0].(types.Params) + ret0, _ := ret[0].(types1.Params) return ret0 } @@ -110,10 +110,10 @@ func (mr *MockAccountKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call } // NewAccountWithAddress mocks base method. -func (m *MockAccountKeeper) NewAccountWithAddress(ctx context.Context, addr types1.AccAddress) types1.AccountI { +func (m *MockAccountKeeper) NewAccountWithAddress(ctx context.Context, addr types0.AccAddress) types0.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "NewAccountWithAddress", ctx, addr) - ret0, _ := ret[0].(types1.AccountI) + ret0, _ := ret[0].(types0.AccountI) return ret0 } @@ -124,7 +124,7 @@ func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr interfa } // SetAccount mocks base method. -func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types1.AccountI) { +func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types0.AccountI) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetAccount", ctx, acc) } @@ -159,7 +159,7 @@ func (m *MockFeegrantKeeper) EXPECT() *MockFeegrantKeeperMockRecorder { } // UseGrantedFees mocks base method. -func (m *MockFeegrantKeeper) UseGrantedFees(ctx context.Context, granter, grantee types1.AccAddress, fee types1.Coins, msgs []types1.Msg) error { +func (m *MockFeegrantKeeper) UseGrantedFees(ctx context.Context, granter, grantee types0.AccAddress, fee types0.Coins, msgs []types0.Msg) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UseGrantedFees", ctx, granter, grantee, fee, msgs) ret0, _ := ret[0].(error) @@ -196,10 +196,10 @@ func (m *MockConsensusKeeper) EXPECT() *MockConsensusKeeperMockRecorder { } // Params mocks base method. -func (m *MockConsensusKeeper) Params(arg0 context.Context, arg1 *types0.QueryParamsRequest) (*types0.QueryParamsResponse, error) { +func (m *MockConsensusKeeper) Params(arg0 context.Context, arg1 *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Params", arg0, arg1) - ret0, _ := ret[0].(*types0.QueryParamsResponse) + ret0, _ := ret[0].(*types.QueryParamsResponse) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/x/auth/ante/testutil_test.go b/x/auth/ante/testutil_test.go index 04b8f63f855..f72c94f0f83 100644 --- a/x/auth/ante/testutil_test.go +++ b/x/auth/ante/testutil_test.go @@ -16,15 +16,6 @@ import ( "cosmossdk.io/core/header" coretesting "cosmossdk.io/core/testing" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - "cosmossdk.io/x/auth/ante" - antetestutil "cosmossdk.io/x/auth/ante/testutil" - authcodec "cosmossdk.io/x/auth/codec" - "cosmossdk.io/x/auth/keeper" - xauthsigning "cosmossdk.io/x/auth/signing" - authtestutil "cosmossdk.io/x/auth/testutil" - txtestutil "cosmossdk.io/x/auth/tx/testutil" - "cosmossdk.io/x/auth/types" consensustypes "cosmossdk.io/x/consensus/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -41,6 +32,15 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + antetestutil "github.com/cosmos/cosmos-sdk/x/auth/ante/testutil" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" + "github.com/cosmos/cosmos-sdk/x/auth/keeper" + xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + txtestutil "github.com/cosmos/cosmos-sdk/x/auth/tx/testutil" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // TestAccount represents an account used in the tests in x/auth/ante. diff --git a/x/auth/ante/unordered.go b/x/auth/ante/unordered.go index 5cae688156b..39ea3ab5a1d 100644 --- a/x/auth/ante/unordered.go +++ b/x/auth/ante/unordered.go @@ -14,10 +14,10 @@ import ( "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/transaction" errorsmod "cosmossdk.io/errors" - "cosmossdk.io/x/auth/ante/unorderedtx" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx" ) // bufPool is a pool of bytes.Buffer objects to reduce memory allocations. diff --git a/x/auth/ante/unordered_test.go b/x/auth/ante/unordered_test.go index b02fcc28c47..41100856b57 100644 --- a/x/auth/ante/unordered_test.go +++ b/x/auth/ante/unordered_test.go @@ -8,13 +8,13 @@ import ( "cosmossdk.io/core/header" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth/ante" - "cosmossdk.io/x/auth/ante/unorderedtx" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx" ) const gasConsumed = uint64(25) diff --git a/x/auth/ante/unorderedtx/manager_test.go b/x/auth/ante/unorderedtx/manager_test.go index 9ac795b2dc3..8c16933fce7 100644 --- a/x/auth/ante/unorderedtx/manager_test.go +++ b/x/auth/ante/unorderedtx/manager_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/x/auth/ante/unorderedtx" + "github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx" ) func TestUnorderedTxManager_Close(t *testing.T) { diff --git a/x/auth/ante/unorderedtx/snapshotter_test.go b/x/auth/ante/unorderedtx/snapshotter_test.go index dcf7c05a0cd..a2e66bfd869 100644 --- a/x/auth/ante/unorderedtx/snapshotter_test.go +++ b/x/auth/ante/unorderedtx/snapshotter_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/x/auth/ante/unorderedtx" + "github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx" ) func TestSnapshotter(t *testing.T) { diff --git a/x/auth/client/cli/broadcast.go b/x/auth/client/cli/broadcast.go index dba2fedd5ee..a57fa1caff8 100644 --- a/x/auth/client/cli/broadcast.go +++ b/x/auth/client/cli/broadcast.go @@ -7,11 +7,10 @@ import ( "github.com/spf13/cobra" - authclient "cosmossdk.io/x/auth/client" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/version" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" ) // GetBroadcastCommand returns the tx broadcast command. diff --git a/x/auth/client/cli/encode.go b/x/auth/client/cli/encode.go index 5046f61a7ea..4a56d98aaab 100644 --- a/x/auth/client/cli/encode.go +++ b/x/auth/client/cli/encode.go @@ -5,10 +5,9 @@ import ( "github.com/spf13/cobra" - authclient "cosmossdk.io/x/auth/client" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" ) // GetEncodeCommand returns the encode command to take a JSONified transaction and turn it into diff --git a/x/auth/client/cli/encode_test.go b/x/auth/client/cli/encode_test.go index 1234de797ac..2b44bfb1699 100644 --- a/x/auth/client/cli/encode_test.go +++ b/x/auth/client/cli/encode_test.go @@ -7,14 +7,13 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/x/auth" - "cosmossdk.io/x/auth/client/cli" - "github.com/cosmos/cosmos-sdk/client" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/client/cli" ) func TestGetCommandEncode(t *testing.T) { diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index 273dd707f6b..491c1ba7ad4 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -7,14 +7,13 @@ import ( "github.com/spf13/cobra" - authtx "cosmossdk.io/x/auth/tx" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" querytypes "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/version" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" ) const ( diff --git a/x/auth/client/cli/query_test.go b/x/auth/client/cli/query_test.go index 2639b81b4c8..58ee64fba21 100644 --- a/x/auth/client/cli/query_test.go +++ b/x/auth/client/cli/query_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/x/auth/client/cli" + "github.com/cosmos/cosmos-sdk/x/auth/client/cli" ) func TestParseSigs(t *testing.T) { diff --git a/x/auth/client/cli/tx_multisign.go b/x/auth/client/cli/tx_multisign.go index 497cc50d885..8b7d1ee3a25 100644 --- a/x/auth/client/cli/tx_multisign.go +++ b/x/auth/client/cli/tx_multisign.go @@ -11,8 +11,6 @@ import ( "google.golang.org/protobuf/types/known/anypb" errorsmod "cosmossdk.io/errors" - authclient "cosmossdk.io/x/auth/client" - "cosmossdk.io/x/auth/signing" txsigning "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/client" @@ -24,6 +22,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/version" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) // GetMultiSignCommand returns the multi-sign command diff --git a/x/auth/client/cli/tx_sign.go b/x/auth/client/cli/tx_sign.go index a4057650d04..07d8f5330f4 100644 --- a/x/auth/client/cli/tx_sign.go +++ b/x/auth/client/cli/tx_sign.go @@ -8,8 +8,6 @@ import ( "github.com/spf13/cobra" errorsmod "cosmossdk.io/errors" - authclient "cosmossdk.io/x/auth/client" - "cosmossdk.io/x/auth/signing" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -17,6 +15,8 @@ import ( kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) const ( diff --git a/x/auth/client/cli/tx_simulate.go b/x/auth/client/cli/tx_simulate.go index ef570ebc82a..5a8e71c38e3 100644 --- a/x/auth/client/cli/tx_simulate.go +++ b/x/auth/client/cli/tx_simulate.go @@ -5,11 +5,10 @@ import ( "github.com/spf13/cobra" - authclient "cosmossdk.io/x/auth/client" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" ) // GetSimulateCmd returns a command that simulates whether a transaction will be diff --git a/x/auth/client/cli/validate_sigs.go b/x/auth/client/cli/validate_sigs.go index f5bc6cf4e78..98ec9a6c3de 100644 --- a/x/auth/client/cli/validate_sigs.go +++ b/x/auth/client/cli/validate_sigs.go @@ -7,8 +7,6 @@ import ( "github.com/spf13/cobra" "google.golang.org/protobuf/types/known/anypb" - authclient "cosmossdk.io/x/auth/client" - authsigning "cosmossdk.io/x/auth/signing" txsigning "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/client" @@ -16,6 +14,8 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) func GetValidateSignaturesCommand() *cobra.Command { diff --git a/x/auth/client/testutil/helpers.go b/x/auth/client/testutil/helpers.go index 69d0b6ff380..092b061a83c 100644 --- a/x/auth/client/testutil/helpers.go +++ b/x/auth/client/testutil/helpers.go @@ -4,13 +4,12 @@ import ( "fmt" "strings" - "cosmossdk.io/x/auth/client/cli" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/x/auth/client/cli" ) func TxSignExec(clientCtx client.Context, from fmt.Stringer, filename string, extraArgs ...string) (testutil.BufferWriter, error) { diff --git a/x/auth/client/tx_test.go b/x/auth/client/tx_test.go index 61ab3349a09..18ee2cd5a4d 100644 --- a/x/auth/client/tx_test.go +++ b/x/auth/client/tx_test.go @@ -7,15 +7,14 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/x/auth" - authclient "cosmossdk.io/x/auth/client" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" ) func TestParseQueryResponse(t *testing.T) { diff --git a/x/auth/depinject.go b/x/auth/depinject.go index 4c6c1a2d80d..0b1daedf758 100644 --- a/x/auth/depinject.go +++ b/x/auth/depinject.go @@ -6,13 +6,13 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" - "cosmossdk.io/x/auth/ante" - "cosmossdk.io/x/auth/keeper" - "cosmossdk.io/x/auth/simulation" - "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/keeper" + "github.com/cosmos/cosmos-sdk/x/auth/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ depinject.OnePerModuleType = AppModule{} diff --git a/x/auth/keeper/deterministic_test.go b/x/auth/keeper/deterministic_test.go index d20d5dff579..eabf22bf8aa 100644 --- a/x/auth/keeper/deterministic_test.go +++ b/x/auth/keeper/deterministic_test.go @@ -15,11 +15,6 @@ import ( "cosmossdk.io/core/header" coretesting "cosmossdk.io/core/testing" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - authcodec "cosmossdk.io/x/auth/codec" - "cosmossdk.io/x/auth/keeper" - authtestutil "cosmossdk.io/x/auth/testutil" - "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/baseapp" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" @@ -29,6 +24,11 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" + "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) type DeterministicTestSuite struct { diff --git a/x/auth/keeper/genesis.go b/x/auth/keeper/genesis.go index 7bed1523912..8db9431ea6e 100644 --- a/x/auth/keeper/genesis.go +++ b/x/auth/keeper/genesis.go @@ -4,9 +4,8 @@ import ( "context" "fmt" - "cosmossdk.io/x/auth/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // InitGenesis - Init store state from genesis data diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 4305358c304..402eb6b0a14 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -9,11 +9,10 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "cosmossdk.io/x/auth/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ types.QueryServer = queryServer{} diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index 3908455383f..82e9cfe573f 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -9,10 +9,9 @@ import ( "github.com/cosmos/gogoproto/proto" - "cosmossdk.io/x/auth/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) const addrStr = "cosmos13c3d4wq2t22dl0dstraf8jc3f902e3fsy9n3wv" diff --git a/x/auth/keeper/keeper.go b/x/auth/keeper/keeper.go index 5a8c35fda61..973f9b4b81f 100644 --- a/x/auth/keeper/keeper.go +++ b/x/auth/keeper/keeper.go @@ -10,13 +10,13 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" errorsmod "cosmossdk.io/errors" - "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // AccountKeeperI is the interface contract that x/auth's keeper implements. diff --git a/x/auth/keeper/keeper_test.go b/x/auth/keeper/keeper_test.go index a511dfa01c8..cf7b4e4d013 100644 --- a/x/auth/keeper/keeper_test.go +++ b/x/auth/keeper/keeper_test.go @@ -12,11 +12,6 @@ import ( "cosmossdk.io/core/header" coretesting "cosmossdk.io/core/testing" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - authcodec "cosmossdk.io/x/auth/codec" - "cosmossdk.io/x/auth/keeper" - authtestutil "cosmossdk.io/x/auth/testutil" - "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/baseapp" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" @@ -26,6 +21,11 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" + "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) const ( diff --git a/x/auth/keeper/migrations.go b/x/auth/keeper/migrations.go index c858e7e9551..e621f5cf1cb 100644 --- a/x/auth/keeper/migrations.go +++ b/x/auth/keeper/migrations.go @@ -3,10 +3,9 @@ package keeper import ( "context" - v5 "cosmossdk.io/x/auth/migrations/v5" - "cosmossdk.io/x/auth/types" - sdk "github.com/cosmos/cosmos-sdk/types" + v5 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v5" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // Migrator is a struct for handling in-place store migrations. diff --git a/x/auth/keeper/msg_server.go b/x/auth/keeper/msg_server.go index db302b48c90..84155981bb0 100644 --- a/x/auth/keeper/msg_server.go +++ b/x/auth/keeper/msg_server.go @@ -5,9 +5,8 @@ import ( "errors" "fmt" - "cosmossdk.io/x/auth/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ types.MsgServer = msgServer{} diff --git a/x/auth/keeper/msg_server_test.go b/x/auth/keeper/msg_server_test.go index b6789421ed1..f65334ea5f1 100644 --- a/x/auth/keeper/msg_server_test.go +++ b/x/auth/keeper/msg_server_test.go @@ -8,10 +8,9 @@ import ( "github.com/golang/mock/gomock" "google.golang.org/protobuf/runtime/protoiface" - "cosmossdk.io/x/auth/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) func (s *KeeperTestSuite) TestUpdateParams() { diff --git a/x/auth/migrations/legacytx/stdsig_test.go b/x/auth/migrations/legacytx/stdsig_test.go index e28738cf129..b64949af14d 100644 --- a/x/auth/migrations/legacytx/stdsig_test.go +++ b/x/auth/migrations/legacytx/stdsig_test.go @@ -6,9 +6,8 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/x/auth/migrations/legacytx" - "github.com/cosmos/cosmos-sdk/testutil/testdata" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) func TestStdSignatureMarshalYAML(t *testing.T) { diff --git a/x/auth/module.go b/x/auth/module.go index 49a358a1bf2..9cd8d0f79a5 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -13,16 +13,16 @@ import ( "cosmossdk.io/core/legacy" "cosmossdk.io/core/registry" "cosmossdk.io/core/transaction" - "cosmossdk.io/x/auth/ante" - "cosmossdk.io/x/auth/keeper" - "cosmossdk.io/x/auth/simulation" - "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/keeper" + "github.com/cosmos/cosmos-sdk/x/auth/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // ConsensusVersion defines the current x/auth module consensus version. diff --git a/x/auth/proto/cosmos/auth/module/v1/module.proto b/x/auth/proto/cosmos/auth/module/v1/module.proto index 8d6c578f11a..dbe46a157c7 100644 --- a/x/auth/proto/cosmos/auth/module/v1/module.proto +++ b/x/auth/proto/cosmos/auth/module/v1/module.proto @@ -7,7 +7,7 @@ import "cosmos/app/v1alpha1/module.proto"; // Module is the config object for the auth module. message Module { option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/x/auth" + go_import: "github.com/cosmos/cosmos-sdk/x/auth" }; // bech32_prefix is the bech32 account prefix for the app. diff --git a/x/auth/proto/cosmos/auth/v1beta1/auth.proto b/x/auth/proto/cosmos/auth/v1beta1/auth.proto index da918041ef1..c67ac69d3ee 100644 --- a/x/auth/proto/cosmos/auth/v1beta1/auth.proto +++ b/x/auth/proto/cosmos/auth/v1beta1/auth.proto @@ -6,7 +6,7 @@ import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; -option go_package = "cosmossdk.io/x/auth/types"; +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; // BaseAccount defines a base account type. It contains all the necessary fields // for basic account functionality. Any custom account type should extend this diff --git a/x/auth/proto/cosmos/auth/v1beta1/genesis.proto b/x/auth/proto/cosmos/auth/v1beta1/genesis.proto index dd71df80e92..d1aa66e4626 100644 --- a/x/auth/proto/cosmos/auth/v1beta1/genesis.proto +++ b/x/auth/proto/cosmos/auth/v1beta1/genesis.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; import "cosmos/auth/v1beta1/auth.proto"; import "amino/amino.proto"; -option go_package = "cosmossdk.io/x/auth/types"; +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; // GenesisState defines the auth module's genesis state. message GenesisState { diff --git a/x/auth/proto/cosmos/auth/v1beta1/query.proto b/x/auth/proto/cosmos/auth/v1beta1/query.proto index bcf8e87e436..c2f14e8be73 100644 --- a/x/auth/proto/cosmos/auth/v1beta1/query.proto +++ b/x/auth/proto/cosmos/auth/v1beta1/query.proto @@ -9,7 +9,7 @@ import "cosmos/auth/v1beta1/auth.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/query/v1/query.proto"; -option go_package = "cosmossdk.io/x/auth/types"; +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; // Query defines the gRPC querier service. service Query { diff --git a/x/auth/proto/cosmos/auth/v1beta1/tx.proto b/x/auth/proto/cosmos/auth/v1beta1/tx.proto index e6e79849600..bdfac0f171d 100644 --- a/x/auth/proto/cosmos/auth/v1beta1/tx.proto +++ b/x/auth/proto/cosmos/auth/v1beta1/tx.proto @@ -8,7 +8,7 @@ import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; import "cosmos/auth/v1beta1/auth.proto"; -option go_package = "cosmossdk.io/x/auth/types"; +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; // Msg defines the x/auth Msg service. service Msg { diff --git a/x/auth/signing/adapter_test.go b/x/auth/signing/adapter_test.go index 432a0194ba7..af163ac0160 100644 --- a/x/auth/signing/adapter_test.go +++ b/x/auth/signing/adapter_test.go @@ -6,12 +6,11 @@ import ( "github.com/stretchr/testify/require" - authsign "cosmossdk.io/x/auth/signing" - codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" ) func TestGetSignBytesAdapterNoPublicKey(t *testing.T) { diff --git a/x/auth/simulation/genesis.go b/x/auth/simulation/genesis.go index 87b5cb2a61a..c6984cc355e 100644 --- a/x/auth/simulation/genesis.go +++ b/x/auth/simulation/genesis.go @@ -5,12 +5,11 @@ import ( "fmt" "math/rand" - "cosmossdk.io/x/auth/types" - vestingtypes "cosmossdk.io/x/auth/vesting/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/types" + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) // Simulation parameter constants diff --git a/x/auth/simulation/genesis_test.go b/x/auth/simulation/genesis_test.go index 2d6a63e4882..44a2482149c 100644 --- a/x/auth/simulation/genesis_test.go +++ b/x/auth/simulation/genesis_test.go @@ -8,14 +8,14 @@ import ( "github.com/stretchr/testify/require" sdkmath "cosmossdk.io/math" - "cosmossdk.io/x/auth/simulation" - "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/testutil" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // TestRandomizedGenState tests the normal scenario of applying RandomizedGenState. diff --git a/x/auth/simulation/proposals.go b/x/auth/simulation/proposals.go index 78a5c09e2f8..930d9153fd8 100644 --- a/x/auth/simulation/proposals.go +++ b/x/auth/simulation/proposals.go @@ -5,11 +5,11 @@ import ( "math/rand" coreaddress "cosmossdk.io/core/address" - "cosmossdk.io/x/auth/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/simulation" ) diff --git a/x/auth/simulation/proposals_test.go b/x/auth/simulation/proposals_test.go index b5fc4cf8aa5..f43e105d305 100644 --- a/x/auth/simulation/proposals_test.go +++ b/x/auth/simulation/proposals_test.go @@ -6,13 +6,12 @@ import ( "gotest.tools/v3/assert" - "cosmossdk.io/x/auth/simulation" - "cosmossdk.io/x/auth/types" - codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestProposalMsgs(t *testing.T) { diff --git a/x/auth/tx/aux_test.go b/x/auth/tx/aux_test.go index 4d1ae10b327..f1e8dca0879 100644 --- a/x/auth/tx/aux_test.go +++ b/x/auth/tx/aux_test.go @@ -6,8 +6,6 @@ import ( "github.com/stretchr/testify/require" - authsigning "cosmossdk.io/x/auth/signing" - clienttx "github.com/cosmos/cosmos-sdk/client/tx" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -16,6 +14,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) var ( diff --git a/x/auth/tx/builder.go b/x/auth/tx/builder.go index af97b2e3c02..423bca3a087 100644 --- a/x/auth/tx/builder.go +++ b/x/auth/tx/builder.go @@ -14,7 +14,6 @@ import ( signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" "cosmossdk.io/core/address" - authsign "cosmossdk.io/x/auth/signing" "cosmossdk.io/x/tx/decode" "github.com/cosmos/cosmos-sdk/client" @@ -24,6 +23,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" ) var ( diff --git a/x/auth/tx/config/depinject.go b/x/auth/tx/config/depinject.go index d371bc713e4..9b7d8f0268c 100644 --- a/x/auth/tx/config/depinject.go +++ b/x/auth/tx/config/depinject.go @@ -19,11 +19,6 @@ import ( "cosmossdk.io/core/transaction" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" - "cosmossdk.io/x/auth/ante" - "cosmossdk.io/x/auth/ante/unorderedtx" - "cosmossdk.io/x/auth/posthandler" - "cosmossdk.io/x/auth/tx" - authtypes "cosmossdk.io/x/auth/types" txsigning "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/textual" @@ -33,6 +28,11 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx" + "github.com/cosmos/cosmos-sdk/x/auth/posthandler" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // flagMinGasPricesV2 is the flag name for the minimum gas prices in the main server v2 component. diff --git a/x/auth/tx/config/module.go b/x/auth/tx/config/module.go index 1d36738e57c..2529f36bc8e 100644 --- a/x/auth/tx/config/module.go +++ b/x/auth/tx/config/module.go @@ -5,7 +5,8 @@ import ( appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/transaction" - "cosmossdk.io/x/auth/ante" + + "github.com/cosmos/cosmos-sdk/x/auth/ante" ) var ( diff --git a/x/auth/tx/config_test.go b/x/auth/tx/config_test.go index 05d63eb2ae1..5b6afe223ef 100644 --- a/x/auth/tx/config_test.go +++ b/x/auth/tx/config_test.go @@ -8,14 +8,14 @@ import ( _ "cosmossdk.io/api/cosmos/crypto/secp256k1" coretransaction "cosmossdk.io/core/transaction" - "cosmossdk.io/x/auth/tx" - txtestutil "cosmossdk.io/x/auth/tx/testutil" "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/std" "github.com/cosmos/cosmos-sdk/testutil/testdata" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + txtestutil "github.com/cosmos/cosmos-sdk/x/auth/tx/testutil" ) func TestGenerator(t *testing.T) { diff --git a/x/auth/tx/gogotx.go b/x/auth/tx/gogotx.go index 36d124206b0..aa424f1c991 100644 --- a/x/auth/tx/gogotx.go +++ b/x/auth/tx/gogotx.go @@ -13,8 +13,6 @@ import ( "cosmossdk.io/core/address" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" - "cosmossdk.io/x/auth/ante" - authsigning "cosmossdk.io/x/auth/signing" "cosmossdk.io/x/tx/decode" txsigning "cosmossdk.io/x/tx/signing" @@ -26,6 +24,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) func newWrapperFromDecodedTx( diff --git a/x/auth/tx/legacy_amino_json.go b/x/auth/tx/legacy_amino_json.go index 0844a7b8f95..ab2f30246a7 100644 --- a/x/auth/tx/legacy_amino_json.go +++ b/x/auth/tx/legacy_amino_json.go @@ -4,12 +4,12 @@ import ( "fmt" errorsmod "cosmossdk.io/errors" - "cosmossdk.io/x/auth/migrations/legacytx" - "cosmossdk.io/x/auth/signing" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) const aminoNonCriticalFieldsError = "protobuf transaction contains unknown non-critical fields. This is a transaction malleability issue and SIGN_MODE_LEGACY_AMINO_JSON cannot be used." diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index e84d96b2452..94c9314f5db 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -10,8 +10,6 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "cosmossdk.io/x/auth/migrations/legacytx" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -19,6 +17,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" txtypes "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) // baseAppSimulateFn is the signature of the Baseapp#Simulate function. diff --git a/x/auth/tx/testutil/suite.go b/x/auth/tx/testutil/suite.go index 6ac4b25608c..af7da0f1f96 100644 --- a/x/auth/tx/testutil/suite.go +++ b/x/auth/tx/testutil/suite.go @@ -9,7 +9,6 @@ import ( signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" "cosmossdk.io/math" - "cosmossdk.io/x/auth/signing" "github.com/cosmos/cosmos-sdk/client" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" @@ -18,6 +17,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) // TxConfigTestSuite provides a test suite that can be used to test that a TxConfig implementation is correct. diff --git a/x/auth/types/account_test.go b/x/auth/types/account_test.go index 3a4c16e8c46..b4fadfa391a 100644 --- a/x/auth/types/account_test.go +++ b/x/auth/types/account_test.go @@ -8,11 +8,10 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/x/auth/types" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestBaseAddressPubKey(t *testing.T) { diff --git a/x/auth/types/auth.pb.go b/x/auth/types/auth.pb.go index 4682b8fd043..d1802682a13 100644 --- a/x/auth/types/auth.pb.go +++ b/x/auth/types/auth.pb.go @@ -252,54 +252,54 @@ func init() { func init() { proto.RegisterFile("cosmos/auth/v1beta1/auth.proto", fileDescriptor_7e1f7e915d020d2d) } var fileDescriptor_7e1f7e915d020d2d = []byte{ - // 737 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0xc1, 0x4e, 0xf3, 0x46, - 0x10, 0x8e, 0x93, 0x94, 0xbf, 0x6c, 0xf8, 0xa1, 0x98, 0x94, 0x9a, 0xa8, 0x8a, 0x4d, 0xa4, 0x8a, - 0x08, 0x35, 0x0e, 0x09, 0xa5, 0x15, 0xb9, 0x91, 0xb4, 0xaa, 0x10, 0x85, 0x22, 0x47, 0xe5, 0xc0, - 0xc5, 0x5a, 0xdb, 0x8b, 0x59, 0x25, 0xf6, 0xba, 0xde, 0x35, 0x8a, 0x79, 0x02, 0xd4, 0x53, 0xd5, - 0x4b, 0xaf, 0xb4, 0x4f, 0xc0, 0x81, 0x87, 0xa8, 0x7a, 0x42, 0x5c, 0xda, 0x53, 0x54, 0x85, 0x03, - 0xa8, 0xea, 0x43, 0x54, 0xde, 0x75, 0x48, 0x82, 0x72, 0x89, 0x3c, 0xdf, 0xf7, 0xcd, 0xcc, 0x37, - 0x93, 0xb1, 0x41, 0xd9, 0x26, 0xd4, 0x23, 0xb4, 0x0e, 0x23, 0x76, 0x59, 0xbf, 0x6a, 0x58, 0x88, - 0xc1, 0x06, 0x0f, 0xf4, 0x20, 0x24, 0x8c, 0xc8, 0x6b, 0x82, 0xd7, 0x39, 0x94, 0xf2, 0xa5, 0x55, - 0xe8, 0x61, 0x9f, 0xd4, 0xf9, 0xaf, 0xd0, 0x95, 0x36, 0x84, 0xce, 0xe4, 0x51, 0x3d, 0x4d, 0x12, - 0x54, 0xd1, 0x25, 0x2e, 0x11, 0x78, 0xf2, 0x34, 0x4e, 0x70, 0x09, 0x71, 0xfb, 0xa8, 0xce, 0x23, - 0x2b, 0xba, 0xa8, 0x43, 0x3f, 0x16, 0x54, 0xe5, 0xb7, 0x2c, 0x28, 0xb4, 0x21, 0x45, 0x07, 0xb6, - 0x4d, 0x22, 0x9f, 0xc9, 0x4d, 0xf0, 0x0e, 0x3a, 0x4e, 0x88, 0x28, 0x55, 0x24, 0x4d, 0xaa, 0x2e, - 0xb6, 0x95, 0xc7, 0xfb, 0x5a, 0x31, 0xed, 0x71, 0x20, 0x98, 0x2e, 0x0b, 0xb1, 0xef, 0x1a, 0x63, - 0xa1, 0x7c, 0x06, 0xde, 0x05, 0x91, 0x65, 0xf6, 0x50, 0xac, 0x64, 0x35, 0xa9, 0x5a, 0x68, 0x16, - 0x75, 0xd1, 0x50, 0x1f, 0x37, 0xd4, 0x0f, 0xfc, 0xb8, 0xbd, 0xf5, 0xef, 0x50, 0x2d, 0x06, 0x91, - 0xd5, 0xc7, 0x76, 0xa2, 0xfd, 0x9c, 0x78, 0x98, 0x21, 0x2f, 0x60, 0xf1, 0xef, 0xcf, 0x77, 0xdb, - 0x60, 0x42, 0x18, 0x0b, 0x41, 0x64, 0x1d, 0xa1, 0x58, 0xfe, 0x0c, 0x2c, 0x43, 0x61, 0xcb, 0xf4, - 0x23, 0xcf, 0x42, 0xa1, 0x92, 0xd3, 0xa4, 0x6a, 0xde, 0x78, 0x9f, 0xa2, 0x27, 0x1c, 0x94, 0x4b, - 0xe0, 0x43, 0x8a, 0x7e, 0x8c, 0x90, 0x6f, 0x23, 0x25, 0xcf, 0x05, 0xaf, 0x71, 0xab, 0x73, 0x73, - 0xab, 0x66, 0x5e, 0x6e, 0xd5, 0xcc, 0x9f, 0xf7, 0xb5, 0x4f, 0xe7, 0xac, 0x57, 0x4f, 0xe7, 0x3e, - 0xfc, 0xe9, 0xf9, 0x6e, 0x7b, 0x5d, 0x08, 0x6a, 0xd4, 0xe9, 0xd5, 0xa7, 0x76, 0x52, 0xf9, 0x4f, - 0x02, 0xef, 0x8f, 0x89, 0x13, 0xf5, 0x5f, 0xb7, 0x74, 0x08, 0x96, 0x2c, 0x48, 0x91, 0x99, 0x1a, - 0xe1, 0xab, 0x2a, 0x34, 0x35, 0x7d, 0x5e, 0x87, 0xa9, 0x4a, 0xed, 0xfc, 0xc3, 0x50, 0x95, 0x8c, - 0x82, 0x35, 0xb5, 0x70, 0x19, 0xe4, 0x7d, 0xe8, 0x21, 0xbe, 0xb9, 0x45, 0x83, 0x3f, 0xcb, 0x1a, - 0x28, 0x04, 0x28, 0xf4, 0x30, 0xa5, 0x98, 0xf8, 0x54, 0xc9, 0x69, 0xb9, 0xea, 0xa2, 0x31, 0x0d, - 0xb5, 0xce, 0x6f, 0xc4, 0x4c, 0x95, 0x79, 0x1d, 0x67, 0xbc, 0xf2, 0xc9, 0x94, 0xa9, 0xc9, 0x66, - 0xd8, 0x5f, 0x9e, 0xef, 0xb6, 0x97, 0x3d, 0x8e, 0x8c, 0x87, 0xa9, 0xfc, 0x2a, 0x81, 0x8f, 0x84, - 0xa8, 0x13, 0x22, 0x07, 0xf9, 0x0c, 0xc3, 0xbe, 0xac, 0x82, 0x42, 0x2a, 0xe3, 0x6e, 0xf9, 0x6d, - 0x18, 0x40, 0x40, 0x27, 0x89, 0xe7, 0x2d, 0xb0, 0xe2, 0xa0, 0x10, 0x5f, 0x41, 0x86, 0x89, 0x9f, - 0xfc, 0x8d, 0x54, 0xc9, 0x6a, 0xb9, 0xea, 0x92, 0xb1, 0x3c, 0x81, 0x8f, 0x50, 0x4c, 0x5b, 0xfb, - 0x8f, 0xf7, 0xb5, 0x95, 0x89, 0x1f, 0x6d, 0x47, 0xff, 0xe2, 0xab, 0xc4, 0xe3, 0xe6, 0x94, 0xc7, - 0x6f, 0x43, 0x12, 0x05, 0xa9, 0xc5, 0x89, 0x89, 0xca, 0x5f, 0x59, 0xb0, 0x70, 0x0a, 0x43, 0xe8, - 0x51, 0x59, 0x07, 0x6b, 0x1e, 0x1c, 0x98, 0x1e, 0xf2, 0x88, 0x69, 0x5f, 0xc2, 0x10, 0xda, 0x0c, - 0x85, 0xe2, 0x66, 0xf3, 0xc6, 0xaa, 0x07, 0x07, 0xc7, 0xc8, 0x23, 0x9d, 0x57, 0x42, 0xd6, 0xc0, - 0x12, 0x1b, 0x98, 0x14, 0xbb, 0x66, 0x1f, 0x7b, 0x98, 0xf1, 0x75, 0xe7, 0x0d, 0xc0, 0x06, 0x5d, - 0xec, 0x7e, 0x97, 0x20, 0xf2, 0x0e, 0xf8, 0x98, 0x2b, 0xae, 0x91, 0x69, 0x13, 0xca, 0xcc, 0x00, - 0x85, 0xa6, 0x15, 0x33, 0x94, 0x1e, 0xdd, 0x6a, 0x22, 0xbd, 0x46, 0x1d, 0x42, 0xd9, 0x29, 0x0a, - 0xdb, 0x31, 0x43, 0xf2, 0xf7, 0xe0, 0x93, 0xa4, 0xe0, 0x15, 0x0a, 0xf1, 0x45, 0x2c, 0x92, 0x90, - 0xd3, 0xdc, 0xdb, 0x6b, 0xec, 0x8b, 0x3b, 0x6c, 0x2b, 0xa3, 0xa1, 0x5a, 0xec, 0x62, 0xf7, 0x8c, - 0x2b, 0x92, 0xd4, 0x6f, 0xbe, 0xe6, 0xbc, 0x51, 0xa4, 0x33, 0xa8, 0xc8, 0x92, 0x7f, 0x00, 0x1b, - 0x6f, 0x0b, 0x52, 0x64, 0x07, 0xcd, 0xbd, 0x2f, 0x7b, 0x0d, 0xe5, 0x03, 0x5e, 0xb2, 0x34, 0x1a, - 0xaa, 0xeb, 0x33, 0x25, 0xbb, 0x63, 0x85, 0xb1, 0x4e, 0xe7, 0xe2, 0xad, 0xcd, 0x97, 0x5b, 0x55, - 0x7a, 0x7b, 0x06, 0x03, 0xf1, 0x19, 0x12, 0xeb, 0x6c, 0xef, 0xfe, 0x31, 0x2a, 0x4b, 0x0f, 0xa3, - 0xb2, 0xf4, 0xcf, 0xa8, 0x2c, 0xfd, 0xfc, 0x54, 0xce, 0x3c, 0x3c, 0x95, 0x33, 0x7f, 0x3f, 0x95, - 0x33, 0xe7, 0xe9, 0xc7, 0x86, 0x3a, 0x3d, 0x1d, 0x93, 0x71, 0x16, 0x8b, 0x03, 0x44, 0xad, 0x05, - 0xfe, 0x7a, 0xef, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x84, 0x7c, 0x64, 0xd8, 0x04, 0x00, - 0x00, + // 745 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0x8e, 0x93, 0xd0, 0xa5, 0x93, 0x6e, 0x97, 0x7a, 0x43, 0xf1, 0x46, 0x28, 0xf6, 0x46, 0x42, + 0x1b, 0x2a, 0x62, 0x6f, 0x02, 0x05, 0x35, 0xb7, 0x26, 0x20, 0x54, 0x95, 0x96, 0xca, 0x11, 0x3d, + 0xf4, 0x62, 0x8d, 0x9d, 0xa9, 0x3b, 0x6a, 0xc6, 0x63, 0x3c, 0xe3, 0x2a, 0xee, 0x2f, 0xa8, 0x38, + 0x21, 0x2e, 0x5c, 0x0b, 0xbf, 0xa0, 0x87, 0xfe, 0x08, 0xc4, 0xa9, 0xea, 0x05, 0x4e, 0x11, 0x4a, + 0x0f, 0xad, 0x10, 0x3f, 0x02, 0x79, 0xc6, 0x69, 0x92, 0x6e, 0x2e, 0x91, 0xdf, 0xf7, 0x7d, 0xef, + 0xbd, 0xef, 0xbd, 0x3c, 0x1b, 0x54, 0x3d, 0xca, 0x08, 0x65, 0x16, 0x8c, 0xf9, 0x89, 0x75, 0xd6, + 0x74, 0x11, 0x87, 0x4d, 0x11, 0x98, 0x61, 0x44, 0x39, 0x55, 0x5f, 0x4a, 0xde, 0x14, 0x50, 0xc6, + 0x57, 0xd6, 0x20, 0xc1, 0x01, 0xb5, 0xc4, 0xaf, 0xd4, 0x55, 0x5e, 0x49, 0x9d, 0x23, 0x22, 0x2b, + 0x4b, 0x92, 0x54, 0xd9, 0xa7, 0x3e, 0x95, 0x78, 0xfa, 0x34, 0x49, 0xf0, 0x29, 0xf5, 0x07, 0xc8, + 0x12, 0x91, 0x1b, 0x1f, 0x5b, 0x30, 0x48, 0x24, 0x55, 0xfb, 0x2d, 0x0f, 0x4a, 0x1d, 0xc8, 0xd0, + 0xb6, 0xe7, 0xd1, 0x38, 0xe0, 0x6a, 0x0b, 0x3c, 0x83, 0xfd, 0x7e, 0x84, 0x18, 0xd3, 0x14, 0x43, + 0xa9, 0x2f, 0x77, 0xb4, 0xdb, 0xeb, 0x46, 0x39, 0xeb, 0xb1, 0x2d, 0x99, 0x1e, 0x8f, 0x70, 0xe0, + 0xdb, 0x13, 0xa1, 0x7a, 0x08, 0x9e, 0x85, 0xb1, 0xeb, 0x9c, 0xa2, 0x44, 0xcb, 0x1b, 0x4a, 0xbd, + 0xd4, 0x2a, 0x9b, 0xb2, 0xa1, 0x39, 0x69, 0x68, 0x6e, 0x07, 0x49, 0xe7, 0xcd, 0xbf, 0x23, 0xbd, + 0x1c, 0xc6, 0xee, 0x00, 0x7b, 0xa9, 0xf6, 0x33, 0x4a, 0x30, 0x47, 0x24, 0xe4, 0xc9, 0xef, 0xf7, + 0x57, 0x1b, 0x60, 0x4a, 0xd8, 0x4b, 0x61, 0xec, 0xee, 0xa2, 0x44, 0xfd, 0x04, 0xac, 0x42, 0x69, + 0xcb, 0x09, 0x62, 0xe2, 0xa2, 0x48, 0x2b, 0x18, 0x4a, 0xbd, 0x68, 0x3f, 0xcf, 0xd0, 0x7d, 0x01, + 0xaa, 0x15, 0xf0, 0x3e, 0x43, 0x3f, 0xc6, 0x28, 0xf0, 0x90, 0x56, 0x14, 0x82, 0xc7, 0xb8, 0xdd, + 0xbd, 0xb8, 0xd4, 0x73, 0x0f, 0x97, 0x7a, 0xee, 0xcf, 0xeb, 0xc6, 0xc7, 0x0b, 0xd6, 0x6b, 0x66, + 0x73, 0xef, 0xfc, 0x74, 0x7f, 0xb5, 0xb1, 0x2e, 0x05, 0x0d, 0xd6, 0x3f, 0xb5, 0x66, 0x76, 0x52, + 0xfb, 0x4f, 0x01, 0xcf, 0xf7, 0x68, 0x3f, 0x1e, 0x3c, 0x6e, 0x69, 0x07, 0xac, 0xb8, 0x90, 0x21, + 0x27, 0x33, 0x22, 0x56, 0x55, 0x6a, 0x19, 0xe6, 0xa2, 0x0e, 0x33, 0x95, 0x3a, 0xc5, 0x9b, 0x91, + 0xae, 0xd8, 0x25, 0x77, 0x66, 0xe1, 0x2a, 0x28, 0x06, 0x90, 0x20, 0xb1, 0xb9, 0x65, 0x5b, 0x3c, + 0xab, 0x06, 0x28, 0x85, 0x28, 0x22, 0x98, 0x31, 0x4c, 0x03, 0xa6, 0x15, 0x8c, 0x42, 0x7d, 0xd9, + 0x9e, 0x85, 0xda, 0x47, 0x17, 0x72, 0xa6, 0xda, 0xa2, 0x8e, 0x73, 0x5e, 0xc5, 0x64, 0xda, 0xcc, + 0x64, 0x73, 0xec, 0x2f, 0xf7, 0x57, 0x1b, 0xab, 0x44, 0x20, 0x93, 0x61, 0x6a, 0xbf, 0x2a, 0xe0, + 0x03, 0x29, 0xea, 0x46, 0xa8, 0x8f, 0x02, 0x8e, 0xe1, 0x40, 0xd5, 0x41, 0x29, 0x93, 0x09, 0xb7, + 0xe2, 0x36, 0x6c, 0x20, 0xa1, 0xfd, 0xd4, 0xf3, 0x1b, 0xf0, 0xa2, 0x8f, 0x22, 0x7c, 0x06, 0x39, + 0xa6, 0x41, 0xfa, 0x37, 0x32, 0x2d, 0x6f, 0x14, 0xea, 0x2b, 0xf6, 0xea, 0x14, 0xde, 0x45, 0x09, + 0x6b, 0x6f, 0xdd, 0x5e, 0x37, 0x5e, 0x4c, 0xfd, 0x18, 0x6f, 0xcd, 0x2f, 0xbe, 0x4a, 0x3d, 0xbe, + 0x9e, 0xf1, 0xf8, 0x6d, 0x44, 0xe3, 0x30, 0xb3, 0x38, 0x35, 0x51, 0xfb, 0x2b, 0x0f, 0x96, 0x0e, + 0x60, 0x04, 0x09, 0x53, 0x4d, 0xf0, 0x92, 0xc0, 0xa1, 0x43, 0x10, 0xa1, 0x8e, 0x77, 0x02, 0x23, + 0xe8, 0x71, 0x14, 0xc9, 0x9b, 0x2d, 0xda, 0x6b, 0x04, 0x0e, 0xf7, 0x10, 0xa1, 0xdd, 0x47, 0x42, + 0x35, 0xc0, 0x0a, 0x1f, 0x3a, 0x0c, 0xfb, 0xce, 0x00, 0x13, 0xcc, 0xc5, 0xba, 0x8b, 0x36, 0xe0, + 0xc3, 0x1e, 0xf6, 0xbf, 0x4b, 0x11, 0xf5, 0x2d, 0xf8, 0x50, 0x28, 0xce, 0x91, 0xe3, 0x51, 0xc6, + 0x9d, 0x10, 0x45, 0x8e, 0x9b, 0x70, 0x94, 0x1d, 0xdd, 0x5a, 0x2a, 0x3d, 0x47, 0x5d, 0xca, 0xf8, + 0x01, 0x8a, 0x3a, 0x09, 0x47, 0xea, 0xf7, 0xe0, 0xa3, 0xb4, 0xe0, 0x19, 0x8a, 0xf0, 0x71, 0x22, + 0x93, 0x50, 0xbf, 0xb5, 0xb9, 0xd9, 0xdc, 0x92, 0x77, 0xd8, 0xd1, 0xc6, 0x23, 0xbd, 0xdc, 0xc3, + 0xfe, 0xa1, 0x50, 0xa4, 0xa9, 0xdf, 0x7c, 0x2d, 0x78, 0xbb, 0xcc, 0xe6, 0x50, 0x99, 0xa5, 0xfe, + 0x00, 0x5e, 0x3d, 0x2d, 0xc8, 0x90, 0x17, 0xb6, 0x36, 0xbf, 0x3c, 0x6d, 0x6a, 0xef, 0x89, 0x92, + 0x95, 0xf1, 0x48, 0x5f, 0x9f, 0x2b, 0xd9, 0x9b, 0x28, 0xec, 0x75, 0xb6, 0x10, 0x6f, 0xbf, 0x7e, + 0xb8, 0xd4, 0x95, 0xa7, 0x67, 0x30, 0x94, 0x9f, 0x21, 0xb9, 0xce, 0x4e, 0xf7, 0x8f, 0x71, 0x55, + 0xb9, 0x19, 0x57, 0x95, 0x7f, 0xc6, 0x55, 0xe5, 0xe7, 0xbb, 0x6a, 0xee, 0xe6, 0xae, 0x9a, 0xfb, + 0xfb, 0xae, 0x9a, 0x3b, 0xfa, 0xd4, 0xc7, 0xfc, 0x24, 0x76, 0x4d, 0x8f, 0x92, 0xec, 0x53, 0x63, + 0xbd, 0x5b, 0x85, 0x27, 0x21, 0x62, 0xee, 0x92, 0x78, 0xdd, 0x3f, 0xff, 0x3f, 0x00, 0x00, 0xff, + 0xff, 0x8c, 0x05, 0x77, 0x9c, 0xe8, 0x04, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/auth/types/codec.go b/x/auth/types/codec.go index 473e3d94ab2..5cff5c40794 100644 --- a/x/auth/types/codec.go +++ b/x/auth/types/codec.go @@ -4,11 +4,11 @@ import ( corelegacy "cosmossdk.io/core/legacy" "cosmossdk.io/core/registry" coretransaction "cosmossdk.io/core/transaction" - "cosmossdk.io/x/auth/migrations/legacytx" "github.com/cosmos/cosmos-sdk/codec/legacy" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) // RegisterLegacyAminoCodec registers the account interfaces and concrete types on the diff --git a/x/auth/types/credentials_test.go b/x/auth/types/credentials_test.go index 12ddf0a24fd..3fb30311f02 100644 --- a/x/auth/types/credentials_test.go +++ b/x/auth/types/credentials_test.go @@ -5,10 +5,9 @@ import ( "github.com/stretchr/testify/require" - authtypes "cosmossdk.io/x/auth/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestNewModuleCrendentials(t *testing.T) { diff --git a/x/auth/types/genesis.pb.go b/x/auth/types/genesis.pb.go index c7bd41ddb54..533149395e2 100644 --- a/x/auth/types/genesis.pb.go +++ b/x/auth/types/genesis.pb.go @@ -87,7 +87,7 @@ func init() { func init() { proto.RegisterFile("cosmos/auth/v1beta1/genesis.proto", fileDescriptor_d897ccbce9822332) } var fileDescriptor_d897ccbce9822332 = []byte{ - // 258 bytes of a gzipped FileDescriptorProto + // 269 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2c, 0x2d, 0xc9, 0xd0, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, @@ -100,11 +100,11 @@ var fileDescriptor_d897ccbce9822332 = []byte{ 0x71, 0xe2, 0x3c, 0x71, 0x4f, 0x9e, 0x61, 0xc5, 0xf3, 0x0d, 0x5a, 0x8c, 0x41, 0x50, 0x5d, 0x42, 0x06, 0x5c, 0x1c, 0x89, 0xc9, 0xc9, 0xf9, 0xa5, 0x79, 0x25, 0xc5, 0x12, 0x4c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0x22, 0x7a, 0x10, 0x7f, 0xe8, 0xc1, 0xfc, 0xa1, 0xe7, 0x98, 0x57, 0x19, 0x04, 0x57, - 0xe5, 0x64, 0x7c, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, - 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x92, 0x10, 0xab, - 0x8b, 0x53, 0xb2, 0xf5, 0x32, 0xf3, 0xf5, 0x2b, 0x20, 0xfe, 0x2a, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, - 0x62, 0x03, 0x1b, 0x66, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x57, 0x9c, 0xf7, 0x5c, 0x01, - 0x00, 0x00, + 0xe5, 0xe4, 0x7c, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, + 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x9a, 0xe9, 0x99, + 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x50, 0xaf, 0x41, 0x28, 0xdd, 0xe2, 0x94, + 0x6c, 0xfd, 0x0a, 0x88, 0x3f, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x86, 0x1b, 0x03, + 0x02, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x70, 0x8d, 0xea, 0x6c, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/auth/types/genesis_test.go b/x/auth/types/genesis_test.go index b4aa361cfb8..16545c39f72 100644 --- a/x/auth/types/genesis_test.go +++ b/x/auth/types/genesis_test.go @@ -7,14 +7,13 @@ import ( "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" - "cosmossdk.io/x/auth" - "cosmossdk.io/x/auth/types" - codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestSanitize(t *testing.T) { diff --git a/x/auth/types/params_test.go b/x/auth/types/params_test.go index 8f668440329..587778e1f3d 100644 --- a/x/auth/types/params_test.go +++ b/x/auth/types/params_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestParamsEqual(t *testing.T) { diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index cec5068645c..b127caf89b2 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -958,79 +958,79 @@ func init() { func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ - // 1143 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xa6, 0xa1, 0x49, 0x5f, 0xd2, 0x54, 0x8c, 0x5d, 0x11, 0x36, 0xa9, 0x6d, 0x6d, 0x21, - 0x5f, 0xd4, 0xbb, 0xf5, 0x47, 0x53, 0x88, 0xc4, 0x21, 0x2b, 0xd4, 0x2a, 0x42, 0x20, 0x77, 0x5b, - 0x41, 0xe9, 0xc5, 0x5a, 0x67, 0xd7, 0xce, 0xaa, 0xf5, 0xae, 0xeb, 0x5d, 0xa3, 0x9a, 0xc8, 0x02, - 0x21, 0x21, 0xf5, 0xc0, 0x01, 0x09, 0x6e, 0x5c, 0xf2, 0x27, 0x70, 0xb0, 0xc4, 0x01, 0x6e, 0x70, - 0x28, 0x39, 0x55, 0xe1, 0x82, 0x38, 0x20, 0x94, 0x20, 0xc1, 0x9f, 0x81, 0x3c, 0xf3, 0xf6, 0xc3, - 0xf1, 0xd8, 0xde, 0xb4, 0xb7, 0xf5, 0xcc, 0x7b, 0xbf, 0xf7, 0xfb, 0xbd, 0x79, 0xf3, 0xde, 0x18, - 0x32, 0xbb, 0x8e, 0xdb, 0x70, 0x5c, 0x45, 0x6f, 0x7b, 0x7b, 0xca, 0xa7, 0xf9, 0xaa, 0xe9, 0xe9, - 0x79, 0xe5, 0x71, 0xdb, 0x6c, 0x75, 0xe4, 0x66, 0xcb, 0xf1, 0x1c, 0x92, 0x64, 0x06, 0x72, 0xdf, - 0x40, 0x46, 0x03, 0x71, 0x03, 0xbd, 0xaa, 0xba, 0x6b, 0x32, 0xeb, 0xc0, 0xb7, 0xa9, 0xd7, 0x2d, - 0x5b, 0xf7, 0x2c, 0xc7, 0x66, 0x00, 0x62, 0xaa, 0xee, 0xd4, 0x1d, 0xfa, 0xa9, 0xf4, 0xbf, 0x70, - 0xf5, 0xf5, 0xba, 0xe3, 0xd4, 0x1f, 0x99, 0x0a, 0xfd, 0x55, 0x6d, 0xd7, 0x14, 0xdd, 0xc6, 0x88, - 0xe2, 0x32, 0x6e, 0xe9, 0x4d, 0x4b, 0xd1, 0x6d, 0xdb, 0xf1, 0x28, 0x9a, 0x8b, 0xbb, 0x69, 0x1e, - 0x61, 0x4a, 0x0e, 0x81, 0xd9, 0x7e, 0x85, 0x45, 0x44, 0xf2, 0x6c, 0x6b, 0x09, 0x5d, 0x7d, 0xc2, - 0x51, 0x9d, 0x92, 0x0b, 0xa9, 0x3b, 0xfd, 0x9f, 0xdb, 0xbb, 0xbb, 0x4e, 0xdb, 0xf6, 0x5c, 0xcd, - 0x7c, 0xdc, 0x36, 0x5d, 0x8f, 0xdc, 0x02, 0x08, 0x25, 0x2d, 0x0a, 0x59, 0x61, 0x6d, 0xae, 0xb0, - 0x22, 0x23, 0x6e, 0x5f, 0xbf, 0xcc, 0x50, 0x90, 0x8a, 0x5c, 0xd6, 0xeb, 0x26, 0xfa, 0x6a, 0x11, - 0xcf, 0xad, 0xe4, 0x51, 0x2f, 0x77, 0x89, 0xb9, 0xe5, 0x5c, 0xe3, 0x61, 0xf6, 0xba, 0x5c, 0x2a, - 0x4a, 0xbf, 0x09, 0x70, 0xf9, 0x54, 0x54, 0xb7, 0xe9, 0xd8, 0xae, 0x49, 0x34, 0x98, 0xd5, 0x71, - 0x6d, 0x51, 0xc8, 0x9e, 0x5b, 0x9b, 0x2b, 0xa4, 0x64, 0x96, 0x17, 0xd9, 0x4f, 0x99, 0xbc, 0x6d, - 0x77, 0xd4, 0xec, 0x61, 0x2f, 0xb7, 0xcc, 0x39, 0x22, 0x19, 0x11, 0x77, 0xb4, 0x00, 0x87, 0xdc, - 0x1e, 0x90, 0x32, 0x45, 0xa5, 0xac, 0x4e, 0x94, 0xc2, 0x08, 0x4d, 0xd2, 0x72, 0x53, 0xba, 0x0b, - 0xc9, 0xa8, 0x14, 0x3f, 0x7f, 0x05, 0x98, 0xd1, 0x0d, 0xa3, 0x65, 0xba, 0x2e, 0x4d, 0xde, 0x05, - 0x75, 0xf1, 0xa8, 0x97, 0x4b, 0x61, 0xd0, 0x6d, 0xb6, 0x73, 0xd7, 0x6b, 0x59, 0x76, 0x5d, 0xf3, - 0x0d, 0xb7, 0x66, 0x9f, 0x1e, 0x64, 0x12, 0xff, 0x1d, 0x64, 0x12, 0xd2, 0xde, 0xe0, 0xa9, 0x04, - 0xe9, 0x29, 0xc3, 0x0c, 0xca, 0xc2, 0x23, 0x79, 0xd1, 0xec, 0xf8, 0x30, 0x52, 0x0a, 0x08, 0x8d, - 0x54, 0xd6, 0x5b, 0x7a, 0xc3, 0x3f, 0x7d, 0xa9, 0x8c, 0xa2, 0xfc, 0x55, 0x0c, 0xff, 0x0e, 0x9c, - 0x6f, 0xd2, 0x15, 0x8c, 0xbe, 0x24, 0xf3, 0x82, 0x30, 0x27, 0x75, 0xfa, 0xd9, 0x5f, 0x99, 0x84, - 0x86, 0x0e, 0x52, 0x1e, 0x44, 0x8a, 0xf8, 0x81, 0x63, 0xb4, 0x1f, 0x99, 0xa7, 0xaa, 0x8d, 0x97, - 0xd9, 0x4d, 0xe9, 0x6b, 0x01, 0x96, 0xb8, 0x3e, 0xc8, 0xe6, 0x7e, 0xcc, 0x5a, 0x59, 0x39, 0xec, - 0xe5, 0x24, 0x1e, 0xd1, 0x01, 0xdc, 0x48, 0xc5, 0xf0, 0xe9, 0xdc, 0x80, 0xcc, 0x30, 0x1b, 0xb5, - 0xf3, 0xa1, 0xde, 0xf0, 0x0b, 0x9f, 0x10, 0x98, 0xb6, 0xf5, 0x86, 0xc9, 0x4e, 0x5c, 0xa3, 0xdf, - 0xd2, 0x67, 0x90, 0x1d, 0xed, 0x86, 0x4a, 0x3e, 0x8a, 0x77, 0xac, 0x71, 0x85, 0x04, 0x87, 0xbb, - 0x01, 0x49, 0xd5, 0xdc, 0xdd, 0x2b, 0x16, 0xca, 0x2d, 0xb3, 0x66, 0x3d, 0x19, 0x9b, 0xed, 0x32, - 0xa4, 0x06, 0x6d, 0x91, 0xdb, 0x55, 0xb8, 0x58, 0xa5, 0xeb, 0x95, 0x26, 0xdd, 0x40, 0x71, 0xf3, - 0xd5, 0x88, 0x31, 0x1f, 0xf1, 0x63, 0x58, 0xc2, 0x42, 0x57, 0x3b, 0x9e, 0xe9, 0xde, 0x73, 0xb0, - 0xde, 0x31, 0x59, 0x57, 0xe1, 0x22, 0x16, 0x7e, 0xa5, 0xda, 0xdf, 0xa7, 0xc0, 0xf3, 0xda, 0xbc, - 0x1e, 0xf1, 0xe1, 0x03, 0x3f, 0x80, 0x65, 0x3e, 0x30, 0x52, 0x7e, 0x13, 0x16, 0x7c, 0x64, 0x97, - 0xee, 0x20, 0x67, 0x3f, 0x1e, 0x33, 0xe7, 0x63, 0x7f, 0x12, 0x90, 0x66, 0x56, 0xf7, 0x1c, 0x1a, - 0xc3, 0x27, 0xfd, 0x32, 0xd0, 0xf7, 0x03, 0xda, 0xa7, 0xa0, 0xc3, 0x4c, 0xbf, 0x60, 0x42, 0x3e, - 0x87, 0x74, 0xb4, 0x5d, 0x04, 0xc9, 0xd9, 0x79, 0x2f, 0xac, 0xcc, 0x29, 0xcb, 0xa0, 0x80, 0xe7, - 0xd4, 0xa9, 0x45, 0x41, 0x9b, 0xb2, 0x0c, 0x52, 0x00, 0xc0, 0x42, 0xa9, 0x58, 0x06, 0xed, 0x8b, - 0xd3, 0x6a, 0xf2, 0xcf, 0xe1, 0x16, 0xa7, 0x5d, 0x40, 0xb3, 0x1d, 0x63, 0xeb, 0xf2, 0x51, 0x2f, - 0xf7, 0xea, 0xa9, 0xf0, 0x72, 0x41, 0xda, 0xc7, 0xbb, 0xc1, 0x23, 0x80, 0xea, 0xb6, 0xe1, 0x92, - 0x1f, 0x2d, 0x6e, 0x63, 0x5c, 0xd0, 0x07, 0xe0, 0x46, 0x05, 0xaf, 0xc2, 0x6b, 0xd1, 0xe0, 0x3b, - 0x76, 0xcd, 0x79, 0x99, 0x2e, 0xcc, 0xed, 0xf2, 0x26, 0x2c, 0x0e, 0xc7, 0x40, 0x65, 0x25, 0x98, - 0xb6, 0xec, 0x9a, 0x83, 0x57, 0x37, 0xcb, 0xed, 0x89, 0xaa, 0xee, 0xfa, 0xf7, 0x53, 0xa3, 0xd6, - 0xdc, 0x30, 0x85, 0x2f, 0x16, 0xe0, 0x15, 0x1a, 0x87, 0x1c, 0x08, 0x30, 0xeb, 0x77, 0x3c, 0xb2, - 0xce, 0xc5, 0xe4, 0xcd, 0x6d, 0x71, 0x23, 0x8e, 0x29, 0x23, 0x2e, 0xbd, 0x7b, 0x38, 0x3c, 0x9b, - 0x9f, 0xfe, 0xfb, 0xc3, 0x86, 0xf0, 0xe5, 0xef, 0xff, 0x7c, 0x3b, 0x95, 0x21, 0x57, 0x14, 0xee, - 0xa3, 0xc3, 0x67, 0xf5, 0x9d, 0x00, 0x33, 0x88, 0x49, 0xd6, 0x26, 0x86, 0xf5, 0x09, 0xae, 0xc7, - 0xb0, 0x44, 0x7e, 0xa5, 0x90, 0xcc, 0x3a, 0x59, 0x1d, 0x4b, 0x46, 0xd9, 0xc7, 0xe3, 0xeb, 0x92, - 0x23, 0x01, 0xc8, 0x70, 0x1d, 0x92, 0xe2, 0xc4, 0xb8, 0xc3, 0xd7, 0x46, 0x2c, 0x9d, 0xcd, 0x09, - 0x79, 0xdf, 0x39, 0xe4, 0xd5, 0x69, 0x28, 0x26, 0x4f, 0x14, 0xbe, 0x98, 0xe0, 0xf6, 0x57, 0x2c, - 0x43, 0xd9, 0x0f, 0x2f, 0x67, 0x97, 0x7c, 0x25, 0xc0, 0x79, 0x36, 0x57, 0xc9, 0xea, 0x68, 0x4e, - 0x03, 0x43, 0x5c, 0x5c, 0x9b, 0x6c, 0x88, 0x84, 0xd7, 0x42, 0x6e, 0x57, 0xc8, 0x12, 0x97, 0x1b, - 0x1b, 0xe3, 0xe4, 0x27, 0x01, 0x16, 0x06, 0xc7, 0x31, 0x51, 0x46, 0x87, 0xe1, 0x0e, 0x7b, 0xf1, - 0x7a, 0x7c, 0x07, 0xe4, 0x77, 0x6b, 0x42, 0x42, 0x57, 0xc8, 0x1b, 0x5c, 0xd2, 0x0d, 0x0a, 0x57, - 0x09, 0x2a, 0xf6, 0x67, 0x01, 0x92, 0x9c, 0x39, 0x4c, 0x4a, 0x31, 0x19, 0x0d, 0x4c, 0x7b, 0xf1, - 0xc6, 0x19, 0xbd, 0x50, 0xcc, 0xdb, 0x21, 0xef, 0x1c, 0x79, 0x2b, 0x0e, 0x6f, 0x65, 0xbf, 0xff, - 0x92, 0xe8, 0x92, 0xef, 0x05, 0x98, 0x8f, 0xce, 0xe8, 0x11, 0xb7, 0x8e, 0x33, 0xf2, 0x47, 0xdc, - 0x3a, 0xde, 0xc0, 0x97, 0x36, 0x87, 0xbb, 0xc2, 0xe6, 0xd8, 0xd2, 0x60, 0x2f, 0x01, 0xf2, 0x8b, - 0x00, 0x29, 0xde, 0x58, 0x26, 0xfc, 0xf3, 0x1e, 0xf3, 0x34, 0x10, 0xf3, 0x67, 0xf0, 0x88, 0x94, - 0x08, 0x97, 0xf5, 0xa8, 0x1c, 0x33, 0xd6, 0x41, 0xdf, 0x60, 0x23, 0xb7, 0x4b, 0x7e, 0x0d, 0x55, - 0x0c, 0x4c, 0xe9, 0xf1, 0x2a, 0x78, 0x6f, 0x85, 0xf1, 0x2a, 0xb8, 0x4f, 0x00, 0xe9, 0xf6, 0x28, - 0x15, 0x32, 0xb9, 0x16, 0x4b, 0x05, 0x7b, 0x94, 0x74, 0xc9, 0x8f, 0x02, 0xcc, 0x45, 0x66, 0x15, - 0xb9, 0x36, 0xb1, 0x91, 0x45, 0xc6, 0xa6, 0x98, 0x8b, 0x69, 0x8d, 0xac, 0xdf, 0x1f, 0x66, 0x7d, - 0x73, 0x72, 0x91, 0x07, 0xed, 0xcd, 0xae, 0x39, 0x61, 0xfb, 0x56, 0x8b, 0xcf, 0x8e, 0xd3, 0xc2, - 0xf3, 0xe3, 0xb4, 0xf0, 0xf7, 0x71, 0x5a, 0xf8, 0xe6, 0x24, 0x9d, 0x78, 0x7e, 0x92, 0x4e, 0xfc, - 0x71, 0x92, 0x4e, 0x3c, 0xc0, 0xbf, 0xb8, 0xae, 0xf1, 0x50, 0xb6, 0x1c, 0xe5, 0x09, 0x43, 0xf3, - 0x3a, 0x4d, 0xd3, 0xad, 0x9e, 0xa7, 0xef, 0xe4, 0xe2, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf9, - 0xa5, 0x31, 0xbf, 0xd7, 0x0f, 0x00, 0x00, + // 1148 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0xa6, 0xa1, 0x49, 0x5f, 0xd2, 0x54, 0x8c, 0x5d, 0x11, 0xd6, 0xa9, 0x6d, 0x6d, 0x21, + 0x71, 0x42, 0xbd, 0x5b, 0x3b, 0x6e, 0x0a, 0x91, 0x38, 0x64, 0x41, 0xad, 0x22, 0x04, 0x72, 0xb7, + 0x15, 0x94, 0x5e, 0xac, 0xb5, 0xbd, 0x76, 0x56, 0xd4, 0xbb, 0xae, 0x77, 0x8d, 0x6a, 0x22, 0x0b, + 0x84, 0x84, 0xd4, 0x03, 0x07, 0x24, 0xb8, 0x71, 0xc9, 0x9f, 0xc0, 0xc1, 0x12, 0x07, 0xb8, 0xc1, + 0xa1, 0xe4, 0x54, 0x85, 0x0b, 0xe2, 0x80, 0x50, 0x82, 0x04, 0x7f, 0x06, 0xf2, 0xcc, 0xdb, 0x1f, + 0x8e, 0xc7, 0xf6, 0xa6, 0xbd, 0xed, 0xce, 0xbc, 0xf7, 0xbd, 0xef, 0x7b, 0xf3, 0xe6, 0xbd, 0x81, + 0x74, 0xd5, 0x76, 0x9a, 0xb6, 0xa3, 0xe8, 0x1d, 0x77, 0x4f, 0xf9, 0x34, 0x5f, 0x31, 0x5c, 0x3d, + 0xaf, 0x3c, 0xea, 0x18, 0xed, 0xae, 0xdc, 0x6a, 0xdb, 0xae, 0x4d, 0xe2, 0xcc, 0x40, 0x1e, 0x18, + 0xc8, 0x68, 0x20, 0x6e, 0xa0, 0x57, 0x45, 0x77, 0x0c, 0x66, 0xed, 0xfb, 0xb6, 0xf4, 0x86, 0x69, + 0xe9, 0xae, 0x69, 0x5b, 0x0c, 0x40, 0x4c, 0x34, 0xec, 0x86, 0x4d, 0x3f, 0x95, 0xc1, 0x17, 0xae, + 0xbe, 0xda, 0xb0, 0xed, 0xc6, 0x43, 0x43, 0xa1, 0x7f, 0x95, 0x4e, 0x5d, 0xd1, 0x2d, 0x8c, 0x28, + 0xae, 0xe0, 0x96, 0xde, 0x32, 0x15, 0xdd, 0xb2, 0x6c, 0x97, 0xa2, 0x39, 0xb8, 0x9b, 0xe2, 0x11, + 0xa6, 0xe4, 0x10, 0x98, 0xed, 0x97, 0x59, 0x44, 0x24, 0xcf, 0xb6, 0x92, 0xe8, 0xea, 0x11, 0x0e, + 0xeb, 0x94, 0x1c, 0x48, 0xdc, 0x19, 0xfc, 0xee, 0x54, 0xab, 0x76, 0xc7, 0x72, 0x1d, 0xcd, 0x78, + 0xd4, 0x31, 0x1c, 0x97, 0xdc, 0x02, 0x08, 0x24, 0x2d, 0x0b, 0x19, 0x21, 0xbb, 0x50, 0x58, 0x95, + 0x11, 0x77, 0xa0, 0x5f, 0x66, 0x28, 0x48, 0x45, 0x2e, 0xe9, 0x0d, 0x03, 0x7d, 0xb5, 0x90, 0xe7, + 0x76, 0xfc, 0xa8, 0x9f, 0xbb, 0xc4, 0xdc, 0x72, 0x4e, 0xed, 0x93, 0xcc, 0x75, 0xb9, 0xb8, 0x29, + 0xfd, 0x26, 0xc0, 0xe5, 0x53, 0x51, 0x9d, 0x96, 0x6d, 0x39, 0x06, 0xd1, 0x60, 0x5e, 0xc7, 0xb5, + 0x65, 0x21, 0x73, 0x2e, 0xbb, 0x50, 0x48, 0xc8, 0x2c, 0x2f, 0xb2, 0x97, 0x32, 0x79, 0xc7, 0xea, + 0xaa, 0x99, 0xc3, 0x7e, 0x6e, 0x85, 0x73, 0x44, 0x32, 0x22, 0xee, 0x6a, 0x3e, 0x0e, 0xb9, 0x3d, + 0x24, 0x65, 0x86, 0x4a, 0x59, 0x9b, 0x2a, 0x85, 0x11, 0x9a, 0xa6, 0xe5, 0xa6, 0x74, 0x17, 0xe2, + 0x61, 0x29, 0x5e, 0xfe, 0x0a, 0x30, 0xa7, 0xd7, 0x6a, 0x6d, 0xc3, 0x71, 0x68, 0xf2, 0x2e, 0xa8, + 0xcb, 0x47, 0xfd, 0x5c, 0x02, 0x83, 0xee, 0xb0, 0x9d, 0xbb, 0x6e, 0xdb, 0xb4, 0x1a, 0x9a, 0x67, + 0xb8, 0x3d, 0xff, 0xe4, 0x20, 0x1d, 0xfb, 0xef, 0x20, 0x1d, 0x93, 0xf6, 0x86, 0x4f, 0xc5, 0x4f, + 0x4f, 0x09, 0xe6, 0x50, 0x16, 0x1e, 0xc9, 0xf3, 0x66, 0xc7, 0x83, 0x91, 0x12, 0x40, 0x68, 0xa4, + 0x92, 0xde, 0xd6, 0x9b, 0xde, 0xe9, 0x4b, 0x25, 0x14, 0xe5, 0xad, 0x62, 0xf8, 0xb7, 0xe0, 0x7c, + 0x8b, 0xae, 0x60, 0xf4, 0xa4, 0xcc, 0x0b, 0xc2, 0x9c, 0xd4, 0xd9, 0xa7, 0x7f, 0xa5, 0x63, 0x1a, + 0x3a, 0x48, 0x79, 0x10, 0x29, 0xe2, 0xfb, 0x76, 0xad, 0xf3, 0xd0, 0x38, 0x55, 0x6d, 0xbc, 0xcc, + 0x6e, 0x49, 0x5f, 0x0b, 0x90, 0xe4, 0xfa, 0x20, 0x9b, 0xfb, 0x11, 0x6b, 0x65, 0xf5, 0xb0, 0x9f, + 0x93, 0x78, 0x44, 0x87, 0x70, 0x43, 0x15, 0xc3, 0xa7, 0x73, 0x03, 0xd2, 0xa3, 0x6c, 0xd4, 0xee, + 0x07, 0x7a, 0xd3, 0x2b, 0x7c, 0x42, 0x60, 0xd6, 0xd2, 0x9b, 0x06, 0x3b, 0x71, 0x8d, 0x7e, 0x4b, + 0x9f, 0x41, 0x66, 0xbc, 0x1b, 0x2a, 0xf9, 0x30, 0xda, 0xb1, 0x46, 0x15, 0xe2, 0x1f, 0xee, 0x06, + 0xc4, 0x55, 0xa3, 0xba, 0xb7, 0x59, 0x28, 0xb5, 0x8d, 0xba, 0xf9, 0x78, 0x62, 0xb6, 0x4b, 0x90, + 0x18, 0xb6, 0x45, 0x6e, 0x57, 0xe1, 0x62, 0x85, 0xae, 0x97, 0x5b, 0x74, 0x03, 0xc5, 0x2d, 0x56, + 0x42, 0xc6, 0x7c, 0xc4, 0x8f, 0x20, 0x89, 0x85, 0xae, 0x76, 0x5d, 0xc3, 0xb9, 0x67, 0x63, 0xbd, + 0x63, 0xb2, 0xae, 0xc2, 0x45, 0x2c, 0xfc, 0x72, 0x65, 0xb0, 0x4f, 0x81, 0x17, 0xb5, 0x45, 0x3d, + 0xe4, 0xc3, 0x07, 0x7e, 0x00, 0x2b, 0x7c, 0x60, 0xa4, 0xfc, 0x3a, 0x2c, 0x79, 0xc8, 0x0e, 0xdd, + 0x41, 0xce, 0x5e, 0x3c, 0x66, 0xce, 0xc7, 0xfe, 0xd8, 0x27, 0xcd, 0xac, 0xee, 0xd9, 0x34, 0x86, + 0x47, 0xfa, 0x45, 0xa0, 0xef, 0xfb, 0xb4, 0x4f, 0x41, 0x07, 0x99, 0x7e, 0xce, 0x84, 0x7c, 0x0e, + 0xa9, 0x70, 0xbb, 0xf0, 0x93, 0xb3, 0xfb, 0x6e, 0x50, 0x99, 0x33, 0x66, 0x8d, 0x02, 0x9e, 0x53, + 0x67, 0x96, 0x05, 0x6d, 0xc6, 0xac, 0x91, 0x02, 0x00, 0x16, 0x4a, 0xd9, 0xac, 0xd1, 0xbe, 0x38, + 0xab, 0xc6, 0xff, 0x1c, 0x6d, 0x71, 0xda, 0x05, 0x34, 0xdb, 0xad, 0x6d, 0x5f, 0x3e, 0xea, 0xe7, + 0x5e, 0x3e, 0x15, 0x5e, 0x2e, 0x48, 0xfb, 0x78, 0x37, 0x78, 0x04, 0x50, 0xdd, 0x0e, 0x5c, 0xf2, + 0xa2, 0x45, 0x6d, 0x8c, 0x4b, 0xfa, 0x10, 0xdc, 0xb8, 0xe0, 0x15, 0x78, 0x25, 0x1c, 0x7c, 0xd7, + 0xaa, 0xdb, 0x2f, 0xd2, 0x85, 0xb9, 0x5d, 0xde, 0x80, 0xe5, 0xd1, 0x18, 0xa8, 0xac, 0x08, 0xb3, + 0xa6, 0x55, 0xb7, 0xf1, 0xea, 0x66, 0xb8, 0x3d, 0x51, 0xd5, 0x1d, 0xef, 0x7e, 0x6a, 0xd4, 0x9a, + 0x1b, 0xa6, 0xf0, 0xc5, 0x12, 0xbc, 0x44, 0xe3, 0x90, 0x03, 0x01, 0xe6, 0xbd, 0x8e, 0x47, 0xd6, + 0xb9, 0x98, 0xbc, 0xb9, 0x2d, 0x6e, 0x44, 0x31, 0x65, 0xc4, 0xa5, 0xb7, 0x0f, 0x47, 0x67, 0xf3, + 0x93, 0x7f, 0x7f, 0xd8, 0x10, 0xbe, 0xfc, 0xfd, 0x9f, 0x6f, 0x67, 0xd2, 0xe4, 0x8a, 0xc2, 0x7d, + 0x74, 0x78, 0xac, 0xbe, 0x13, 0x60, 0x0e, 0x31, 0x49, 0x76, 0x6a, 0x58, 0x8f, 0xe0, 0x7a, 0x04, + 0x4b, 0xe4, 0x57, 0x0c, 0xc8, 0xac, 0x93, 0xb5, 0x89, 0x64, 0x94, 0x7d, 0x3c, 0xbe, 0x1e, 0x39, + 0x12, 0x80, 0x8c, 0xd6, 0x21, 0xd9, 0x9c, 0x1a, 0x77, 0xf4, 0xda, 0x88, 0xc5, 0xb3, 0x39, 0x21, + 0xef, 0x3b, 0x87, 0xbc, 0x3a, 0x0d, 0xc4, 0xe4, 0x89, 0xc2, 0x17, 0xe3, 0xdf, 0xfe, 0xb2, 0x59, + 0x53, 0xf6, 0x83, 0xcb, 0xd9, 0x23, 0x5f, 0x09, 0x70, 0x9e, 0xcd, 0x55, 0xb2, 0x36, 0x9e, 0xd3, + 0xd0, 0x10, 0x17, 0xb3, 0xd3, 0x0d, 0x91, 0x70, 0x36, 0xe0, 0x76, 0x85, 0x24, 0xb9, 0xdc, 0xd8, + 0x18, 0x27, 0x3f, 0x09, 0xb0, 0x34, 0x3c, 0x8e, 0x89, 0x32, 0x3e, 0x0c, 0x77, 0xd8, 0x8b, 0xd7, + 0xa3, 0x3b, 0x20, 0xbf, 0x5b, 0x53, 0x12, 0xba, 0x4a, 0x5e, 0xe3, 0x92, 0x6e, 0x52, 0xb8, 0xb2, + 0x5f, 0xb1, 0x3f, 0x0b, 0x10, 0xe7, 0xcc, 0x61, 0x52, 0x8c, 0xc8, 0x68, 0x68, 0xda, 0x8b, 0x37, + 0xce, 0xe8, 0x85, 0x62, 0xde, 0x0c, 0x78, 0xe7, 0xc8, 0x1b, 0x51, 0x78, 0x2b, 0xfb, 0x83, 0x97, + 0x44, 0x8f, 0x7c, 0x2f, 0xc0, 0x62, 0x78, 0x46, 0x8f, 0xb9, 0x75, 0x9c, 0x91, 0x3f, 0xe6, 0xd6, + 0xf1, 0x06, 0xbe, 0xb4, 0x35, 0xda, 0x15, 0xb6, 0x26, 0x96, 0x06, 0x7b, 0x09, 0x90, 0x5f, 0x04, + 0x48, 0xf0, 0xc6, 0x32, 0xe1, 0x9f, 0xf7, 0x84, 0xa7, 0x81, 0x98, 0x3f, 0x83, 0x47, 0xa8, 0x44, + 0xb8, 0xac, 0xc7, 0xe5, 0x98, 0xb1, 0xf6, 0xfb, 0x06, 0x1b, 0xb9, 0x3d, 0xf2, 0x6b, 0xa0, 0x62, + 0x68, 0x4a, 0x4f, 0x56, 0xc1, 0x7b, 0x2b, 0x4c, 0x56, 0xc1, 0x7d, 0x02, 0x48, 0xb7, 0xc7, 0xa9, + 0x90, 0xc9, 0xb5, 0x48, 0x2a, 0xd8, 0xa3, 0xa4, 0x47, 0x7e, 0x14, 0x60, 0x21, 0x34, 0xab, 0xc8, + 0xb5, 0xa9, 0x8d, 0x2c, 0x34, 0x36, 0xc5, 0x5c, 0x44, 0x6b, 0x64, 0xfd, 0xde, 0x28, 0xeb, 0x9b, + 0xd3, 0x8b, 0xdc, 0x6f, 0x6f, 0x56, 0xdd, 0x0e, 0xda, 0xb7, 0xfa, 0xce, 0xd3, 0xe3, 0x94, 0xf0, + 0xec, 0x38, 0x25, 0xfc, 0x7d, 0x9c, 0x12, 0xbe, 0x39, 0x49, 0xc5, 0x9e, 0x9d, 0xa4, 0x62, 0x7f, + 0x9c, 0xa4, 0x62, 0x0f, 0xd6, 0x1b, 0xa6, 0xbb, 0xd7, 0xa9, 0xc8, 0x55, 0xbb, 0xe9, 0x01, 0x06, + 0x41, 0x95, 0xc7, 0x0c, 0xdd, 0xed, 0xb6, 0x0c, 0xa7, 0x72, 0x9e, 0xbe, 0x9b, 0x37, 0xff, 0x0f, + 0x00, 0x00, 0xff, 0xff, 0xa8, 0x40, 0x30, 0xd4, 0xe7, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/auth/types/tx.pb.go b/x/auth/types/tx.pb.go index 353ef8999a3..ac7597d0474 100644 --- a/x/auth/types/tx.pb.go +++ b/x/auth/types/tx.pb.go @@ -290,41 +290,42 @@ func init() { func init() { proto.RegisterFile("cosmos/auth/v1beta1/tx.proto", fileDescriptor_c2d62bd9c4c212e5) } var fileDescriptor_c2d62bd9c4c212e5 = []byte{ - // 542 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x41, 0x8f, 0xd2, 0x40, - 0x14, 0x66, 0xdc, 0x5d, 0x0c, 0x83, 0x66, 0xb5, 0x90, 0x2c, 0xb2, 0xa6, 0x62, 0xa3, 0x09, 0x21, - 0x32, 0x5d, 0x58, 0xa3, 0x09, 0x07, 0x13, 0x48, 0x36, 0x9e, 0x30, 0xa6, 0x66, 0x2f, 0x1e, 0x34, - 0x05, 0xc6, 0xb1, 0xd9, 0x6d, 0xa7, 0xe9, 0x1b, 0x56, 0xb8, 0x19, 0x8f, 0x9e, 0x3c, 0xfa, 0x13, - 0x3c, 0x72, 0xe0, 0x47, 0x6c, 0xf6, 0xb4, 0xe1, 0xe4, 0xc9, 0x18, 0x38, 0x70, 0xf1, 0x47, 0x98, - 0xce, 0x4c, 0x25, 0x60, 0x8d, 0x7b, 0x69, 0x3b, 0xf3, 0x7d, 0xef, 0xbd, 0xef, 0xbd, 0xef, 0x15, - 0xdf, 0xed, 0x73, 0xf0, 0x39, 0xd8, 0xee, 0x50, 0xbc, 0xb7, 0xcf, 0x1a, 0x3d, 0x2a, 0xdc, 0x86, - 0x2d, 0x46, 0x24, 0x8c, 0xb8, 0xe0, 0x46, 0x41, 0xa1, 0x24, 0x46, 0x89, 0x46, 0xcb, 0x45, 0xc6, - 0x19, 0x97, 0xb8, 0x1d, 0x7f, 0x29, 0x6a, 0xf9, 0x0e, 0xe3, 0x9c, 0x9d, 0x52, 0x5b, 0x9e, 0x7a, - 0xc3, 0x77, 0xb6, 0x1b, 0x8c, 0x13, 0x48, 0x65, 0x79, 0xab, 0x62, 0x74, 0x4a, 0x05, 0xed, 0xe9, - 0xf2, 0x3e, 0x30, 0xfb, 0xac, 0x11, 0xbf, 0x34, 0x70, 0xdb, 0xf5, 0xbd, 0x80, 0xdb, 0xf2, 0xa9, - 0xaf, 0xcc, 0x34, 0xa9, 0x52, 0x99, 0xc4, 0xad, 0x19, 0xc2, 0xbb, 0x5d, 0x60, 0xc7, 0xe1, 0xc0, - 0x15, 0xf4, 0xa5, 0x1b, 0xb9, 0x3e, 0x18, 0x4f, 0x70, 0x2e, 0x66, 0xf0, 0xc8, 0x13, 0xe3, 0x12, - 0xaa, 0xa0, 0x6a, 0xae, 0x53, 0x9a, 0x4d, 0xeb, 0x45, 0x2d, 0xa2, 0x3d, 0x18, 0x44, 0x14, 0xe0, - 0x95, 0x88, 0xbc, 0x80, 0x39, 0x2b, 0xaa, 0xf1, 0x0c, 0x67, 0x43, 0x99, 0xa1, 0x74, 0xad, 0x82, - 0xaa, 0xf9, 0xe6, 0x3e, 0x49, 0x99, 0x04, 0x51, 0x45, 0x3a, 0xb9, 0xf3, 0x1f, 0xf7, 0x32, 0xdf, - 0x96, 0x93, 0x1a, 0x72, 0x74, 0x54, 0xeb, 0xf9, 0x6c, 0x5a, 0xdf, 0x55, 0x21, 0x75, 0x18, 0x9c, - 0x54, 0x0e, 0xc8, 0xe3, 0xa7, 0x9f, 0x96, 0x93, 0xda, 0xaa, 0xc4, 0xe7, 0xe5, 0xa4, 0x76, 0x7f, - 0xc5, 0xb0, 0x47, 0xaa, 0xaf, 0x8d, 0x06, 0x2c, 0x82, 0xf7, 0x36, 0xae, 0x1c, 0x0a, 0x21, 0x0f, - 0x80, 0xb6, 0x0a, 0x29, 0x35, 0xac, 0xaf, 0x08, 0xdf, 0xea, 0x02, 0x7b, 0xc1, 0x83, 0xb6, 0xe0, - 0xbe, 0xd7, 0x3f, 0x1a, 0xd1, 0xbe, 0x71, 0x80, 0xb3, 0xe0, 0xb1, 0x80, 0x46, 0xff, 0x1d, 0x81, - 0xe6, 0x19, 0x47, 0x78, 0xdb, 0x07, 0x16, 0x77, 0xbf, 0x55, 0xcd, 0x37, 0x8b, 0x44, 0x99, 0x4b, - 0x12, 0x73, 0x49, 0x3b, 0x18, 0x77, 0xf6, 0x2f, 0xa6, 0x75, 0xed, 0x1f, 0xe9, 0xb9, 0x40, 0xff, - 0x8c, 0xa5, 0x0b, 0xcc, 0x91, 0xe1, 0xad, 0x7c, 0xdc, 0xb3, 0xce, 0x69, 0x1d, 0xe3, 0xc2, 0x9a, - 0x2c, 0x87, 0xc2, 0xf0, 0x54, 0x18, 0x45, 0xbc, 0x43, 0xa3, 0x88, 0x6b, 0x6d, 0x8e, 0x3a, 0x18, - 0x55, 0xbc, 0x1d, 0x51, 0x08, 0xf5, 0xf8, 0x53, 0x05, 0x38, 0x92, 0x61, 0xbd, 0xc1, 0xa5, 0xcd, - 0x86, 0x93, 0x11, 0x19, 0x1d, 0x7c, 0x3d, 0x92, 0x55, 0xa0, 0x84, 0x64, 0x27, 0xd5, 0x54, 0x1f, - 0x53, 0x64, 0x39, 0x49, 0x60, 0xf3, 0x17, 0xc2, 0x5b, 0x5d, 0x60, 0xc6, 0x07, 0x7c, 0x63, 0x6d, - 0xb5, 0x1e, 0xa4, 0xa6, 0xda, 0x30, 0xab, 0xfc, 0xe8, 0x2a, 0xac, 0x44, 0xaf, 0x55, 0xb8, 0xf8, - 0xdb, 0x52, 0x83, 0xe2, 0x9b, 0xeb, 0x76, 0x3e, 0xfc, 0x57, 0xce, 0x35, 0x5a, 0xb9, 0x7e, 0x25, - 0x5a, 0x52, 0xbb, 0xbc, 0xf3, 0x31, 0xde, 0xe0, 0xce, 0xe1, 0xf9, 0xdc, 0x44, 0x97, 0x73, 0x13, - 0xfd, 0x9c, 0x9b, 0xe8, 0xcb, 0xc2, 0xcc, 0x5c, 0x2e, 0xcc, 0xcc, 0xf7, 0x85, 0x99, 0x79, 0xad, - 0x7f, 0x63, 0x18, 0x9c, 0x10, 0x8f, 0x27, 0xfb, 0x2a, 0xc6, 0x21, 0x85, 0x5e, 0x56, 0xfa, 0x72, - 0xf8, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x89, 0xaa, 0x66, 0x4e, 0x04, 0x00, 0x00, + // 548 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xcf, 0x8f, 0xd2, 0x40, + 0x14, 0x66, 0xdc, 0x1f, 0x86, 0x41, 0xb3, 0x5a, 0x48, 0x16, 0x59, 0x53, 0xb1, 0xd1, 0x04, 0x89, + 0x4c, 0x17, 0x34, 0x9a, 0x70, 0x30, 0x01, 0xb3, 0xf1, 0x84, 0x31, 0x35, 0x7b, 0xf1, 0xa0, 0x29, + 0x30, 0xce, 0x36, 0x6e, 0x3b, 0x4d, 0xdf, 0xb0, 0xc2, 0xcd, 0x78, 0xf4, 0xe4, 0xd1, 0x3f, 0xc1, + 0x23, 0x07, 0xfe, 0x88, 0xcd, 0x9e, 0x36, 0x9c, 0x3c, 0x19, 0x03, 0x07, 0x2e, 0xfe, 0x11, 0xa6, + 0x33, 0x53, 0x09, 0x6c, 0x8d, 0x7b, 0x69, 0x3b, 0xf3, 0x7d, 0xef, 0xbd, 0xef, 0xbd, 0xef, 0x15, + 0xdf, 0xee, 0x71, 0xf0, 0x39, 0xd8, 0xee, 0x40, 0x1c, 0xd9, 0x27, 0xf5, 0x2e, 0x15, 0x6e, 0xdd, + 0x16, 0x43, 0x12, 0x46, 0x5c, 0x70, 0x23, 0xaf, 0x50, 0x12, 0xa3, 0x44, 0xa3, 0xa5, 0x02, 0xe3, + 0x8c, 0x4b, 0xdc, 0x8e, 0xbf, 0x14, 0xb5, 0x74, 0x8b, 0x71, 0xce, 0x8e, 0xa9, 0x2d, 0x4f, 0xdd, + 0xc1, 0x7b, 0xdb, 0x0d, 0x46, 0x09, 0xa4, 0xb2, 0xbc, 0x53, 0x31, 0x3a, 0xa5, 0x82, 0x76, 0x75, + 0x79, 0x1f, 0x98, 0x7d, 0x52, 0x8f, 0x5f, 0x1a, 0xb8, 0xe9, 0xfa, 0x5e, 0xc0, 0x6d, 0xf9, 0xd4, + 0x57, 0x66, 0x9a, 0x54, 0xa9, 0x4c, 0xe2, 0xd6, 0x14, 0xe1, 0x9d, 0x0e, 0xb0, 0xc3, 0xb0, 0xef, + 0x0a, 0xfa, 0xca, 0x8d, 0x5c, 0x1f, 0x8c, 0x27, 0x38, 0x1b, 0x33, 0x78, 0xe4, 0x89, 0x51, 0x11, + 0x95, 0x51, 0x25, 0xdb, 0x2e, 0x4e, 0x27, 0xb5, 0x82, 0x16, 0xd1, 0xea, 0xf7, 0x23, 0x0a, 0xf0, + 0x5a, 0x44, 0x5e, 0xc0, 0x9c, 0x25, 0xd5, 0x78, 0x86, 0xb7, 0x43, 0x99, 0xa1, 0x78, 0xa5, 0x8c, + 0x2a, 0xb9, 0xc6, 0x1e, 0x49, 0x99, 0x04, 0x51, 0x45, 0xda, 0xd9, 0xd3, 0x9f, 0x77, 0x32, 0xdf, + 0x17, 0xe3, 0x2a, 0x72, 0x74, 0x54, 0xf3, 0xc5, 0x74, 0x52, 0xdb, 0x51, 0x21, 0x35, 0xe8, 0x7f, + 0x28, 0xef, 0x93, 0xc7, 0x4f, 0x3f, 0x2f, 0xc6, 0xd5, 0x65, 0x89, 0x2f, 0x8b, 0x71, 0xf5, 0xee, + 0x92, 0x61, 0x0f, 0x55, 0x5f, 0x6b, 0x0d, 0x58, 0x04, 0xef, 0xae, 0x5d, 0x39, 0x14, 0x42, 0x1e, + 0x00, 0x6d, 0xe6, 0x53, 0x6a, 0x58, 0xdf, 0x10, 0xbe, 0xd1, 0x01, 0xf6, 0x92, 0x07, 0x2d, 0xc1, + 0x7d, 0xaf, 0x77, 0x30, 0xa4, 0x3d, 0x63, 0x1f, 0x6f, 0x83, 0xc7, 0x02, 0x1a, 0xfd, 0x77, 0x04, + 0x9a, 0x67, 0x1c, 0xe0, 0x4d, 0x1f, 0x58, 0xdc, 0xfd, 0x46, 0x25, 0xd7, 0x28, 0x10, 0x65, 0x2e, + 0x49, 0xcc, 0x25, 0xad, 0x60, 0xd4, 0xde, 0x3b, 0x9b, 0xd4, 0xb4, 0x7f, 0xa4, 0xeb, 0x02, 0xfd, + 0x3b, 0x96, 0x0e, 0x30, 0x47, 0x86, 0x37, 0x73, 0x71, 0xcf, 0x3a, 0xa7, 0x75, 0x88, 0xf3, 0x2b, + 0xb2, 0x1c, 0x0a, 0x83, 0x63, 0x61, 0x14, 0xf0, 0x16, 0x8d, 0x22, 0xae, 0xb5, 0x39, 0xea, 0x60, + 0x54, 0xf0, 0x66, 0x44, 0x21, 0xd4, 0xe3, 0x4f, 0x15, 0xe0, 0x48, 0x86, 0xf5, 0x16, 0x17, 0xd7, + 0x1b, 0x4e, 0x46, 0x64, 0xb4, 0xf1, 0xd5, 0x48, 0x56, 0x81, 0x22, 0x92, 0x9d, 0x54, 0x52, 0x7d, + 0x4c, 0x91, 0xe5, 0x24, 0x81, 0x8d, 0xdf, 0x08, 0x6f, 0x74, 0x80, 0x19, 0x1f, 0xf1, 0xb5, 0x95, + 0xd5, 0xba, 0x97, 0x9a, 0x6a, 0xcd, 0xac, 0xd2, 0xc3, 0xcb, 0xb0, 0x12, 0xbd, 0x56, 0xfe, 0xec, + 0xa2, 0xa5, 0x06, 0xc5, 0xd7, 0x57, 0xed, 0xbc, 0xff, 0xaf, 0x9c, 0x2b, 0xb4, 0x52, 0xed, 0x52, + 0xb4, 0xa4, 0x76, 0x69, 0xeb, 0x53, 0xbc, 0xc1, 0xed, 0xe7, 0xa7, 0x33, 0x13, 0x9d, 0xcf, 0x4c, + 0xf4, 0x6b, 0x66, 0xa2, 0xaf, 0x73, 0x33, 0x73, 0x3e, 0x37, 0x33, 0x3f, 0xe6, 0x66, 0xe6, 0xcd, + 0x03, 0xe6, 0x89, 0xa3, 0x41, 0x97, 0xf4, 0xb8, 0xaf, 0x7f, 0x62, 0xfb, 0xe2, 0xfe, 0x8a, 0x51, + 0x48, 0xa1, 0xbb, 0x2d, 0x7d, 0x7a, 0xf4, 0x27, 0x00, 0x00, 0xff, 0xff, 0x4a, 0xdf, 0x75, 0x60, + 0x5e, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/auth/vesting/depinject.go b/x/auth/vesting/depinject.go index c2f346f0320..07812df8814 100644 --- a/x/auth/vesting/depinject.go +++ b/x/auth/vesting/depinject.go @@ -5,8 +5,9 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" - "cosmossdk.io/x/auth/keeper" - "cosmossdk.io/x/auth/vesting/types" + + "github.com/cosmos/cosmos-sdk/x/auth/keeper" + "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) var _ depinject.OnePerModuleType = AppModule{} diff --git a/x/auth/vesting/module.go b/x/auth/vesting/module.go index fc85b46f965..5c79520e185 100644 --- a/x/auth/vesting/module.go +++ b/x/auth/vesting/module.go @@ -4,8 +4,9 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/core/legacy" "cosmossdk.io/core/registry" - "cosmossdk.io/x/auth/keeper" - "cosmossdk.io/x/auth/vesting/types" + + "github.com/cosmos/cosmos-sdk/x/auth/keeper" + "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) var _ appmodule.AppModule = AppModule{} diff --git a/x/auth/vesting/proto/cosmos/vesting/module/v1/module.proto b/x/auth/vesting/proto/cosmos/vesting/module/v1/module.proto index c3f406d7a7a..9de4ee8077b 100644 --- a/x/auth/vesting/proto/cosmos/vesting/module/v1/module.proto +++ b/x/auth/vesting/proto/cosmos/vesting/module/v1/module.proto @@ -7,6 +7,6 @@ import "cosmos/app/v1alpha1/module.proto"; // Module is the config object of the vesting module. message Module { option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/x/auth/vesting" + go_import: "github.com/cosmos/cosmos-sdk/x/auth/vesting" }; -} \ No newline at end of file +} diff --git a/x/auth/vesting/proto/cosmos/vesting/v1beta1/vesting.proto b/x/auth/vesting/proto/cosmos/vesting/v1beta1/vesting.proto index 41249b20461..64b75641c49 100644 --- a/x/auth/vesting/proto/cosmos/vesting/v1beta1/vesting.proto +++ b/x/auth/vesting/proto/cosmos/vesting/v1beta1/vesting.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/auth/v1beta1/auth.proto"; -option go_package = "cosmossdk.io/x/auth/vesting/types"; +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; // BaseVestingAccount implements the VestingAccount interface. It contains all // the necessary fields needed for any vesting account implementation. diff --git a/x/auth/vesting/types/codec.go b/x/auth/vesting/types/codec.go index b76805e32aa..e263124bfd0 100644 --- a/x/auth/vesting/types/codec.go +++ b/x/auth/vesting/types/codec.go @@ -3,10 +3,10 @@ package types import ( corelegacy "cosmossdk.io/core/legacy" "cosmossdk.io/core/registry" - authtypes "cosmossdk.io/x/auth/types" - "cosmossdk.io/x/auth/vesting/exported" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/auth/vesting/exported" ) // RegisterLegacyAminoCodec registers the vesting interfaces and concrete types on the diff --git a/x/auth/vesting/types/expected_keepers.go b/x/auth/vesting/types/expected_keepers.go index 59118b466a6..3d8815385d1 100644 --- a/x/auth/vesting/types/expected_keepers.go +++ b/x/auth/vesting/types/expected_keepers.go @@ -3,9 +3,8 @@ package types import ( "context" - "cosmossdk.io/x/auth/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // BankKeeper defines the expected interface contract the vesting module requires diff --git a/x/auth/vesting/types/genesis_test.go b/x/auth/vesting/types/genesis_test.go index 94e9d492fe5..31971396dd8 100644 --- a/x/auth/vesting/types/genesis_test.go +++ b/x/auth/vesting/types/genesis_test.go @@ -5,10 +5,9 @@ import ( "github.com/stretchr/testify/require" - authtypes "cosmossdk.io/x/auth/types" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/x/auth/vesting/types/vesting.pb.go b/x/auth/vesting/types/vesting.pb.go index 8914d2985dc..c5c2a54a829 100644 --- a/x/auth/vesting/types/vesting.pb.go +++ b/x/auth/vesting/types/vesting.pb.go @@ -4,7 +4,7 @@ package types import ( - types "cosmossdk.io/x/auth/types" + types "github.com/cosmos/cosmos-sdk/x/auth/types" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" diff --git a/x/auth/vesting/types/vesting_account.go b/x/auth/vesting/types/vesting_account.go index e2b8fd40dd9..868dc49588e 100644 --- a/x/auth/vesting/types/vesting_account.go +++ b/x/auth/vesting/types/vesting_account.go @@ -6,10 +6,10 @@ import ( "time" "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" - vestexported "cosmossdk.io/x/auth/vesting/exported" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + vestexported "github.com/cosmos/cosmos-sdk/x/auth/vesting/exported" ) // Compile-time type assertions diff --git a/x/auth/vesting/types/vesting_account_test.go b/x/auth/vesting/types/vesting_account_test.go index 502ce29c4ce..54330978d12 100644 --- a/x/auth/vesting/types/vesting_account_test.go +++ b/x/auth/vesting/types/vesting_account_test.go @@ -11,12 +11,6 @@ import ( "cosmossdk.io/core/header" coretesting "cosmossdk.io/core/testing" storetypes "cosmossdk.io/store/types" - authcodec "cosmossdk.io/x/auth/codec" - "cosmossdk.io/x/auth/keeper" - authtypes "cosmossdk.io/x/auth/types" - "cosmossdk.io/x/auth/vesting" - vestingtestutil "cosmossdk.io/x/auth/vesting/testutil" - "cosmossdk.io/x/auth/vesting/types" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" @@ -25,6 +19,12 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" + "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/auth/vesting" + vestingtestutil "github.com/cosmos/cosmos-sdk/x/auth/vesting/testutil" + "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) var ( diff --git a/x/authz/client/cli/tx.go b/x/authz/client/cli/tx.go index 515efb5aa95..370069052f4 100644 --- a/x/authz/client/cli/tx.go +++ b/x/authz/client/cli/tx.go @@ -8,7 +8,6 @@ import ( "github.com/spf13/cobra" - authclient "cosmossdk.io/x/auth/client" "cosmossdk.io/x/authz" bank "cosmossdk.io/x/bank/types" staking "cosmossdk.io/x/staking/types" @@ -18,6 +17,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" ) // Flag names and values diff --git a/x/authz/go.mod b/x/authz/go.mod index 90b6d3c23fa..0991fcbabbd 100644 --- a/x/authz/go.mod +++ b/x/authz/go.mod @@ -30,11 +30,16 @@ require ( require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect +<<<<<<< HEAD buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/collections v0.4.1-0.20240802064046-23fac2f1b8ab // indirect; main cosmossdk.io/core/testing v0.0.0-20240826100755-28c792bcd06c // main cosmossdk.io/schema v0.2.0 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 +======= + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/core/testing v0.0.0-00010101000000-000000000000 +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -174,6 +179,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -181,6 +187,13 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/collections => ../../collections + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/staking => ../staking diff --git a/x/authz/keeper/msg_server_test.go b/x/authz/keeper/msg_server_test.go index ccce5a6f097..2958e45a991 100644 --- a/x/authz/keeper/msg_server_test.go +++ b/x/authz/keeper/msg_server_test.go @@ -7,13 +7,13 @@ import ( "cosmossdk.io/core/header" sdkmath "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/authz" banktypes "cosmossdk.io/x/bank/types" "github.com/cosmos/cosmos-sdk/codec/address" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func (suite *TestSuite) createAccounts() []sdk.AccAddress { diff --git a/x/authz/module/abci_test.go b/x/authz/module/abci_test.go index 00fda78e2a5..58811ba6294 100644 --- a/x/authz/module/abci_test.go +++ b/x/authz/module/abci_test.go @@ -11,7 +11,6 @@ import ( coretesting "cosmossdk.io/core/testing" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/authz" "cosmossdk.io/x/authz/keeper" authzmodule "cosmossdk.io/x/authz/module" @@ -26,6 +25,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestExpiredGrantsQueue(t *testing.T) { diff --git a/x/authz/msgs_test.go b/x/authz/msgs_test.go index 8675683b552..0ec52a5ed17 100644 --- a/x/authz/msgs_test.go +++ b/x/authz/msgs_test.go @@ -12,7 +12,6 @@ import ( txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" sdkmath "cosmossdk.io/math" - "cosmossdk.io/x/auth/migrations/legacytx" "cosmossdk.io/x/authz" banktypes "cosmossdk.io/x/bank/types" stakingtypes "cosmossdk.io/x/staking/types" @@ -23,6 +22,7 @@ import ( codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) func TestMsgGrantGetAuthorization(t *testing.T) { diff --git a/x/bank/depinject.go b/x/bank/depinject.go index ecc05abf473..b17a0cbf755 100644 --- a/x/bank/depinject.go +++ b/x/bank/depinject.go @@ -10,11 +10,11 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/bank/types" "github.com/cosmos/cosmos-sdk/codec" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ depinject.OnePerModuleType = AppModule{} diff --git a/x/bank/go.mod b/x/bank/go.mod index 2398b355299..73871500521 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -31,8 +31,11 @@ require ( require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect +<<<<<<< HEAD cosmossdk.io/schema v0.2.0 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 +======= +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.4-0.20240815194237-858ec2fcb897 // indirect; main @@ -173,6 +176,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -180,6 +184,13 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/collections => ../../collections + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/staking => ../staking ) diff --git a/x/bank/keeper/collections_test.go b/x/bank/keeper/collections_test.go index b97cf02b95d..3e6d470b380 100644 --- a/x/bank/keeper/collections_test.go +++ b/x/bank/keeper/collections_test.go @@ -12,7 +12,6 @@ import ( coretesting "cosmossdk.io/core/testing" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" banktypes "cosmossdk.io/x/bank/types" @@ -23,6 +22,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestBankStateCompatibility(t *testing.T) { diff --git a/x/bank/keeper/grpc_query_test.go b/x/bank/keeper/grpc_query_test.go index 5cbcf592843..c563e4b60f6 100644 --- a/x/bank/keeper/grpc_query_test.go +++ b/x/bank/keeper/grpc_query_test.go @@ -7,14 +7,14 @@ import ( v1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" "cosmossdk.io/core/header" - authtypes "cosmossdk.io/x/auth/types" - vestingtypes "cosmossdk.io/x/auth/vesting/types" "cosmossdk.io/x/bank/testutil" "cosmossdk.io/x/bank/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) func (suite *KeeperTestSuite) TestQueryBalance() { diff --git a/x/bank/keeper/keeper.go b/x/bank/keeper/keeper.go index fee164f6d96..ba7ee06976e 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -8,13 +8,13 @@ import ( "cosmossdk.io/core/event" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ Keeper = (*BaseKeeper)(nil) diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index 4f4f682a786..a5680bfb43b 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -19,8 +19,6 @@ import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" - vesting "cosmossdk.io/x/auth/vesting/types" "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" banktypes "cosmossdk.io/x/bank/types" @@ -34,6 +32,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/types/query" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + vesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) const ( diff --git a/x/bank/keeper/msg_server_test.go b/x/bank/keeper/msg_server_test.go index ea27bbcbf1f..ecc09f79ba7 100644 --- a/x/bank/keeper/msg_server_test.go +++ b/x/bank/keeper/msg_server_test.go @@ -1,10 +1,10 @@ package keeper_test import ( - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var govAcc = authtypes.NewEmptyModuleAccount(banktypes.GovModuleName, authtypes.Minter) diff --git a/x/bank/testutil/expected_keepers_mocks.go b/x/bank/testutil/expected_keepers_mocks.go index 058c4e2d7e3..aeddace241f 100644 --- a/x/bank/testutil/expected_keepers_mocks.go +++ b/x/bank/testutil/expected_keepers_mocks.go @@ -9,8 +9,8 @@ import ( reflect "reflect" address "cosmossdk.io/core/address" - types "cosmossdk.io/x/auth/types" - types0 "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + types0 "github.com/cosmos/cosmos-sdk/x/auth/types" gomock "github.com/golang/mock/gomock" ) @@ -52,10 +52,10 @@ func (mr *MockAccountKeeperMockRecorder) AddressCodec() *gomock.Call { } // GetAccount mocks base method. -func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types0.AccAddress) types0.AccountI { +func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAccount", ctx, addr) - ret0, _ := ret[0].(types0.AccountI) + ret0, _ := ret[0].(types.AccountI) return ret0 } @@ -66,10 +66,10 @@ func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomo } // GetModuleAccount mocks base method. -func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName string) types0.ModuleAccountI { +func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName string) types.ModuleAccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAccount", ctx, moduleName) - ret0, _ := ret[0].(types0.ModuleAccountI) + ret0, _ := ret[0].(types.ModuleAccountI) return ret0 } @@ -80,10 +80,10 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interf } // GetModuleAccountAndPermissions mocks base method. -func (m *MockAccountKeeper) GetModuleAccountAndPermissions(ctx context.Context, moduleName string) (types0.ModuleAccountI, []string) { +func (m *MockAccountKeeper) GetModuleAccountAndPermissions(ctx context.Context, moduleName string) (types.ModuleAccountI, []string) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAccountAndPermissions", ctx, moduleName) - ret0, _ := ret[0].(types0.ModuleAccountI) + ret0, _ := ret[0].(types.ModuleAccountI) ret1, _ := ret[1].([]string) return ret0, ret1 } @@ -95,10 +95,10 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAccountAndPermissions(ctx, mod } // GetModuleAddress mocks base method. -func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types0.AccAddress { +func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types.AccAddress { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAddress", moduleName) - ret0, _ := ret[0].(types0.AccAddress) + ret0, _ := ret[0].(types.AccAddress) return ret0 } @@ -109,10 +109,10 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName interface{} } // GetModuleAddressAndPermissions mocks base method. -func (m *MockAccountKeeper) GetModuleAddressAndPermissions(moduleName string) (types0.AccAddress, []string) { +func (m *MockAccountKeeper) GetModuleAddressAndPermissions(moduleName string) (types.AccAddress, []string) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAddressAndPermissions", moduleName) - ret0, _ := ret[0].(types0.AccAddress) + ret0, _ := ret[0].(types.AccAddress) ret1, _ := ret[1].([]string) return ret0, ret1 } @@ -124,10 +124,10 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAddressAndPermissions(moduleNa } // GetModulePermissions mocks base method. -func (m *MockAccountKeeper) GetModulePermissions() map[string]types.PermissionsForAddress { +func (m *MockAccountKeeper) GetModulePermissions() map[string]types0.PermissionsForAddress { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModulePermissions") - ret0, _ := ret[0].(map[string]types.PermissionsForAddress) + ret0, _ := ret[0].(map[string]types0.PermissionsForAddress) return ret0 } @@ -138,7 +138,7 @@ func (mr *MockAccountKeeperMockRecorder) GetModulePermissions() *gomock.Call { } // HasAccount mocks base method. -func (m *MockAccountKeeper) HasAccount(ctx context.Context, addr types0.AccAddress) bool { +func (m *MockAccountKeeper) HasAccount(ctx context.Context, addr types.AccAddress) bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "HasAccount", ctx, addr) ret0, _ := ret[0].(bool) @@ -152,10 +152,10 @@ func (mr *MockAccountKeeperMockRecorder) HasAccount(ctx, addr interface{}) *gomo } // NewAccount mocks base method. -func (m *MockAccountKeeper) NewAccount(arg0 context.Context, arg1 types0.AccountI) types0.AccountI { +func (m *MockAccountKeeper) NewAccount(arg0 context.Context, arg1 types.AccountI) types.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "NewAccount", arg0, arg1) - ret0, _ := ret[0].(types0.AccountI) + ret0, _ := ret[0].(types.AccountI) return ret0 } @@ -166,10 +166,10 @@ func (mr *MockAccountKeeperMockRecorder) NewAccount(arg0, arg1 interface{}) *gom } // NewAccountWithAddress mocks base method. -func (m *MockAccountKeeper) NewAccountWithAddress(ctx context.Context, addr types0.AccAddress) types0.AccountI { +func (m *MockAccountKeeper) NewAccountWithAddress(ctx context.Context, addr types.AccAddress) types.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "NewAccountWithAddress", ctx, addr) - ret0, _ := ret[0].(types0.AccountI) + ret0, _ := ret[0].(types.AccountI) return ret0 } @@ -180,7 +180,7 @@ func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr interfa } // SetAccount mocks base method. -func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types0.AccountI) { +func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types.AccountI) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetAccount", ctx, acc) } @@ -192,7 +192,7 @@ func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomoc } // SetModuleAccount mocks base method. -func (m *MockAccountKeeper) SetModuleAccount(ctx context.Context, macc types0.ModuleAccountI) { +func (m *MockAccountKeeper) SetModuleAccount(ctx context.Context, macc types.ModuleAccountI) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetModuleAccount", ctx, macc) } @@ -204,7 +204,7 @@ func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(ctx, macc interface{}) } // ValidatePermissions mocks base method. -func (m *MockAccountKeeper) ValidatePermissions(macc types0.ModuleAccountI) error { +func (m *MockAccountKeeper) ValidatePermissions(macc types.ModuleAccountI) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidatePermissions", macc) ret0, _ := ret[0].(error) diff --git a/x/bank/types/expected_keepers.go b/x/bank/types/expected_keepers.go index d49bf4cc4b9..013530f8116 100644 --- a/x/bank/types/expected_keepers.go +++ b/x/bank/types/expected_keepers.go @@ -4,9 +4,9 @@ import ( "context" "cosmossdk.io/core/address" - "cosmossdk.io/x/auth/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" ) // AccountKeeper defines the account contract that must be fulfilled when diff --git a/x/circuit/ante/circuit_test.go b/x/circuit/ante/circuit_test.go index 566748b6632..e88b96b5ee5 100644 --- a/x/circuit/ante/circuit_test.go +++ b/x/circuit/ante/circuit_test.go @@ -7,7 +7,6 @@ import ( "github.com/stretchr/testify/require" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" "cosmossdk.io/x/circuit/ante" cbtypes "cosmossdk.io/x/circuit/types" @@ -17,6 +16,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" ) type fixture struct { diff --git a/x/circuit/depinject.go b/x/circuit/depinject.go index 5ed20d5ed91..37410272c6f 100644 --- a/x/circuit/depinject.go +++ b/x/circuit/depinject.go @@ -6,13 +6,13 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/circuit/keeper" "cosmossdk.io/x/circuit/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ depinject.OnePerModuleType = AppModule{} diff --git a/x/circuit/go.mod b/x/circuit/go.mod index c1562634b7c..bb66f1c0502 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -9,9 +9,14 @@ require ( cosmossdk.io/core/testing v0.0.0-20240826100755-28c792bcd06c // main cosmossdk.io/depinject v1.0.0 cosmossdk.io/errors v1.0.1 +<<<<<<< HEAD cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 github.com/cosmos/cosmos-sdk v0.52.0 +======= + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc + github.com/cosmos/cosmos-sdk v0.53.0 +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) github.com/cosmos/gogoproto v1.7.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 @@ -174,6 +179,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -181,6 +187,12 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/staking => ../staking diff --git a/x/circuit/keeper/genesis_test.go b/x/circuit/keeper/genesis_test.go index 6f660a62645..aa6f1fcfa14 100644 --- a/x/circuit/keeper/genesis_test.go +++ b/x/circuit/keeper/genesis_test.go @@ -8,7 +8,6 @@ import ( coretesting "cosmossdk.io/core/testing" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/circuit" "cosmossdk.io/x/circuit/keeper" "cosmossdk.io/x/circuit/types" @@ -19,6 +18,7 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type GenesisTestSuite struct { diff --git a/x/circuit/keeper/keeper_test.go b/x/circuit/keeper/keeper_test.go index 02fef99daa2..b232ae0944c 100644 --- a/x/circuit/keeper/keeper_test.go +++ b/x/circuit/keeper/keeper_test.go @@ -10,7 +10,6 @@ import ( "cosmossdk.io/core/address" coretesting "cosmossdk.io/core/testing" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/circuit" "cosmossdk.io/x/circuit/keeper" "cosmossdk.io/x/circuit/types" @@ -20,6 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var addresses = []string{ diff --git a/x/consensus/go.mod b/x/consensus/go.mod index d546b50aa39..24c4e8ab8e1 100644 --- a/x/consensus/go.mod +++ b/x/consensus/go.mod @@ -28,7 +28,6 @@ require ( cosmossdk.io/log v1.4.1 // indirect cosmossdk.io/math v1.3.0 // indirect cosmossdk.io/schema v0.2.0 // indirect - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.4-0.20240815194237-858ec2fcb897 // indirect; main @@ -171,6 +170,7 @@ require ( replace github.com/cosmos/cosmos-sdk => ../../. replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -178,6 +178,12 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking ) diff --git a/x/distribution/depinject.go b/x/distribution/depinject.go index 07e63548efa..1701e88b8bf 100644 --- a/x/distribution/depinject.go +++ b/x/distribution/depinject.go @@ -6,12 +6,12 @@ import ( "cosmossdk.io/core/comet" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/distribution/keeper" "cosmossdk.io/x/distribution/types" staking "cosmossdk.io/x/staking/types" "github.com/cosmos/cosmos-sdk/codec" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ depinject.OnePerModuleType = AppModule{} diff --git a/x/distribution/go.mod b/x/distribution/go.mod index 3e97676b671..4a4cd2c4ada 100644 --- a/x/distribution/go.mod +++ b/x/distribution/go.mod @@ -34,7 +34,10 @@ require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/schema v0.2.0 // indirect +<<<<<<< HEAD cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 +======= +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.4-0.20240815194237-858ec2fcb897 // indirect; main filippo.io/edwards25519 v1.1.0 // indirect @@ -175,6 +178,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -182,6 +186,13 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/collections => ../../collections + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/protocolpool => ../protocolpool diff --git a/x/distribution/keeper/allocation_test.go b/x/distribution/keeper/allocation_test.go index 21d788c9784..703840f15e1 100644 --- a/x/distribution/keeper/allocation_test.go +++ b/x/distribution/keeper/allocation_test.go @@ -14,7 +14,6 @@ import ( coretesting "cosmossdk.io/core/testing" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/distribution" "cosmossdk.io/x/distribution/keeper" distrtestutil "cosmossdk.io/x/distribution/testutil" @@ -27,6 +26,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ comet.Service = (*emptyCometService)(nil) diff --git a/x/distribution/keeper/common_test.go b/x/distribution/keeper/common_test.go index 47445e4a085..5451c73d449 100644 --- a/x/distribution/keeper/common_test.go +++ b/x/distribution/keeper/common_test.go @@ -1,11 +1,11 @@ package keeper_test import ( - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/distribution/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/x/distribution/keeper/delegation_test.go b/x/distribution/keeper/delegation_test.go index 31419b10e08..8ee03d5f3f3 100644 --- a/x/distribution/keeper/delegation_test.go +++ b/x/distribution/keeper/delegation_test.go @@ -11,7 +11,6 @@ import ( coretesting "cosmossdk.io/core/testing" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/distribution" "cosmossdk.io/x/distribution/keeper" distrtestutil "cosmossdk.io/x/distribution/testutil" @@ -24,6 +23,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestCalculateRewardsBasic(t *testing.T) { diff --git a/x/distribution/keeper/grpc_query_test.go b/x/distribution/keeper/grpc_query_test.go index affc16b392b..84fa95def6c 100644 --- a/x/distribution/keeper/grpc_query_test.go +++ b/x/distribution/keeper/grpc_query_test.go @@ -7,7 +7,6 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/distribution/keeper" distrtestutil "cosmossdk.io/x/distribution/testutil" "cosmossdk.io/x/distribution/types" @@ -15,6 +14,7 @@ import ( codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestQueryParams(t *testing.T) { diff --git a/x/distribution/keeper/keeper_test.go b/x/distribution/keeper/keeper_test.go index a3fdb44d797..589b738a0b5 100644 --- a/x/distribution/keeper/keeper_test.go +++ b/x/distribution/keeper/keeper_test.go @@ -11,7 +11,6 @@ import ( coretesting "cosmossdk.io/core/testing" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/distribution" "cosmossdk.io/x/distribution/keeper" distrtestutil "cosmossdk.io/x/distribution/testutil" @@ -24,6 +23,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type dep struct { diff --git a/x/distribution/keeper/msg_server_test.go b/x/distribution/keeper/msg_server_test.go index 59a21395de4..03f4e8c8856 100644 --- a/x/distribution/keeper/msg_server_test.go +++ b/x/distribution/keeper/msg_server_test.go @@ -7,12 +7,12 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/distribution/keeper" "cosmossdk.io/x/distribution/types" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestMsgSetWithdrawAddress(t *testing.T) { diff --git a/x/distribution/migrations/v4/migrate_funds_test.go b/x/distribution/migrations/v4/migrate_funds_test.go index 90f557e130c..7186a4154f2 100644 --- a/x/distribution/migrations/v4/migrate_funds_test.go +++ b/x/distribution/migrations/v4/migrate_funds_test.go @@ -10,10 +10,6 @@ import ( "cosmossdk.io/core/comet" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - authtestutil "cosmossdk.io/x/auth/testutil" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktypes "cosmossdk.io/x/bank/types" @@ -30,6 +26,10 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/integration" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type emptyCometService struct{} diff --git a/x/epochs/go.mod b/x/epochs/go.mod index d98bdf46166..59456a20699 100644 --- a/x/epochs/go.mod +++ b/x/epochs/go.mod @@ -25,8 +25,11 @@ require ( buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/log v1.4.1 // indirect cosmossdk.io/math v1.3.0 // indirect +<<<<<<< HEAD cosmossdk.io/schema v0.2.0 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect +======= +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect @@ -173,6 +176,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -180,6 +184,12 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/staking => ../staking diff --git a/x/evidence/go.mod b/x/evidence/go.mod index 86899303ef5..6fae695c97c 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -30,7 +30,6 @@ require ( buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/log v1.4.1 // indirect cosmossdk.io/schema v0.2.0 // indirect - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.4-0.20240815194237-858ec2fcb897 // indirect; main @@ -174,6 +173,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -181,6 +181,12 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/staking => ../staking diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index 13d3c732380..a5d274b2a93 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -33,7 +33,6 @@ require ( buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/log v1.4.1 // indirect cosmossdk.io/schema v0.2.0 // indirect - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect @@ -178,6 +177,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -185,6 +185,13 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/collections => ../../collections + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/gov => ../gov diff --git a/x/feegrant/keeper/genesis_test.go b/x/feegrant/keeper/genesis_test.go index db7a39b67a2..61cb5cd14a0 100644 --- a/x/feegrant/keeper/genesis_test.go +++ b/x/feegrant/keeper/genesis_test.go @@ -10,7 +10,6 @@ import ( coretesting "cosmossdk.io/core/testing" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/feegrant" "cosmossdk.io/x/feegrant/keeper" "cosmossdk.io/x/feegrant/module" @@ -25,6 +24,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/x/feegrant/keeper/keeper.go b/x/feegrant/keeper/keeper.go index b59fd7caa0f..30e47ae3608 100644 --- a/x/feegrant/keeper/keeper.go +++ b/x/feegrant/keeper/keeper.go @@ -9,12 +9,12 @@ import ( corecontext "cosmossdk.io/core/context" "cosmossdk.io/core/event" errorsmod "cosmossdk.io/errors" - "cosmossdk.io/x/auth/ante" "cosmossdk.io/x/feegrant" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/auth/ante" ) // Keeper manages state of all fee grants, as well as calculating approval. diff --git a/x/feegrant/keeper/keeper_test.go b/x/feegrant/keeper/keeper_test.go index 1a682e73a5a..af5cde5dc66 100644 --- a/x/feegrant/keeper/keeper_test.go +++ b/x/feegrant/keeper/keeper_test.go @@ -10,7 +10,6 @@ import ( coretesting "cosmossdk.io/core/testing" sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/feegrant" "cosmossdk.io/x/feegrant/keeper" "cosmossdk.io/x/feegrant/module" @@ -23,6 +22,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type KeeperTestSuite struct { diff --git a/x/feegrant/keeper/msg_server_test.go b/x/feegrant/keeper/msg_server_test.go index 50f21da5bd4..2e4e8f405c8 100644 --- a/x/feegrant/keeper/msg_server_test.go +++ b/x/feegrant/keeper/msg_server_test.go @@ -7,12 +7,12 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/core/header" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/feegrant" codecaddress "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func (suite *KeeperTestSuite) TestGrantAllowance() { diff --git a/x/feegrant/module/abci_test.go b/x/feegrant/module/abci_test.go index 20c74ebf37c..12f65c24c89 100644 --- a/x/feegrant/module/abci_test.go +++ b/x/feegrant/module/abci_test.go @@ -10,7 +10,6 @@ import ( coretesting "cosmossdk.io/core/testing" sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/feegrant" "cosmossdk.io/x/feegrant/keeper" "cosmossdk.io/x/feegrant/module" @@ -24,6 +23,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestFeegrantPruning(t *testing.T) { diff --git a/x/feegrant/msgs_test.go b/x/feegrant/msgs_test.go index 29c775f1eec..a0c19d0ff1c 100644 --- a/x/feegrant/msgs_test.go +++ b/x/feegrant/msgs_test.go @@ -6,12 +6,12 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/math" - "cosmossdk.io/x/auth/migrations/legacytx" "cosmossdk.io/x/feegrant" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) func TestAminoJSON(t *testing.T) { diff --git a/x/genutil/client/cli/genaccount_test.go b/x/genutil/client/cli/genaccount_test.go index 9acf60e29ad..c0b293cb43b 100644 --- a/x/genutil/client/cli/genaccount_test.go +++ b/x/genutil/client/cli/genaccount_test.go @@ -9,7 +9,6 @@ import ( corectx "cosmossdk.io/core/context" "cosmossdk.io/log" - "cosmossdk.io/x/auth" "github.com/cosmos/cosmos-sdk/client" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" @@ -18,6 +17,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltest "github.com/cosmos/cosmos-sdk/x/genutil/client/testutil" ) diff --git a/x/genutil/client/cli/gentx.go b/x/genutil/client/cli/gentx.go index dfeda2df59d..c56c772afc7 100644 --- a/x/genutil/client/cli/gentx.go +++ b/x/genutil/client/cli/gentx.go @@ -12,7 +12,6 @@ import ( "github.com/spf13/cobra" "cosmossdk.io/errors" - authclient "cosmossdk.io/x/auth/client" "cosmossdk.io/x/staking/client/cli" "github.com/cosmos/cosmos-sdk/client" @@ -22,6 +21,7 @@ import ( "github.com/cosmos/cosmos-sdk/server" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" "github.com/cosmos/cosmos-sdk/x/genutil" "github.com/cosmos/cosmos-sdk/x/genutil/types" ) diff --git a/x/genutil/genaccounts.go b/x/genutil/genaccounts.go index d55fdd3ef90..75899c8cfd8 100644 --- a/x/genutil/genaccounts.go +++ b/x/genutil/genaccounts.go @@ -6,12 +6,12 @@ import ( "fmt" "cosmossdk.io/core/address" - authtypes "cosmossdk.io/x/auth/types" - authvesting "cosmossdk.io/x/auth/vesting/types" banktypes "cosmossdk.io/x/bank/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + authvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ) diff --git a/x/gov/client/cli/prompt.go b/x/gov/client/cli/prompt.go index bb6706479bf..ec5f4928771 100644 --- a/x/gov/client/cli/prompt.go +++ b/x/gov/client/cli/prompt.go @@ -13,13 +13,13 @@ import ( "github.com/spf13/cobra" "cosmossdk.io/core/address" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/gov/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) const ( diff --git a/x/gov/client/cli/tx_test.go b/x/gov/client/cli/tx_test.go index 46620dd8053..696cd717cd0 100644 --- a/x/gov/client/cli/tx_test.go +++ b/x/gov/client/cli/tx_test.go @@ -11,7 +11,6 @@ import ( "github.com/stretchr/testify/suite" sdkmath "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/gov" "cosmossdk.io/x/gov/client/cli" govclitestutil "cosmossdk.io/x/gov/client/testutil" @@ -28,6 +27,7 @@ import ( clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" sdk "github.com/cosmos/cosmos-sdk/types" testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type CLITestSuite struct { diff --git a/x/gov/client/utils/query.go b/x/gov/client/utils/query.go index fdc5354f1f2..32e1131fb09 100644 --- a/x/gov/client/utils/query.go +++ b/x/gov/client/utils/query.go @@ -3,13 +3,13 @@ package utils import ( "fmt" - authtx "cosmossdk.io/x/auth/tx" "cosmossdk.io/x/gov/types" v1 "cosmossdk.io/x/gov/types/v1" "cosmossdk.io/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" ) const ( diff --git a/x/gov/depinject.go b/x/gov/depinject.go index 46af43b1c78..d1b7f672a79 100644 --- a/x/gov/depinject.go +++ b/x/gov/depinject.go @@ -10,13 +10,13 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" - authtypes "cosmossdk.io/x/auth/types" govclient "cosmossdk.io/x/gov/client" "cosmossdk.io/x/gov/keeper" govtypes "cosmossdk.io/x/gov/types" "cosmossdk.io/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/codec" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ depinject.OnePerModuleType = AppModule{} diff --git a/x/gov/go.mod b/x/gov/go.mod index b42baf3c91b..e3ab7a0159b 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -11,8 +11,12 @@ require ( cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.4.1 cosmossdk.io/math v1.3.0 +<<<<<<< HEAD cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897 cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 +======= + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 @@ -177,6 +181,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -184,6 +189,13 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/collections => ../../collections + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/protocolpool => ../protocolpool diff --git a/x/gov/keeper/common_test.go b/x/gov/keeper/common_test.go index 5b18aaaf3da..3b8da3aa860 100644 --- a/x/gov/keeper/common_test.go +++ b/x/gov/keeper/common_test.go @@ -14,7 +14,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" "cosmossdk.io/x/gov/keeper" govtestutil "cosmossdk.io/x/gov/testutil" @@ -30,6 +29,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/x/gov/keeper/deposit_test.go b/x/gov/keeper/deposit_test.go index c0dbba8f91a..d4685b9bf1c 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -8,12 +8,12 @@ import ( "cosmossdk.io/collections" sdkmath "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" v1 "cosmossdk.io/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/codec/address" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) const ( diff --git a/x/group/go.mod b/x/group/go.mod index b46bd5b2e33..98667066c41 100644 --- a/x/group/go.mod +++ b/x/group/go.mod @@ -11,7 +11,6 @@ require ( cosmossdk.io/math v1.3.0 cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897 cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 @@ -194,7 +193,6 @@ replace ( cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/accounts/defaults/lockup => ../accounts/defaults/lockup cosmossdk.io/x/accounts/defaults/multisig => ../accounts/defaults/multisig - cosmossdk.io/x/auth => ../auth cosmossdk.io/x/authz => ../authz cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus diff --git a/x/group/keeper/genesis_test.go b/x/group/keeper/genesis_test.go index a508ae96b7e..a960529e84c 100644 --- a/x/group/keeper/genesis_test.go +++ b/x/group/keeper/genesis_test.go @@ -12,7 +12,6 @@ import ( coreaddress "cosmossdk.io/core/address" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" "cosmossdk.io/x/group" "cosmossdk.io/x/group/keeper" @@ -28,6 +27,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type GenesisTestSuite struct { diff --git a/x/group/keeper/grpc_query_test.go b/x/group/keeper/grpc_query_test.go index e0cce158844..84f7a7c31a3 100644 --- a/x/group/keeper/grpc_query_test.go +++ b/x/group/keeper/grpc_query_test.go @@ -10,7 +10,6 @@ import ( "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/group" groupkeeper "cosmossdk.io/x/group/keeper" "cosmossdk.io/x/group/module" @@ -26,6 +25,7 @@ import ( "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/types/query" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type fixture struct { diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index 498b3d81bf5..b07d1136280 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -12,7 +12,6 @@ import ( "cosmossdk.io/core/header" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" banktypes "cosmossdk.io/x/bank/types" "cosmossdk.io/x/group" @@ -29,6 +28,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) const minExecutionPeriod = 5 * time.Second diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index 0f7d3eeadec..79f449d3095 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -9,7 +9,6 @@ import ( "strings" errorsmod "cosmossdk.io/errors" - authtypes "cosmossdk.io/x/auth/types" govtypes "cosmossdk.io/x/gov/types" "cosmossdk.io/x/group" "cosmossdk.io/x/group/errors" @@ -18,6 +17,7 @@ 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" ) var _ group.MsgServer = Keeper{} diff --git a/x/group/migrations/v2/gen_state.go b/x/group/migrations/v2/gen_state.go index 10918441a47..e6f58645a03 100644 --- a/x/group/migrations/v2/gen_state.go +++ b/x/group/migrations/v2/gen_state.go @@ -4,9 +4,9 @@ import ( "encoding/binary" "cosmossdk.io/core/address" - authtypes "cosmossdk.io/x/auth/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // MigrateGenState accepts exported v0.46 x/auth genesis state and migrates it to diff --git a/x/group/migrations/v2/gen_state_test.go b/x/group/migrations/v2/gen_state_test.go index 05b4d239353..9d920e86954 100644 --- a/x/group/migrations/v2/gen_state_test.go +++ b/x/group/migrations/v2/gen_state_test.go @@ -6,11 +6,11 @@ import ( "github.com/stretchr/testify/require" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/group" v2 "cosmossdk.io/x/group/migrations/v2" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestMigrateGenState(t *testing.T) { diff --git a/x/group/migrations/v2/migrate.go b/x/group/migrations/v2/migrate.go index c2db3044326..8d8da84655d 100644 --- a/x/group/migrations/v2/migrate.go +++ b/x/group/migrations/v2/migrate.go @@ -6,12 +6,12 @@ import ( "fmt" "cosmossdk.io/core/store" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/group" "cosmossdk.io/x/group/internal/orm" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) const ( diff --git a/x/group/migrations/v2/migrate_test.go b/x/group/migrations/v2/migrate_test.go index b3177f4ae19..34af6c3f256 100644 --- a/x/group/migrations/v2/migrate_test.go +++ b/x/group/migrations/v2/migrate_test.go @@ -10,10 +10,6 @@ import ( corestore "cosmossdk.io/core/store" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - "cosmossdk.io/x/auth" - authkeeper "cosmossdk.io/x/auth/keeper" - authtestutil "cosmossdk.io/x/auth/testutil" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/group" "cosmossdk.io/x/group/internal/orm" groupkeeper "cosmossdk.io/x/group/keeper" @@ -27,6 +23,10 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/x/group/simulation/operations_test.go b/x/group/simulation/operations_test.go index f67d9936fd8..598e6892b1f 100644 --- a/x/group/simulation/operations_test.go +++ b/x/group/simulation/operations_test.go @@ -10,7 +10,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" - authkeeper "cosmossdk.io/x/auth/keeper" bankkeeper "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/bank/testutil" banktypes "cosmossdk.io/x/bank/types" @@ -26,6 +25,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) type SimTestSuite struct { diff --git a/x/group/testutil/app_config.go b/x/group/testutil/app_config.go index 01f572dba23..017808f605d 100644 --- a/x/group/testutil/app_config.go +++ b/x/group/testutil/app_config.go @@ -1,18 +1,18 @@ package testutil import ( - _ "cosmossdk.io/x/accounts" // import as blank for app wiring - _ "cosmossdk.io/x/auth" // import as blank for app wiring - _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring - _ "cosmossdk.io/x/authz" // import as blank for app wiring - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/consensus" // import as blank for app wiring - _ "cosmossdk.io/x/group/module" // import as blank for app wiring - _ "cosmossdk.io/x/mint" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // import as blank for app wiring + _ "cosmossdk.io/x/accounts" // import as blank for app wiring + _ "cosmossdk.io/x/authz" // import as blank for app wiring + _ "cosmossdk.io/x/bank" // import as blank for app wiring + _ "cosmossdk.io/x/consensus" // import as blank for app wiring + _ "cosmossdk.io/x/group/module" // import as blank for app wiring + _ "cosmossdk.io/x/mint" // import as blank for app wiring + _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/x/mint/depinject.go b/x/mint/depinject.go index 4b430f0e805..e580cc096ca 100644 --- a/x/mint/depinject.go +++ b/x/mint/depinject.go @@ -5,12 +5,12 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" - authtypes "cosmossdk.io/x/auth/types" epochstypes "cosmossdk.io/x/epochs/types" "cosmossdk.io/x/mint/keeper" "cosmossdk.io/x/mint/types" "github.com/cosmos/cosmos-sdk/codec" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ depinject.OnePerModuleType = AppModule{} diff --git a/x/mint/go.mod b/x/mint/go.mod index fffdeb31ca9..293ed5e9500 100644 --- a/x/mint/go.mod +++ b/x/mint/go.mod @@ -28,7 +28,6 @@ require ( require ( buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.4-0.20240815194237-858ec2fcb897 // indirect; main @@ -178,6 +177,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -185,6 +185,12 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/staking => ../staking diff --git a/x/mint/keeper/genesis_test.go b/x/mint/keeper/genesis_test.go index 56b1171a5dc..839ca62bcc9 100644 --- a/x/mint/keeper/genesis_test.go +++ b/x/mint/keeper/genesis_test.go @@ -10,7 +10,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/mint" "cosmossdk.io/x/mint/keeper" minttestutil "cosmossdk.io/x/mint/testutil" @@ -22,6 +21,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var minterAcc = authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Minter) diff --git a/x/mint/keeper/grpc_query_test.go b/x/mint/keeper/grpc_query_test.go index eb83b895a7e..cc941f87788 100644 --- a/x/mint/keeper/grpc_query_test.go +++ b/x/mint/keeper/grpc_query_test.go @@ -9,7 +9,6 @@ import ( "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/mint" "cosmossdk.io/x/mint/keeper" minttestutil "cosmossdk.io/x/mint/testutil" @@ -21,6 +20,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type MintTestSuite struct { diff --git a/x/mint/keeper/keeper_test.go b/x/mint/keeper/keeper_test.go index 215ac12b4dd..454967c1fc0 100644 --- a/x/mint/keeper/keeper_test.go +++ b/x/mint/keeper/keeper_test.go @@ -11,7 +11,6 @@ import ( coretesting "cosmossdk.io/core/testing" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/mint" "cosmossdk.io/x/mint/keeper" minttestutil "cosmossdk.io/x/mint/testutil" @@ -22,6 +21,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) const govModuleNameStr = "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn" diff --git a/x/mint/module_test.go b/x/mint/module_test.go index 9dc9e75e2ad..d1a618459db 100644 --- a/x/mint/module_test.go +++ b/x/mint/module_test.go @@ -9,7 +9,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/mint" "cosmossdk.io/x/mint/keeper" minttestutil "cosmossdk.io/x/mint/testutil" @@ -20,6 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) const govModuleNameStr = "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn" diff --git a/x/nft/go.mod b/x/nft/go.mod index 0469d9b2406..94feafee023 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -26,7 +26,6 @@ require ( buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/collections v0.4.1-0.20240802064046-23fac2f1b8ab // indirect; main cosmossdk.io/schema v0.2.0 // indirect - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect @@ -173,6 +172,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -180,6 +180,12 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/staking => ../staking diff --git a/x/params/go.mod b/x/params/go.mod index 98dd852861a..93c1f81debc 100644 --- a/x/params/go.mod +++ b/x/params/go.mod @@ -30,7 +30,6 @@ require ( buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/collections v0.4.1-0.20240802064046-23fac2f1b8ab // indirect; main cosmossdk.io/schema v0.2.0 // indirect - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect @@ -174,6 +173,7 @@ replace github.com/cosmos/cosmos-sdk => ../.. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -181,6 +181,12 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/distribution => ../distribution diff --git a/x/protocolpool/depinject.go b/x/protocolpool/depinject.go index baac855e190..ff07c331963 100644 --- a/x/protocolpool/depinject.go +++ b/x/protocolpool/depinject.go @@ -5,7 +5,6 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/protocolpool/keeper" "cosmossdk.io/x/protocolpool/simulation" "cosmossdk.io/x/protocolpool/types" @@ -13,6 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ depinject.OnePerModuleType = AppModule{} diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index 4c6fb72ab5a..83e8455516e 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -10,8 +10,12 @@ require ( cosmossdk.io/depinject v1.0.0 cosmossdk.io/errors v1.0.1 cosmossdk.io/math v1.3.0 +<<<<<<< HEAD cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897 cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 +======= + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.52.0 github.com/cosmos/gogoproto v1.7.0 @@ -174,6 +178,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -181,6 +186,12 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/staking => ../staking diff --git a/x/protocolpool/keeper/keeper_test.go b/x/protocolpool/keeper/keeper_test.go index fa147d97314..e4fc05d1a6a 100644 --- a/x/protocolpool/keeper/keeper_test.go +++ b/x/protocolpool/keeper/keeper_test.go @@ -12,7 +12,6 @@ import ( coretesting "cosmossdk.io/core/testing" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" poolkeeper "cosmossdk.io/x/protocolpool/keeper" pooltestutil "cosmossdk.io/x/protocolpool/testutil" "cosmossdk.io/x/protocolpool/types" @@ -24,6 +23,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/x/slashing/depinject.go b/x/slashing/depinject.go index ead44b6fd8f..867b9a176ee 100644 --- a/x/slashing/depinject.go +++ b/x/slashing/depinject.go @@ -8,13 +8,13 @@ import ( "cosmossdk.io/core/comet" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/slashing/keeper" "cosmossdk.io/x/slashing/types" staking "cosmossdk.io/x/staking/types" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ depinject.OnePerModuleType = AppModule{} diff --git a/x/slashing/go.mod b/x/slashing/go.mod index 1ec7686cc5f..11bff1343e0 100644 --- a/x/slashing/go.mod +++ b/x/slashing/go.mod @@ -10,8 +10,12 @@ require ( cosmossdk.io/depinject v1.0.0 cosmossdk.io/errors v1.0.1 cosmossdk.io/math v1.3.0 +<<<<<<< HEAD cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897 cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 +======= + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 github.com/bits-and-blooms/bitset v1.10.0 github.com/cosmos/cosmos-proto v1.0.0-beta.5 @@ -175,6 +179,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -182,6 +187,12 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/staking => ../staking diff --git a/x/slashing/keeper/keeper_test.go b/x/slashing/keeper/keeper_test.go index 5223244db97..95e464b422d 100644 --- a/x/slashing/keeper/keeper_test.go +++ b/x/slashing/keeper/keeper_test.go @@ -13,7 +13,6 @@ import ( coretesting "cosmossdk.io/core/testing" sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" slashingkeeper "cosmossdk.io/x/slashing/keeper" slashingtestutil "cosmossdk.io/x/slashing/testutil" slashingtypes "cosmossdk.io/x/slashing/types" @@ -27,6 +26,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" addresstypes "github.com/cosmos/cosmos-sdk/types/address" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var consAddr = sdk.ConsAddress("addr1_______________") diff --git a/x/staking/depinject.go b/x/staking/depinject.go index 4adee385d4d..afe00e42543 100644 --- a/x/staking/depinject.go +++ b/x/staking/depinject.go @@ -12,7 +12,6 @@ import ( "cosmossdk.io/core/comet" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/staking/keeper" "cosmossdk.io/x/staking/simulation" "cosmossdk.io/x/staking/types" @@ -20,6 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ depinject.OnePerModuleType = AppModule{} diff --git a/x/staking/go.mod b/x/staking/go.mod index 227e1284943..e723680d832 100644 --- a/x/staking/go.mod +++ b/x/staking/go.mod @@ -32,9 +32,12 @@ require ( require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect +<<<<<<< HEAD cosmossdk.io/log v1.4.1 cosmossdk.io/schema v0.2.0 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 +======= +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 cosmossdk.io/x/tx v0.13.4-0.20240815194237-858ec2fcb897 // indirect; main @@ -173,6 +176,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. // TODO remove post spinning out all modules replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -180,6 +184,13 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/collections => ../../collections + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus ) diff --git a/x/staking/keeper/cons_pubkey_test.go b/x/staking/keeper/cons_pubkey_test.go index 6404f3edcca..aeaca41ecb4 100644 --- a/x/staking/keeper/cons_pubkey_test.go +++ b/x/staking/keeper/cons_pubkey_test.go @@ -7,13 +7,13 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/core/header" - authtypes "cosmossdk.io/x/auth/types" stakingkeeper "cosmossdk.io/x/staking/keeper" "cosmossdk.io/x/staking/testutil" "cosmossdk.io/x/staking/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func (s *KeeperTestSuite) TestConsPubKeyRotationHistory() { diff --git a/x/staking/keeper/keeper_test.go b/x/staking/keeper/keeper_test.go index 0c4311a906e..2b30568e982 100644 --- a/x/staking/keeper/keeper_test.go +++ b/x/staking/keeper/keeper_test.go @@ -14,7 +14,6 @@ import ( "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" consensustypes "cosmossdk.io/x/consensus/types" stakingkeeper "cosmossdk.io/x/staking/keeper" stakingtestutil "cosmossdk.io/x/staking/testutil" @@ -31,6 +30,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" addresstypes "github.com/cosmos/cosmos-sdk/types/address" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/x/staking/keeper/msg_server_test.go b/x/staking/keeper/msg_server_test.go index d4995bf0131..597742f2c61 100644 --- a/x/staking/keeper/msg_server_test.go +++ b/x/staking/keeper/msg_server_test.go @@ -9,7 +9,6 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/core/header" "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" stakingkeeper "cosmossdk.io/x/staking/keeper" "cosmossdk.io/x/staking/types" @@ -21,6 +20,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/x/staking/keeper/validator_test.go b/x/staking/keeper/validator_test.go index d6f0655e981..9780823a6e6 100644 --- a/x/staking/keeper/validator_test.go +++ b/x/staking/keeper/validator_test.go @@ -9,12 +9,12 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/core/header" "cosmossdk.io/math" - authtypes "cosmossdk.io/x/auth/types" stakingkeeper "cosmossdk.io/x/staking/keeper" "cosmossdk.io/x/staking/testutil" stakingtypes "cosmossdk.io/x/staking/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func (s *KeeperTestSuite) applyValidatorSetUpdates(ctx sdk.Context, keeper *stakingkeeper.Keeper, expectedUpdatesLen int) []appmodule.ValidatorUpdate { diff --git a/x/upgrade/depinject.go b/x/upgrade/depinject.go index ef056c668a8..bc36da63285 100644 --- a/x/upgrade/depinject.go +++ b/x/upgrade/depinject.go @@ -10,7 +10,6 @@ import ( coreserver "cosmossdk.io/core/server" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/upgrade/keeper" "cosmossdk.io/x/upgrade/types" @@ -19,6 +18,7 @@ import ( "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/types/module" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var _ depinject.OnePerModuleType = AppModule{} diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index 3dd98fa17ed..24ae38284bd 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -9,8 +9,12 @@ require ( cosmossdk.io/depinject v1.0.0 cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.4.1 +<<<<<<< HEAD cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 +======= + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 cosmossdk.io/x/gov v0.0.0-20230925135524-a1bc045b3190 github.com/cometbft/cometbft v1.0.0-rc1 @@ -205,6 +209,7 @@ require ( replace github.com/cosmos/cosmos-sdk => ../../. replace ( +<<<<<<< HEAD // pseudo version lower than the latest tag cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240815194237-858ec2fcb897 // main // pseudo version lower than the latest tag @@ -212,6 +217,12 @@ replace ( // pseudo version lower than the latest tag cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 // main cosmossdk.io/x/auth => ../auth +======= + cosmossdk.io/api => ../../api + cosmossdk.io/core => ../../core + cosmossdk.io/core/testing => ../../core/testing + cosmossdk.io/store => ../../store +>>>>>>> 70488a89a (refactor: revert auth extraction (#21507)) cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus cosmossdk.io/x/gov => ../gov diff --git a/x/upgrade/keeper/abci_test.go b/x/upgrade/keeper/abci_test.go index c55d47fe0e7..5ae0fd23ff7 100644 --- a/x/upgrade/keeper/abci_test.go +++ b/x/upgrade/keeper/abci_test.go @@ -15,7 +15,6 @@ import ( coretesting "cosmossdk.io/core/testing" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/upgrade" "cosmossdk.io/x/upgrade/keeper" "cosmossdk.io/x/upgrade/types" @@ -28,6 +27,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) const govModuleName = "gov" diff --git a/x/upgrade/keeper/grpc_query_test.go b/x/upgrade/keeper/grpc_query_test.go index 7e6042257e1..46e70264b51 100644 --- a/x/upgrade/keeper/grpc_query_test.go +++ b/x/upgrade/keeper/grpc_query_test.go @@ -11,7 +11,6 @@ import ( "cosmossdk.io/core/header" coretesting "cosmossdk.io/core/testing" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/upgrade" "cosmossdk.io/x/upgrade/keeper" "cosmossdk.io/x/upgrade/types" @@ -23,6 +22,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type UpgradeTestSuite struct { diff --git a/x/upgrade/keeper/keeper_test.go b/x/upgrade/keeper/keeper_test.go index a7add3e24f6..0aabb13500b 100644 --- a/x/upgrade/keeper/keeper_test.go +++ b/x/upgrade/keeper/keeper_test.go @@ -14,7 +14,6 @@ import ( coretesting "cosmossdk.io/core/testing" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/upgrade" "cosmossdk.io/x/upgrade/keeper" "cosmossdk.io/x/upgrade/types" @@ -27,6 +26,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type KeeperTestSuite struct {