From 93a6e6830b600707561d8ddc4418f0a4083794e3 Mon Sep 17 00:00:00 2001 From: Emmanuel T Odeke Date: Thu, 2 Nov 2023 19:52:57 -0700 Subject: [PATCH] refactor(x/auth): spin out go.mod A Go module for x/auth at cosmossdk.io/x/auth Updates #11899 --- .github/workflows/test.yml | 31 + CHANGELOG.md | 1 + UPGRADING.md | 5 + baseapp/abci_test.go | 2 +- baseapp/abci_utils_test.go | 2 +- baseapp/baseapp_test.go | 2 +- baseapp/block_gas_test.go | 4 +- baseapp/msg_service_router_test.go | 4 +- baseapp/utils_test.go | 8 +- client/tx/tx.go | 3 +- client/tx/tx_test.go | 7 +- client/tx_config.go | 2 +- client/v2/autocli/app.go | 2 +- client/v2/autocli/builder.go | 2 +- client/v2/autocli/msg.go | 4 +- collections/README.md | 12 +- core/appmodule/README.md | 2 +- crypto/keyring/autocli.go | 2 +- crypto/keys/multisig/multisig_test.go | 2 +- .../adr-011-generalize-genesis-accounts.md | 2 +- docs/architecture/adr-057-app-wiring.md | 2 +- docs/user/run-node/03-txs.md | 6 +- go.mod | 2 + go.work.example | 3 +- proto/cosmos/auth/module/v1/module.proto | 2 +- proto/cosmos/auth/v1beta1/auth.proto | 2 +- proto/cosmos/auth/v1beta1/genesis.proto | 2 +- proto/cosmos/auth/v1beta1/query.proto | 2 +- proto/cosmos/auth/v1beta1/tx.proto | 2 +- proto/cosmos/tx/config/v1/config.proto | 4 +- proto/cosmos/vesting/module/v1/module.proto | 2 +- proto/cosmos/vesting/v1beta1/tx.proto | 2 +- proto/cosmos/vesting/v1beta1/vesting.proto | 2 +- runtime/app.go | 2 +- server/api/server_test.go | 4 +- server/cmt_cmds.go | 2 +- server/mock/tx.go | 2 +- simapp/ante.go | 2 +- simapp/app.go | 23 +- simapp/app_config.go | 8 +- simapp/app_test.go | 4 +- simapp/app_v2.go | 8 +- simapp/genesis_account.go | 3 +- simapp/genesis_account_test.go | 2 +- simapp/simd/cmd/commands.go | 2 +- simapp/simd/cmd/root.go | 6 +- simapp/simd/cmd/root_v2.go | 6 +- simapp/simd/cmd/testnet.go | 2 +- simapp/simd/cmd/testnet_test.go | 2 +- simapp/test_helpers.go | 2 +- tests/e2e/auth/suite.go | 6 +- tests/e2e/authz/tx.go | 2 +- tests/e2e/gov/tx.go | 2 +- tests/e2e/tx/benchmarks_test.go | 2 +- tests/e2e/tx/service_test.go | 8 +- .../integration/auth/client/cli/suite_test.go | 6 +- tests/integration/bank/app_test.go | 6 +- tests/integration/bank/bench_test.go | 2 +- .../bank/keeper/deterministic_test.go | 10 +- .../distribution/keeper/msg_server_test.go | 8 +- tests/integration/distribution/module_test.go | 4 +- .../evidence/keeper/infraction_test.go | 8 +- tests/integration/example/example_test.go | 8 +- tests/integration/gov/common_test.go | 2 +- tests/integration/gov/genesis_test.go | 6 +- tests/integration/gov/keeper/common_test.go | 2 +- tests/integration/gov/keeper/keeper_test.go | 8 +- tests/integration/gov/module_test.go | 4 +- tests/integration/rapidgen/rapidgen.go | 4 +- tests/integration/runtime/query_test.go | 4 +- tests/integration/server/grpc/server_test.go | 2 +- .../slashing/keeper/keeper_test.go | 6 +- .../integration/staking/keeper/common_test.go | 8 +- .../staking/keeper/deterministic_test.go | 8 +- .../staking/simulation/operations_test.go | 4 +- .../tx/aminojson/aminojson_test.go | 14 +- tests/integration/tx/decode_test.go | 6 +- tests/starship/tests/client.go | 5 +- testutil/cli/tx.go | 3 +- testutil/integration/router.go | 4 +- testutil/network/network.go | 6 +- testutil/network/util.go | 2 +- testutil/sims/app_helpers.go | 2 +- testutil/sims/simulation_helpers_test.go | 2 +- testutil/sims/state_helpers.go | 2 +- testutil/sims/tx_helpers.go | 2 +- types/mempool/mempool_test.go | 2 +- types/mempool/priority_nonce.go | 3 +- types/mempool/priority_nonce_test.go | 2 +- types/mempool/sender_nonce.go | 3 +- types/mempool/sender_nonce_property_test.go | 2 +- types/module/module_test.go | 2 +- types/module/testutil/codec.go | 3 +- types/query/pagination_test.go | 4 +- x/auth/README.md | 689 ------------------ x/auth/ante/ante.go | 2 +- 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_test.go | 12 +- .../ante/testutil/expected_keepers_mocks.go | 20 +- x/auth/ante/testutil_test.go | 18 +- 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 | 3 +- 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/keeper/deterministic_test.go | 8 +- 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_bench_test.go | 4 +- x/auth/keeper/keeper_test.go | 8 +- x/auth/keeper/migrations.go | 5 +- x/auth/keeper/msg_server.go | 3 +- x/auth/keeper/msg_server_test.go | 2 +- x/auth/migrations/legacytx/stdsig_test.go | 3 +- x/auth/module.go | 8 +- x/auth/module_test.go | 6 +- x/auth/simulation/genesis.go | 5 +- x/auth/simulation/genesis_test.go | 4 +- x/auth/simulation/proposals.go | 3 +- x/auth/simulation/proposals_test.go | 5 +- x/auth/testutil/app_config.go | 14 +- x/auth/tx/aux_test.go | 3 +- x/auth/tx/builder.go | 4 +- x/auth/tx/config.go | 2 +- x/auth/tx/config/config.go | 8 +- x/auth/tx/config_test.go | 5 +- x/auth/tx/legacy_amino_json.go | 4 +- x/auth/tx/legacy_amino_json_test.go | 6 +- x/auth/tx/service.go | 3 +- x/auth/tx/testutil/suite.go | 2 +- x/auth/types/account_retriever_test.go | 5 +- x/auth/types/account_test.go | 3 +- x/auth/types/codec.go | 3 +- x/auth/types/credentials_test.go | 3 +- x/auth/types/genesis_test.go | 5 +- x/auth/types/params_test.go | 2 +- x/auth/vesting/client/cli/tx.go | 3 +- x/auth/vesting/client/cli/tx_test.go | 4 +- x/auth/vesting/fuzz_test.go | 6 +- x/auth/vesting/module.go | 6 +- x/auth/vesting/msg_server.go | 6 +- x/auth/vesting/msg_server_test.go | 12 +- x/auth/vesting/types/codec.go | 5 +- 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 | 10 +- x/authz/client/cli/tx.go | 2 +- x/authz/keeper/msg_server_test.go | 2 +- x/authz/module/abci_test.go | 2 +- x/authz/msgs_test.go | 2 +- x/authz/simulation/operations_test.go | 2 +- x/authz/testutil/app_config.go | 4 +- 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/module.go | 2 +- x/bank/simulation/operations_test.go | 4 +- x/bank/testutil/expected_keepers_mocks.go | 50 +- x/bank/types/expected_keepers.go | 2 +- x/circuit/ante/circuit_test.go | 2 +- x/circuit/keeper/genesis_test.go | 2 +- x/circuit/keeper/keeper_test.go | 2 +- x/circuit/module.go | 2 +- x/consensus/keeper/keeper_test.go | 2 +- x/consensus/module.go | 2 +- .../testutil/expected_keepers_mocks.go | 3 +- x/counter/testutil/expected_keepers_mocks.go | 3 +- x/crisis/module.go | 2 +- x/distribution/keeper/allocation_test.go | 2 +- x/distribution/keeper/common_test.go | 2 +- x/distribution/keeper/delegation_test.go | 2 +- x/distribution/keeper/keeper_test.go | 2 +- x/distribution/keeper/msg_server_test.go | 2 +- .../migrations/funds/migrate_test.go | 6 +- x/distribution/module.go | 2 +- x/distribution/simulation/operations_test.go | 2 +- x/distribution/testutil/app_config.go | 4 +- x/evidence/testutil/app_config.go | 4 +- 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/feegrant/simulation/operations_test.go | 6 +- x/genutil/client/cli/genaccount_test.go | 2 +- x/genutil/client/cli/gentx.go | 2 +- x/genutil/genaccounts.go | 4 +- x/gov/abci_test.go | 2 +- x/gov/client/cli/prompt.go | 2 +- x/gov/client/cli/tx_test.go | 2 +- x/gov/client/utils/query.go | 2 +- x/gov/common_test.go | 6 +- x/gov/keeper/common_test.go | 2 +- x/gov/keeper/deposit_test.go | 2 +- x/gov/module.go | 2 +- x/gov/simulation/operations_test.go | 6 +- 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 | 3 +- x/group/migrations/v2/gen_state_test.go | 3 +- x/group/migrations/v2/migrate.go | 2 +- x/group/migrations/v2/migrate_test.go | 6 +- x/group/simulation/operations_test.go | 2 +- x/group/testutil/app_config.go | 4 +- 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.go | 2 +- x/mint/module_test.go | 4 +- x/mint/testutil/app_config.go | 4 +- x/nft/simulation/operations_test.go | 2 +- x/nft/testutil/app_config.go | 4 +- x/protocolpool/module.go | 2 +- x/protocolpool/simulation/operations_test.go | 2 +- x/protocolpool/testutil/app_config.go | 4 +- x/slashing/app_test.go | 2 +- x/slashing/keeper/keeper_test.go | 2 +- x/slashing/module.go | 2 +- x/slashing/simulation/operations_test.go | 2 +- x/slashing/testutil/app_config.go | 4 +- x/staking/app_test.go | 2 +- x/staking/keeper/keeper_test.go | 2 +- x/staking/module.go | 2 +- x/staking/module_test.go | 4 +- x/staking/testutil/app_config.go | 4 +- x/upgrade/abci_test.go | 2 +- x/upgrade/keeper/grpc_query_test.go | 2 +- x/upgrade/keeper/keeper_test.go | 2 +- x/upgrade/module.go | 2 +- 252 files changed, 555 insertions(+), 1161 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b5a0bfb21f..ddbf1b6a00a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1099,6 +1099,37 @@ jobs: with: projectBaseDir: x/staking/ + test-x-auth: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: "1.21" + 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 2131b19ca59..c9b2dd5af66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -187,6 +187,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/consensus) [#18041](https://github.com/cosmos/cosmos-sdk/pull/18041) `ToProtoConsensusParams()` returns an error * (x/slashing) [#18115](https://github.com/cosmos/cosmos-sdk/pull/18115) `NewValidatorSigningInfo` takes strings instead of `sdk.AccAddress` * (types) [#18268](https://github.com/cosmos/cosmos-sdk/pull/18268) Remove global setting of basedenom. Use the staking module parameter instead +* (x/auth) [#18351](https://github.com/cosmos/cosmos-sdk/pull/18351) Auth module was moved to its own go.mod `cosmossdk.io/x/auth` ### CLI Breaking Changes diff --git a/UPGRADING.md b/UPGRADING.md index f2cd1eaf8f7..54dffcd5309 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -58,6 +58,11 @@ Most of Cosmos SDK modules have migrated to [collections](https://docs.cosmos.ne Many functions have been removed due to this changes as the API can be smaller thanks to collections. For modules that have migrated, verify you are checking against `collections.ErrNotFound` when applicable. +#### `x/auth` + +Auth was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/auth` + + #### `x/authz` Authz was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/authz` diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index b60bc1b4232..7e2586a8120 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -31,6 +31,7 @@ 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" @@ -40,7 +41,6 @@ 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 8919ee81ba8..f204250382e 100644 --- a/baseapp/abci_utils_test.go +++ b/baseapp/abci_utils_test.go @@ -15,6 +15,7 @@ import ( "github.com/stretchr/testify/suite" "cosmossdk.io/log" + authtx "cosmossdk.io/x/auth/tx" "github.com/cosmos/cosmos-sdk/baseapp" baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil" @@ -23,7 +24,6 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" ) const ( diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index 21043545c7b..67414a9c12d 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -20,6 +20,7 @@ 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" @@ -30,7 +31,6 @@ 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/block_gas_test.go b/baseapp/block_gas_test.go index 6f761eddfc5..e69a4e00c8a 100644 --- a/baseapp/block_gas_test.go +++ b/baseapp/block_gas_test.go @@ -14,6 +14,8 @@ import ( "cosmossdk.io/log" sdkmath "cosmossdk.io/math" store "cosmossdk.io/store/types" + authkeeper "cosmossdk.io/x/auth/keeper" + xauthsigning "cosmossdk.io/x/auth/signing" bankkeeper "cosmossdk.io/x/bank/keeper" banktypes "cosmossdk.io/x/bank/types" @@ -31,8 +33,6 @@ 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" - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) const mintModuleName = "mint" diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go index 8ddb490e994..2f9807997e2 100644 --- a/baseapp/msg_service_router_test.go +++ b/baseapp/msg_service_router_test.go @@ -10,6 +10,8 @@ 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" @@ -17,8 +19,6 @@ 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 b75849ded75..cece72c3d99 100644 --- a/baseapp/utils_test.go +++ b/baseapp/utils_test.go @@ -26,6 +26,10 @@ import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + _ "cosmossdk.io/x/auth" + "cosmossdk.io/x/auth/signing" + _ "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/staking" @@ -44,10 +48,6 @@ 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" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" _ "github.com/cosmos/cosmos-sdk/x/consensus" ) diff --git a/client/tx/tx.go b/client/tx/tx.go index f7111182962..cae7cb9bf35 100644 --- a/client/tx/tx.go +++ b/client/tx/tx.go @@ -11,6 +11,8 @@ 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" @@ -18,7 +20,6 @@ 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 7b2b4b7f0d0..340fbc80434 100644 --- a/client/tx/tx_test.go +++ b/client/tx/tx_test.go @@ -9,6 +9,10 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" + ante "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/client/tx" "github.com/cosmos/cosmos-sdk/codec" @@ -21,9 +25,6 @@ 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" - ante "github.com/cosmos/cosmos-sdk/x/auth/ante" - "github.com/cosmos/cosmos-sdk/x/auth/signing" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" countertypes "github.com/cosmos/cosmos-sdk/x/counter/types" ) diff --git a/client/tx_config.go b/client/tx_config.go index 4dd1caa0139..c28139be909 100644 --- a/client/tx_config.go +++ b/client/tx_config.go @@ -1,13 +1,13 @@ package client import ( + "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/app.go b/client/v2/autocli/app.go index 052b660e157..ea6732480e6 100644 --- a/client/v2/autocli/app.go +++ b/client/v2/autocli/app.go @@ -11,10 +11,10 @@ import ( "cosmossdk.io/client/v2/autocli/keyring" "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + "cosmossdk.io/x/auth/tx" "github.com/cosmos/cosmos-sdk/client" sdkflags "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/x/auth/tx" ) // AppOptions are autocli options for an app. These options can be built via depinject based on an app config. Ex: diff --git a/client/v2/autocli/builder.go b/client/v2/autocli/builder.go index f92147df324..98c50ddf655 100644 --- a/client/v2/autocli/builder.go +++ b/client/v2/autocli/builder.go @@ -8,9 +8,9 @@ import ( "cosmossdk.io/client/v2/autocli/flag" "cosmossdk.io/client/v2/autocli/keyring" + authtx "cosmossdk.io/x/auth/tx" "github.com/cosmos/cosmos-sdk/client" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" ) // Builder manages options for building CLI commands. diff --git a/client/v2/autocli/msg.go b/client/v2/autocli/msg.go index 5bad6e1817f..de76b405194 100644 --- a/client/v2/autocli/msg.go +++ b/client/v2/autocli/msg.go @@ -12,13 +12,13 @@ import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" "cosmossdk.io/client/v2/autocli/flag" + authtx "cosmossdk.io/x/auth/tx" + authtxconfig "cosmossdk.io/x/auth/tx/config" "github.com/cosmos/cosmos-sdk/client" clienttx "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/tx/signing" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config" ) // BuildMsgCommand builds the msg commands for all the provided modules. If a custom command is provided for a diff --git a/collections/README.md b/collections/README.md index 842881648d3..2e1e691d6d1 100644 --- a/collections/README.md +++ b/collections/README.md @@ -208,7 +208,7 @@ import ( 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" + authtypes "cosmossdk.io/x/auth/types" ) var AccountsPrefix = collections.NewPrefix(0) @@ -257,7 +257,7 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + authtypes "cosmossdk.io/x/auth/types" ) var AccountsPrefix = collections.NewPrefix(0) @@ -508,7 +508,7 @@ import ( 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" + authtypes "cosmossdk.io/x/auth/types" ) var AccountsPrefix = collections.NewPrefix(0) @@ -926,7 +926,7 @@ import ( 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" + authtypes "cosmossdk.io/x/auth/types" ) var AccountsNumberIndexPrefix = collections.NewPrefix(1) @@ -985,7 +985,7 @@ import ( 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" + authtypes "cosmossdk.io/x/auth/types" ) var AccountsNumberIndexPrefix = collections.NewPrefix(1) @@ -1093,7 +1093,7 @@ import ( 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" + authtypes "cosmossdk.io/x/auth/types" ) var AccountsPrefix = collections.NewPrefix(0) diff --git a/core/appmodule/README.md b/core/appmodule/README.md index 8be9edc40ce..ebcdeaf74c3 100644 --- a/core/appmodule/README.md +++ b/core/appmodule/README.md @@ -26,7 +26,7 @@ import "cosmos/app/v1alpha1/module.proto"; message Module { option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/auth" + go_import: "cosmossdk.io/x/auth" }; string bech32_prefix = 1; repeated ModuleAccountPermission module_account_permissions = 2; diff --git a/crypto/keyring/autocli.go b/crypto/keyring/autocli.go index 0dd91ff60a4..51569f19170 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 3fa46e35d0b..e85a83b350b 100644 --- a/crypto/keys/multisig/multisig_test.go +++ b/crypto/keys/multisig/multisig_test.go @@ -9,6 +9,7 @@ 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" @@ -22,7 +23,6 @@ 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/docs/architecture/adr-011-generalize-genesis-accounts.md b/docs/architecture/adr-011-generalize-genesis-accounts.md index 92a704ba6ea..be4f9b37ef5 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 "github.com/cosmos/cosmos-sdk/x/auth/types" +import authtypes "cosmossdk.io/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 916023bdb6d..ba1774c4312 100644 --- a/docs/architecture/adr-057-app-wiring.md +++ b/docs/architecture/adr-057-app-wiring.md @@ -228,7 +228,7 @@ package main import ( // Each go package which registers a module must be imported just for side-effects // so that module implementations are registered. - _ "github.com/cosmos/cosmos-sdk/x/auth/module" + _ "cosmossdk.io/x/auth/module" _ "cosmossdk.io/x/bank/module" _ "cosmossdk.io/x/staking/module" "github.com/cosmos/cosmos-sdk/core/app" diff --git a/docs/user/run-node/03-txs.md b/docs/user/run-node/03-txs.md index 37050ce4e89..f4541570e9b 100644 --- a/docs/user/run-node/03-txs.md +++ b/docs/user/run-node/03-txs.md @@ -190,9 +190,10 @@ In the current `TxBuilder`'s API, both steps are done using the same method: `Se ```go import ( + xauthsigning "cosmossdk.io/x/auth/signing" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" - xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) func sendTx() error { @@ -322,9 +323,10 @@ import ( "fmt" "testing" + authtx "cosmossdk.io/x/auth/tx" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/types/tx" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" ) func simulateTx() error { diff --git a/go.mod b/go.mod index 4c3af35f469..25728ccf65f 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,7 @@ require ( cosmossdk.io/log v1.2.1 cosmossdk.io/math v1.1.3-rc.1 cosmossdk.io/store v1.0.0 + cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 cosmossdk.io/x/gov v0.0.0-20230925135524-a1bc045b3190 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 @@ -167,6 +168,7 @@ require ( // ) // TODO remove after all modules have their own go.mods replace ( + cosmossdk.io/x/auth => ./x/auth cosmossdk.io/x/bank => ./x/bank cosmossdk.io/x/distribution => ./x/distribution cosmossdk.io/x/gov => ./x/gov diff --git a/go.work.example b/go.work.example index e92d73671e3..b01e3260a66 100644 --- a/go.work.example +++ b/go.work.example @@ -21,13 +21,14 @@ use ( ./tools/confix ./tools/hubl ./x/accounts + ./x/auth ./x/authz ./x/bank ./x/circuit ./x/distribution ./x/evidence ./x/feegrant - ./x/gov + ./x/gov ./x/group ./x/nft ./x/params diff --git a/proto/cosmos/auth/module/v1/module.proto b/proto/cosmos/auth/module/v1/module.proto index dbe46a157c7..8d6c578f11a 100644 --- a/proto/cosmos/auth/module/v1/module.proto +++ b/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: "github.com/cosmos/cosmos-sdk/x/auth" + go_import: "cosmossdk.io/x/auth" }; // bech32_prefix is the bech32 account prefix for the app. diff --git a/proto/cosmos/auth/v1beta1/auth.proto b/proto/cosmos/auth/v1beta1/auth.proto index ebc18b69f05..77134aae785 100644 --- a/proto/cosmos/auth/v1beta1/auth.proto +++ b/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 = "github.com/cosmos/cosmos-sdk/x/auth/types"; +option go_package = "cosmossdk.io/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/proto/cosmos/auth/v1beta1/genesis.proto b/proto/cosmos/auth/v1beta1/genesis.proto index d1aa66e4626..dd71df80e92 100644 --- a/proto/cosmos/auth/v1beta1/genesis.proto +++ b/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 = "github.com/cosmos/cosmos-sdk/x/auth/types"; +option go_package = "cosmossdk.io/x/auth/types"; // GenesisState defines the auth module's genesis state. message GenesisState { diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index 804f2ff0800..9f5b5d6d401 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/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 = "github.com/cosmos/cosmos-sdk/x/auth/types"; +option go_package = "cosmossdk.io/x/auth/types"; // Query defines the gRPC querier service. service Query { diff --git a/proto/cosmos/auth/v1beta1/tx.proto b/proto/cosmos/auth/v1beta1/tx.proto index 1edee037092..4089d047be5 100644 --- a/proto/cosmos/auth/v1beta1/tx.proto +++ b/proto/cosmos/auth/v1beta1/tx.proto @@ -7,7 +7,7 @@ import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; import "cosmos/auth/v1beta1/auth.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; +option go_package = "cosmossdk.io/x/auth/types"; // Msg defines the x/auth Msg service. service Msg { diff --git a/proto/cosmos/tx/config/v1/config.proto b/proto/cosmos/tx/config/v1/config.proto index 15553a2821e..ec3b3b1b244 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: "github.com/cosmos/cosmos-sdk/x/auth/tx" + go_import: "cosmossdk.io/x/auth/tx" }; // skip_ante_handler defines whether the ante handler registration should be skipped in case an app wants to override @@ -17,4 +17,4 @@ message Config { // skip_post_handler defines whether the post handler registration should be skipped in case an app wants to override // this functionality. bool skip_post_handler = 2; -} \ No newline at end of file +} diff --git a/proto/cosmos/vesting/module/v1/module.proto b/proto/cosmos/vesting/module/v1/module.proto index 88bb89c1871..c3f406d7a7a 100644 --- a/proto/cosmos/vesting/module/v1/module.proto +++ b/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: "github.com/cosmos/cosmos-sdk/x/auth/vesting" + go_import: "cosmossdk.io/x/auth/vesting" }; } \ No newline at end of file diff --git a/proto/cosmos/vesting/v1beta1/tx.proto b/proto/cosmos/vesting/v1beta1/tx.proto index 97af97906d3..89d3b5aedb2 100644 --- a/proto/cosmos/vesting/v1beta1/tx.proto +++ b/proto/cosmos/vesting/v1beta1/tx.proto @@ -8,7 +8,7 @@ import "cosmos/vesting/v1beta1/vesting.proto"; import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; +option go_package = "cosmossdk.io/x/auth/vesting/types"; // Msg defines the bank Msg service. service Msg { diff --git a/proto/cosmos/vesting/v1beta1/vesting.proto b/proto/cosmos/vesting/v1beta1/vesting.proto index 12e9cdd2e09..219083f2ec5 100644 --- a/proto/cosmos/vesting/v1beta1/vesting.proto +++ b/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 = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; +option go_package = "cosmossdk.io/x/auth/vesting/types"; // BaseVestingAccount implements the VestingAccount interface. It contains all // the necessary fields needed for any vesting account implementation. diff --git a/runtime/app.go b/runtime/app.go index a581740e3b7..41746b0b1ed 100644 --- a/runtime/app.go +++ b/runtime/app.go @@ -12,6 +12,7 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" + authtx "cosmossdk.io/x/auth/tx" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" @@ -25,7 +26,6 @@ import ( servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - 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/server/api/server_test.go b/server/api/server_test.go index 683d6a87507..e878b3c2acc 100644 --- a/server/api/server_test.go +++ b/server/api/server_test.go @@ -18,6 +18,8 @@ import ( "github.com/stretchr/testify/suite" "google.golang.org/grpc/codes" + _ "cosmossdk.io/x/auth" + _ "cosmossdk.io/x/auth/tx/config" _ "cosmossdk.io/x/bank" banktypes "cosmossdk.io/x/bank/types" _ "cosmossdk.io/x/staking" @@ -26,8 +28,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/network" - _ "github.com/cosmos/cosmos-sdk/x/auth" - _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" _ "github.com/cosmos/cosmos-sdk/x/genutil" ) diff --git a/server/cmt_cmds.go b/server/cmt_cmds.go index 7c7f0f037fc..bd6be4dd431 100644 --- a/server/cmt_cmds.go +++ b/server/cmt_cmds.go @@ -17,6 +17,7 @@ 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" @@ -27,7 +28,6 @@ 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 f8bdef446a9..151a4d57461 100644 --- a/server/mock/tx.go +++ b/server/mock/tx.go @@ -8,12 +8,12 @@ import ( bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" 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" ) // An sdk.Tx which is its own sdk.Msg. diff --git a/simapp/ante.go b/simapp/ante.go index 58e85a7597d..918244a8140 100644 --- a/simapp/ante.go +++ b/simapp/ante.go @@ -3,10 +3,10 @@ package simapp import ( "errors" + "cosmossdk.io/x/auth/ante" circuitante "cosmossdk.io/x/circuit/ante" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/ante" ) // HandlerOptions are the options required for constructing a default SDK AnteHandler. diff --git a/simapp/app.go b/simapp/app.go index 1c3e2b11659..207fdd8d3d8 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -20,6 +20,18 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/auth" + "cosmossdk.io/x/auth/ante" + 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" @@ -87,17 +99,6 @@ 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" - 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" consensus "github.com/cosmos/cosmos-sdk/x/consensus" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" diff --git a/simapp/app_config.go b/simapp/app_config.go index 2f0164f651e..2cb1cb7ee69 100644 --- a/simapp/app_config.go +++ b/simapp/app_config.go @@ -29,6 +29,10 @@ import ( vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" "cosmossdk.io/core/appconfig" "cosmossdk.io/depinject" + _ "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 @@ -61,10 +65,6 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/types/module" - _ "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" _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" _ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects diff --git a/simapp/app_test.go b/simapp/app_test.go index 6c71d51edf6..bce2b9611fc 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -16,6 +16,8 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" "cosmossdk.io/log" + "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" @@ -37,8 +39,6 @@ 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/crisis" "github.com/cosmos/cosmos-sdk/x/genutil" ) diff --git a/simapp/app_v2.go b/simapp/app_v2.go index 51bf6dc4b53..4ceff737f67 100644 --- a/simapp/app_v2.go +++ b/simapp/app_v2.go @@ -39,10 +39,10 @@ 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" - 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" + "cosmossdk.io/x/auth" + authkeeper "cosmossdk.io/x/auth/keeper" + authsims "cosmossdk.io/x/auth/simulation" + authtypes "cosmossdk.io/x/auth/types" consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" ) diff --git a/simapp/genesis_account.go b/simapp/genesis_account.go index 5c9c7f9a03f..d242ba57060 100644 --- a/simapp/genesis_account.go +++ b/simapp/genesis_account.go @@ -3,8 +3,9 @@ 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 d813e9ec7e3..0fe897c1074 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/simd/cmd/commands.go b/simapp/simd/cmd/commands.go index abf4cef2cb1..b4fe7e6d81a 100644 --- a/simapp/simd/cmd/commands.go +++ b/simapp/simd/cmd/commands.go @@ -12,6 +12,7 @@ import ( "cosmossdk.io/log" "cosmossdk.io/simapp" confixcmd "cosmossdk.io/tools/confix/cmd" + authcmd "cosmossdk.io/x/auth/client/cli" banktypes "cosmossdk.io/x/bank/types" "github.com/cosmos/cosmos-sdk/client" @@ -27,7 +28,6 @@ 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/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" ) diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index c1a2654579d..603eef560d3 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -11,6 +11,9 @@ import ( "cosmossdk.io/log" "cosmossdk.io/simapp" "cosmossdk.io/simapp/params" + "cosmossdk.io/x/auth/tx" + txmodule "cosmossdk.io/x/auth/tx/config" + "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" @@ -20,9 +23,6 @@ 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" - txmodule "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_v2.go b/simapp/simd/cmd/root_v2.go index 47113624b1c..0949360140e 100644 --- a/simapp/simd/cmd/root_v2.go +++ b/simapp/simd/cmd/root_v2.go @@ -13,6 +13,9 @@ 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" @@ -23,9 +26,6 @@ import ( "github.com/cosmos/cosmos-sdk/server" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" "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 d0de26b57c7..46a9aadfcb1 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -16,6 +16,7 @@ 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" @@ -32,7 +33,6 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - 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 51f991960ef..bf5b10058fe 100644 --- a/simapp/simd/cmd/testnet_test.go +++ b/simapp/simd/cmd/testnet_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/log" + "cosmossdk.io/x/auth" "cosmossdk.io/x/bank" banktypes "cosmossdk.io/x/bank/types" "cosmossdk.io/x/distribution" @@ -20,7 +21,6 @@ import ( "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/types/module" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/consensus" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltest "github.com/cosmos/cosmos-sdk/x/genutil/client/testutil" diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index b240e811eb1..184a0ac5fdc 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -15,6 +15,7 @@ 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" @@ -28,7 +29,6 @@ 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/tests/e2e/auth/suite.go b/tests/e2e/auth/suite.go index 7f0164a7ee5..edace5e7fea 100644 --- a/tests/e2e/auth/suite.go +++ b/tests/e2e/auth/suite.go @@ -13,6 +13,9 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/math" + authcli "cosmossdk.io/x/auth/client/cli" + authclitestutil "cosmossdk.io/x/auth/client/testutil" + authtestutil "cosmossdk.io/x/auth/testutil" banktypes "cosmossdk.io/x/bank/types" govtestutil "cosmossdk.io/x/gov/client/testutil" govtypes "cosmossdk.io/x/gov/types/v1beta1" @@ -30,9 +33,6 @@ 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" - authtestutil "github.com/cosmos/cosmos-sdk/x/auth/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 70e5a26b045..8060eb3fc9c 100644 --- a/tests/e2e/authz/tx.go +++ b/tests/e2e/authz/tx.go @@ -27,7 +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" + authcli "cosmossdk.io/x/auth/client/cli" ) type E2ETestSuite struct { diff --git a/tests/e2e/gov/tx.go b/tests/e2e/gov/tx.go index 6bcd862168d..639a0ddb2bb 100644 --- a/tests/e2e/gov/tx.go +++ b/tests/e2e/gov/tx.go @@ -9,6 +9,7 @@ import ( "cosmossdk.io/math" "cosmossdk.io/x/gov/client/cli" + authtypes "cosmossdk.io/x/auth/types" govclitestutil "cosmossdk.io/x/gov/client/testutil" "cosmossdk.io/x/gov/types" v1 "cosmossdk.io/x/gov/types/v1" @@ -19,7 +20,6 @@ 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 1806fca465e..43cf72fed61 100644 --- a/tests/e2e/tx/benchmarks_test.go +++ b/tests/e2e/tx/benchmarks_test.go @@ -8,6 +8,7 @@ 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" @@ -18,7 +19,6 @@ 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 9d4daaf0c73..53caea5c76e 100644 --- a/tests/e2e/tx/service_test.go +++ b/tests/e2e/tx/service_test.go @@ -13,6 +13,10 @@ import ( errorsmod "cosmossdk.io/errors" "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" + authtx "cosmossdk.io/x/auth/tx" banktypes "cosmossdk.io/x/bank/types" "github.com/cosmos/cosmos-sdk/client" @@ -30,10 +34,6 @@ 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" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" ) var bankMsgSendEventAction = fmt.Sprintf("message.action='%s'", sdk.MsgTypeURL(&banktypes.MsgSend{})) diff --git a/tests/integration/auth/client/cli/suite_test.go b/tests/integration/auth/client/cli/suite_test.go index 4502694a03d..f3a33e55cfa 100644 --- a/tests/integration/auth/client/cli/suite_test.go +++ b/tests/integration/auth/client/cli/suite_test.go @@ -13,6 +13,9 @@ 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" @@ -32,9 +35,6 @@ 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/bank/app_test.go b/tests/integration/bank/app_test.go index 58f280bf577..c9a41f526cf 100644 --- a/tests/integration/bank/app_test.go +++ b/tests/integration/bank/app_test.go @@ -11,6 +11,9 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" sdkmath "cosmossdk.io/math" + _ "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" @@ -29,9 +32,6 @@ 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" _ "github.com/cosmos/cosmos-sdk/x/consensus" ) diff --git a/tests/integration/bank/bench_test.go b/tests/integration/bank/bench_test.go index 8cabe66aa41..628d85a50ee 100644 --- a/tests/integration/bank/bench_test.go +++ b/tests/integration/bank/bench_test.go @@ -9,6 +9,7 @@ import ( abci "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/require" + authtypes "cosmossdk.io/x/auth/types" _ "cosmossdk.io/x/bank" "cosmossdk.io/x/bank/testutil" stakingtypes "cosmossdk.io/x/staking/types" @@ -18,7 +19,6 @@ 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 bb0145e8bb4..ccdcfbcb151 100644 --- a/tests/integration/bank/keeper/deterministic_test.go +++ b/tests/integration/bank/keeper/deterministic_test.go @@ -10,6 +10,11 @@ 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" + _ "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" @@ -23,11 +28,6 @@ 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" - _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" _ "github.com/cosmos/cosmos-sdk/x/consensus" ) diff --git a/tests/integration/distribution/keeper/msg_server_test.go b/tests/integration/distribution/keeper/msg_server_test.go index 82165edd7bd..4afa781f6b2 100644 --- a/tests/integration/distribution/keeper/msg_server_test.go +++ b/tests/integration/distribution/keeper/msg_server_test.go @@ -13,6 +13,10 @@ 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" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktypes "cosmossdk.io/x/bank/types" @@ -33,10 +37,6 @@ 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" - 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 4c70f0bd5c6..a7bcd2c6520 100644 --- a/tests/integration/distribution/module_test.go +++ b/tests/integration/distribution/module_test.go @@ -7,12 +7,12 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" + authkeeper "cosmossdk.io/x/auth/keeper" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/distribution/testutil" "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/keeper/infraction_test.go b/tests/integration/evidence/keeper/infraction_test.go index 0fd658d30b3..875e4b8b870 100644 --- a/tests/integration/evidence/keeper/infraction_test.go +++ b/tests/integration/evidence/keeper/infraction_test.go @@ -16,6 +16,10 @@ 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" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktypes "cosmossdk.io/x/bank/types" @@ -42,10 +46,6 @@ 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" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" ) diff --git a/tests/integration/example/example_test.go b/tests/integration/example/example_test.go index 8870cff2adb..2b5cadc6ebe 100644 --- a/tests/integration/example/example_test.go +++ b/tests/integration/example/example_test.go @@ -9,6 +9,10 @@ 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" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/mint" mintkeeper "cosmossdk.io/x/mint/keeper" minttypes "cosmossdk.io/x/mint/types" @@ -18,10 +22,6 @@ 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" - 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/common_test.go b/tests/integration/gov/common_test.go index c5b1e7e21b8..731d0e9a2bd 100644 --- a/tests/integration/gov/common_test.go +++ b/tests/integration/gov/common_test.go @@ -6,13 +6,13 @@ 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" stakingtypes "cosmossdk.io/x/staking/types" sdk "github.com/cosmos/cosmos-sdk/types" - 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 8c5aee54436..c099e0c838c 100644 --- a/tests/integration/gov/genesis_test.go +++ b/tests/integration/gov/genesis_test.go @@ -11,6 +11,9 @@ import ( "cosmossdk.io/core/header" "cosmossdk.io/depinject" "cosmossdk.io/log" + _ "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" @@ -27,9 +30,6 @@ 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" _ "github.com/cosmos/cosmos-sdk/x/consensus" ) diff --git a/tests/integration/gov/keeper/common_test.go b/tests/integration/gov/keeper/common_test.go index 2abf6f79d4a..ba176a36633 100644 --- a/tests/integration/gov/keeper/common_test.go +++ b/tests/integration/gov/keeper/common_test.go @@ -6,6 +6,7 @@ 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" @@ -13,7 +14,6 @@ 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 3219f97f1f5..d7a92cc9589 100644 --- a/tests/integration/gov/keeper/keeper_test.go +++ b/tests/integration/gov/keeper/keeper_test.go @@ -16,6 +16,10 @@ import ( "cosmossdk.io/x/gov/types" v1 "cosmossdk.io/x/gov/types/v1" "cosmossdk.io/x/gov/types/v1beta1" + "cosmossdk.io/x/auth" + authkeeper "cosmossdk.io/x/auth/keeper" + authsims "cosmossdk.io/x/auth/simulation" + authtypes "cosmossdk.io/x/auth/types" minttypes "cosmossdk.io/x/mint/types" poolkeeper "cosmossdk.io/x/protocolpool/keeper" pooltypes "cosmossdk.io/x/protocolpool/types" @@ -29,10 +33,6 @@ 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" - 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 bad985c29a8..c482716aae9 100644 --- a/tests/integration/gov/module_test.go +++ b/tests/integration/gov/module_test.go @@ -7,14 +7,14 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" + 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/rapidgen/rapidgen.go b/tests/integration/rapidgen/rapidgen.go index bfa24184209..808e9b1503c 100644 --- a/tests/integration/rapidgen/rapidgen.go +++ b/tests/integration/rapidgen/rapidgen.go @@ -29,6 +29,8 @@ 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" disttypes "cosmossdk.io/x/distribution/types" @@ -43,8 +45,6 @@ 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" consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" ) diff --git a/tests/integration/runtime/query_test.go b/tests/integration/runtime/query_test.go index e2385dc8747..de6c8e91e86 100644 --- a/tests/integration/runtime/query_test.go +++ b/tests/integration/runtime/query_test.go @@ -14,6 +14,8 @@ import ( reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" "cosmossdk.io/depinject" "cosmossdk.io/log" + _ "cosmossdk.io/x/auth" + _ "cosmossdk.io/x/auth/tx/config" _ "cosmossdk.io/x/bank" _ "cosmossdk.io/x/staking" @@ -22,8 +24,6 @@ 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" _ "github.com/cosmos/cosmos-sdk/x/consensus" ) diff --git a/tests/integration/server/grpc/server_test.go b/tests/integration/server/grpc/server_test.go index a8276d16c40..19cf44cc488 100644 --- a/tests/integration/server/grpc/server_test.go +++ b/tests/integration/server/grpc/server_test.go @@ -12,6 +12,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" + authclient "cosmossdk.io/x/auth/client" banktypes "cosmossdk.io/x/bank/types" stakingtypes "cosmossdk.io/x/staking/types" @@ -26,7 +27,6 @@ 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" - authclient "github.com/cosmos/cosmos-sdk/x/auth/client" ) type IntegrationTestSuite struct { diff --git a/tests/integration/slashing/keeper/keeper_test.go b/tests/integration/slashing/keeper/keeper_test.go index e71e8c6d583..82fdcfe6fde 100644 --- a/tests/integration/slashing/keeper/keeper_test.go +++ b/tests/integration/slashing/keeper/keeper_test.go @@ -11,6 +11,9 @@ import ( "cosmossdk.io/core/comet" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" + "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" @@ -31,9 +34,6 @@ 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" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type fixture struct { diff --git a/tests/integration/staking/keeper/common_test.go b/tests/integration/staking/keeper/common_test.go index e747a303c2f..f26884a5a50 100644 --- a/tests/integration/staking/keeper/common_test.go +++ b/tests/integration/staking/keeper/common_test.go @@ -10,6 +10,10 @@ 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" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktypes "cosmossdk.io/x/bank/types" @@ -26,10 +30,6 @@ 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" ) var PKs = simtestutil.CreateTestPubKeys(500) diff --git a/tests/integration/staking/keeper/deterministic_test.go b/tests/integration/staking/keeper/deterministic_test.go index 3cd4b39f524..1f16b882765 100644 --- a/tests/integration/staking/keeper/deterministic_test.go +++ b/tests/integration/staking/keeper/deterministic_test.go @@ -11,6 +11,10 @@ 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" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank" bankkeeper "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" @@ -30,10 +34,6 @@ 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" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/tests/integration/staking/simulation/operations_test.go b/tests/integration/staking/simulation/operations_test.go index b684da8688f..c581db3d120 100644 --- a/tests/integration/staking/simulation/operations_test.go +++ b/tests/integration/staking/simulation/operations_test.go @@ -17,6 +17,8 @@ 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" @@ -37,8 +39,6 @@ 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 864f7445c9f..e68839f2035 100644 --- a/tests/integration/tx/aminojson/aminojson_test.go +++ b/tests/integration/tx/aminojson/aminojson_test.go @@ -32,6 +32,13 @@ 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" @@ -65,13 +72,6 @@ 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" "github.com/cosmos/cosmos-sdk/x/consensus" ) diff --git a/tests/integration/tx/decode_test.go b/tests/integration/tx/decode_test.go index 694161f1250..3458a363886 100644 --- a/tests/integration/tx/decode_test.go +++ b/tests/integration/tx/decode_test.go @@ -11,6 +11,9 @@ 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/distribution" @@ -33,9 +36,6 @@ 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" "github.com/cosmos/cosmos-sdk/x/consensus" ) diff --git a/tests/starship/tests/client.go b/tests/starship/tests/client.go index abfde6270ff..dfe27b178d1 100644 --- a/tests/starship/tests/client.go +++ b/tests/starship/tests/client.go @@ -9,13 +9,14 @@ import ( "google.golang.org/grpc" + xauthsigning "cosmossdk.io/x/auth/signing" + auth "cosmossdk.io/x/auth/types" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" - xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - auth "github.com/cosmos/cosmos-sdk/x/auth/types" ) // CreditFromFaucet will request facuet of the chain for tokens to address diff --git a/testutil/cli/tx.go b/testutil/cli/tx.go index b033657a3d8..93d3d8a45c8 100644 --- a/testutil/cli/tx.go +++ b/testutil/cli/tx.go @@ -3,11 +3,12 @@ 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 389469b0038..cbb57982320 100644 --- a/testutil/integration/router.go +++ b/testutil/integration/router.go @@ -13,6 +13,8 @@ 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" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" @@ -21,8 +23,6 @@ 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" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" ) diff --git a/testutil/network/network.go b/testutil/network/network.go index 24a8da27f99..96621b78459 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -30,6 +30,9 @@ import ( sdkmath "cosmossdk.io/math" "cosmossdk.io/math/unsafe" pruningtypes "cosmossdk.io/store/pruning/types" + _ "cosmossdk.io/x/auth" // import auth as a blank + _ "cosmossdk.io/x/auth/tx/config" // import auth tx config as a blank + authtypes "cosmossdk.io/x/auth/types" _ "cosmossdk.io/x/bank" // import bank as a blank banktypes "cosmossdk.io/x/bank/types" _ "cosmossdk.io/x/staking" // import staking as a blank @@ -56,9 +59,6 @@ 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" // import auth as a blank - _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import auth tx config as a blank - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" _ "github.com/cosmos/cosmos-sdk/x/consensus" // import consensus as a blank "github.com/cosmos/cosmos-sdk/x/genutil" ) diff --git a/testutil/network/util.go b/testutil/network/util.go index 9ead5ba11bc..75a0b8eb248 100644 --- a/testutil/network/util.go +++ b/testutil/network/util.go @@ -19,13 +19,13 @@ 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/server" "github.com/cosmos/cosmos-sdk/server/api" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" servercmtlog "github.com/cosmos/cosmos-sdk/server/log" - 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/testutil/sims/app_helpers.go b/testutil/sims/app_helpers.go index 25a79f1e481..e58103f7890 100644 --- a/testutil/sims/app_helpers.go +++ b/testutil/sims/app_helpers.go @@ -13,6 +13,7 @@ import ( "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" @@ -25,7 +26,6 @@ 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/simulation_helpers_test.go b/testutil/sims/simulation_helpers_test.go index 349c5535c42..dd30429745c 100644 --- a/testutil/sims/simulation_helpers_test.go +++ b/testutil/sims/simulation_helpers_test.go @@ -12,11 +12,11 @@ import ( "cosmossdk.io/store/metrics" "cosmossdk.io/store/rootmulti" storetypes "cosmossdk.io/store/types" + authtypes "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/kv" "github.com/cosmos/cosmos-sdk/types/simulation" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestGetSimulationLog(t *testing.T) { diff --git a/testutil/sims/state_helpers.go b/testutil/sims/state_helpers.go index 1ad9b2101c8..3c1575a2e4d 100644 --- a/testutil/sims/state_helpers.go +++ b/testutil/sims/state_helpers.go @@ -13,6 +13,7 @@ import ( "github.com/cosmos/gogoproto/proto" "cosmossdk.io/math" + authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" stakingtypes "cosmossdk.io/x/staking/types" @@ -22,7 +23,6 @@ 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 96a2054f638..7120b4d672f 100644 --- a/testutil/sims/tx_helpers.go +++ b/testutil/sims/tx_helpers.go @@ -11,6 +11,7 @@ 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" @@ -18,7 +19,6 @@ 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/types/mempool/mempool_test.go b/types/mempool/mempool_test.go index 4f0906bd201..b55470fcfd9 100644 --- a/types/mempool/mempool_test.go +++ b/types/mempool/mempool_test.go @@ -10,6 +10,7 @@ import ( protov2 "google.golang.org/protobuf/proto" "cosmossdk.io/log" + "cosmossdk.io/x/auth/signing" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -17,7 +18,6 @@ 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" "github.com/cosmos/cosmos-sdk/x/counter" ) diff --git a/types/mempool/priority_nonce.go b/types/mempool/priority_nonce.go index 6f344a1c832..94ab96bc7f6 100644 --- a/types/mempool/priority_nonce.go +++ b/types/mempool/priority_nonce.go @@ -8,8 +8,9 @@ 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/priority_nonce_test.go b/types/mempool/priority_nonce_test.go index ad3a1006afd..091e8b91d0e 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 7645bda3399..524d20a73c7 100644 --- a/types/mempool/sender_nonce.go +++ b/types/mempool/sender_nonce.go @@ -10,8 +10,9 @@ 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 07b2b662bdc..0d5e10851e3 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" mempool "github.com/cosmos/cosmos-sdk/types/mempool" - "github.com/cosmos/cosmos-sdk/x/auth/signing" ) var ( diff --git a/types/module/module_test.go b/types/module/module_test.go index 69af1f7ab0b..020f9cbc9b6 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 42efba87de1..cd3ddf20621 100644 --- a/types/module/testutil/codec.go +++ b/types/module/testutil/codec.go @@ -1,13 +1,14 @@ 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/types/query/pagination_test.go b/types/query/pagination_test.go index d568689cd8f..3daa5ba0942 100644 --- a/types/query/pagination_test.go +++ b/types/query/pagination_test.go @@ -12,6 +12,8 @@ import ( "cosmossdk.io/log" "cosmossdk.io/math" "cosmossdk.io/store/prefix" + _ "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" @@ -27,8 +29,6 @@ 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" _ "github.com/cosmos/cosmos-sdk/x/consensus" ) diff --git a/x/auth/README.md b/x/auth/README.md index 1d5e22b5d87..171fe3d8e20 100644 --- a/x/auth/README.md +++ b/x/auth/README.md @@ -3,692 +3,3 @@ sidebar_position: 1 --- # `x/auth` - -## Abstract - -This document specifies the auth module of the Cosmos SDK. - -The auth module is responsible for specifying the base transaction and account types -for an application, since the SDK itself is agnostic to these particulars. It contains -the middlewares, where all basic transaction validity checks (signatures, nonces, auxiliary fields) -are performed, and exposes the account keeper, which allows other modules to read, write, and modify accounts. - -This module is used in the Cosmos Hub. - -## Contents - -* [Concepts](#concepts) - * [Gas & Fees](#gas--fees) -* [State](#state) - * [Accounts](#accounts) -* [AnteHandlers](#antehandlers) -* [Keepers](#keepers) - * [Account Keeper](#account-keeper) -* [Parameters](#parameters) -* [Client](#client) - * [CLI](#cli) - * [gRPC](#grpc) - * [REST](#rest) - -## Concepts - -**Note:** The auth module is different from the [authz module](../modules/authz/). - -The differences are: - -* `auth` - authentication of accounts and transactions for Cosmos SDK applications and is responsible for specifying the base transaction and account types. -* `authz` - authorization for accounts to perform actions on behalf of other accounts and enables a granter to grant authorizations to a grantee that allows the grantee to execute messages on behalf of the granter. - -### Gas & Fees - -Fees serve two purposes for an operator of the network. - -Fees limit the growth of the state stored by every full node and allow for -general purpose censorship of transactions of little economic value. Fees -are best suited as an anti-spam mechanism where validators are disinterested in -the use of the network and identities of users. - -Fees are determined by the gas limits and gas prices transactions provide, where -`fees = ceil(gasLimit * gasPrices)`. Txs incur gas costs for all state reads/writes, -signature verification, as well as costs proportional to the tx size. Operators -should set minimum gas prices when starting their nodes. They must set the unit -costs of gas in each token denomination they wish to support: - -`simd start ... --minimum-gas-prices=0.00001stake;0.05photinos` - -When adding transactions to mempool or gossipping transactions, validators check -if the transaction's gas prices, which are determined by the provided fees, meet -any of the validator's minimum gas prices. In other words, a transaction must -provide a fee of at least one denomination that matches a validator's minimum -gas price. - -CometBFT does not currently provide fee based mempool prioritization, and fee -based mempool filtering is local to node and not part of consensus. But with -minimum gas prices set, such a mechanism could be implemented by node operators. - -Because the market value for tokens will fluctuate, validators are expected to -dynamically adjust their minimum gas prices to a level that would encourage the -use of the network. - -## State - -### Accounts - -Accounts contain authentication information for a uniquely identified external user of an SDK blockchain, -including public key, address, and account number / sequence number for replay protection. For efficiency, -since account balances must also be fetched to pay fees, account structs also store the balance of a user -as `sdk.Coins`. - -Accounts are exposed externally as an interface, and stored internally as -either a base account or vesting account. Module clients wishing to add more -account types may do so. - -* `0x01 | Address -> ProtocolBuffer(account)` - -#### Account Interface - -The account interface exposes methods to read and write standard account information. -Note that all of these methods operate on an account struct conforming to the -interface - in order to write the account to the store, the account keeper will -need to be used. - -```go -// AccountI is an interface used to store coins at a given address within state. -// It presumes a notion of sequence numbers for replay protection, -// a notion of account numbers for replay protection for previously pruned accounts, -// and a pubkey for authentication purposes. -// -// Many complex conditions can be used in the concrete struct which implements AccountI. -type AccountI interface { - proto.Message - - GetAddress() sdk.AccAddress - SetAddress(sdk.AccAddress) error // errors if already set. - - GetPubKey() crypto.PubKey // can return nil. - SetPubKey(crypto.PubKey) error - - GetAccountNumber() uint64 - SetAccountNumber(uint64) error - - GetSequence() uint64 - SetSequence(uint64) error - - // Ensure that account implements stringer - String() string -} -``` - -##### Base Account - -A base account is the simplest and most common account type, which just stores all requisite -fields directly in a struct. - -```protobuf -// BaseAccount defines a base account type. It contains all the necessary fields -// for basic account functionality. Any custom account type should extend this -// type for additional functionality (e.g. vesting). -message BaseAccount { - string address = 1; - google.protobuf.Any pub_key = 2; - uint64 account_number = 3; - uint64 sequence = 4; -} -``` - -### Vesting Account - -See [Vesting](https://docs.cosmos.network/main/modules/auth/vesting/). - -## AnteHandlers - -The `x/auth` module presently has no transaction handlers of its own, but does expose the special `AnteHandler`, used for performing basic validity checks on a transaction, such that it could be thrown out of the mempool. -The `AnteHandler` can be seen as a set of decorators that check transactions within the current context, per [ADR 010](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-010-modular-antehandler.md). - -Note that the `AnteHandler` is called on both `CheckTx` and `DeliverTx`, as CometBFT proposers presently have the ability to include in their proposed block transactions which fail `CheckTx`. - -### Decorators - -The auth module provides `AnteDecorator`s that are recursively chained together into a single `AnteHandler` in the following order: - -* `SetUpContextDecorator`: Sets the `GasMeter` in the `Context` and wraps the next `AnteHandler` with a defer clause to recover from any downstream `OutOfGas` panics in the `AnteHandler` chain to return an error with information on gas provided and gas used. - -* `RejectExtensionOptionsDecorator`: Rejects all extension options which can optionally be included in protobuf transactions. - -* `MempoolFeeDecorator`: Checks if the `tx` fee is above local mempool `minFee` parameter during `CheckTx`. - -* `ValidateBasicDecorator`: Calls `tx.ValidateBasic` and returns any non-nil error. - -* `TxTimeoutHeightDecorator`: Check for a `tx` height timeout. - -* `ValidateMemoDecorator`: Validates `tx` memo with application parameters and returns any non-nil error. - -* `ConsumeGasTxSizeDecorator`: Consumes gas proportional to the `tx` size based on application parameters. - -* `DeductFeeDecorator`: Deducts the `FeeAmount` from first signer of the `tx`. If the `x/feegrant` module is enabled and a fee granter is set, it deducts fees from the fee granter account. - -* `SetPubKeyDecorator`: Sets the pubkey from a `tx`'s signers that does not already have its corresponding pubkey saved in the state machine and in the current context. - -* `ValidateSigCountDecorator`: Validates the number of signatures in `tx` based on app-parameters. - -* `SigGasConsumeDecorator`: Consumes parameter-defined amount of gas for each signature. This requires pubkeys to be set in context for all signers as part of `SetPubKeyDecorator`. - -* `SigVerificationDecorator`: Verifies all signatures are valid. This requires pubkeys to be set in context for all signers as part of `SetPubKeyDecorator`. - -* `IncrementSequenceDecorator`: Increments the account sequence for each signer to prevent replay attacks. - -## Keepers - -The auth module only exposes one keeper, the account keeper, which can be used to read and write accounts. - -### Account Keeper - -Presently only one fully-permissioned account keeper is exposed, which has the ability to both read and write -all fields of all accounts, and to iterate over all stored accounts. - -```go -// AccountKeeperI is the interface contract that x/auth's keeper implements. -type AccountKeeperI interface { - // Return a new account with the next account number and the specified address. Does not save the new account to the store. - NewAccountWithAddress(sdk.Context, sdk.AccAddress) types.AccountI - - // Return a new account with the next account number. Does not save the new account to the store. - NewAccount(sdk.Context, types.AccountI) types.AccountI - - // Check if an account exists in the store. - HasAccount(sdk.Context, sdk.AccAddress) bool - - // Retrieve an account from the store. - GetAccount(sdk.Context, sdk.AccAddress) types.AccountI - - // Set an account in the store. - SetAccount(sdk.Context, types.AccountI) - - // Remove an account from the store. - RemoveAccount(sdk.Context, types.AccountI) - - // Iterate over all accounts, calling the provided function. Stop iteration when it returns true. - IterateAccounts(sdk.Context, func(types.AccountI) bool) - - // Fetch the public key of an account at a specified address - GetPubKey(sdk.Context, sdk.AccAddress) (crypto.PubKey, error) - - // Fetch the sequence of an account at a specified address. - GetSequence(sdk.Context, sdk.AccAddress) (uint64, error) - - // Fetch the next account number, and increment the internal counter. - NextAccountNumber(sdk.Context) uint64 -} -``` - -## Parameters - -The auth module contains the following parameters: - -| Key | Type | Example | -| ---------------------- | --------------- | ------- | -| MaxMemoCharacters | uint64 | 256 | -| TxSigLimit | uint64 | 7 | -| TxSizeCostPerByte | uint64 | 10 | -| SigVerifyCostED25519 | uint64 | 590 | -| SigVerifyCostSecp256k1 | uint64 | 1000 | - -## Client - -### CLI - -A user can query and interact with the `auth` module using the CLI. - -### Query - -The `query` commands allow users to query `auth` state. - -```bash -simd query auth --help -``` - -#### account - -The `account` command allow users to query for an account by it's address. - -```bash -simd query auth account [address] [flags] -``` - -Example: - -```bash -simd query auth account cosmos1... -``` - -Example Output: - -```bash -'@type': /cosmos.auth.v1beta1.BaseAccount -account_number: "0" -address: cosmos1zwg6tpl8aw4rawv8sgag9086lpw5hv33u5ctr2 -pub_key: - '@type': /cosmos.crypto.secp256k1.PubKey - key: ApDrE38zZdd7wLmFS9YmqO684y5DG6fjZ4rVeihF/AQD -sequence: "1" -``` - -#### accounts - -The `accounts` command allow users to query all the available accounts. - -```bash -simd query auth accounts [flags] -``` - -Example: - -```bash -simd query auth accounts -``` - -Example Output: - -```bash -accounts: -- '@type': /cosmos.auth.v1beta1.BaseAccount - account_number: "0" - address: cosmos1zwg6tpl8aw4rawv8sgag9086lpw5hv33u5ctr2 - pub_key: - '@type': /cosmos.crypto.secp256k1.PubKey - key: ApDrE38zZdd7wLmFS9YmqO684y5DG6fjZ4rVeihF/AQD - sequence: "1" -- '@type': /cosmos.auth.v1beta1.ModuleAccount - base_account: - account_number: "8" - address: cosmos1yl6hdjhmkf37639730gffanpzndzdpmhwlkfhr - pub_key: null - sequence: "0" - name: transfer - permissions: - - minter - - burner -- '@type': /cosmos.auth.v1beta1.ModuleAccount - base_account: - account_number: "4" - address: cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh - pub_key: null - sequence: "0" - name: bonded_tokens_pool - permissions: - - burner - - staking -- '@type': /cosmos.auth.v1beta1.ModuleAccount - base_account: - account_number: "5" - address: cosmos1tygms3xhhs3yv487phx3dw4a95jn7t7lpm470r - pub_key: null - sequence: "0" - name: not_bonded_tokens_pool - permissions: - - burner - - staking -- '@type': /cosmos.auth.v1beta1.ModuleAccount - base_account: - account_number: "6" - address: cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn - pub_key: null - sequence: "0" - name: gov - permissions: - - burner -- '@type': /cosmos.auth.v1beta1.ModuleAccount - base_account: - account_number: "3" - address: cosmos1jv65s3grqf6v6jl3dp4t6c9t9rk99cd88lyufl - pub_key: null - sequence: "0" - name: distribution - permissions: [] -- '@type': /cosmos.auth.v1beta1.BaseAccount - account_number: "1" - address: cosmos147k3r7v2tvwqhcmaxcfql7j8rmkrlsemxshd3j - pub_key: null - sequence: "0" -- '@type': /cosmos.auth.v1beta1.ModuleAccount - base_account: - account_number: "7" - address: cosmos1m3h30wlvsf8llruxtpukdvsy0km2kum8g38c8q - pub_key: null - sequence: "0" - name: mint - permissions: - - minter -- '@type': /cosmos.auth.v1beta1.ModuleAccount - base_account: - account_number: "2" - address: cosmos17xpfvakm2amg962yls6f84z3kell8c5lserqta - pub_key: null - sequence: "0" - name: fee_collector - permissions: [] -pagination: - next_key: null - total: "0" -``` - -#### params - -The `params` command allow users to query the current auth parameters. - -```bash -simd query auth params [flags] -``` - -Example: - -```bash -simd query auth params -``` - -Example Output: - -```bash -max_memo_characters: "256" -sig_verify_cost_ed25519: "590" -sig_verify_cost_secp256k1: "1000" -tx_sig_limit: "7" -tx_size_cost_per_byte: "10" -``` - -### Transactions - -The `auth` module supports transactions commands to help you with signing and more. Compared to other modules you can access directly the `auth` module transactions commands using the only `tx` command. - -Use directly the `--help` flag to get more information about the `tx` command. - -```bash -simd tx --help -``` - -#### `sign` - -The `sign` command allows users to sign transactions that was generated offline. - -```bash -simd tx sign tx.json --from $ALICE > tx.signed.json -``` - -The result is a signed transaction that can be broadcasted to the network thanks to the broadcast command. - -More information about the `sign` command can be found running `simd tx sign --help`. - -#### `sign-batch` - -The `sign-batch` command allows users to sign multiples offline generated transactions. -The transactions can be in one file, with one tx per line, or in multiple files. - -```bash -simd tx sign txs.json --from $ALICE > tx.signed.json -``` - -or - -```bash -simd tx sign tx1.json tx2.json tx3.json --from $ALICE > tx.signed.json -``` - -The result is multiples signed transactions. For combining the signed transactions into one transactions, use the `--append` flag. - -More information about the `sign-batch` command can be found running `simd tx sign-batch --help`. - -#### `multi-sign` - -The `multi-sign` command allows users to sign transactions that was generated offline by a multisig account. - -```bash -simd tx multisign transaction.json k1k2k3 k1sig.json k2sig.json k3sig.json -``` - -Where `k1k2k3` is the multisig account address, `k1sig.json` is the signature of the first signer, `k2sig.json` is the signature of the second signer, and `k3sig.json` is the signature of the third signer. - -More information about the `multi-sign` command can be found running `simd tx multi-sign --help`. - -#### `multisign-batch` - -The `multisign-batch` works the same way as `sign-batch`, but for multisig accounts. -With the difference that the `multisign-batch` command requires all transactions to be in one file, and the `--append` flag does not exist. - -More information about the `multisign-batch` command can be found running `simd tx multisign-batch --help`. - -#### `validate-signatures` - -The `validate-signatures` command allows users to validate the signatures of a signed transaction. - -```bash -$ simd tx validate-signatures tx.signed.json -Signers: - 0: cosmos1l6vsqhh7rnwsyr2kyz3jjg3qduaz8gwgyl8275 - -Signatures: - 0: cosmos1l6vsqhh7rnwsyr2kyz3jjg3qduaz8gwgyl8275 [OK] -``` - -More information about the `validate-signatures` command can be found running `simd tx validate-signatures --help`. - -#### `broadcast` - -The `broadcast` command allows users to broadcast a signed transaction to the network. - -```bash -simd tx broadcast tx.signed.json -``` - -More information about the `broadcast` command can be found running `simd tx broadcast --help`. - - -### gRPC - -A user can query the `auth` module using gRPC endpoints. - -#### Account - -The `account` endpoint allow users to query for an account by it's address. - -```bash -cosmos.auth.v1beta1.Query/Account -``` - -Example: - -```bash -grpcurl -plaintext \ - -d '{"address":"cosmos1.."}' \ - localhost:9090 \ - cosmos.auth.v1beta1.Query/Account -``` - -Example Output: - -```bash -{ - "account":{ - "@type":"/cosmos.auth.v1beta1.BaseAccount", - "address":"cosmos1zwg6tpl8aw4rawv8sgag9086lpw5hv33u5ctr2", - "pubKey":{ - "@type":"/cosmos.crypto.secp256k1.PubKey", - "key":"ApDrE38zZdd7wLmFS9YmqO684y5DG6fjZ4rVeihF/AQD" - }, - "sequence":"1" - } -} -``` - -#### Accounts - -The `accounts` endpoint allow users to query all the available accounts. - -```bash -cosmos.auth.v1beta1.Query/Accounts -``` - -Example: - -```bash -grpcurl -plaintext \ - localhost:9090 \ - cosmos.auth.v1beta1.Query/Accounts -``` - -Example Output: - -```bash -{ - "accounts":[ - { - "@type":"/cosmos.auth.v1beta1.BaseAccount", - "address":"cosmos1zwg6tpl8aw4rawv8sgag9086lpw5hv33u5ctr2", - "pubKey":{ - "@type":"/cosmos.crypto.secp256k1.PubKey", - "key":"ApDrE38zZdd7wLmFS9YmqO684y5DG6fjZ4rVeihF/AQD" - }, - "sequence":"1" - }, - { - "@type":"/cosmos.auth.v1beta1.ModuleAccount", - "baseAccount":{ - "address":"cosmos1yl6hdjhmkf37639730gffanpzndzdpmhwlkfhr", - "accountNumber":"8" - }, - "name":"transfer", - "permissions":[ - "minter", - "burner" - ] - }, - { - "@type":"/cosmos.auth.v1beta1.ModuleAccount", - "baseAccount":{ - "address":"cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh", - "accountNumber":"4" - }, - "name":"bonded_tokens_pool", - "permissions":[ - "burner", - "staking" - ] - }, - { - "@type":"/cosmos.auth.v1beta1.ModuleAccount", - "baseAccount":{ - "address":"cosmos1tygms3xhhs3yv487phx3dw4a95jn7t7lpm470r", - "accountNumber":"5" - }, - "name":"not_bonded_tokens_pool", - "permissions":[ - "burner", - "staking" - ] - }, - { - "@type":"/cosmos.auth.v1beta1.ModuleAccount", - "baseAccount":{ - "address":"cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn", - "accountNumber":"6" - }, - "name":"gov", - "permissions":[ - "burner" - ] - }, - { - "@type":"/cosmos.auth.v1beta1.ModuleAccount", - "baseAccount":{ - "address":"cosmos1jv65s3grqf6v6jl3dp4t6c9t9rk99cd88lyufl", - "accountNumber":"3" - }, - "name":"distribution" - }, - { - "@type":"/cosmos.auth.v1beta1.BaseAccount", - "accountNumber":"1", - "address":"cosmos147k3r7v2tvwqhcmaxcfql7j8rmkrlsemxshd3j" - }, - { - "@type":"/cosmos.auth.v1beta1.ModuleAccount", - "baseAccount":{ - "address":"cosmos1m3h30wlvsf8llruxtpukdvsy0km2kum8g38c8q", - "accountNumber":"7" - }, - "name":"mint", - "permissions":[ - "minter" - ] - }, - { - "@type":"/cosmos.auth.v1beta1.ModuleAccount", - "baseAccount":{ - "address":"cosmos17xpfvakm2amg962yls6f84z3kell8c5lserqta", - "accountNumber":"2" - }, - "name":"fee_collector" - } - ], - "pagination":{ - "total":"9" - } -} -``` - -#### Params - -The `params` endpoint allow users to query the current auth parameters. - -```bash -cosmos.auth.v1beta1.Query/Params -``` - -Example: - -```bash -grpcurl -plaintext \ - localhost:9090 \ - cosmos.auth.v1beta1.Query/Params -``` - -Example Output: - -```bash -{ - "params": { - "maxMemoCharacters": "256", - "txSigLimit": "7", - "txSizeCostPerByte": "10", - "sigVerifyCostEd25519": "590", - "sigVerifyCostSecp256k1": "1000" - } -} -``` - -### REST - -A user can query the `auth` module using REST endpoints. - -#### Account - -The `account` endpoint allow users to query for an account by it's address. - -```bash -/cosmos/auth/v1beta1/account?address={address} -``` - -#### Accounts - -The `accounts` endpoint allow users to query all the available accounts. - -```bash -/cosmos/auth/v1beta1/accounts -``` - -#### Params - -The `params` endpoint allow users to query the current auth parameters. - -```bash -/cosmos/auth/v1beta1/params -``` diff --git a/x/auth/ante/ante.go b/x/auth/ante/ante.go index 8b2277aeb88..9c1371a67b4 100644 --- a/x/auth/ante/ante.go +++ b/x/auth/ante/ante.go @@ -3,12 +3,12 @@ package ante import ( errorsmod "cosmossdk.io/errors" storetypes "cosmossdk.io/store/types" + "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/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 be1948ae97a..b6f56366b19 100644 --- a/x/auth/ante/ante_test.go +++ b/x/auth/ante/ante_test.go @@ -13,6 +13,8 @@ import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + "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" @@ -22,8 +24,6 @@ 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 46a2e27f013..980cd6f7412 100644 --- a/x/auth/ante/basic.go +++ b/x/auth/ante/basic.go @@ -3,6 +3,8 @@ package ante import ( 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" @@ -10,8 +12,6 @@ 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 baac049acc6..a0813763166 100644 --- a/x/auth/ante/basic_test.go +++ b/x/auth/ante/basic_test.go @@ -7,6 +7,7 @@ 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/crypto/types/multisig" @@ -14,7 +15,6 @@ 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 139204cedf7..2d5e5e558de 100644 --- a/x/auth/ante/expected_keepers.go +++ b/x/auth/ante/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 contract needed for AccountKeeper related APIs. diff --git a/x/auth/ante/ext_test.go b/x/auth/ante/ext_test.go index 9181c7664a7..229d62af37e 100644 --- a/x/auth/ante/ext_test.go +++ b/x/auth/ante/ext_test.go @@ -5,11 +5,12 @@ 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 7581765ecf7..c1d2050cbfa 100644 --- a/x/auth/ante/fee.go +++ b/x/auth/ante/fee.go @@ -5,10 +5,10 @@ import ( "fmt" 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 check 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 3cb46158f10..9c012e6fb12 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 ffc8fe97f84..a746e216c9c 100644 --- a/x/auth/ante/feegrant_test.go +++ b/x/auth/ante/feegrant_test.go @@ -10,6 +10,12 @@ 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" @@ -18,11 +24,6 @@ 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 c9fa03b461a..6f36e69a6be 100644 --- a/x/auth/ante/setup_test.go +++ b/x/auth/ante/setup_test.go @@ -7,13 +7,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 c588f2b7827..4cd62c57ca6 100644 --- a/x/auth/ante/sigverify.go +++ b/x/auth/ante/sigverify.go @@ -10,6 +10,8 @@ import ( errorsmod "cosmossdk.io/errors" storetypes "cosmossdk.io/store/types" + 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" @@ -22,8 +24,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "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_test.go b/x/auth/ante/sigverify_test.go index ee19482d8c6..2e1a900047e 100644 --- a/x/auth/ante/sigverify_test.go +++ b/x/auth/ante/sigverify_test.go @@ -9,6 +9,12 @@ import ( bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" 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" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" @@ -20,12 +26,6 @@ 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 TestSetPubKey(t *testing.T) { diff --git a/x/auth/ante/testutil/expected_keepers_mocks.go b/x/auth/ante/testutil/expected_keepers_mocks.go index f6c54d54179..7c45bfd2c7b 100644 --- a/x/auth/ante/testutil/expected_keepers_mocks.go +++ b/x/auth/ante/testutil/expected_keepers_mocks.go @@ -9,8 +9,8 @@ import ( reflect "reflect" address "cosmossdk.io/core/address" - types "github.com/cosmos/cosmos-sdk/types" - types0 "github.com/cosmos/cosmos-sdk/x/auth/types" + types "cosmossdk.io/x/auth/types" + types0 "github.com/cosmos/cosmos-sdk/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 types.AccAddress) types.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].(types.AccountI) + ret0, _ := ret[0].(types0.AccountI) return ret0 } @@ -66,10 +66,10 @@ func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomo } // GetModuleAddress mocks base method. -func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types.AccAddress { +func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types0.AccAddress { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAddress", moduleName) - ret0, _ := ret[0].(types.AccAddress) + ret0, _ := ret[0].(types0.AccAddress) return ret0 } @@ -80,10 +80,10 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName interface{} } // GetParams mocks base method. -func (m *MockAccountKeeper) GetParams(ctx context.Context) types0.Params { +func (m *MockAccountKeeper) GetParams(ctx context.Context) types.Params { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetParams", ctx) - ret0, _ := ret[0].(types0.Params) + ret0, _ := ret[0].(types.Params) return ret0 } @@ -94,7 +94,7 @@ func (mr *MockAccountKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call } // SetAccount mocks base method. -func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types.AccountI) { +func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types0.AccountI) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetAccount", ctx, acc) } @@ -129,7 +129,7 @@ func (m *MockFeegrantKeeper) EXPECT() *MockFeegrantKeeperMockRecorder { } // UseGrantedFees mocks base method. -func (m *MockFeegrantKeeper) UseGrantedFees(ctx context.Context, granter, grantee types.AccAddress, fee types.Coins, msgs []types.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) diff --git a/x/auth/ante/testutil_test.go b/x/auth/ante/testutil_test.go index fbe6eb7c12c..f91434007c4 100644 --- a/x/auth/ante/testutil_test.go +++ b/x/auth/ante/testutil_test.go @@ -12,6 +12,15 @@ import ( _ "cosmossdk.io/api/cosmos/bank/v1beta1" _ "cosmossdk.io/api/cosmos/crypto/secp256k1" 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" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" @@ -24,15 +33,6 @@ 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/client/cli/broadcast.go b/x/auth/client/cli/broadcast.go index 3febeb486f4..033be29fc4a 100644 --- a/x/auth/client/cli/broadcast.go +++ b/x/auth/client/cli/broadcast.go @@ -7,10 +7,11 @@ 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 65a13c6d1ae..dd677d4110e 100644 --- a/x/auth/client/cli/encode.go +++ b/x/auth/client/cli/encode.go @@ -5,9 +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" - 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 9eed60caaaa..f6d5b61b63d 100644 --- a/x/auth/client/cli/encode_test.go +++ b/x/auth/client/cli/encode_test.go @@ -7,12 +7,13 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/x/auth" + "cosmossdk.io/x/auth/client/cli" + "github.com/cosmos/cosmos-sdk/client" "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 8d3ee8e793d..e2fd6f5eb53 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -6,13 +6,14 @@ 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" "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 58ee64fba21..2639b81b4c8 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" - "github.com/cosmos/cosmos-sdk/x/auth/client/cli" + "cosmossdk.io/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 b033b646f3e..13348801899 100644 --- a/x/auth/client/cli/tx_multisign.go +++ b/x/auth/client/cli/tx_multisign.go @@ -10,6 +10,8 @@ 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" @@ -22,8 +24,6 @@ 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 ae3d0607ebc..c63c4a7e4ea 100644 --- a/x/auth/client/cli/tx_sign.go +++ b/x/auth/client/cli/tx_sign.go @@ -6,12 +6,13 @@ 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" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" sdk "github.com/cosmos/cosmos-sdk/types" - authclient "github.com/cosmos/cosmos-sdk/x/auth/client" ) const ( diff --git a/x/auth/client/cli/tx_simulate.go b/x/auth/client/cli/tx_simulate.go index 9cb49e4778d..daff57403fc 100644 --- a/x/auth/client/cli/tx_simulate.go +++ b/x/auth/client/cli/tx_simulate.go @@ -5,10 +5,11 @@ 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 f9c1fee0e1f..846fc8cee58 100644 --- a/x/auth/client/cli/validate_sigs.go +++ b/x/auth/client/cli/validate_sigs.go @@ -7,6 +7,8 @@ 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" @@ -14,8 +16,6 @@ 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 092b061a83c..69d0b6ff380 100644 --- a/x/auth/client/testutil/helpers.go +++ b/x/auth/client/testutil/helpers.go @@ -4,12 +4,13 @@ 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 ae88666db47..d9ac3906620 100644 --- a/x/auth/client/tx_test.go +++ b/x/auth/client/tx_test.go @@ -7,13 +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" "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/keeper/deterministic_test.go b/x/auth/keeper/deterministic_test.go index 630fa173fd4..6e3724caee9 100644 --- a/x/auth/keeper/deterministic_test.go +++ b/x/auth/keeper/deterministic_test.go @@ -12,6 +12,10 @@ import ( "cosmossdk.io/core/header" corestore "cosmossdk.io/core/store" storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/auth" + authcodec "cosmossdk.io/x/auth/codec" + "cosmossdk.io/x/auth/keeper" + "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" @@ -20,10 +24,6 @@ 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" - "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 25047cf8e5d..e8a46c49eff 100644 --- a/x/auth/keeper/genesis.go +++ b/x/auth/keeper/genesis.go @@ -3,8 +3,9 @@ package keeper import ( "context" + "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 19698eacc3d..6025b6f932b 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -9,10 +9,11 @@ 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 82e9cfe573f..3908455383f 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -9,9 +9,10 @@ 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 ccf842406af..0db126421fb 100644 --- a/x/auth/keeper/keeper.go +++ b/x/auth/keeper/keeper.go @@ -11,12 +11,12 @@ import ( "cosmossdk.io/core/store" errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" + "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/codec" 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_bench_test.go b/x/auth/keeper/keeper_bench_test.go index 55203dc99bd..c45ccdf43c7 100644 --- a/x/auth/keeper/keeper_bench_test.go +++ b/x/auth/keeper/keeper_bench_test.go @@ -7,11 +7,11 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" + "cosmossdk.io/x/auth/keeper" + "cosmossdk.io/x/auth/testutil" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/keeper" - "github.com/cosmos/cosmos-sdk/x/auth/testutil" ) func BenchmarkAccountMapperGetAccountFound(b *testing.B) { diff --git a/x/auth/keeper/keeper_test.go b/x/auth/keeper/keeper_test.go index 8eff83d1ddd..f7c47eb3529 100644 --- a/x/auth/keeper/keeper_test.go +++ b/x/auth/keeper/keeper_test.go @@ -7,6 +7,10 @@ import ( "cosmossdk.io/core/header" storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/auth" + authcodec "cosmossdk.io/x/auth/codec" + "cosmossdk.io/x/auth/keeper" + "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/baseapp" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -15,10 +19,6 @@ 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" - "github.com/cosmos/cosmos-sdk/x/auth/types" ) const ( diff --git a/x/auth/keeper/migrations.go b/x/auth/keeper/migrations.go index d7fd61b7974..f7017d20ad8 100644 --- a/x/auth/keeper/migrations.go +++ b/x/auth/keeper/migrations.go @@ -3,9 +3,10 @@ package keeper import ( "github.com/cosmos/gogoproto/grpc" + 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 19503146064..1e1b4e0953b 100644 --- a/x/auth/keeper/msg_server.go +++ b/x/auth/keeper/msg_server.go @@ -4,8 +4,9 @@ import ( "context" "fmt" + "cosmossdk.io/x/auth/types" + sdk "github.com/cosmos/cosmos-sdk/types" - "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 03b923d4507..b1decd0b380 100644 --- a/x/auth/keeper/msg_server_test.go +++ b/x/auth/keeper/msg_server_test.go @@ -1,7 +1,7 @@ package keeper_test import ( - "github.com/cosmos/cosmos-sdk/x/auth/types" + "cosmossdk.io/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 b64949af14d..e28738cf129 100644 --- a/x/auth/migrations/legacytx/stdsig_test.go +++ b/x/auth/migrations/legacytx/stdsig_test.go @@ -6,8 +6,9 @@ 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 5e5fb00208b..615c79f64d1 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -13,6 +13,10 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" + "cosmossdk.io/x/auth/keeper" + "cosmossdk.io/x/auth/simulation" + "cosmossdk.io/x/auth/types" + "cosmossdk.io/x/auth/vesting/client/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -20,10 +24,6 @@ import ( 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/keeper" - "github.com/cosmos/cosmos-sdk/x/auth/simulation" - "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli" ) // ConsensusVersion defines the current x/auth module consensus version. diff --git a/x/auth/module_test.go b/x/auth/module_test.go index 742658e5caa..5c2d8402f78 100644 --- a/x/auth/module_test.go +++ b/x/auth/module_test.go @@ -7,11 +7,11 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" + "cosmossdk.io/x/auth/keeper" + "cosmossdk.io/x/auth/testutil" + "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/testutil" - "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { diff --git a/x/auth/simulation/genesis.go b/x/auth/simulation/genesis.go index c6984cc355e..87b5cb2a61a 100644 --- a/x/auth/simulation/genesis.go +++ b/x/auth/simulation/genesis.go @@ -5,11 +5,12 @@ 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 1ad07afd32f..94d2621a2af 100644 --- a/x/auth/simulation/genesis_test.go +++ b/x/auth/simulation/genesis_test.go @@ -8,13 +8,13 @@ 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" 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 0e7cd95797f..809bbcb3282 100644 --- a/x/auth/simulation/proposals.go +++ b/x/auth/simulation/proposals.go @@ -3,10 +3,11 @@ package simulation import ( "math/rand" + "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 d3a856af4c2..1168a0b892b 100644 --- a/x/auth/simulation/proposals_test.go +++ b/x/auth/simulation/proposals_test.go @@ -6,11 +6,12 @@ import ( "gotest.tools/v3/assert" + "cosmossdk.io/x/auth/simulation" + "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/simulation" - "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestProposalMsgs(t *testing.T) { diff --git a/x/auth/testutil/app_config.go b/x/auth/testutil/app_config.go index b5bd3aebe4c..0ad41388e73 100644 --- a/x/auth/testutil/app_config.go +++ b/x/auth/testutil/app_config.go @@ -1,15 +1,15 @@ package testutil import ( - _ "cosmossdk.io/x/bank" // import as blank for app wiring - _ "cosmossdk.io/x/staking" // 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/staking" // import as blank for app wiring + _ "cosmossdk.io/x/auth" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "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/consensus" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/consensus" // 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/auth/tx/aux_test.go b/x/auth/tx/aux_test.go index 5e9bcdbbee6..b728efa79a7 100644 --- a/x/auth/tx/aux_test.go +++ b/x/auth/tx/aux_test.go @@ -6,6 +6,8 @@ import ( "github.com/stretchr/testify/require" + authsigning "cosmossdk.io/x/auth/signing" + clienttx "github.com/cosmos/cosmos-sdk/client/tx" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -13,7 +15,6 @@ 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 4d13c11e876..3539c3dbcff 100644 --- a/x/auth/tx/builder.go +++ b/x/auth/tx/builder.go @@ -8,6 +8,8 @@ import ( protov2 "google.golang.org/protobuf/proto" errorsmod "cosmossdk.io/errors" + "cosmossdk.io/x/auth/ante" + authsigning "cosmossdk.io/x/auth/signing" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -17,8 +19,6 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "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" ) // wrapper is a wrapper around the tx.Tx proto.Message which retain the raw diff --git a/x/auth/tx/config.go b/x/auth/tx/config.go index 8aab60c5192..858851b1c69 100644 --- a/x/auth/tx/config.go +++ b/x/auth/tx/config.go @@ -3,6 +3,7 @@ package tx import ( "fmt" + authcodec "cosmossdk.io/x/auth/codec" txsigning "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/aminojson" "cosmossdk.io/x/tx/signing/direct" @@ -13,7 +14,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" - authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" ) type config struct { diff --git a/x/auth/tx/config/config.go b/x/auth/tx/config/config.go index 09cf60c756f..ca61e53b8e0 100644 --- a/x/auth/tx/config/config.go +++ b/x/auth/tx/config/config.go @@ -13,6 +13,10 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + "cosmossdk.io/x/auth/ante" + "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" @@ -23,10 +27,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/registry" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/ante" - "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" ) func init() { diff --git a/x/auth/tx/config_test.go b/x/auth/tx/config_test.go index c07b39b171b..e109f69f1e0 100644 --- a/x/auth/tx/config_test.go +++ b/x/auth/tx/config_test.go @@ -6,14 +6,15 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "cosmossdk.io/x/auth/tx" + txtestutil "cosmossdk.io/x/auth/tx/testutil" + "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/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - "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/legacy_amino_json.go b/x/auth/tx/legacy_amino_json.go index 0c76158e5d2..5ed91891742 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/legacy_amino_json_test.go b/x/auth/tx/legacy_amino_json_test.go index b90d1d71ae0..dc72a0ff38b 100644 --- a/x/auth/tx/legacy_amino_json_test.go +++ b/x/auth/tx/legacy_amino_json_test.go @@ -6,6 +6,9 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/x/auth/migrations/legacytx" + "cosmossdk.io/x/auth/signing" + "cosmossdk.io/x/auth/types" txsigning "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/aminojson" @@ -15,9 +18,6 @@ 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/migrations/legacytx" - "github.com/cosmos/cosmos-sdk/x/auth/signing" - "github.com/cosmos/cosmos-sdk/x/auth/types" ) var ( diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index 0113f34b3c6..67dbf3fa591 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -11,6 +11,8 @@ 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" @@ -18,7 +20,6 @@ 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 2d95ba6dcff..a89fe73b5f8 100644 --- a/x/auth/tx/testutil/suite.go +++ b/x/auth/tx/testutil/suite.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/suite" signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" + "cosmossdk.io/x/auth/signing" "github.com/cosmos/cosmos-sdk/client" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" @@ -15,7 +16,6 @@ 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_retriever_test.go b/x/auth/types/account_retriever_test.go index c3b47c62cf9..b90a3d21a01 100644 --- a/x/auth/types/account_retriever_test.go +++ b/x/auth/types/account_retriever_test.go @@ -5,9 +5,10 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/x/auth/testutil" + "cosmossdk.io/x/auth/types" + "github.com/cosmos/cosmos-sdk/testutil/network" - "github.com/cosmos/cosmos-sdk/x/auth/testutil" - "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestAccountRetriever(t *testing.T) { diff --git a/x/auth/types/account_test.go b/x/auth/types/account_test.go index b4fadfa391a..3a4c16e8c46 100644 --- a/x/auth/types/account_test.go +++ b/x/auth/types/account_test.go @@ -8,10 +8,11 @@ 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/codec.go b/x/auth/types/codec.go index ee9fdf48289..146ef5d2bff 100644 --- a/x/auth/types/codec.go +++ b/x/auth/types/codec.go @@ -1,12 +1,13 @@ package types import ( + "cosmossdk.io/x/auth/migrations/legacytx" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/codec/types" 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 1e5a0ce6d1e..f31339ac564 100644 --- a/x/auth/types/credentials_test.go +++ b/x/auth/types/credentials_test.go @@ -5,9 +5,10 @@ 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_test.go b/x/auth/types/genesis_test.go index f1e1e6443c7..1515fe4b757 100644 --- a/x/auth/types/genesis_test.go +++ b/x/auth/types/genesis_test.go @@ -7,12 +7,13 @@ import ( proto "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" + "cosmossdk.io/x/auth" + "cosmossdk.io/x/auth/types" + 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 bffeb160171..fdef7174cf0 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" - "github.com/cosmos/cosmos-sdk/x/auth/types" + "cosmossdk.io/x/auth/types" ) func TestParamsEqual(t *testing.T) { diff --git a/x/auth/vesting/client/cli/tx.go b/x/auth/vesting/client/cli/tx.go index fa8927cf692..16e684aeb2b 100644 --- a/x/auth/vesting/client/cli/tx.go +++ b/x/auth/vesting/client/cli/tx.go @@ -7,11 +7,12 @@ import ( "github.com/spf13/cobra" + "cosmossdk.io/x/auth/vesting/types" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) // GetTxCmd returns vesting module's transaction commands. diff --git a/x/auth/vesting/client/cli/tx_test.go b/x/auth/vesting/client/cli/tx_test.go index ced28393e8c..51ca0e3f20b 100644 --- a/x/auth/vesting/client/cli/tx_test.go +++ b/x/auth/vesting/client/cli/tx_test.go @@ -10,6 +10,8 @@ import ( "github.com/stretchr/testify/suite" sdkmath "cosmossdk.io/math" + "cosmossdk.io/x/auth/vesting" + "cosmossdk.io/x/auth/vesting/client/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -20,8 +22,6 @@ 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" - "github.com/cosmos/cosmos-sdk/x/auth/vesting" - "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli" ) type CLITestSuite struct { diff --git a/x/auth/vesting/fuzz_test.go b/x/auth/vesting/fuzz_test.go index 1f166f09ca3..fb5ad804264 100644 --- a/x/auth/vesting/fuzz_test.go +++ b/x/auth/vesting/fuzz_test.go @@ -11,6 +11,9 @@ import ( "cosmossdk.io/core/header" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" + authkeeper "cosmossdk.io/x/auth/keeper" + authtypes "cosmossdk.io/x/auth/types" + vestingtypes "cosmossdk.io/x/auth/vesting/types" "cosmossdk.io/x/bank/keeper" banktestutil "cosmossdk.io/x/bank/testutil" banktypes "cosmossdk.io/x/bank/types" @@ -20,9 +23,6 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) var ( diff --git a/x/auth/vesting/module.go b/x/auth/vesting/module.go index 665315aaadc..7dfbe79abe2 100644 --- a/x/auth/vesting/module.go +++ b/x/auth/vesting/module.go @@ -11,14 +11,14 @@ import ( modulev1 "cosmossdk.io/api/cosmos/vesting/module/v1" "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + "cosmossdk.io/x/auth/keeper" + "cosmossdk.io/x/auth/vesting/client/cli" + "cosmossdk.io/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/x/auth/keeper" - "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli" - "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) var ( diff --git a/x/auth/vesting/msg_server.go b/x/auth/vesting/msg_server.go index c459c3ca7f7..91ddc9d0e93 100644 --- a/x/auth/vesting/msg_server.go +++ b/x/auth/vesting/msg_server.go @@ -6,13 +6,13 @@ import ( "github.com/hashicorp/go-metrics" errorsmod "cosmossdk.io/errors" + "cosmossdk.io/x/auth/keeper" + authtypes "cosmossdk.io/x/auth/types" + "cosmossdk.io/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "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/types" ) type msgServer struct { diff --git a/x/auth/vesting/msg_server_test.go b/x/auth/vesting/msg_server_test.go index df4daedc237..0c8b020c38a 100644 --- a/x/auth/vesting/msg_server_test.go +++ b/x/auth/vesting/msg_server_test.go @@ -10,17 +10,17 @@ import ( "cosmossdk.io/core/header" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + authcodec "cosmossdk.io/x/auth/codec" + authkeeper "cosmossdk.io/x/auth/keeper" + authtypes "cosmossdk.io/x/auth/types" + "cosmossdk.io/x/auth/vesting" + vestingtestutil "cosmossdk.io/x/auth/vesting/testutil" + vestingtypes "cosmossdk.io/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" 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" - authkeeper "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" - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) var ( diff --git a/x/auth/vesting/types/codec.go b/x/auth/vesting/types/codec.go index 0b03bdff9f0..3db83da0521 100644 --- a/x/auth/vesting/types/codec.go +++ b/x/auth/vesting/types/codec.go @@ -1,13 +1,14 @@ package types import ( + authtypes "cosmossdk.io/x/auth/types" + "cosmossdk.io/x/auth/vesting/exported" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - 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/genesis_test.go b/x/auth/vesting/types/genesis_test.go index 31971396dd8..94e9d492fe5 100644 --- a/x/auth/vesting/types/genesis_test.go +++ b/x/auth/vesting/types/genesis_test.go @@ -5,9 +5,10 @@ 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 0bf8f8a22fd..82be093401b 100644 --- a/x/auth/vesting/types/vesting.pb.go +++ b/x/auth/vesting/types/vesting.pb.go @@ -8,7 +8,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - types "github.com/cosmos/cosmos-sdk/x/auth/types" + types "cosmossdk.io/x/auth/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" diff --git a/x/auth/vesting/types/vesting_account.go b/x/auth/vesting/types/vesting_account.go index 868dc49588e..e2b8fd40dd9 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 3366d1ea5a3..011445350d3 100644 --- a/x/auth/vesting/types/vesting_account_test.go +++ b/x/auth/vesting/types/vesting_account_test.go @@ -9,6 +9,11 @@ import ( "cosmossdk.io/core/header" 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" + "cosmossdk.io/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/runtime" @@ -16,11 +21,6 @@ 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" - "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 23ed9b2dfb0..e666d4bcbfb 100644 --- a/x/authz/client/cli/tx.go +++ b/x/authz/client/cli/tx.go @@ -8,6 +8,7 @@ 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" @@ -17,7 +18,6 @@ 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/keeper/msg_server_test.go b/x/authz/keeper/msg_server_test.go index 0233abcf38c..597c1e02c71 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(accs int) []sdk.AccAddress { diff --git a/x/authz/module/abci_test.go b/x/authz/module/abci_test.go index 584546499cc..9b4019a205f 100644 --- a/x/authz/module/abci_test.go +++ b/x/authz/module/abci_test.go @@ -23,7 +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" + authtypes "cosmossdk.io/x/auth/types" ) func TestExpiredGrantsQueue(t *testing.T) { diff --git a/x/authz/msgs_test.go b/x/authz/msgs_test.go index fa69b0fd152..87933036f53 100644 --- a/x/authz/msgs_test.go +++ b/x/authz/msgs_test.go @@ -21,7 +21,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + "cosmossdk.io/x/auth/migrations/legacytx" ) func TestMsgGrantGetAuthorization(t *testing.T) { diff --git a/x/authz/simulation/operations_test.go b/x/authz/simulation/operations_test.go index 92af4ed216b..20ec555fa26 100644 --- a/x/authz/simulation/operations_test.go +++ b/x/authz/simulation/operations_test.go @@ -26,7 +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" + authkeeper "cosmossdk.io/x/auth/keeper" ) type SimTestSuite struct { diff --git a/x/authz/testutil/app_config.go b/x/authz/testutil/app_config.go index 91fc2c8cacb..e4a35d048d7 100644 --- a/x/authz/testutil/app_config.go +++ b/x/authz/testutil/app_config.go @@ -1,6 +1,8 @@ package testutil import ( + _ "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/module" // import as blank for app wiring _ "cosmossdk.io/x/bank" // import as blank for app wiring _ "cosmossdk.io/x/gov" // import as blank for app wiring @@ -8,8 +10,6 @@ import ( _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "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/consensus" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) diff --git a/x/bank/keeper/collections_test.go b/x/bank/keeper/collections_test.go index 6285375bc85..534fde9a937 100644 --- a/x/bank/keeper/collections_test.go +++ b/x/bank/keeper/collections_test.go @@ -12,6 +12,7 @@ import ( "cosmossdk.io/log" "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" @@ -21,7 +22,6 @@ 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 493b89901f1..556cecdbeed 100644 --- a/x/bank/keeper/grpc_query_test.go +++ b/x/bank/keeper/grpc_query_test.go @@ -6,14 +6,14 @@ import ( "time" "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 260211ab5b7..e3bafc0a1ad 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -8,13 +8,13 @@ import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" "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 b08b6ce5030..5a25feb7d26 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -19,6 +19,8 @@ import ( "cosmossdk.io/log" "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" @@ -31,8 +33,6 @@ 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 85217688491..45e5270f71e 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/module.go b/x/bank/module.go index 21fc3097c03..77397d8acd1 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -14,6 +14,7 @@ import ( corestore "cosmossdk.io/core/store" "cosmossdk.io/depinject" "cosmossdk.io/log" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/bank/client/cli" "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/bank/simulation" @@ -26,7 +27,6 @@ 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" ) // ConsensusVersion defines the current x/bank module consensus version. diff --git a/x/bank/simulation/operations_test.go b/x/bank/simulation/operations_test.go index 9d045281628..df8a3dfa229 100644 --- a/x/bank/simulation/operations_test.go +++ b/x/bank/simulation/operations_test.go @@ -9,6 +9,8 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" + _ "cosmossdk.io/x/auth" + _ "cosmossdk.io/x/auth/tx/config" _ "cosmossdk.io/x/bank" "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/bank/simulation" @@ -23,8 +25,6 @@ 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" _ "github.com/cosmos/cosmos-sdk/x/consensus" ) diff --git a/x/bank/testutil/expected_keepers_mocks.go b/x/bank/testutil/expected_keepers_mocks.go index fcdfd8a472e..2000823388a 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 "github.com/cosmos/cosmos-sdk/types" - types0 "github.com/cosmos/cosmos-sdk/x/auth/types" + types "cosmossdk.io/x/auth/types" + types0 "github.com/cosmos/cosmos-sdk/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 types.AccAddress) types.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].(types.AccountI) + ret0, _ := ret[0].(types0.AccountI) return ret0 } @@ -66,10 +66,10 @@ func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomo } // GetAllAccounts mocks base method. -func (m *MockAccountKeeper) GetAllAccounts(ctx context.Context) []types.AccountI { +func (m *MockAccountKeeper) GetAllAccounts(ctx context.Context) []types0.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAllAccounts", ctx) - ret0, _ := ret[0].([]types.AccountI) + ret0, _ := ret[0].([]types0.AccountI) return ret0 } @@ -80,10 +80,10 @@ func (mr *MockAccountKeeperMockRecorder) GetAllAccounts(ctx interface{}) *gomock } // GetModuleAccount mocks base method. -func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName string) types.ModuleAccountI { +func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName string) types0.ModuleAccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAccount", ctx, moduleName) - ret0, _ := ret[0].(types.ModuleAccountI) + ret0, _ := ret[0].(types0.ModuleAccountI) return ret0 } @@ -94,10 +94,10 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interf } // GetModuleAccountAndPermissions mocks base method. -func (m *MockAccountKeeper) GetModuleAccountAndPermissions(ctx context.Context, moduleName string) (types.ModuleAccountI, []string) { +func (m *MockAccountKeeper) GetModuleAccountAndPermissions(ctx context.Context, moduleName string) (types0.ModuleAccountI, []string) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAccountAndPermissions", ctx, moduleName) - ret0, _ := ret[0].(types.ModuleAccountI) + ret0, _ := ret[0].(types0.ModuleAccountI) ret1, _ := ret[1].([]string) return ret0, ret1 } @@ -109,10 +109,10 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAccountAndPermissions(ctx, mod } // GetModuleAddress mocks base method. -func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types.AccAddress { +func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types0.AccAddress { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAddress", moduleName) - ret0, _ := ret[0].(types.AccAddress) + ret0, _ := ret[0].(types0.AccAddress) return ret0 } @@ -123,10 +123,10 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName interface{} } // GetModuleAddressAndPermissions mocks base method. -func (m *MockAccountKeeper) GetModuleAddressAndPermissions(moduleName string) (types.AccAddress, []string) { +func (m *MockAccountKeeper) GetModuleAddressAndPermissions(moduleName string) (types0.AccAddress, []string) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModuleAddressAndPermissions", moduleName) - ret0, _ := ret[0].(types.AccAddress) + ret0, _ := ret[0].(types0.AccAddress) ret1, _ := ret[1].([]string) return ret0, ret1 } @@ -138,10 +138,10 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAddressAndPermissions(moduleNa } // GetModulePermissions mocks base method. -func (m *MockAccountKeeper) GetModulePermissions() map[string]types0.PermissionsForAddress { +func (m *MockAccountKeeper) GetModulePermissions() map[string]types.PermissionsForAddress { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetModulePermissions") - ret0, _ := ret[0].(map[string]types0.PermissionsForAddress) + ret0, _ := ret[0].(map[string]types.PermissionsForAddress) return ret0 } @@ -152,7 +152,7 @@ func (mr *MockAccountKeeperMockRecorder) GetModulePermissions() *gomock.Call { } // HasAccount mocks base method. -func (m *MockAccountKeeper) HasAccount(ctx context.Context, addr types.AccAddress) bool { +func (m *MockAccountKeeper) HasAccount(ctx context.Context, addr types0.AccAddress) bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "HasAccount", ctx, addr) ret0, _ := ret[0].(bool) @@ -166,7 +166,7 @@ func (mr *MockAccountKeeperMockRecorder) HasAccount(ctx, addr interface{}) *gomo } // IterateAccounts mocks base method. -func (m *MockAccountKeeper) IterateAccounts(ctx context.Context, process func(types.AccountI) bool) { +func (m *MockAccountKeeper) IterateAccounts(ctx context.Context, process func(types0.AccountI) bool) { m.ctrl.T.Helper() m.ctrl.Call(m, "IterateAccounts", ctx, process) } @@ -178,10 +178,10 @@ func (mr *MockAccountKeeperMockRecorder) IterateAccounts(ctx, process interface{ } // NewAccount mocks base method. -func (m *MockAccountKeeper) NewAccount(arg0 context.Context, arg1 types.AccountI) types.AccountI { +func (m *MockAccountKeeper) NewAccount(arg0 context.Context, arg1 types0.AccountI) types0.AccountI { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "NewAccount", arg0, arg1) - ret0, _ := ret[0].(types.AccountI) + ret0, _ := ret[0].(types0.AccountI) return ret0 } @@ -192,10 +192,10 @@ func (mr *MockAccountKeeperMockRecorder) NewAccount(arg0, arg1 interface{}) *gom } // NewAccountWithAddress mocks base method. -func (m *MockAccountKeeper) NewAccountWithAddress(ctx context.Context, addr types.AccAddress) types.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].(types.AccountI) + ret0, _ := ret[0].(types0.AccountI) return ret0 } @@ -206,7 +206,7 @@ func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr interfa } // SetAccount mocks base method. -func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types.AccountI) { +func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types0.AccountI) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetAccount", ctx, acc) } @@ -218,7 +218,7 @@ func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomoc } // SetModuleAccount mocks base method. -func (m *MockAccountKeeper) SetModuleAccount(ctx context.Context, macc types.ModuleAccountI) { +func (m *MockAccountKeeper) SetModuleAccount(ctx context.Context, macc types0.ModuleAccountI) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetModuleAccount", ctx, macc) } @@ -230,7 +230,7 @@ func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(ctx, macc interface{}) } // ValidatePermissions mocks base method. -func (m *MockAccountKeeper) ValidatePermissions(macc types.ModuleAccountI) error { +func (m *MockAccountKeeper) ValidatePermissions(macc types0.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 ebd5eb9a657..6af5c9b5307 100644 --- a/x/bank/types/expected_keepers.go +++ b/x/bank/types/expected_keepers.go @@ -4,9 +4,9 @@ import ( context "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 9185c8c0198..d74e83a8aee 100644 --- a/x/circuit/ante/circuit_test.go +++ b/x/circuit/ante/circuit_test.go @@ -7,6 +7,7 @@ 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" @@ -15,7 +16,6 @@ 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/keeper/genesis_test.go b/x/circuit/keeper/genesis_test.go index 595330b06b2..3569c5fc69d 100644 --- a/x/circuit/keeper/genesis_test.go +++ b/x/circuit/keeper/genesis_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/suite" 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" @@ -17,7 +18,6 @@ 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/circuit/keeper/keeper_test.go b/x/circuit/keeper/keeper_test.go index 59e18a8cf89..d556388212e 100644 --- a/x/circuit/keeper/keeper_test.go +++ b/x/circuit/keeper/keeper_test.go @@ -9,6 +9,7 @@ import ( "cosmossdk.io/core/address" 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" @@ -17,7 +18,6 @@ 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/circuit/module.go b/x/circuit/module.go index 2bd0b19ba60..bfbc4d3dc73 100644 --- a/x/circuit/module.go +++ b/x/circuit/module.go @@ -13,6 +13,7 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/circuit/keeper" "cosmossdk.io/x/circuit/types" @@ -23,7 +24,6 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/telemetry" "github.com/cosmos/cosmos-sdk/types/module" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // ConsensusVersion defines the current circuit module consensus version. diff --git a/x/consensus/keeper/keeper_test.go b/x/consensus/keeper/keeper_test.go index d4e8e63619f..3c3f9d97e48 100644 --- a/x/consensus/keeper/keeper_test.go +++ b/x/consensus/keeper/keeper_test.go @@ -8,13 +8,13 @@ import ( "github.com/stretchr/testify/suite" storetypes "cosmossdk.io/store/types" + authtypes "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/runtime" "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" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" "github.com/cosmos/cosmos-sdk/x/consensus/types" ) diff --git a/x/consensus/module.go b/x/consensus/module.go index 4df4c60ba3d..7091e5f80bc 100644 --- a/x/consensus/module.go +++ b/x/consensus/module.go @@ -11,6 +11,7 @@ import ( "cosmossdk.io/core/event" storetypes "cosmossdk.io/core/store" "cosmossdk.io/depinject" + authtypes "cosmossdk.io/x/auth/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" @@ -18,7 +19,6 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/types/module" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/consensus/keeper" "github.com/cosmos/cosmos-sdk/x/consensus/types" ) diff --git a/x/consensus/testutil/expected_keepers_mocks.go b/x/consensus/testutil/expected_keepers_mocks.go index 35929b606df..83c92ceeebc 100644 --- a/x/consensus/testutil/expected_keepers_mocks.go +++ b/x/consensus/testutil/expected_keepers_mocks.go @@ -7,8 +7,9 @@ package testutil import ( reflect "reflect" + types0 "cosmossdk.io/x/auth/types" + types "github.com/cosmos/cosmos-sdk/types" - types0 "github.com/cosmos/cosmos-sdk/x/auth/types" gomock "github.com/golang/mock/gomock" ) diff --git a/x/counter/testutil/expected_keepers_mocks.go b/x/counter/testutil/expected_keepers_mocks.go index 35929b606df..83c92ceeebc 100644 --- a/x/counter/testutil/expected_keepers_mocks.go +++ b/x/counter/testutil/expected_keepers_mocks.go @@ -7,8 +7,9 @@ package testutil import ( reflect "reflect" + types0 "cosmossdk.io/x/auth/types" + types "github.com/cosmos/cosmos-sdk/types" - types0 "github.com/cosmos/cosmos-sdk/x/auth/types" gomock "github.com/golang/mock/gomock" ) diff --git a/x/crisis/module.go b/x/crisis/module.go index 501f7b6056c..b1b7f287d26 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -15,6 +15,7 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" + authtypes "cosmossdk.io/x/auth/types" govtypes "cosmossdk.io/x/gov/types" "github.com/cosmos/cosmos-sdk/client" @@ -24,7 +25,6 @@ import ( servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/telemetry" "github.com/cosmos/cosmos-sdk/types/module" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/crisis/keeper" "github.com/cosmos/cosmos-sdk/x/crisis/types" ) diff --git a/x/distribution/keeper/allocation_test.go b/x/distribution/keeper/allocation_test.go index 4043919c7ea..3b3a4dd9d18 100644 --- a/x/distribution/keeper/allocation_test.go +++ b/x/distribution/keeper/allocation_test.go @@ -12,6 +12,7 @@ import ( "cosmossdk.io/core/header" "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" @@ -23,7 +24,6 @@ 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 TestAllocateTokensToValidatorWithCommission(t *testing.T) { diff --git a/x/distribution/keeper/common_test.go b/x/distribution/keeper/common_test.go index 5451c73d449..47445e4a085 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 828bc16aff1..ea8744cdf12 100644 --- a/x/distribution/keeper/delegation_test.go +++ b/x/distribution/keeper/delegation_test.go @@ -10,6 +10,7 @@ import ( "cosmossdk.io/core/header" "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" @@ -21,7 +22,6 @@ 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/keeper_test.go b/x/distribution/keeper/keeper_test.go index 30fdc8d0515..f2cdf30a601 100644 --- a/x/distribution/keeper/keeper_test.go +++ b/x/distribution/keeper/keeper_test.go @@ -10,6 +10,7 @@ import ( "cosmossdk.io/core/header" "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" @@ -21,7 +22,6 @@ 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 cb2125fa795..19441a97f04 100644 --- a/x/distribution/keeper/msg_server_test.go +++ b/x/distribution/keeper/msg_server_test.go @@ -7,11 +7,11 @@ 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" 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/funds/migrate_test.go b/x/distribution/migrations/funds/migrate_test.go index ffa89597f7b..1ba5d0ea008 100644 --- a/x/distribution/migrations/funds/migrate_test.go +++ b/x/distribution/migrations/funds/migrate_test.go @@ -8,6 +8,9 @@ import ( "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" + "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" @@ -23,9 +26,6 @@ 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" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) func TestFundsMigration(t *testing.T) { diff --git a/x/distribution/module.go b/x/distribution/module.go index 01283195bd5..97a501b9084 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -12,6 +12,7 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/distribution/client/cli" "cosmossdk.io/x/distribution/keeper" "cosmossdk.io/x/distribution/simulation" @@ -24,7 +25,6 @@ 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" ) // ConsensusVersion defines the current x/distribution module consensus version. diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index a5ed58b57a8..cead5c26b43 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -11,6 +11,7 @@ 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,7 +28,6 @@ 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/x/distribution/testutil/app_config.go b/x/distribution/testutil/app_config.go index 2e96e0b7f8b..9a114235ac2 100644 --- a/x/distribution/testutil/app_config.go +++ b/x/distribution/testutil/app_config.go @@ -1,6 +1,8 @@ package testutil import ( + _ "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/distribution" // import as blank for app wiring _ "cosmossdk.io/x/mint" // import as blank for app wiring @@ -8,8 +10,6 @@ import ( _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "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/consensus" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) diff --git a/x/evidence/testutil/app_config.go b/x/evidence/testutil/app_config.go index 9a386d62c9d..0bcc4cd9f64 100644 --- a/x/evidence/testutil/app_config.go +++ b/x/evidence/testutil/app_config.go @@ -1,14 +1,14 @@ package testutil import ( + _ "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/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/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/consensus" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) diff --git a/x/feegrant/keeper/genesis_test.go b/x/feegrant/keeper/genesis_test.go index f48b9f01251..578a7812a3b 100644 --- a/x/feegrant/keeper/genesis_test.go +++ b/x/feegrant/keeper/genesis_test.go @@ -9,6 +9,7 @@ import ( "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" @@ -22,7 +23,6 @@ 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 1bb0c9dd264..6b67205c976 100644 --- a/x/feegrant/keeper/keeper.go +++ b/x/feegrant/keeper/keeper.go @@ -10,13 +10,13 @@ import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/auth/ante" "cosmossdk.io/x/feegrant" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" 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 272618a7121..dc92fe29856 100644 --- a/x/feegrant/keeper/keeper_test.go +++ b/x/feegrant/keeper/keeper_test.go @@ -9,6 +9,7 @@ import ( "cosmossdk.io/core/header" 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" @@ -20,7 +21,6 @@ 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 e368df88b66..ecda3d89c15 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 34280ef68a8..e2a4d5cc796 100644 --- a/x/feegrant/module/abci_test.go +++ b/x/feegrant/module/abci_test.go @@ -9,6 +9,7 @@ import ( "cosmossdk.io/core/header" 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" @@ -21,7 +22,6 @@ 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 a0c19d0ff1c..29c775f1eec 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/feegrant/simulation/operations_test.go b/x/feegrant/simulation/operations_test.go index d2f3fe85c73..41e9fb1feb0 100644 --- a/x/feegrant/simulation/operations_test.go +++ b/x/feegrant/simulation/operations_test.go @@ -11,6 +11,9 @@ import ( "cosmossdk.io/core/header" "cosmossdk.io/depinject" "cosmossdk.io/log" + _ "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" @@ -30,9 +33,6 @@ 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/consensus" _ "github.com/cosmos/cosmos-sdk/x/genutil" ) diff --git a/x/genutil/client/cli/genaccount_test.go b/x/genutil/client/cli/genaccount_test.go index 7bc1a60702e..6f46a4bf4a1 100644 --- a/x/genutil/client/cli/genaccount_test.go +++ b/x/genutil/client/cli/genaccount_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/log" + "cosmossdk.io/x/auth" "github.com/cosmos/cosmos-sdk/client" addresscodec "github.com/cosmos/cosmos-sdk/codec/address" @@ -17,7 +18,6 @@ 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 f00514d50f5..bd9eaf35fe1 100644 --- a/x/genutil/client/cli/gentx.go +++ b/x/genutil/client/cli/gentx.go @@ -13,6 +13,7 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/errors" + authclient "cosmossdk.io/x/auth/client" "cosmossdk.io/x/staking/client/cli" "github.com/cosmos/cosmos-sdk/client" @@ -23,7 +24,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "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 95a5b9670e6..5ece341a47d 100644 --- a/x/genutil/genaccounts.go +++ b/x/genutil/genaccounts.go @@ -5,12 +5,12 @@ import ( "errors" "fmt" + 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/abci_test.go b/x/gov/abci_test.go index ae98b97fe58..7dc07a51c4f 100644 --- a/x/gov/abci_test.go +++ b/x/gov/abci_test.go @@ -8,6 +8,7 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/math" + authtypes "cosmossdk.io/x/auth/types" banktypes "cosmossdk.io/x/bank/types" "cosmossdk.io/x/gov" "cosmossdk.io/x/gov/keeper" @@ -18,7 +19,6 @@ 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" ) func TestUnregisteredProposal_InactiveProposalFails(t *testing.T) { diff --git a/x/gov/client/cli/prompt.go b/x/gov/client/cli/prompt.go index de213cc4e78..b18578f7430 100644 --- a/x/gov/client/cli/prompt.go +++ b/x/gov/client/cli/prompt.go @@ -12,13 +12,13 @@ import ( "github.com/manifoldco/promptui" "github.com/spf13/cobra" + 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 451836f34c6..b9cadf37365 100644 --- a/x/gov/client/cli/tx_test.go +++ b/x/gov/client/cli/tx_test.go @@ -11,6 +11,7 @@ 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" @@ -26,7 +27,6 @@ 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 922e34099ee..4f5a64de45d 100644 --- a/x/gov/client/utils/query.go +++ b/x/gov/client/utils/query.go @@ -6,10 +6,10 @@ import ( "cosmossdk.io/x/gov/types" v1 "cosmossdk.io/x/gov/types/v1" "cosmossdk.io/x/gov/types/v1beta1" + authtx "cosmossdk.io/x/auth/tx" "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/common_test.go b/x/gov/common_test.go index fe3d5fea0d7..ecf00828cd9 100644 --- a/x/gov/common_test.go +++ b/x/gov/common_test.go @@ -11,6 +11,9 @@ import ( "cosmossdk.io/depinject" sdklog "cosmossdk.io/log" "cosmossdk.io/math" + _ "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" "cosmossdk.io/x/gov/keeper" @@ -28,9 +31,6 @@ 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" _ "github.com/cosmos/cosmos-sdk/x/consensus" ) diff --git a/x/gov/keeper/common_test.go b/x/gov/keeper/common_test.go index 4c2eb496e61..1e3a55ffda5 100644 --- a/x/gov/keeper/common_test.go +++ b/x/gov/keeper/common_test.go @@ -12,6 +12,7 @@ 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" @@ -27,7 +28,6 @@ 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 bd5f8fa7ac3..3def399e811 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -8,13 +8,13 @@ import ( "cosmossdk.io/collections" sdkmath "cosmossdk.io/math" + authtypes "cosmossdk.io/x/auth/types" v1 "cosmossdk.io/x/gov/types/v1" pooltypes "cosmossdk.io/x/protocolpool/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" ) const ( diff --git a/x/gov/module.go b/x/gov/module.go index 3dde25164b2..787c9494266 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -17,6 +17,7 @@ import ( "cosmossdk.io/core/appmodule" store "cosmossdk.io/core/store" "cosmossdk.io/depinject" + authtypes "cosmossdk.io/x/auth/types" govclient "cosmossdk.io/x/gov/client" "cosmossdk.io/x/gov/client/cli" "cosmossdk.io/x/gov/keeper" @@ -32,7 +33,6 @@ 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" ) const ConsensusVersion = 5 diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index 0cee14b7fe2..59109228f62 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -12,6 +12,9 @@ import ( "cosmossdk.io/core/header" "cosmossdk.io/depinject" "cosmossdk.io/log" + _ "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" @@ -31,9 +34,6 @@ 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/consensus" ) diff --git a/x/group/keeper/genesis_test.go b/x/group/keeper/genesis_test.go index 7daa66b774f..39640d04710 100644 --- a/x/group/keeper/genesis_test.go +++ b/x/group/keeper/genesis_test.go @@ -11,6 +11,7 @@ import ( "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" @@ -24,7 +25,6 @@ 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 2ff56892532..79a8e9cc765 100644 --- a/x/group/keeper/grpc_query_test.go +++ b/x/group/keeper/grpc_query_test.go @@ -10,6 +10,7 @@ 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" @@ -23,7 +24,6 @@ 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 d5a1078d975..d9fd9dac708 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -12,6 +12,7 @@ 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" @@ -26,7 +27,6 @@ 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 7ffedd0f046..1934254444f 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -9,6 +9,7 @@ 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" @@ -17,7 +18,6 @@ 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 310e07da2f3..0728a3430de 100644 --- a/x/group/migrations/v2/gen_state.go +++ b/x/group/migrations/v2/gen_state.go @@ -3,8 +3,9 @@ package v2 import ( "encoding/binary" + 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 adcce276d53..187515eb63a 100644 --- a/x/group/migrations/v2/gen_state_test.go +++ b/x/group/migrations/v2/gen_state_test.go @@ -6,10 +6,9 @@ import ( "github.com/stretchr/testify/require" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/group" v2 "cosmossdk.io/x/group/migrations/v2" - - 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 9c1555c21b6..511e628f55b 100644 --- a/x/group/migrations/v2/migrate.go +++ b/x/group/migrations/v2/migrate.go @@ -5,12 +5,12 @@ import ( "fmt" storetypes "cosmossdk.io/store/types" + 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 65b84e3a58d..2df8204de4b 100644 --- a/x/group/migrations/v2/migrate_test.go +++ b/x/group/migrations/v2/migrate_test.go @@ -6,6 +6,9 @@ import ( "github.com/stretchr/testify/require" storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/auth" + authkeeper "cosmossdk.io/x/auth/keeper" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/group" "cosmossdk.io/x/group/internal/orm" groupkeeper "cosmossdk.io/x/group/keeper" @@ -18,9 +21,6 @@ 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" - 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 69b06567577..433764d3f5f 100644 --- a/x/group/simulation/operations_test.go +++ b/x/group/simulation/operations_test.go @@ -10,6 +10,7 @@ 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" @@ -25,7 +26,6 @@ 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 ca225e42006..b2eeaa095e0 100644 --- a/x/group/testutil/app_config.go +++ b/x/group/testutil/app_config.go @@ -6,10 +6,10 @@ import ( _ "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/auth" // import as blank for app wiring + _ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "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/consensus" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) diff --git a/x/mint/keeper/genesis_test.go b/x/mint/keeper/genesis_test.go index c9842bc0250..7690c490b0f 100644 --- a/x/mint/keeper/genesis_test.go +++ b/x/mint/keeper/genesis_test.go @@ -9,6 +9,7 @@ import ( "cosmossdk.io/collections" "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" @@ -19,7 +20,6 @@ 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 a0ebdbc1613..60800199106 100644 --- a/x/mint/keeper/grpc_query_test.go +++ b/x/mint/keeper/grpc_query_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/suite" 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" @@ -18,7 +19,6 @@ 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 350df65a88f..41888b33416 100644 --- a/x/mint/keeper/keeper_test.go +++ b/x/mint/keeper/keeper_test.go @@ -8,6 +8,7 @@ import ( "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" @@ -17,7 +18,6 @@ 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.go b/x/mint/module.go index 75b2837620a..a28640f2df4 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -11,6 +11,7 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/mint/keeper" "cosmossdk.io/x/mint/simulation" "cosmossdk.io/x/mint/types" @@ -20,7 +21,6 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/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" ) // ConsensusVersion defines the current x/mint module consensus version. diff --git a/x/mint/module_test.go b/x/mint/module_test.go index 1078b1d0cc6..c6f4610c39a 100644 --- a/x/mint/module_test.go +++ b/x/mint/module_test.go @@ -7,12 +7,12 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" + authkeeper "cosmossdk.io/x/auth/keeper" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/mint/testutil" "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/x/mint/testutil/app_config.go b/x/mint/testutil/app_config.go index 344106b0f28..3f7e7d0f195 100644 --- a/x/mint/testutil/app_config.go +++ b/x/mint/testutil/app_config.go @@ -1,13 +1,13 @@ package testutil import ( + _ "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/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/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/consensus" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) diff --git a/x/nft/simulation/operations_test.go b/x/nft/simulation/operations_test.go index 3349e570668..f39dbefdd77 100644 --- a/x/nft/simulation/operations_test.go +++ b/x/nft/simulation/operations_test.go @@ -11,6 +11,7 @@ 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,7 +27,6 @@ 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/nft/testutil/app_config.go b/x/nft/testutil/app_config.go index c69fb86b04c..c1f75e5918c 100644 --- a/x/nft/testutil/app_config.go +++ b/x/nft/testutil/app_config.go @@ -1,14 +1,14 @@ package testutil import ( + _ "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/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/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/consensus" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) diff --git a/x/protocolpool/module.go b/x/protocolpool/module.go index 2001029e91c..bb6c43eb7c9 100644 --- a/x/protocolpool/module.go +++ b/x/protocolpool/module.go @@ -9,6 +9,7 @@ import ( "cosmossdk.io/core/appmodule" storetypes "cosmossdk.io/core/store" "cosmossdk.io/depinject" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/protocolpool/keeper" "cosmossdk.io/x/protocolpool/simulation" "cosmossdk.io/x/protocolpool/types" @@ -18,7 +19,6 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/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" ) // ConsensusVersion defines the current x/protocolpool module consensus version. diff --git a/x/protocolpool/simulation/operations_test.go b/x/protocolpool/simulation/operations_test.go index 04c72ec6e7b..29a43825d96 100644 --- a/x/protocolpool/simulation/operations_test.go +++ b/x/protocolpool/simulation/operations_test.go @@ -9,6 +9,7 @@ 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,7 +24,6 @@ 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/x/protocolpool/testutil/app_config.go b/x/protocolpool/testutil/app_config.go index 79bba82d17a..a956d77e02a 100644 --- a/x/protocolpool/testutil/app_config.go +++ b/x/protocolpool/testutil/app_config.go @@ -1,6 +1,8 @@ package testutil import ( + _ "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/distribution" // import as blank for app wiring _ "cosmossdk.io/x/gov" // import as blank for app wiring @@ -9,8 +11,6 @@ import ( _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "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/consensus" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) diff --git a/x/slashing/app_test.go b/x/slashing/app_test.go index 5dc9ca4deaa..92891ce8326 100644 --- a/x/slashing/app_test.go +++ b/x/slashing/app_test.go @@ -10,6 +10,7 @@ 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" @@ -23,7 +24,6 @@ import ( "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 ( diff --git a/x/slashing/keeper/keeper_test.go b/x/slashing/keeper/keeper_test.go index 050257c23b2..24cf08c2aa1 100644 --- a/x/slashing/keeper/keeper_test.go +++ b/x/slashing/keeper/keeper_test.go @@ -12,6 +12,7 @@ import ( "cosmossdk.io/core/header" sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + authtypes "cosmossdk.io/x/auth/types" govtypes "cosmossdk.io/x/gov/types" slashingkeeper "cosmossdk.io/x/slashing/keeper" slashingtestutil "cosmossdk.io/x/slashing/testutil" @@ -25,7 +26,6 @@ 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(sdk.AccAddress([]byte("addr1_______________"))) diff --git a/x/slashing/module.go b/x/slashing/module.go index 39e3aeb74ad..49a62f30ded 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -11,6 +11,7 @@ import ( "cosmossdk.io/core/appmodule" store "cosmossdk.io/core/store" "cosmossdk.io/depinject" + authtypes "cosmossdk.io/x/auth/types" govtypes "cosmossdk.io/x/gov/types" "cosmossdk.io/x/slashing/keeper" "cosmossdk.io/x/slashing/simulation" @@ -22,7 +23,6 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/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" ) // ConsensusVersion defines the current x/slashing module consensus version. diff --git a/x/slashing/simulation/operations_test.go b/x/slashing/simulation/operations_test.go index 738763f1dd8..1068f25447e 100644 --- a/x/slashing/simulation/operations_test.go +++ b/x/slashing/simulation/operations_test.go @@ -16,6 +16,7 @@ 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,7 +38,6 @@ 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/slashing/testutil/app_config.go b/x/slashing/testutil/app_config.go index 9a4a1043e14..433d7b05e72 100644 --- a/x/slashing/testutil/app_config.go +++ b/x/slashing/testutil/app_config.go @@ -1,6 +1,8 @@ package testutil import ( + _ "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/distribution" // import as blank for app wiring _ "cosmossdk.io/x/mint" // import as blank for app wiring @@ -9,8 +11,6 @@ import ( _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "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/consensus" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) diff --git a/x/staking/app_test.go b/x/staking/app_test.go index b30d116b1c1..4647b5063f1 100644 --- a/x/staking/app_test.go +++ b/x/staking/app_test.go @@ -10,6 +10,7 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" "cosmossdk.io/math" + authtypes "cosmossdk.io/x/auth/types" bankKeeper "cosmossdk.io/x/bank/keeper" stakingKeeper "cosmossdk.io/x/staking/keeper" "cosmossdk.io/x/staking/testutil" @@ -20,7 +21,6 @@ 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 ( diff --git a/x/staking/keeper/keeper_test.go b/x/staking/keeper/keeper_test.go index 2b0a289a15a..d1bbe681b13 100644 --- a/x/staking/keeper/keeper_test.go +++ b/x/staking/keeper/keeper_test.go @@ -12,6 +12,7 @@ import ( "cosmossdk.io/core/header" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + authtypes "cosmossdk.io/x/auth/types" stakingkeeper "cosmossdk.io/x/staking/keeper" stakingtestutil "cosmossdk.io/x/staking/testutil" stakingtypes "cosmossdk.io/x/staking/types" @@ -26,7 +27,6 @@ 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/module.go b/x/staking/module.go index 8132532e620..82fd4d533f6 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -15,6 +15,7 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/staking/client/cli" "cosmossdk.io/x/staking/keeper" "cosmossdk.io/x/staking/simulation" @@ -27,7 +28,6 @@ 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" ) const ( diff --git a/x/staking/module_test.go b/x/staking/module_test.go index 64232e96fc8..5a621b84e3e 100644 --- a/x/staking/module_test.go +++ b/x/staking/module_test.go @@ -7,12 +7,12 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" + authKeeper "cosmossdk.io/x/auth/keeper" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/staking/testutil" "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/x/staking/testutil/app_config.go b/x/staking/testutil/app_config.go index 89a1e0ef918..7471f026d63 100644 --- a/x/staking/testutil/app_config.go +++ b/x/staking/testutil/app_config.go @@ -1,6 +1,8 @@ package testutil import ( + _ "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/distribution" // import as blank for app wiring _ "cosmossdk.io/x/mint" // import as blank for app wiring @@ -9,8 +11,6 @@ import ( _ "cosmossdk.io/x/staking" // import as blank for app wiring "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "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/consensus" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring ) diff --git a/x/upgrade/abci_test.go b/x/upgrade/abci_test.go index a8db0b6b1ca..ad6ecc94008 100644 --- a/x/upgrade/abci_test.go +++ b/x/upgrade/abci_test.go @@ -14,6 +14,7 @@ import ( "cosmossdk.io/core/header" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" + authtypes "cosmossdk.io/x/auth/types" govtypes "cosmossdk.io/x/gov/types" "cosmossdk.io/x/upgrade" "cosmossdk.io/x/upgrade/keeper" @@ -27,7 +28,6 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/module" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) type TestSuite struct { diff --git a/x/upgrade/keeper/grpc_query_test.go b/x/upgrade/keeper/grpc_query_test.go index 7120a10f687..7395020af0b 100644 --- a/x/upgrade/keeper/grpc_query_test.go +++ b/x/upgrade/keeper/grpc_query_test.go @@ -9,6 +9,7 @@ import ( "cosmossdk.io/core/header" 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" @@ -20,7 +21,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" 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 1c2f5f6e017..951e2e42acf 100644 --- a/x/upgrade/keeper/keeper_test.go +++ b/x/upgrade/keeper/keeper_test.go @@ -12,6 +12,7 @@ import ( "cosmossdk.io/core/header" "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" @@ -24,7 +25,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" 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/module.go b/x/upgrade/module.go index 3df57d11412..472ebe0d8f5 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -14,6 +14,7 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" + authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/upgrade/client/cli" "cosmossdk.io/x/upgrade/keeper" "cosmossdk.io/x/upgrade/types" @@ -26,7 +27,6 @@ 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" ) const govModuleName = "gov"