From 69d1dd0b42651adb16fddde87a1ecd8083f8aecf Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Tue, 18 Jul 2023 18:24:57 +0800 Subject: [PATCH] refactor: use gci linter to sort imports (#2608) * use the gci linter to sort imports * enable custom ordering in gci --- .golangci.yml | 15 +++++- ante/ante.go | 8 +-- ante/gov_ante.go | 5 +- ante/gov_ante_test.go | 11 ++-- app/app.go | 28 +++++----- app/app_helpers.go | 3 +- app/app_test.go | 5 +- app/export.go | 3 +- app/helpers/test_helpers.go | 12 ++--- app/keepers/keepers.go | 52 +++++++++---------- app/keepers/keys.go | 14 ++--- app/modules.go | 30 ++++++----- app/sim/sim_state.go | 4 +- app/sim/sim_utils.go | 4 +- app/sim_test.go | 7 +-- app/upgrades/v7/constants.go | 3 +- app/upgrades/v7/upgrades.go | 7 +-- app/upgrades/v8/upgrades.go | 7 +-- app/upgrades/v9/constants.go | 3 +- cmd/gaiad/cmd/bech32_convert.go | 4 +- cmd/gaiad/cmd/genaccounts.go | 3 +- cmd/gaiad/cmd/root.go | 11 ++-- cmd/gaiad/cmd/root_test.go | 3 +- cmd/gaiad/cmd/testnet.go | 15 +++--- tests/e2e/chain.go | 3 +- tests/e2e/e2e_bypassminfee_test.go | 6 ++- tests/e2e/e2e_exec_test.go | 3 +- tests/e2e/e2e_globalfee_test.go | 1 + tests/e2e/e2e_gov_test.go | 1 - tests/e2e/e2e_ibc_test.go | 3 +- tests/e2e/e2e_setup_test.go | 19 +++---- tests/e2e/genesis.go | 6 ++- tests/e2e/query.go | 1 - tests/e2e/validator.go | 9 ++-- tests/ics/interchain_security_test.go | 10 ++-- x/globalfee/ante/antetest/fee_test.go | 8 +-- x/globalfee/ante/antetest/fee_test_setup.go | 12 ++--- x/globalfee/ante/fee.go | 6 ++- x/globalfee/ante/fee_utils.go | 2 + x/globalfee/ante/fee_utils_test.go | 3 +- x/globalfee/client/cli/query.go | 3 +- x/globalfee/genesis_test.go | 11 ++-- x/globalfee/migrations/v2/migration.go | 1 + .../migrations/v2/v2_test/migration_test.go | 10 ++-- x/globalfee/module.go | 10 ++-- x/globalfee/querier_test.go | 5 +- x/globalfee/types/genesis.go | 1 + x/globalfee/types/params.go | 7 ++- x/globalfee/types/params_test.go | 3 +- 49 files changed, 230 insertions(+), 171 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 9b6e8ad4719..7554db88ca6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,6 +10,7 @@ linters: - dogsled - errcheck - exportloopref + - gci - goconst - gocritic - gofumpt @@ -57,6 +58,18 @@ issues: max-same-issues: 10000 linters-settings: + gci: + custom-order: true + sections: + - standard # Standard section: captures all standard packages. + - default # Default section: contains all imports that could not be matched to another section type. + - blank # blank imports + - dot # dot imports + - prefix(github.com/cometbft/cometbft) # comet + - prefix(github.com/cosmos) # cosmos org + - prefix(cosmossdk.io) # new modules + - prefix(github.com/cosmos/cosmos-sdk) # cosmos sdk + - prefix(github.com/cosmos/gaia) # Gaia dogsled: max-blank-identifiers: 3 maligned: @@ -94,4 +107,4 @@ linters-settings: - name: empty-block - name: superfluous-else - name: unreachable-code - - name: redefines-builtin-id \ No newline at end of file + - name: redefines-builtin-id diff --git a/ante/ante.go b/ante/ante.go index b6ae8811aaf..39d3860d207 100644 --- a/ante/ante.go +++ b/ante/ante.go @@ -1,16 +1,18 @@ package ante import ( + ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante" + ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper" + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/ante" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - gaiaerrors "github.com/cosmos/gaia/v11/types/errors" - ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante" - ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper" + gaiaerrors "github.com/cosmos/gaia/v11/types/errors" gaiafeeante "github.com/cosmos/gaia/v11/x/globalfee/ante" ) diff --git a/ante/gov_ante.go b/ante/gov_ante.go index 5c08e669f85..e9d8709a57d 100644 --- a/ante/gov_ante.go +++ b/ante/gov_ante.go @@ -2,13 +2,14 @@ package ante import ( errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - gaiaerrors "github.com/cosmos/gaia/v11/types/errors" - "github.com/cosmos/cosmos-sdk/x/authz" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + gaiaerrors "github.com/cosmos/gaia/v11/types/errors" ) // initial deposit must be greater than or equal to 10% of the minimum deposit diff --git a/ante/gov_ante_test.go b/ante/gov_ante_test.go index d2509dbe181..dc872156d20 100644 --- a/ante/gov_ante_test.go +++ b/ante/gov_ante_test.go @@ -4,19 +4,18 @@ import ( "fmt" "testing" - sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/stretchr/testify/suite" + tmrand "github.com/tendermint/tendermint/libs/rand" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/testutil/testdata" - tmrand "github.com/tendermint/tendermint/libs/rand" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + sdk "github.com/cosmos/cosmos-sdk/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/gaia/v11/ante" - gaiahelpers "github.com/cosmos/gaia/v11/app/helpers" - gaiaapp "github.com/cosmos/gaia/v11/app" + gaiahelpers "github.com/cosmos/gaia/v11/app/helpers" ) var ( diff --git a/app/app.go b/app/app.go index 6953942ccaf..279eb22705c 100644 --- a/app/app.go +++ b/app/app.go @@ -7,6 +7,21 @@ import ( "os" "path/filepath" + "github.com/gorilla/mux" + "github.com/rakyll/statik/fs" + "github.com/spf13/cast" + abci "github.com/tendermint/tendermint/abci/types" + tmjson "github.com/tendermint/tendermint/libs/json" + "github.com/tendermint/tendermint/libs/log" + tmos "github.com/tendermint/tendermint/libs/os" + dbm "github.com/tendermint/tm-db" + + // unnamed import of statik for swagger UI support + _ "github.com/cosmos/cosmos-sdk/client/docs/statik" + + ibctesting "github.com/cosmos/interchain-security/v2/legacy_ibc_testing/testing" + providertypes "github.com/cosmos/interchain-security/v2/x/ccv/provider/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" @@ -29,16 +44,6 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ibctesting "github.com/cosmos/interchain-security/v2/legacy_ibc_testing/testing" - providertypes "github.com/cosmos/interchain-security/v2/x/ccv/provider/types" - "github.com/gorilla/mux" - "github.com/rakyll/statik/fs" - "github.com/spf13/cast" - abci "github.com/tendermint/tendermint/abci/types" - tmjson "github.com/tendermint/tendermint/libs/json" - "github.com/tendermint/tendermint/libs/log" - tmos "github.com/tendermint/tendermint/libs/os" - dbm "github.com/tendermint/tm-db" gaiaante "github.com/cosmos/gaia/v11/ante" "github.com/cosmos/gaia/v11/app/keepers" @@ -46,9 +51,6 @@ import ( "github.com/cosmos/gaia/v11/app/upgrades" v11 "github.com/cosmos/gaia/v11/app/upgrades/v11" "github.com/cosmos/gaia/v11/x/globalfee" - - // unnamed import of statik for swagger UI support - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" ) var ( diff --git a/app/app_helpers.go b/app/app_helpers.go index a4e058a0c85..bb0eb81331f 100644 --- a/app/app_helpers.go +++ b/app/app_helpers.go @@ -1,11 +1,12 @@ package gaia import ( - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper" ibcstakinginterface "github.com/cosmos/interchain-security/v2/legacy_ibc_testing/core" icstest "github.com/cosmos/interchain-security/v2/testutil/integration" ibcproviderkeeper "github.com/cosmos/interchain-security/v2/x/ccv/provider/keeper" + + capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" ) // ProviderApp interface implementations for icstest tests diff --git a/app/app_test.go b/app/app_test.go index a55c5c2cbe6..d2272577416 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -3,12 +3,13 @@ package gaia_test import ( "testing" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" db "github.com/tendermint/tm-db" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + gaia "github.com/cosmos/gaia/v11/app" gaiahelpers "github.com/cosmos/gaia/v11/app/helpers" ) diff --git a/app/export.go b/app/export.go index a818f49c8f6..a28815383ba 100644 --- a/app/export.go +++ b/app/export.go @@ -3,12 +3,13 @@ package gaia import ( "encoding/json" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) // ExportAppStateAndValidators exports the state of the application for a genesis diff --git a/app/helpers/test_helpers.go b/app/helpers/test_helpers.go index 748927ff4e5..6b5fcb1c11c 100644 --- a/app/helpers/test_helpers.go +++ b/app/helpers/test_helpers.go @@ -5,7 +5,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/libs/log" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtypes "github.com/tendermint/tendermint/types" + dbm "github.com/tendermint/tm-db" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -15,12 +21,6 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtypes "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" gaiaapp "github.com/cosmos/gaia/v11/app" ) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 70a0f765ccb..6484797d4b4 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -1,6 +1,32 @@ package keepers import ( + liquiditykeeper "github.com/gravity-devs/liquidity/x/liquidity/keeper" + liquiditytypes "github.com/gravity-devs/liquidity/x/liquidity/types" + "github.com/strangelove-ventures/packet-forward-middleware/v4/router" + routerkeeper "github.com/strangelove-ventures/packet-forward-middleware/v4/router/keeper" + routertypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types" + tmos "github.com/tendermint/tendermint/libs/os" + + // unnamed import of statik for swagger UI support + _ "github.com/cosmos/cosmos-sdk/client/docs/statik" + + ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts" + icahost "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" + "github.com/cosmos/ibc-go/v4/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v4/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" + ibcclient "github.com/cosmos/ibc-go/v4/modules/core/02-client" + ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types" + ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" + ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper" + ibcprovider "github.com/cosmos/interchain-security/v2/x/ccv/provider" + ibcproviderkeeper "github.com/cosmos/interchain-security/v2/x/ccv/provider/keeper" + providertypes "github.com/cosmos/interchain-security/v2/x/ccv/provider/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -22,12 +48,8 @@ import ( evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" "github.com/cosmos/cosmos-sdk/x/feegrant" feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - providertypes "github.com/cosmos/interchain-security/v2/x/ccv/provider/types" - tmos "github.com/tendermint/tendermint/libs/os" - govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/cosmos/cosmos-sdk/x/params" @@ -41,30 +63,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/upgrade" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts" - icahost "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" - "github.com/cosmos/ibc-go/v4/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v4/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - ibcclient "github.com/cosmos/ibc-go/v4/modules/core/02-client" - ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper" - ibcprovider "github.com/cosmos/interchain-security/v2/x/ccv/provider" - ibcproviderkeeper "github.com/cosmos/interchain-security/v2/x/ccv/provider/keeper" - liquiditykeeper "github.com/gravity-devs/liquidity/x/liquidity/keeper" - liquiditytypes "github.com/gravity-devs/liquidity/x/liquidity/types" - "github.com/strangelove-ventures/packet-forward-middleware/v4/router" - routerkeeper "github.com/strangelove-ventures/packet-forward-middleware/v4/router/keeper" - routertypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types" "github.com/cosmos/gaia/v11/x/globalfee" - - // unnamed import of statik for swagger UI support - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" ) type AppKeepers struct { diff --git a/app/keepers/keys.go b/app/keepers/keys.go index d3b5d0db1db..815892aa62e 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -1,6 +1,14 @@ package keepers import ( + liquiditytypes "github.com/gravity-devs/liquidity/x/liquidity/types" + routertypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types" + + icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" + ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" + ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" + providertypes "github.com/cosmos/interchain-security/v2/x/ccv/provider/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -16,12 +24,6 @@ import ( slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" - providertypes "github.com/cosmos/interchain-security/v2/x/ccv/provider/types" - liquiditytypes "github.com/gravity-devs/liquidity/x/liquidity/types" - routertypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types" ) func (appKeepers *AppKeepers) GenerateKeys() { diff --git a/app/modules.go b/app/modules.go index 024b9c562ed..12d0e0ddc13 100644 --- a/app/modules.go +++ b/app/modules.go @@ -1,6 +1,22 @@ package gaia import ( + "github.com/gravity-devs/liquidity/x/liquidity" + liquiditytypes "github.com/gravity-devs/liquidity/x/liquidity/types" + "github.com/strangelove-ventures/packet-forward-middleware/v4/router" + routertypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types" + + ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts" + icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" + "github.com/cosmos/ibc-go/v4/modules/apps/transfer" + ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v4/modules/core" + ibcclientclient "github.com/cosmos/ibc-go/v4/modules/core/02-client/client" + ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" + ibcprovider "github.com/cosmos/interchain-security/v2/x/ccv/provider" + ibcproviderclient "github.com/cosmos/interchain-security/v2/x/ccv/provider/client" + providertypes "github.com/cosmos/interchain-security/v2/x/ccv/provider/types" + "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" @@ -38,20 +54,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/upgrade" upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts" - icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" - "github.com/cosmos/ibc-go/v4/modules/apps/transfer" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v4/modules/core" - ibcclientclient "github.com/cosmos/ibc-go/v4/modules/core/02-client/client" - ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" - ibcprovider "github.com/cosmos/interchain-security/v2/x/ccv/provider" - ibcproviderclient "github.com/cosmos/interchain-security/v2/x/ccv/provider/client" - providertypes "github.com/cosmos/interchain-security/v2/x/ccv/provider/types" - "github.com/gravity-devs/liquidity/x/liquidity" - liquiditytypes "github.com/gravity-devs/liquidity/x/liquidity/types" - "github.com/strangelove-ventures/packet-forward-middleware/v4/router" - routertypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types" gaiaappparams "github.com/cosmos/gaia/v11/app/params" "github.com/cosmos/gaia/v11/x/globalfee" diff --git a/app/sim/sim_state.go b/app/sim/sim_state.go index a71a0bf5eda..131109849c9 100644 --- a/app/sim/sim_state.go +++ b/app/sim/sim_state.go @@ -11,8 +11,6 @@ import ( tmjson "github.com/tendermint/tendermint/libs/json" tmtypes "github.com/tendermint/tendermint/types" - gaia "github.com/cosmos/gaia/v11/app" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" simappparams "github.com/cosmos/cosmos-sdk/simapp/params" @@ -22,6 +20,8 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + gaia "github.com/cosmos/gaia/v11/app" ) // AppStateFn returns the initial application state using a genesis or the simulation parameters. diff --git a/app/sim/sim_utils.go b/app/sim/sim_utils.go index e672240d978..517616548a5 100644 --- a/app/sim/sim_utils.go +++ b/app/sim/sim_utils.go @@ -8,14 +8,14 @@ import ( "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - gaia "github.com/cosmos/gaia/v11/app" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/simapp/helpers" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + + gaia "github.com/cosmos/gaia/v11/app" ) // SetupSimulation creates the config, db (levelDB), temporary directory and logger for diff --git a/app/sim_test.go b/app/sim_test.go index c14195b37b7..2520cb26703 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -7,14 +7,15 @@ import ( "os" "testing" + "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" + dbm "github.com/tendermint/tm-db" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/store" simulation2 "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" - "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/log" - dbm "github.com/tendermint/tm-db" gaia "github.com/cosmos/gaia/v11/app" "github.com/cosmos/gaia/v11/app/helpers" diff --git a/app/upgrades/v7/constants.go b/app/upgrades/v7/constants.go index 63fbf3619f8..220dae89013 100644 --- a/app/upgrades/v7/constants.go +++ b/app/upgrades/v7/constants.go @@ -1,9 +1,10 @@ package v7 import ( - store "github.com/cosmos/cosmos-sdk/store/types" icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" + store "github.com/cosmos/cosmos-sdk/store/types" + "github.com/cosmos/gaia/v11/app/upgrades" ) diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index 98df63b9137..fb2d803b17a 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -1,14 +1,15 @@ package v7 import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts" icacontrollertypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/controller/types" icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/cosmos/gaia/v11/app/keepers" ) diff --git a/app/upgrades/v8/upgrades.go b/app/upgrades/v8/upgrades.go index 85627030a33..2519442c6af 100644 --- a/app/upgrades/v8/upgrades.go +++ b/app/upgrades/v8/upgrades.go @@ -4,14 +4,15 @@ import ( "errors" "fmt" + icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" + ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" - ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" "github.com/cosmos/gaia/v11/app/keepers" ) diff --git a/app/upgrades/v9/constants.go b/app/upgrades/v9/constants.go index 544fa0d9718..abafb30ec0a 100644 --- a/app/upgrades/v9/constants.go +++ b/app/upgrades/v9/constants.go @@ -1,9 +1,10 @@ package v9 import ( - store "github.com/cosmos/cosmos-sdk/store/types" ccvprovider "github.com/cosmos/interchain-security/v2/x/ccv/provider/types" + store "github.com/cosmos/cosmos-sdk/store/types" + "github.com/cosmos/gaia/v11/app/upgrades" ) diff --git a/cmd/gaiad/cmd/bech32_convert.go b/cmd/gaiad/cmd/bech32_convert.go index ab16076a394..6f5182391f1 100644 --- a/cmd/gaiad/cmd/bech32_convert.go +++ b/cmd/gaiad/cmd/bech32_convert.go @@ -3,9 +3,9 @@ package cmd import ( "fmt" - addressutil "github.com/cosmos/gaia/v11/pkg/address" - "github.com/spf13/cobra" + + addressutil "github.com/cosmos/gaia/v11/pkg/address" ) var flagBech32Prefix = "prefix" diff --git a/cmd/gaiad/cmd/genaccounts.go b/cmd/gaiad/cmd/genaccounts.go index d655b7dc6f0..3be49ba2dd9 100644 --- a/cmd/gaiad/cmd/genaccounts.go +++ b/cmd/gaiad/cmd/genaccounts.go @@ -6,6 +6,8 @@ import ( "errors" "fmt" + "github.com/spf13/cobra" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -16,7 +18,6 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/spf13/cobra" ) const ( diff --git a/cmd/gaiad/cmd/root.go b/cmd/gaiad/cmd/root.go index 2fe5502a757..ca001b35b5e 100644 --- a/cmd/gaiad/cmd/root.go +++ b/cmd/gaiad/cmd/root.go @@ -6,6 +6,12 @@ import ( "os" "path/filepath" + "github.com/spf13/cast" + "github.com/spf13/cobra" + tmcli "github.com/tendermint/tendermint/libs/cli" + "github.com/tendermint/tendermint/libs/log" + dbm "github.com/tendermint/tm-db" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" @@ -24,11 +30,6 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" - "github.com/spf13/cast" - "github.com/spf13/cobra" - tmcli "github.com/tendermint/tendermint/libs/cli" - "github.com/tendermint/tendermint/libs/log" - dbm "github.com/tendermint/tm-db" gaia "github.com/cosmos/gaia/v11/app" "github.com/cosmos/gaia/v11/app/params" diff --git a/cmd/gaiad/cmd/root_test.go b/cmd/gaiad/cmd/root_test.go index 0ce64a1b926..40ddf2e31d7 100644 --- a/cmd/gaiad/cmd/root_test.go +++ b/cmd/gaiad/cmd/root_test.go @@ -3,9 +3,10 @@ package cmd_test import ( "testing" - svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/stretchr/testify/require" + svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" + app "github.com/cosmos/gaia/v11/app" "github.com/cosmos/gaia/v11/cmd/gaiad/cmd" ) diff --git a/cmd/gaiad/cmd/testnet.go b/cmd/gaiad/cmd/testnet.go index 997ebfed7fc..fb8da4405b4 100644 --- a/cmd/gaiad/cmd/testnet.go +++ b/cmd/gaiad/cmd/testnet.go @@ -8,6 +8,13 @@ import ( "os" "path/filepath" + "github.com/spf13/cobra" + tmconfig "github.com/tendermint/tendermint/config" + tmos "github.com/tendermint/tendermint/libs/os" + tmrand "github.com/tendermint/tendermint/libs/rand" + "github.com/tendermint/tendermint/types" + tmtime "github.com/tendermint/tendermint/types/time" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -24,14 +31,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/spf13/cobra" - tmconfig "github.com/tendermint/tendermint/config" - tmos "github.com/tendermint/tendermint/libs/os" - tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" - // ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - // ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" ) var ( diff --git a/tests/e2e/chain.go b/tests/e2e/chain.go index 9c931eede8a..fda64dbbe62 100644 --- a/tests/e2e/chain.go +++ b/tests/e2e/chain.go @@ -4,13 +4,14 @@ import ( "fmt" "os" + tmrand "github.com/tendermint/tendermint/libs/rand" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" authvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - tmrand "github.com/tendermint/tendermint/libs/rand" gaia "github.com/cosmos/gaia/v11/app" "github.com/cosmos/gaia/v11/app/params" diff --git a/tests/e2e/e2e_bypassminfee_test.go b/tests/e2e/e2e_bypassminfee_test.go index 2901c557fef..893226f6995 100644 --- a/tests/e2e/e2e_bypassminfee_test.go +++ b/tests/e2e/e2e_bypassminfee_test.go @@ -3,11 +3,13 @@ package e2e import ( "time" + ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" + ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" ) func (s *IntegrationTestSuite) testBypassMinFeeWithdrawReward(endpoint string) { diff --git a/tests/e2e/e2e_exec_test.go b/tests/e2e/e2e_exec_test.go index c85c11d42e4..4f1572cbd3d 100644 --- a/tests/e2e/e2e_exec_test.go +++ b/tests/e2e/e2e_exec_test.go @@ -10,6 +10,8 @@ import ( "strings" "time" + "github.com/ory/dockertest/v3/docker" + "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" @@ -19,7 +21,6 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/ory/dockertest/v3/docker" ) const ( diff --git a/tests/e2e/e2e_globalfee_test.go b/tests/e2e/e2e_globalfee_test.go index f70cb5cb983..8dfcdd5f60d 100644 --- a/tests/e2e/e2e_globalfee_test.go +++ b/tests/e2e/e2e_globalfee_test.go @@ -5,6 +5,7 @@ import ( "time" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/tests/e2e/e2e_gov_test.go b/tests/e2e/e2e_gov_test.go index eefdfc0bf2f..a9c8b295340 100644 --- a/tests/e2e/e2e_gov_test.go +++ b/tests/e2e/e2e_gov_test.go @@ -9,7 +9,6 @@ import ( ccvtypes "github.com/cosmos/interchain-security/v2/x/ccv/provider/types" sdk "github.com/cosmos/cosmos-sdk/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" diff --git a/tests/e2e/e2e_ibc_test.go b/tests/e2e/e2e_ibc_test.go index be6a1d2c3fc..cfe2235beb0 100644 --- a/tests/e2e/e2e_ibc_test.go +++ b/tests/e2e/e2e_ibc_test.go @@ -9,9 +9,10 @@ import ( "strings" "time" + "github.com/ory/dockertest/v3/docker" + "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ory/dockertest/v3/docker" ) type ForwardMetadata struct { diff --git a/tests/e2e/e2e_setup_test.go b/tests/e2e/e2e_setup_test.go index 37c2b910d80..a757b55194e 100644 --- a/tests/e2e/e2e_setup_test.go +++ b/tests/e2e/e2e_setup_test.go @@ -15,6 +15,16 @@ import ( "testing" "time" + "github.com/ory/dockertest/v3" + "github.com/ory/dockertest/v3/docker" + "github.com/spf13/viper" + "github.com/stretchr/testify/suite" + tmconfig "github.com/tendermint/tendermint/config" + tmjson "github.com/tendermint/tendermint/libs/json" + "github.com/tendermint/tendermint/libs/rand" + rpchttp "github.com/tendermint/tendermint/rpc/client/http" + + ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" ccvprovider "github.com/cosmos/interchain-security/v2/x/ccv/provider/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -31,15 +41,6 @@ import ( evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - "github.com/ory/dockertest/v3" - "github.com/ory/dockertest/v3/docker" - "github.com/spf13/viper" - "github.com/stretchr/testify/suite" - tmconfig "github.com/tendermint/tendermint/config" - tmjson "github.com/tendermint/tendermint/libs/json" - "github.com/tendermint/tendermint/libs/rand" - rpchttp "github.com/tendermint/tendermint/rpc/client/http" ) const ( diff --git a/tests/e2e/genesis.go b/tests/e2e/genesis.go index 685e872cb23..68e4489ee8a 100644 --- a/tests/e2e/genesis.go +++ b/tests/e2e/genesis.go @@ -6,6 +6,10 @@ import ( "os" "time" + tmtypes "github.com/tendermint/tendermint/types" + + icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" + "github.com/cosmos/cosmos-sdk/server" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -14,8 +18,6 @@ import ( genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" - tmtypes "github.com/tendermint/tendermint/types" globfeetypes "github.com/cosmos/gaia/v11/x/globalfee/types" ) diff --git a/tests/e2e/query.go b/tests/e2e/query.go index ccd30a96c81..f3e76ed9803 100644 --- a/tests/e2e/query.go +++ b/tests/e2e/query.go @@ -13,7 +13,6 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" diff --git a/tests/e2e/validator.go b/tests/e2e/validator.go index e6ac398b503..ffff9f8f449 100644 --- a/tests/e2e/validator.go +++ b/tests/e2e/validator.go @@ -7,6 +7,11 @@ import ( "path" "path/filepath" + tmcfg "github.com/tendermint/tendermint/config" + tmos "github.com/tendermint/tendermint/libs/os" + "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/privval" + sdkcrypto "github.com/cosmos/cosmos-sdk/crypto" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/hd" @@ -19,10 +24,6 @@ import ( authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" "github.com/cosmos/cosmos-sdk/x/genutil" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - tmcfg "github.com/tendermint/tendermint/config" - tmos "github.com/tendermint/tendermint/libs/os" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/privval" gaia "github.com/cosmos/gaia/v11/app" ) diff --git a/tests/ics/interchain_security_test.go b/tests/ics/interchain_security_test.go index c6572711b0b..1dd5027a371 100644 --- a/tests/ics/interchain_security_test.go +++ b/tests/ics/interchain_security_test.go @@ -4,15 +4,15 @@ import ( "encoding/json" "testing" - appConsumer "github.com/cosmos/interchain-security/v2/app/consumer" - "github.com/cosmos/interchain-security/v2/tests/integration" - icstestingutils "github.com/cosmos/interchain-security/v2/testutil/ibc_testing" "github.com/stretchr/testify/suite" - - ibctesting "github.com/cosmos/interchain-security/v2/legacy_ibc_testing/testing" "github.com/tendermint/tendermint/libs/log" tmdb "github.com/tendermint/tm-db" + appConsumer "github.com/cosmos/interchain-security/v2/app/consumer" + ibctesting "github.com/cosmos/interchain-security/v2/legacy_ibc_testing/testing" + "github.com/cosmos/interchain-security/v2/tests/integration" + icstestingutils "github.com/cosmos/interchain-security/v2/testutil/ibc_testing" + gaiaApp "github.com/cosmos/gaia/v11/app" ) diff --git a/x/globalfee/ante/antetest/fee_test.go b/x/globalfee/ante/antetest/fee_test.go index 5ba974e13ef..bfaeb950859 100644 --- a/x/globalfee/ante/antetest/fee_test.go +++ b/x/globalfee/ante/antetest/fee_test.go @@ -3,13 +3,15 @@ package antetest import ( "testing" + "github.com/stretchr/testify/suite" + + ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" + ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - "github.com/stretchr/testify/suite" gaiafeeante "github.com/cosmos/gaia/v11/x/globalfee/ante" globfeetypes "github.com/cosmos/gaia/v11/x/globalfee/types" diff --git a/x/globalfee/ante/antetest/fee_test_setup.go b/x/globalfee/ante/antetest/fee_test_setup.go index df381f4caca..90fcefa64b5 100644 --- a/x/globalfee/ante/antetest/fee_test_setup.go +++ b/x/globalfee/ante/antetest/fee_test_setup.go @@ -3,6 +3,10 @@ package antetest import ( "fmt" + "github.com/stretchr/testify/suite" + tmrand "github.com/tendermint/tendermint/libs/rand" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -12,15 +16,11 @@ import ( xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" "github.com/cosmos/cosmos-sdk/x/params/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/stretchr/testify/suite" - tmrand "github.com/tendermint/tendermint/libs/rand" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - gaiahelpers "github.com/cosmos/gaia/v11/app/helpers" - gaiafeeante "github.com/cosmos/gaia/v11/x/globalfee/ante" gaiaapp "github.com/cosmos/gaia/v11/app" + gaiahelpers "github.com/cosmos/gaia/v11/app/helpers" "github.com/cosmos/gaia/v11/x/globalfee" + gaiafeeante "github.com/cosmos/gaia/v11/x/globalfee/ante" globfeetypes "github.com/cosmos/gaia/v11/x/globalfee/types" ) diff --git a/x/globalfee/ante/fee.go b/x/globalfee/ante/fee.go index 284f863e90e..238118f6e25 100644 --- a/x/globalfee/ante/fee.go +++ b/x/globalfee/ante/fee.go @@ -4,13 +4,15 @@ import ( "errors" "fmt" + tmstrings "github.com/tendermint/tendermint/libs/strings" + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - gaiaerrors "github.com/cosmos/gaia/v11/types/errors" - tmstrings "github.com/tendermint/tendermint/libs/strings" + gaiaerrors "github.com/cosmos/gaia/v11/types/errors" "github.com/cosmos/gaia/v11/x/globalfee" "github.com/cosmos/gaia/v11/x/globalfee/types" ) diff --git a/x/globalfee/ante/fee_utils.go b/x/globalfee/ante/fee_utils.go index 289f45e250b..b7abd5ad125 100644 --- a/x/globalfee/ante/fee_utils.go +++ b/x/globalfee/ante/fee_utils.go @@ -2,7 +2,9 @@ package ante import ( errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + gaiaerrors "github.com/cosmos/gaia/v11/types/errors" ) diff --git a/x/globalfee/ante/fee_utils_test.go b/x/globalfee/ante/fee_utils_test.go index 8378e467135..7bf9e914152 100644 --- a/x/globalfee/ante/fee_utils_test.go +++ b/x/globalfee/ante/fee_utils_test.go @@ -3,8 +3,9 @@ package ante import ( "testing" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" ) func TestContainZeroCoins(t *testing.T) { diff --git a/x/globalfee/client/cli/query.go b/x/globalfee/client/cli/query.go index b3b2056fc37..5f8b43b6a02 100644 --- a/x/globalfee/client/cli/query.go +++ b/x/globalfee/client/cli/query.go @@ -1,9 +1,10 @@ package cli import ( + "github.com/spf13/cobra" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" "github.com/cosmos/gaia/v11/x/globalfee/types" ) diff --git a/x/globalfee/genesis_test.go b/x/globalfee/genesis_test.go index 30b84962f15..d963702878f 100644 --- a/x/globalfee/genesis_test.go +++ b/x/globalfee/genesis_test.go @@ -4,6 +4,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + dbm "github.com/tendermint/tm-db" + "github.com/cosmos/cosmos-sdk/simapp" simappparams "github.com/cosmos/cosmos-sdk/simapp/params" "github.com/cosmos/cosmos-sdk/store" @@ -11,11 +17,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - dbm "github.com/tendermint/tm-db" "github.com/cosmos/gaia/v11/x/globalfee/types" ) diff --git a/x/globalfee/migrations/v2/migration.go b/x/globalfee/migrations/v2/migration.go index a6e3ea0b472..176ff59d6f1 100644 --- a/x/globalfee/migrations/v2/migration.go +++ b/x/globalfee/migrations/v2/migration.go @@ -3,6 +3,7 @@ package v2 import ( sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/cosmos/gaia/v11/x/globalfee/types" ) diff --git a/x/globalfee/migrations/v2/v2_test/migration_test.go b/x/globalfee/migrations/v2/v2_test/migration_test.go index 632e578980c..f7253086351 100644 --- a/x/globalfee/migrations/v2/v2_test/migration_test.go +++ b/x/globalfee/migrations/v2/v2_test/migration_test.go @@ -3,18 +3,20 @@ package v2_test import ( "testing" + "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmdb "github.com/tendermint/tm-db" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/store" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + v2 "github.com/cosmos/gaia/v11/x/globalfee/migrations/v2" globalfeetypes "github.com/cosmos/gaia/v11/x/globalfee/types" - "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmdb "github.com/tendermint/tm-db" ) func TestMigrateStore(t *testing.T) { diff --git a/x/globalfee/module.go b/x/globalfee/module.go index c49ed71133b..13686ffab97 100644 --- a/x/globalfee/module.go +++ b/x/globalfee/module.go @@ -5,17 +5,19 @@ import ( "encoding/json" "fmt" + "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + abci "github.com/tendermint/tendermint/abci/types" + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/client" "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/types/module" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" "github.com/cosmos/gaia/v11/x/globalfee/client/cli" "github.com/cosmos/gaia/v11/x/globalfee/keeper" diff --git a/x/globalfee/querier_test.go b/x/globalfee/querier_test.go index 5f6c86345c0..8f5a9160c2b 100644 --- a/x/globalfee/querier_test.go +++ b/x/globalfee/querier_test.go @@ -3,11 +3,12 @@ package globalfee import ( "testing" - sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/cosmos/gaia/v11/x/globalfee/types" ) diff --git a/x/globalfee/types/genesis.go b/x/globalfee/types/genesis.go index 253df889c6a..b0e94687fbe 100644 --- a/x/globalfee/types/genesis.go +++ b/x/globalfee/types/genesis.go @@ -4,6 +4,7 @@ import ( "encoding/json" errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec" ) diff --git a/x/globalfee/types/params.go b/x/globalfee/types/params.go index f3fc120acb4..aa7159bbf96 100644 --- a/x/globalfee/types/params.go +++ b/x/globalfee/types/params.go @@ -4,12 +4,15 @@ import ( "fmt" "strings" + ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" + ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + gaiaerrors "github.com/cosmos/gaia/v11/types/errors" - ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" ) var ( diff --git a/x/globalfee/types/params_test.go b/x/globalfee/types/params_test.go index b2c2931674a..78d17ba80aa 100644 --- a/x/globalfee/types/params_test.go +++ b/x/globalfee/types/params_test.go @@ -3,8 +3,9 @@ package types import ( "testing" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" ) func TestDefaultParams(t *testing.T) {