From f9d6c733f41147b42b032d77ba2048402801af86 Mon Sep 17 00:00:00 2001 From: Arnaud Mimart <33665250+amimart@users.noreply.github.com> Date: Wed, 17 Jan 2024 17:56:55 +0100 Subject: [PATCH] style: make linters happy --- app/ante.go | 7 ++- app/app.go | 71 ++++++++++++------------ app/encoding.go | 4 +- app/export.go | 6 +- app/genesis.go | 6 +- cmd/okp4d/cmd/root.go | 22 ++++---- scripts/main.go | 4 +- testutil/network/network.go | 3 +- x/logic/fs/wasm_test.go | 8 +-- x/logic/interpreter/interpreter.go | 4 +- x/logic/interpreter/registry.go | 4 +- x/logic/keeper/grpc_query_ask.go | 3 +- x/logic/keeper/grpc_query_ask_test.go | 1 + x/logic/keeper/grpc_query_params_test.go | 2 +- x/logic/keeper/interpreter.go | 3 +- x/logic/keeper/keeper.go | 2 +- x/logic/keeper/msg_server_test.go | 1 + x/logic/module.go | 3 +- x/logic/predicate/address_test.go | 7 +-- x/logic/predicate/bank_test.go | 10 ++-- x/logic/predicate/block_test.go | 7 +-- x/logic/predicate/builtin_test.go | 8 +-- x/logic/predicate/chain_test.go | 7 +-- x/logic/predicate/crypto_test.go | 7 +-- x/logic/predicate/did_test.go | 8 +-- x/logic/predicate/encoding_test.go | 8 +-- x/logic/predicate/file_test.go | 8 +-- x/logic/predicate/json_test.go | 8 +-- x/logic/predicate/string_test.go | 7 +-- x/logic/predicate/uri_test.go | 8 +-- x/logic/types/codec.go | 2 +- x/mint/keeper/genesis.go | 2 +- x/mint/keeper/genesis_test.go | 19 +++++-- x/mint/keeper/grpc_query_test.go | 8 +-- x/mint/keeper/keeper.go | 4 +- x/mint/keeper/keeper_test.go | 8 +-- x/mint/keeper/msg_server_test.go | 1 + x/mint/module.go | 4 +- x/mint/module_test.go | 4 +- x/mint/simulation/decoder_test.go | 4 +- x/mint/simulation/proposals_test.go | 4 +- x/mint/types/codec.go | 2 +- x/mint/types/params.go | 4 +- x/vesting/module.go | 4 +- x/vesting/msg_server.go | 4 ++ x/vesting/msg_server_test.go | 7 +-- x/vesting/types/vesting_account.go | 1 + x/vesting/types/vesting_account_test.go | 7 +-- 48 files changed, 171 insertions(+), 165 deletions(-) diff --git a/app/ante.go b/app/ante.go index e26a34ed8..f83627510 100644 --- a/app/ante.go +++ b/app/ante.go @@ -3,13 +3,16 @@ package app import ( "errors" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types" + corestoretypes "cosmossdk.io/core/store" circuitante "cosmossdk.io/x/circuit/ante" circuitkeeper "cosmossdk.io/x/circuit/keeper" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/ante" + ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" "github.com/cosmos/ibc-go/v8/modules/core/keeper" ) diff --git a/app/app.go b/app/app.go index 4c712c93e..73d414504 100644 --- a/app/app.go +++ b/app/app.go @@ -13,39 +13,26 @@ import ( "strings" "sync" - "cosmossdk.io/client/v2/autocli" - - "cosmossdk.io/core/appmodule" - - "github.com/cosmos/cosmos-sdk/x/auth/posthandler" - - "github.com/cosmos/cosmos-sdk/types/msgservice" - - "cosmossdk.io/x/circuit" - - "github.com/okp4/okp4d/x/mint" - - "github.com/cosmos/cosmos-sdk/runtime" - - "cosmossdk.io/log" - "cosmossdk.io/x/tx/signing" - abci "github.com/cometbft/cometbft/abci/types" - tmos "github.com/cometbft/cometbft/libs/os" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/CosmWasm/wasmd/x/wasm" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" dbm "github.com/cosmos/cosmos-db" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec/address" - "github.com/cosmos/cosmos-sdk/server" - "github.com/cosmos/cosmos-sdk/std" "github.com/cosmos/gogoproto/proto" "github.com/ignite/cli/ignite/pkg/openapiconsole" "github.com/prometheus/client_golang/prometheus" "github.com/spf13/cast" + abci "github.com/cometbft/cometbft/abci/types" + tmos "github.com/cometbft/cometbft/libs/os" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" - + "cosmossdk.io/client/v2/autocli" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/circuit" circuitkeeper "cosmossdk.io/x/circuit/keeper" circuittypes "cosmossdk.io/x/circuit/types" "cosmossdk.io/x/evidence" @@ -54,26 +41,35 @@ import ( "cosmossdk.io/x/feegrant" feegrantkeeper "cosmossdk.io/x/feegrant/keeper" feegrantmodule "cosmossdk.io/x/feegrant/module" + "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/upgrade" upgradekeeper "cosmossdk.io/x/upgrade/keeper" upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/runtime" runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" + "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" + "github.com/cosmos/cosmos-sdk/std" 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/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" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -113,8 +109,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/ibc-go/modules/capability" + "github.com/cosmos/ibc-go/modules/capability" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" @@ -139,16 +135,13 @@ import ( ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" - "github.com/CosmWasm/wasmd/x/wasm" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - okp4wasm "github.com/okp4/okp4d/app/wasm" "github.com/okp4/okp4d/docs" logicmodule "github.com/okp4/okp4d/x/logic" logicfs "github.com/okp4/okp4d/x/logic/fs" logicmodulekeeper "github.com/okp4/okp4d/x/logic/keeper" logicmoduletypes "github.com/okp4/okp4d/x/logic/types" + "github.com/okp4/okp4d/x/mint" mintkeeper "github.com/okp4/okp4d/x/mint/keeper" minttypes "github.com/okp4/okp4d/x/mint/types" "github.com/okp4/okp4d/x/vesting" @@ -674,8 +667,10 @@ func New( feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName), app.interfaceRegistry), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), + slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, + app.GetSubspace(slashingtypes.ModuleName), app.interfaceRegistry), + distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, + app.GetSubspace(distrtypes.ModuleName)), staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), upgrade.NewAppModule(app.UpgradeKeeper, app.AccountKeeper.AddressCodec()), evidence.NewAppModule(app.EvidenceKeeper), @@ -689,7 +684,8 @@ func New( ibcfee.NewAppModule(app.IBCFeeKeeper), ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), ibctm.AppModule{}, - wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)), + wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, + app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)), // our modules vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), @@ -935,7 +931,8 @@ func (app *App) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.ResponseFin app.once.Do(func() { ctx := app.NewUncachedContext(false, tmproto.Header{}) if _, err := app.ConsensusParamsKeeper.Params(ctx, &consensusparamtypes.QueryParamsRequest{}); err != nil { - // prevents panic: consensus key is nil: collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/tendermint.types.ConsensusParams + // prevents panic: consensus key is nil: collections: not found: key 'no_key' of type + // github.com/cosmos/gogoproto/tendermint.types.ConsensusParams // sdk 47: // Migrate Tendermint consensus parameters from x/params module to a dedicated x/consensus module. // see https://github.com/cosmos/cosmos-sdk/blob/v0.47.0/simapp/upgrades.go#L66 @@ -950,7 +947,7 @@ func (app *App) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.ResponseFin return app.BaseApp.FinalizeBlock(req) } -// PreBlocker application updates every pre block +// PreBlocker application updates every pre block. func (app *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { return app.ModuleManager.PreBlock(ctx) } @@ -1029,7 +1026,7 @@ func (app *App) InterfaceRegistry() types.InterfaceRegistry { return app.interfaceRegistry } -// TxConfig returns WasmApp's TxConfig +// TxConfig returns WasmApp's TxConfig. func (app *App) TxConfig() client.TxConfig { return app.txConfig } @@ -1056,8 +1053,8 @@ func (app *App) AutoCliOpts() autocli.AppOptions { } // DefaultGenesis returns a default genesis from the registered AppModuleBasic's. -func (a *App) DefaultGenesis() map[string]json.RawMessage { - return a.BasicModuleManager.DefaultGenesis(a.appCodec) +func (app *App) DefaultGenesis() map[string]json.RawMessage { + return app.BasicModuleManager.DefaultGenesis(app.appCodec) } // GetKey returns the KVStoreKey for the provided store key. diff --git a/app/encoding.go b/app/encoding.go index 033678a7e..3c6bf9c9e 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -3,10 +3,12 @@ package app import ( "testing" + dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" - dbm "github.com/cosmos/cosmos-db" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + "github.com/okp4/okp4d/app/params" ) diff --git a/app/export.go b/app/export.go index 8e20005e6..0fcdbdbfd 100644 --- a/app/export.go +++ b/app/export.go @@ -5,10 +5,10 @@ import ( "fmt" "log" - storetypes "cosmossdk.io/store/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + storetypes "cosmossdk.io/store/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" @@ -61,7 +61,7 @@ func (app *App) ExportAppStateAndValidators( // // in favour of export at a block height // -//nolint:funlen +//nolint:funlen,gocognit,gocyclo func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) { applyAllowedAddrs := false diff --git a/app/genesis.go b/app/genesis.go index 34edce093..a42a94f1e 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -4,12 +4,12 @@ import ( "encoding/json" "testing" - "cosmossdk.io/log" - dbm "github.com/cosmos/cosmos-db" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/codec" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" ) // The genesis state of the blockchain is represented here as a map of raw json diff --git a/cmd/okp4d/cmd/root.go b/cmd/okp4d/cmd/root.go index 7b26fcf61..508e25beb 100644 --- a/cmd/okp4d/cmd/root.go +++ b/cmd/okp4d/cmd/root.go @@ -6,17 +6,18 @@ import ( "os" "strings" + "github.com/CosmWasm/wasmd/x/wasm" + wasmcli "github.com/CosmWasm/wasmd/x/wasm/client/cli" + dbm "github.com/cosmos/cosmos-db" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" - "cosmossdk.io/log" - - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + cmtcfg "github.com/cometbft/cometbft/config" + "cosmossdk.io/log" confixcmd "cosmossdk.io/tools/confix/cmd" - cmtcfg "github.com/cometbft/cometbft/config" - dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" @@ -29,6 +30,7 @@ import ( "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/types/tx/signing" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" @@ -38,14 +40,13 @@ import ( "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" - "github.com/CosmWasm/wasmd/x/wasm" - wasmcli "github.com/CosmWasm/wasmd/x/wasm/client/cli" - "github.com/okp4/okp4d/app" appparams "github.com/okp4/okp4d/app/params" ) // NewRootCmd creates a new root command for a Cosmos SDK application. +// +//nolint:funlen func NewRootCmd() *cobra.Command { // Set config initSDKConfig() @@ -97,9 +98,8 @@ Want to lean more about OKP4 network? Complete documentation is available at htt // sets the RPC client needed for SIGN_MODE_TEXTUAL. This sign mode // is only available if the client is online. if !initClientCtx.Offline { - enabledSignModes := append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL) txConfigOpts := tx.ConfigOptions{ - EnabledSignModes: enabledSignModes, + EnabledSignModes: append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL), TextualCoinMetadataQueryFn: txmodule.NewGRPCCoinMetadataQueryFn(initClientCtx), } txConfig, err := tx.NewTxConfigWithOptions( @@ -266,7 +266,7 @@ func overwriteFlagDefaults(c *cobra.Command, defaults map[string]string) { // newApp creates a new Cosmos SDK app. // -//nolint:funlen + func newApp( logger log.Logger, db dbm.DB, diff --git a/scripts/main.go b/scripts/main.go index 36b29042a..a8c1cf7f1 100644 --- a/scripts/main.go +++ b/scripts/main.go @@ -3,9 +3,9 @@ package main import ( "os" - "cosmossdk.io/log" - "github.com/spf13/cobra" + + "cosmossdk.io/log" ) func main() { diff --git a/testutil/network/network.go b/testutil/network/network.go index 9f2d5c3de..4e469ae0d 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -5,12 +5,13 @@ import ( "testing" "time" + dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" tmrand "github.com/cometbft/cometbft/libs/rand" - dbm "github.com/cosmos/cosmos-db" pruningtypes "cosmossdk.io/store/pruning/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" diff --git a/x/logic/fs/wasm_test.go b/x/logic/fs/wasm_test.go index bd4b18bff..b4559e02d 100644 --- a/x/logic/fs/wasm_test.go +++ b/x/logic/fs/wasm_test.go @@ -8,17 +8,17 @@ import ( "net/url" "testing" - "cosmossdk.io/store/metrics" - + dbm "github.com/cosmos/cosmos-db" "github.com/golang/mock/gomock" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/logic/testutil" diff --git a/x/logic/interpreter/interpreter.go b/x/logic/interpreter/interpreter.go index 423394100..4a3169984 100644 --- a/x/logic/interpreter/interpreter.go +++ b/x/logic/interpreter/interpreter.go @@ -6,10 +6,10 @@ import ( "io" "io/fs" - storetypes "cosmossdk.io/store/types" - "github.com/ichiban/prolog" "github.com/ichiban/prolog/engine" + + storetypes "cosmossdk.io/store/types" ) // Predicates is a map of predicate names to their execution costs. diff --git a/x/logic/interpreter/registry.go b/x/logic/interpreter/registry.go index f46df62a0..18e2877c2 100644 --- a/x/logic/interpreter/registry.go +++ b/x/logic/interpreter/registry.go @@ -5,11 +5,11 @@ import ( "strconv" "strings" - storetypes "cosmossdk.io/store/types" - "github.com/ichiban/prolog" "github.com/ichiban/prolog/engine" + storetypes "cosmossdk.io/store/types" + "github.com/okp4/okp4d/x/logic/predicate" ) diff --git a/x/logic/keeper/grpc_query_ask.go b/x/logic/keeper/grpc_query_ask.go index 520b51ee9..c008ee9a3 100644 --- a/x/logic/keeper/grpc_query_ask.go +++ b/x/logic/keeper/grpc_query_ask.go @@ -3,9 +3,8 @@ package keeper import ( goctx "context" - storetypes "cosmossdk.io/store/types" - errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/logic/keeper/grpc_query_ask_test.go b/x/logic/keeper/grpc_query_ask_test.go index 9292af9ec..04f6d9283 100644 --- a/x/logic/keeper/grpc_query_ask_test.go +++ b/x/logic/keeper/grpc_query_ask_test.go @@ -11,6 +11,7 @@ import ( . "github.com/smartystreets/goconvey/convey" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/testutil" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/x/logic/keeper/grpc_query_params_test.go b/x/logic/keeper/grpc_query_params_test.go index f7d22bbd3..75020b851 100644 --- a/x/logic/keeper/grpc_query_params_test.go +++ b/x/logic/keeper/grpc_query_params_test.go @@ -11,8 +11,8 @@ import ( . "github.com/smartystreets/goconvey/convey" "cosmossdk.io/math" - storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/testutil" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/x/logic/keeper/interpreter.go b/x/logic/keeper/interpreter.go index acd805d9c..669d4ec95 100644 --- a/x/logic/keeper/interpreter.go +++ b/x/logic/keeper/interpreter.go @@ -4,13 +4,12 @@ import ( goctx "context" "math" - storetypes "cosmossdk.io/store/types" - "github.com/ichiban/prolog" "github.com/samber/lo" errorsmod "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/logic/keeper/keeper.go b/x/logic/keeper/keeper.go index 4210f5905..5657bad08 100644 --- a/x/logic/keeper/keeper.go +++ b/x/logic/keeper/keeper.go @@ -6,8 +6,8 @@ import ( "io/fs" "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/logic/keeper/msg_server_test.go b/x/logic/keeper/msg_server_test.go index c70c1eede..ac34db843 100644 --- a/x/logic/keeper/msg_server_test.go +++ b/x/logic/keeper/msg_server_test.go @@ -11,6 +11,7 @@ import ( . "github.com/smartystreets/goconvey/convey" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/testutil" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" diff --git a/x/logic/module.go b/x/logic/module.go index 9abc53814..363fa72d6 100644 --- a/x/logic/module.go +++ b/x/logic/module.go @@ -5,6 +5,8 @@ import ( "encoding/json" "fmt" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "cosmossdk.io/core/appmodule" "github.com/cosmos/cosmos-sdk/client" @@ -12,7 +14,6 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/okp4/okp4d/x/logic/exported" "github.com/okp4/okp4d/x/logic/keeper" diff --git a/x/logic/predicate/address_test.go b/x/logic/predicate/address_test.go index 4b1165c75..7eeb76393 100644 --- a/x/logic/predicate/address_test.go +++ b/x/logic/predicate/address_test.go @@ -6,18 +6,17 @@ import ( "strings" "testing" - "cosmossdk.io/store/metrics" - dbm "github.com/cosmos/cosmos-db" - "github.com/ichiban/prolog/engine" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "cosmossdk.io/log" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/logic/testutil" diff --git a/x/logic/predicate/bank_test.go b/x/logic/predicate/bank_test.go index fcb6bd184..915f4d119 100644 --- a/x/logic/predicate/bank_test.go +++ b/x/logic/predicate/bank_test.go @@ -6,21 +6,19 @@ import ( "strings" "testing" - "cosmossdk.io/math" - - "cosmossdk.io/store/metrics" - dbm "github.com/cosmos/cosmos-db" - "github.com/golang/mock/gomock" "github.com/ichiban/prolog/engine" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "cosmossdk.io/log" + "cosmossdk.io/math" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" bank "github.com/cosmos/cosmos-sdk/x/bank/types" diff --git a/x/logic/predicate/block_test.go b/x/logic/predicate/block_test.go index 7a744701f..20e0ae974 100644 --- a/x/logic/predicate/block_test.go +++ b/x/logic/predicate/block_test.go @@ -5,18 +5,17 @@ import ( "testing" "time" - "cosmossdk.io/store/metrics" - dbm "github.com/cosmos/cosmos-db" - "github.com/ichiban/prolog/engine" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "cosmossdk.io/log" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/logic/testutil" diff --git a/x/logic/predicate/builtin_test.go b/x/logic/predicate/builtin_test.go index 6539ee316..9990285ff 100644 --- a/x/logic/predicate/builtin_test.go +++ b/x/logic/predicate/builtin_test.go @@ -4,18 +4,18 @@ import ( "fmt" "testing" - "cosmossdk.io/store/metrics" - + dbm "github.com/cosmos/cosmos-db" "github.com/golang/mock/gomock" "github.com/ichiban/prolog/engine" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/logic/testutil" diff --git a/x/logic/predicate/chain_test.go b/x/logic/predicate/chain_test.go index cf9bf6c51..9b0f6a99e 100644 --- a/x/logic/predicate/chain_test.go +++ b/x/logic/predicate/chain_test.go @@ -4,18 +4,17 @@ import ( "fmt" "testing" - "cosmossdk.io/store/metrics" - dbm "github.com/cosmos/cosmos-db" - "github.com/ichiban/prolog/engine" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "cosmossdk.io/log" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/logic/testutil" diff --git a/x/logic/predicate/crypto_test.go b/x/logic/predicate/crypto_test.go index 47dca957b..f8a4852b5 100644 --- a/x/logic/predicate/crypto_test.go +++ b/x/logic/predicate/crypto_test.go @@ -6,18 +6,17 @@ import ( "strings" "testing" - "cosmossdk.io/store/metrics" - dbm "github.com/cosmos/cosmos-db" - "github.com/ichiban/prolog/engine" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "cosmossdk.io/log" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/logic/testutil" diff --git a/x/logic/predicate/did_test.go b/x/logic/predicate/did_test.go index 25bd477c2..b5b42a3e9 100644 --- a/x/logic/predicate/did_test.go +++ b/x/logic/predicate/did_test.go @@ -6,17 +6,17 @@ import ( "strings" "testing" - "cosmossdk.io/store/metrics" - + dbm "github.com/cosmos/cosmos-db" "github.com/ichiban/prolog/engine" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/logic/testutil" diff --git a/x/logic/predicate/encoding_test.go b/x/logic/predicate/encoding_test.go index a96a8c54c..b2fc880ad 100644 --- a/x/logic/predicate/encoding_test.go +++ b/x/logic/predicate/encoding_test.go @@ -5,18 +5,18 @@ import ( "strings" "testing" - "cosmossdk.io/store/metrics" - + dbm "github.com/cosmos/cosmos-db" "github.com/ichiban/prolog" "github.com/ichiban/prolog/engine" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/logic/testutil" diff --git a/x/logic/predicate/file_test.go b/x/logic/predicate/file_test.go index aabbe641a..149444a14 100644 --- a/x/logic/predicate/file_test.go +++ b/x/logic/predicate/file_test.go @@ -9,19 +9,19 @@ import ( "testing" "time" - "cosmossdk.io/store/metrics" - + dbm "github.com/cosmos/cosmos-db" "github.com/golang/mock/gomock" "github.com/ichiban/prolog" "github.com/ichiban/prolog/engine" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/logic/fs" diff --git a/x/logic/predicate/json_test.go b/x/logic/predicate/json_test.go index f6eed27d7..ffe3ca31d 100644 --- a/x/logic/predicate/json_test.go +++ b/x/logic/predicate/json_test.go @@ -6,17 +6,17 @@ import ( "strings" "testing" - "cosmossdk.io/store/metrics" - + dbm "github.com/cosmos/cosmos-db" "github.com/ichiban/prolog/engine" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/logic/testutil" diff --git a/x/logic/predicate/string_test.go b/x/logic/predicate/string_test.go index 583b72e35..f7597a3af 100644 --- a/x/logic/predicate/string_test.go +++ b/x/logic/predicate/string_test.go @@ -7,17 +7,16 @@ import ( "testing" dbm "github.com/cosmos/cosmos-db" - - "cosmossdk.io/store/metrics" - "github.com/ichiban/prolog/engine" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "cosmossdk.io/log" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/logic/testutil" diff --git a/x/logic/predicate/uri_test.go b/x/logic/predicate/uri_test.go index 804c5c92b..bd916dd58 100644 --- a/x/logic/predicate/uri_test.go +++ b/x/logic/predicate/uri_test.go @@ -6,17 +6,17 @@ import ( "strings" "testing" - "cosmossdk.io/store/metrics" - + dbm "github.com/cosmos/cosmos-db" "github.com/ichiban/prolog/engine" . "github.com/smartystreets/goconvey/convey" - "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/log" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/logic/testutil" diff --git a/x/logic/types/codec.go b/x/logic/types/codec.go index 26d647334..dad52ba63 100644 --- a/x/logic/types/codec.go +++ b/x/logic/types/codec.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/msgservice" ) -// RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec +// RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(Params{}, "okp4/logic/Params", nil) legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "okp4/logic/MsgUpdateParams") diff --git a/x/mint/keeper/genesis.go b/x/mint/keeper/genesis.go index 19ab12b4f..21126f3e2 100644 --- a/x/mint/keeper/genesis.go +++ b/x/mint/keeper/genesis.go @@ -6,7 +6,7 @@ import ( "github.com/okp4/okp4d/x/mint/types" ) -// InitGenesis new mint genesis +// InitGenesis new mint genesis. func (keeper Keeper) InitGenesis(ctx sdk.Context, ak types.AccountKeeper, data *types.GenesisState) { if err := keeper.Minter.Set(ctx, data.Minter); err != nil { panic(err) diff --git a/x/mint/keeper/genesis_test.go b/x/mint/keeper/genesis_test.go index 309a38783..07d563869 100644 --- a/x/mint/keeper/genesis_test.go +++ b/x/mint/keeper/genesis_test.go @@ -3,16 +3,15 @@ package keeper_test import ( "testing" - "cosmossdk.io/collections" - "github.com/cosmos/cosmos-sdk/runtime" - - "cosmossdk.io/math" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + "cosmossdk.io/collections" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" + "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" @@ -58,7 +57,15 @@ func (s *GenesisTestSuite) SetupTest() { accountKeeper.EXPECT().GetModuleAddress(minterAcc.Name).Return(minterAcc.GetAddress()) accountKeeper.EXPECT().GetModuleAccount(s.sdkCtx, minterAcc.Name).Return(minterAcc) - s.keeper = keeper.NewKeeper(s.cdc, runtime.NewKVStoreService(key), stakingKeeper, accountKeeper, bankKeeper, "", "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn") + s.keeper = keeper.NewKeeper( + s.cdc, + runtime.NewKVStoreService(key), + stakingKeeper, + accountKeeper, + bankKeeper, + "", + "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn", + ) } func (s *GenesisTestSuite) TestImportExportGenesis() { diff --git a/x/mint/keeper/grpc_query_test.go b/x/mint/keeper/grpc_query_test.go index ea7e9b07a..9e63027f4 100644 --- a/x/mint/keeper/grpc_query_test.go +++ b/x/mint/keeper/grpc_query_test.go @@ -4,13 +4,13 @@ import ( gocontext "context" "testing" - "github.com/cosmos/cosmos-sdk/runtime" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" storetypes "cosmossdk.io/store/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" @@ -69,9 +69,9 @@ func (suite *MintTestSuite) SetupTest() { func (suite *MintTestSuite) TestGRPCParams() { params, err := suite.queryClient.Params(gocontext.Background(), &types.QueryParamsRequest{}) suite.Require().NoError(err) - kParams, err := suite.mintKeeper.Params.Get(suite.ctx) + keeperParams, err := suite.mintKeeper.Params.Get(suite.ctx) suite.Require().NoError(err) - suite.Require().Equal(params.Params, kParams) + suite.Require().Equal(params.Params, keeperParams) inflation, err := suite.queryClient.Inflation(gocontext.Background(), &types.QueryInflationRequest{}) suite.Require().NoError(err) diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go index b92d67c53..6de824e46 100644 --- a/x/mint/keeper/keeper.go +++ b/x/mint/keeper/keeper.go @@ -3,11 +3,9 @@ package keeper import ( "context" - "cosmossdk.io/core/store" - "cosmossdk.io/collections" + "cosmossdk.io/core/store" "cosmossdk.io/log" - "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/mint/keeper/keeper_test.go b/x/mint/keeper/keeper_test.go index 1df1aee35..5405c1456 100644 --- a/x/mint/keeper/keeper_test.go +++ b/x/mint/keeper/keeper_test.go @@ -3,13 +3,13 @@ package keeper_test import ( "testing" - "cosmossdk.io/math" - storetypes "cosmossdk.io/store/types" - "github.com/cosmos/cosmos-sdk/runtime" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/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" diff --git a/x/mint/keeper/msg_server_test.go b/x/mint/keeper/msg_server_test.go index 24c30c407..e7a91b597 100644 --- a/x/mint/keeper/msg_server_test.go +++ b/x/mint/keeper/msg_server_test.go @@ -2,6 +2,7 @@ package keeper_test import ( "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/okp4/okp4d/x/mint/types" diff --git a/x/mint/module.go b/x/mint/module.go index 17ee5e4a3..210cc39f4 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/okp4/okp4d/x/mint/client/cli" + "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" "cosmossdk.io/core/appmodule" @@ -16,8 +16,8 @@ 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/grpc-ecosystem/grpc-gateway/runtime" + "github.com/okp4/okp4d/x/mint/client/cli" "github.com/okp4/okp4d/x/mint/keeper" "github.com/okp4/okp4d/x/mint/simulation" "github.com/okp4/okp4d/x/mint/types" diff --git a/x/mint/module_test.go b/x/mint/module_test.go index 34db3e6d3..6ae3df35a 100644 --- a/x/mint/module_test.go +++ b/x/mint/module_test.go @@ -3,11 +3,11 @@ package mint_test import ( "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/depinject" "cosmossdk.io/log" - "github.com/stretchr/testify/require" - 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" diff --git a/x/mint/simulation/decoder_test.go b/x/mint/simulation/decoder_test.go index 5a6a8217f..443cc310e 100644 --- a/x/mint/simulation/decoder_test.go +++ b/x/mint/simulation/decoder_test.go @@ -4,10 +4,10 @@ import ( "fmt" "testing" - "cosmossdk.io/math" - "github.com/stretchr/testify/require" + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/types/kv" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/x/mint/simulation/proposals_test.go b/x/mint/simulation/proposals_test.go index d7fac0199..8db8cd711 100644 --- a/x/mint/simulation/proposals_test.go +++ b/x/mint/simulation/proposals_test.go @@ -4,12 +4,12 @@ import ( "math/rand" "testing" - "cosmossdk.io/math" - "gotest.tools/v3/assert" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" diff --git a/x/mint/types/codec.go b/x/mint/types/codec.go index 3a95f7dc7..7a1c0f8b9 100644 --- a/x/mint/types/codec.go +++ b/x/mint/types/codec.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/msgservice" ) -// RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec +// RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(Params{}, "okp4/mint/Params", nil) legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "okp4/mint/MsgUpdateParams") diff --git a/x/mint/types/params.go b/x/mint/types/params.go index d775796ec..0fa51c6b7 100644 --- a/x/mint/types/params.go +++ b/x/mint/types/params.go @@ -5,10 +5,10 @@ import ( "fmt" "strings" - "cosmossdk.io/math" - "sigs.k8s.io/yaml" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/vesting/module.go b/x/vesting/module.go index 1ca30895a..b196d2411 100644 --- a/x/vesting/module.go +++ b/x/vesting/module.go @@ -3,14 +3,14 @@ package vesting import ( "encoding/json" - "google.golang.org/grpc" - "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" + "google.golang.org/grpc" abci "github.com/cometbft/cometbft/abci/types" "cosmossdk.io/core/appmodule" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/vesting/msg_server.go b/x/vesting/msg_server.go index 58f056fe8..e351d2fe1 100644 --- a/x/vesting/msg_server.go +++ b/x/vesting/msg_server.go @@ -29,6 +29,7 @@ func NewMsgServerImpl(k keeper.AccountKeeper, bk types.BankKeeper) types.MsgServ var _ types.MsgServer = msgServer{} +//nolint:contextcheck func (s msgServer) CreateVestingAccount(goCtx context.Context, msg *types.MsgCreateVestingAccount, ) (*types.MsgCreateVestingAccountResponse, error) { @@ -92,6 +93,7 @@ func (s msgServer) CreateVestingAccount(goCtx context.Context, return &types.MsgCreateVestingAccountResponse{}, nil } +//nolint:contextcheck func (s msgServer) CreatePermanentLockedAccount(goCtx context.Context, msg *types.MsgCreatePermanentLockedAccount, ) (*types.MsgCreatePermanentLockedAccountResponse, error) { @@ -148,6 +150,7 @@ func (s msgServer) CreatePermanentLockedAccount(goCtx context.Context, return &types.MsgCreatePermanentLockedAccountResponse{}, nil } +//nolint:contextcheck func (s msgServer) CreatePeriodicVestingAccount(goCtx context.Context, msg *types.MsgCreatePeriodicVestingAccount, ) (*types.MsgCreatePeriodicVestingAccountResponse, error) { @@ -207,6 +210,7 @@ func (s msgServer) CreatePeriodicVestingAccount(goCtx context.Context, return &types.MsgCreatePeriodicVestingAccountResponse{}, nil } +//nolint:contextcheck func (s msgServer) CreateCliffVestingAccount(goCtx context.Context, msg *types.MsgCreateCliffVestingAccount, ) (*types.MsgCreateCliffVestingAccountResponse, error) { diff --git a/x/vesting/msg_server_test.go b/x/vesting/msg_server_test.go index 790e9b31f..1ba140bb2 100644 --- a/x/vesting/msg_server_test.go +++ b/x/vesting/msg_server_test.go @@ -4,10 +4,6 @@ import ( "testing" "time" - "github.com/cosmos/cosmos-sdk/runtime" - - authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" @@ -15,9 +11,12 @@ import ( tmtime "github.com/cometbft/cometbft/types/time" storetypes "cosmossdk.io/store/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" diff --git a/x/vesting/types/vesting_account.go b/x/vesting/types/vesting_account.go index 0707f6295..7359b45d3 100644 --- a/x/vesting/types/vesting_account.go +++ b/x/vesting/types/vesting_account.go @@ -7,6 +7,7 @@ import ( "sigs.k8s.io/yaml" "cosmossdk.io/math" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" diff --git a/x/vesting/types/vesting_account_test.go b/x/vesting/types/vesting_account_test.go index 64a75c227..87d57b611 100644 --- a/x/vesting/types/vesting_account_test.go +++ b/x/vesting/types/vesting_account_test.go @@ -4,10 +4,6 @@ import ( "testing" "time" - authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" - - "github.com/cosmos/cosmos-sdk/runtime" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -15,11 +11,14 @@ import ( tmtime "github.com/cometbft/cometbft/types/time" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" "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"