From 4426156159a2681fe047c7259a6b83c567289fc6 Mon Sep 17 00:00:00 2001 From: Lockwarr Date: Wed, 16 Oct 2024 11:42:51 +0300 Subject: [PATCH] fix: linter --- testutil/common/sample/sample.go | 2 +- testutil/contractmanager/network/network.go | 2 +- testutil/interchainqueries/network/network.go | 2 +- testutil/interchaintxs/network/network.go | 2 +- third_party/proto/buf.yaml | 6 ++-- x/contractmanager/client/cli/query.go | 3 +- x/contractmanager/genesis.go | 2 +- x/contractmanager/ibc_middleware.go | 6 ++-- x/contractmanager/keeper/failure.go | 2 +- x/contractmanager/keeper/msg_server.go | 2 +- x/contractmanager/keeper/params.go | 4 +-- x/contractmanager/migrations/v2/store.go | 2 +- x/contractmanager/module.go | 36 +++++++++---------- x/contractmanager/types/errors.go | 2 +- x/contractmanager/types/events.go | 2 +- x/contractmanager/types/genesis.go | 4 +-- x/contractmanager/types/keys.go | 12 +++---- x/contractmanager/types/params.go | 10 +++--- x/feerefunder/client/cli/query.go | 2 +- x/feerefunder/genesis.go | 2 +- x/feerefunder/keeper/keeper.go | 2 +- x/feerefunder/keeper/msg_server.go | 2 +- x/feerefunder/keeper/params.go | 4 +-- x/feerefunder/module.go | 36 +++++++++---------- x/feerefunder/types/events.go | 2 +- x/feerefunder/types/expected_keepers.go | 4 +-- x/feerefunder/types/fee.go | 6 ++-- x/feerefunder/types/genesis.go | 3 +- x/feerefunder/types/keys.go | 8 ++--- x/feerefunder/types/params.go | 10 +++--- x/interchainqueries/client/cli/query.go | 2 +- x/interchainqueries/client/cli/tx.go | 2 +- x/interchainqueries/genesis.go | 1 - x/interchainqueries/keeper/keeper.go | 8 ++--- x/interchainqueries/keeper/msg_server.go | 2 +- x/interchainqueries/keeper/params.go | 4 +-- .../keeper/process_block_results.go | 6 ++-- x/interchainqueries/module.go | 2 +- x/interchainqueries/module_simulation.go | 8 ++--- x/interchainqueries/simulation/simap.go | 2 +- x/interchainqueries/types/errors.go | 2 +- x/interchainqueries/types/expected_keepers.go | 2 +- x/interchainqueries/types/genesis.go | 2 +- x/interchainqueries/types/keys.go | 12 +++---- x/interchainqueries/types/params.go | 10 +++--- x/interchainqueries/types/tx.go | 2 +- x/interchainqueries/types/types.go | 4 +-- x/interchaintxs/client/cli/query.go | 2 +- x/interchaintxs/client/cli/tx.go | 2 +- x/interchaintxs/ibc_module.go | 4 +-- x/interchaintxs/keeper/keeper.go | 2 +- x/interchaintxs/keeper/msg_server.go | 2 +- x/interchaintxs/keeper/params.go | 4 +-- x/interchaintxs/module.go | 2 +- x/interchaintxs/module_simulation.go | 8 ++--- x/interchaintxs/simulation/simap.go | 2 +- x/interchaintxs/types/errors.go | 2 +- x/interchaintxs/types/expected_keepers.go | 4 +-- x/interchaintxs/types/genesis.go | 2 +- x/interchaintxs/types/keys.go | 14 ++++---- x/interchaintxs/types/params.go | 8 ++--- x/interchaintxs/types/tx.go | 4 +-- x/interchaintxs/types/types.go | 2 +- x/transfer/keeper/keeper.go | 4 +-- x/transfer/module.go | 6 ++-- x/transfer/types/expected_keepers.go | 2 +- 66 files changed, 162 insertions(+), 167 deletions(-) diff --git a/testutil/common/sample/sample.go b/testutil/common/sample/sample.go index 98f2153e..671742a4 100644 --- a/testutil/common/sample/sample.go +++ b/testutil/common/sample/sample.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -// AccAddress returns a sample account address +// AccAddress returns a sample account address. func AccAddress() string { pk := ed25519.GenPrivKey().PubKey() addr := pk.Address() diff --git a/testutil/contractmanager/network/network.go b/testutil/contractmanager/network/network.go index f8f2698a..72f558ca 100644 --- a/testutil/contractmanager/network/network.go +++ b/testutil/contractmanager/network/network.go @@ -52,7 +52,7 @@ func New(t *testing.T, configs ...network.Config) *network.Network { } // DefaultConfig will initialize config for the network with custom application, -// genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig +// genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig. func DefaultConfig() network.Config { // app doesn't have these modules anymore, but we need them for test setup, which uses gentx and MsgCreateValidator app.ModuleBasics[genutiltypes.ModuleName] = genutil.AppModuleBasic{} diff --git a/testutil/interchainqueries/network/network.go b/testutil/interchainqueries/network/network.go index 31510e78..031fe7ff 100644 --- a/testutil/interchainqueries/network/network.go +++ b/testutil/interchainqueries/network/network.go @@ -52,7 +52,7 @@ func New(t *testing.T, configs ...network.Config) *network.Network { } // DefaultConfig will initialize config for the network with custom application, -// genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig +// genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig. func DefaultConfig() network.Config { // app doesn't have these modules anymore, but we need them for test setup, which uses gentx and MsgCreateValidator app.ModuleBasics[genutiltypes.ModuleName] = genutil.AppModuleBasic{} diff --git a/testutil/interchaintxs/network/network.go b/testutil/interchaintxs/network/network.go index 31510e78..031fe7ff 100644 --- a/testutil/interchaintxs/network/network.go +++ b/testutil/interchaintxs/network/network.go @@ -52,7 +52,7 @@ func New(t *testing.T, configs ...network.Config) *network.Network { } // DefaultConfig will initialize config for the network with custom application, -// genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig +// genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig. func DefaultConfig() network.Config { // app doesn't have these modules anymore, but we need them for test setup, which uses gentx and MsgCreateValidator app.ModuleBasics[genutiltypes.ModuleName] = genutil.AppModuleBasic{} diff --git a/third_party/proto/buf.yaml b/third_party/proto/buf.yaml index 7d7a8315..704fbf51 100644 --- a/third_party/proto/buf.yaml +++ b/third_party/proto/buf.yaml @@ -4,9 +4,9 @@ deps: # TODO: update sdk buf dependency when v0.50.0 is tagged and pushed to BSR # see: (https://github.com/cosmos/cosmos-sdk/tree/main/proto#sdk-x-buf) - buf.build/cosmos/cosmos-sdk:v0.50.0 - - buf.build/cosmos/cosmos-proto:1935555c206d4afb9e94615dfd0fad31 - - buf.build/cosmos/gogo-proto:a14993478f40695898ed8a86931094b6656e8a5d - - buf.build/googleapis/googleapis:8d7204855ec14631a499bd7393ce1970 + - buf.build/cosmos/cosmos-proto + - buf.build/cosmos/gogo-proto + - buf.build/googleapis/googleapis - buf.build/cosmos/ics23:b1abd8678aab07165efd453c96796a179eb3131f breaking: use: diff --git a/x/contractmanager/client/cli/query.go b/x/contractmanager/client/cli/query.go index 51e20450..1d56be7f 100644 --- a/x/contractmanager/client/cli/query.go +++ b/x/contractmanager/client/cli/query.go @@ -2,7 +2,6 @@ package cli import ( "fmt" - // "strings" "github.com/spf13/cobra" @@ -11,7 +10,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/contractmanager/types" ) -// GetQueryCmd returns the cli query commands for this module +// GetQueryCmd returns the cli query commands for this module. func GetQueryCmd(_ string) *cobra.Command { // Group contractmanager queries under a subcommand cmd := &cobra.Command{ diff --git a/x/contractmanager/genesis.go b/x/contractmanager/genesis.go index 9af749ac..f0cd7d1e 100644 --- a/x/contractmanager/genesis.go +++ b/x/contractmanager/genesis.go @@ -20,7 +20,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) } } -// ExportGenesis returns the module's exported genesis +// ExportGenesis returns the module's exported genesis. func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis := types.DefaultGenesis() genesis.Params = k.GetParams(ctx) diff --git a/x/contractmanager/ibc_middleware.go b/x/contractmanager/ibc_middleware.go index aaf371a6..80ec3eb5 100644 --- a/x/contractmanager/ibc_middleware.go +++ b/x/contractmanager/ibc_middleware.go @@ -18,7 +18,7 @@ type SudoLimitWrapper struct { contractmanagertypes.WasmKeeper } -// NewSudoLimitWrapper suppresses an error from a Sudo contract handler and saves it to a store +// NewSudoLimitWrapper suppresses an error from a Sudo contract handler and saves it to a store. func NewSudoLimitWrapper(contractManager contractmanagertypes.ContractManagerKeeper, sudoKeeper contractmanagertypes.WasmKeeper) contractmanagertypes.WasmKeeper { return SudoLimitWrapper{ contractManager, @@ -28,7 +28,7 @@ func NewSudoLimitWrapper(contractManager contractmanagertypes.ContractManagerKee // Sudo calls underlying Sudo handlers with a limited amount of gas // in case of `out of gas` panic it converts the panic into an error and stops `out of gas` panic propagation -// if error happens during the Sudo call, we store the data that raised the error, and return the error +// if error happens during the Sudo call, we store the data that raised the error, and return the error. func (k SudoLimitWrapper) Sudo(ctx context.Context, contractAddress sdk.AccAddress, msg []byte) (resp []byte, err error) { c := sdk.UnwrapSDKContext(ctx) @@ -67,7 +67,7 @@ func (k SudoLimitWrapper) Logger(ctx sdk.Context) log.Logger { } // outOfGasRecovery converts `out of gas` panic into an error -// leaving unprocessed any other kinds of panics +// leaving unprocessed any other kinds of panics. func outOfGasRecovery( gasMeter types.GasMeter, err *error, diff --git a/x/contractmanager/keeper/failure.go b/x/contractmanager/keeper/failure.go index 374f82b7..c40c8c23 100644 --- a/x/contractmanager/keeper/failure.go +++ b/x/contractmanager/keeper/failure.go @@ -57,7 +57,7 @@ func (k Keeper) GetNextFailureIDKey(ctx context.Context, address string) uint64 return 0 } -// GetAllFailures returns all failures +// GetAllFailures returns all failures. func (k Keeper) GetAllFailures(ctx context.Context) (list []types.Failure) { c := sdk.UnwrapSDKContext(ctx) diff --git a/x/contractmanager/keeper/msg_server.go b/x/contractmanager/keeper/msg_server.go index 9a296727..0c77bb23 100644 --- a/x/contractmanager/keeper/msg_server.go +++ b/x/contractmanager/keeper/msg_server.go @@ -22,7 +22,7 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { var _ types.MsgServer = msgServer{} -// UpdateParams updates the module parameters +// UpdateParams updates the module parameters. func (k Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { if err := req.Validate(); err != nil { return nil, errors.Wrap(err, "failed to validate MsgUpdateParams") diff --git a/x/contractmanager/keeper/params.go b/x/contractmanager/keeper/params.go index e4e006cc..6f55ba94 100644 --- a/x/contractmanager/keeper/params.go +++ b/x/contractmanager/keeper/params.go @@ -8,7 +8,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/contractmanager/types" ) -// GetParams get all parameters as types.Params +// GetParams get all parameters as types.Params. func (k Keeper) GetParams(ctx context.Context) (params types.Params) { c := sdk.UnwrapSDKContext(ctx) store := c.KVStore(k.storeKey) @@ -21,7 +21,7 @@ func (k Keeper) GetParams(ctx context.Context) (params types.Params) { return params } -// SetParams set the params +// SetParams set the params. func (k Keeper) SetParams(ctx context.Context, params types.Params) error { c := sdk.UnwrapSDKContext(ctx) store := c.KVStore(k.storeKey) diff --git a/x/contractmanager/migrations/v2/store.go b/x/contractmanager/migrations/v2/store.go index 585baf8c..65a65ae4 100644 --- a/x/contractmanager/migrations/v2/store.go +++ b/x/contractmanager/migrations/v2/store.go @@ -10,7 +10,7 @@ import ( // MigrateStore performs in-place store migrations. // The migration rearranges removes all old failures, -// since they do not have the necessary fields packet and ack for resubmission +// since they do not have the necessary fields packet and ack for resubmission. func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey) error { return migrateFailures(ctx, storeKey) } diff --git a/x/contractmanager/module.go b/x/contractmanager/module.go index b5e015fe..5d0ed265 100644 --- a/x/contractmanager/module.go +++ b/x/contractmanager/module.go @@ -7,7 +7,7 @@ import ( "cosmossdk.io/core/appmodule" - // this line is used by starport scaffolding # 1 + // this line is used by starport scaffolding # 1. "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" @@ -44,27 +44,27 @@ func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { return AppModuleBasic{cdc: cdc} } -// Name returns the name of the module as a string +// Name returns the name of the module as a string. func (AppModuleBasic) Name() string { return types.ModuleName } -// RegisterLegacyAminoCodec registers the amino codec for the module, which is used to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore +// RegisterLegacyAminoCodec registers the amino codec for the module, which is used to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore. func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { types.RegisterCodec(cdc) } -// RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message +// RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message. func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { types.RegisterInterfaces(reg) } -// DefaultGenesis returns a default GenesisState for the module, marshalled to json.RawMessage. The default GenesisState need to be defined by the module developer and is primarily used for testing +// DefaultGenesis returns a default GenesisState for the module, marshalled to json.RawMessage. The default GenesisState need to be defined by the module developer and is primarily used for testing. func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(types.DefaultGenesis()) } -// ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form +// ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { var genState types.GenesisState if err := cdc.UnmarshalJSON(bz, &genState); err != nil { @@ -77,27 +77,27 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingCo func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) { } -// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) //nolint:errcheck } -// GetTxCmd returns the root Tx command for the module. The subcommands of this root command are used by end-users to generate new transactions containing messages defined in the module +// GetTxCmd returns the root Tx command for the module. The subcommands of this root command are used by end-users to generate new transactions containing messages defined in the module. func (a AppModuleBasic) GetTxCmd() *cobra.Command { return nil } -// GetQueryCmd returns the root query command for the module. The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module +// GetQueryCmd returns the root query command for the module. The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module. func (AppModuleBasic) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd(types.StoreKey) } -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------. // AppModule -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------. var _ appmodule.AppModule = AppModule{} -// AppModule implements the AppModule interface that defines the inter-dependent methods that modules need to implement +// AppModule implements the AppModule interface that defines the inter-dependent methods that modules need to implement. type AppModule struct { AppModuleBasic @@ -122,10 +122,10 @@ func (am AppModule) IsOnePerModuleType() { // marker func (am AppModule) IsAppModule() { // marker } -// Deprecated: use RegisterServices +// Deprecated: use RegisterServices. func (AppModule) QuerierRoute() string { return types.RouterKey } -// RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries +// RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.keeper) types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) @@ -136,7 +136,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { } } -// RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted) +// RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted). func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // InitGenesis performs the module's genesis initialization. It returns no validator updates. @@ -156,13 +156,13 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw return cdc.MustMarshalJSON(genState) } -// ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1 +// ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1. func (AppModule) ConsensusVersion() uint64 { return types.ConsensusVersion } -// BeginBlock contains the logic that is automatically triggered at the beginning of each block +// BeginBlock contains the logic that is automatically triggered at the beginning of each block. func (am AppModule) BeginBlock(_ sdk.Context) {} -// EndBlock contains the logic that is automatically triggered at the end of each block +// EndBlock contains the logic that is automatically triggered at the end of each block. func (am AppModule) EndBlock(_ sdk.Context) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } diff --git a/x/contractmanager/types/errors.go b/x/contractmanager/types/errors.go index ba32da1f..558f66a2 100644 --- a/x/contractmanager/types/errors.go +++ b/x/contractmanager/types/errors.go @@ -4,7 +4,7 @@ import ( "cosmossdk.io/errors" ) -// x/contractmanager module sentinel errors +// x/contractmanager module sentinel errors. var ( ErrIncorrectFailureToResubmit = errors.Register(ModuleName, 1101, "incorrect failure to resubmit") ErrFailedToResubmitFailure = errors.Register(ModuleName, 1102, "failed to resubmit failure") diff --git a/x/contractmanager/types/events.go b/x/contractmanager/types/events.go index 36ccef85..0736edf1 100644 --- a/x/contractmanager/types/events.go +++ b/x/contractmanager/types/events.go @@ -1,6 +1,6 @@ package types -// Contractmanager events +// Contractmanager events. const ( // AttributeKeySudoError indicates an attribute containing detailed Sudo call error. AttributeKeySudoError = "error" diff --git a/x/contractmanager/types/genesis.go b/x/contractmanager/types/genesis.go index 5b63d3c6..c5721753 100644 --- a/x/contractmanager/types/genesis.go +++ b/x/contractmanager/types/genesis.go @@ -4,10 +4,10 @@ import ( "fmt" ) -// DefaultIndex is the default global index +// DefaultIndex is the default global index. const DefaultIndex uint64 = 1 -// DefaultGenesis returns the default genesis state +// DefaultGenesis returns the default genesis state. func DefaultGenesis() *GenesisState { return &GenesisState{ FailuresList: []Failure{}, diff --git a/x/contractmanager/types/keys.go b/x/contractmanager/types/keys.go index 62447d84..865a10e2 100644 --- a/x/contractmanager/types/keys.go +++ b/x/contractmanager/types/keys.go @@ -3,16 +3,16 @@ package types import sdk "github.com/cosmos/cosmos-sdk/types" const ( - // ModuleName defines the module name + // ModuleName defines the module name. ModuleName = "contractmanager" - // StoreKey defines the primary module store key + // StoreKey defines the primary module store key. StoreKey = ModuleName - // RouterKey defines the module's message routing key + // RouterKey defines the module's message routing key. RouterKey = ModuleName - // MemStoreKey defines the in-memory store key + // MemStoreKey defines the in-memory store key. MemStoreKey = "mem_" + ModuleName ) @@ -26,7 +26,7 @@ var ( ParamsKey = []byte{prefixParamsKey} ) -// GetFailureKeyPrefix returns the store key for the failures of the specific address +// GetFailureKeyPrefix returns the store key for the failures of the specific address. func GetFailureKeyPrefix( address string, ) []byte { @@ -35,7 +35,7 @@ func GetFailureKeyPrefix( return append(key, []byte("/")...) } -// GetFailureKey returns the store key to retrieve a Failure from the index fields +// GetFailureKey returns the store key to retrieve a Failure from the index fields. func GetFailureKey( address string, offset uint64, diff --git a/x/contractmanager/types/params.go b/x/contractmanager/types/params.go index 5a2a9c29..ef6d2853 100644 --- a/x/contractmanager/types/params.go +++ b/x/contractmanager/types/params.go @@ -9,29 +9,29 @@ var _ paramtypes.ParamSet = (*Params)(nil) const DefaultSudoCallGasLimit = uint64(1_000_000) -// ParamKeyTable the param key table for launch module +// ParamKeyTable the param key table for launch module. func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) } -// NewParams creates a new Params instance +// NewParams creates a new Params instance. func NewParams(sudoCallGasLimit uint64) Params { return Params{ SudoCallGasLimit: sudoCallGasLimit, } } -// DefaultParams returns a default set of parameters +// DefaultParams returns a default set of parameters. func DefaultParams() Params { return NewParams(DefaultSudoCallGasLimit) } -// ParamSetPairs get the params.ParamSet +// ParamSetPairs get the params.ParamSet. func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{} } -// Validate validates the set of params +// Validate validates the set of params. func (p Params) Validate() error { return nil } diff --git a/x/feerefunder/client/cli/query.go b/x/feerefunder/client/cli/query.go index 4b6e3396..1c39935d 100644 --- a/x/feerefunder/client/cli/query.go +++ b/x/feerefunder/client/cli/query.go @@ -13,7 +13,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types" ) -// GetQueryCmd returns the cli query commands for this module +// GetQueryCmd returns the cli query commands for this module. func GetQueryCmd(_ string) *cobra.Command { // Group feerefunder queries under a subcommand cmd := &cobra.Command{ diff --git a/x/feerefunder/genesis.go b/x/feerefunder/genesis.go index be3dab78..eb0aea28 100644 --- a/x/feerefunder/genesis.go +++ b/x/feerefunder/genesis.go @@ -20,7 +20,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) } } -// ExportGenesis returns the module's exported genesis +// ExportGenesis returns the module's exported genesis. func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis := types.DefaultGenesis() genesis.Params = k.GetParams(ctx) diff --git a/x/feerefunder/keeper/keeper.go b/x/feerefunder/keeper/keeper.go index 31e34438..8476abc5 100644 --- a/x/feerefunder/keeper/keeper.go +++ b/x/feerefunder/keeper/keeper.go @@ -259,7 +259,7 @@ func (k Keeper) distributeFee(ctx sdk.Context, receiver sdk.AccAddress, fee sdk. } // allowedCoins returns true if one or more coins from `fees` are not present in coins from `params` -// assumes that `params` is sorted +// assumes that `params` is sorted. func allowedCoins(fees, params sdk.Coins) bool { for _, fee := range fees { if params.AmountOf(fee.Denom).IsZero() { diff --git a/x/feerefunder/keeper/msg_server.go b/x/feerefunder/keeper/msg_server.go index 17458d63..4e9daf4e 100644 --- a/x/feerefunder/keeper/msg_server.go +++ b/x/feerefunder/keeper/msg_server.go @@ -22,7 +22,7 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { var _ types.MsgServer = msgServer{} -// UpdateParams updates the module parameters +// UpdateParams updates the module parameters. func (k Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { if err := req.Validate(); err != nil { return nil, errors.Wrap(err, "failed to validate MsgUpdateParams") diff --git a/x/feerefunder/keeper/params.go b/x/feerefunder/keeper/params.go index 614bd03a..8743b843 100644 --- a/x/feerefunder/keeper/params.go +++ b/x/feerefunder/keeper/params.go @@ -6,7 +6,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types" ) -// GetParams get all parameters as types.Params +// GetParams get all parameters as types.Params. func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { store := ctx.KVStore(k.storeKey) bz := store.Get(types.ParamsKey) @@ -18,7 +18,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { return params } -// SetParams set the params +// SetParams set the params. func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { store := ctx.KVStore(k.storeKey) bz, err := k.cdc.Marshal(¶ms) diff --git a/x/feerefunder/module.go b/x/feerefunder/module.go index de59070f..33aba318 100644 --- a/x/feerefunder/module.go +++ b/x/feerefunder/module.go @@ -7,8 +7,6 @@ import ( "cosmossdk.io/core/appmodule" - // this line is used by starport scaffolding # 1 - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -47,27 +45,27 @@ func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { return AppModuleBasic{cdc: cdc} } -// Name returns the name of the module as a string +// Name returns the name of the module as a string. func (AppModuleBasic) Name() string { return types.ModuleName } -// RegisterLegacyAminoCodec registers the amino codec for the module, which is used to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore +// RegisterLegacyAminoCodec registers the amino codec for the module, which is used to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore. func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { types.RegisterCodec(cdc) } -// RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message +// RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message. func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { types.RegisterInterfaces(reg) } -// DefaultGenesis returns a default GenesisState for the module, marshalled to json.RawMessage. The default GenesisState need to be defined by the module developer and is primarily used for testing +// DefaultGenesis returns a default GenesisState for the module, marshalled to json.RawMessage. The default GenesisState need to be defined by the module developer and is primarily used for testing. func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(types.DefaultGenesis()) } -// ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form +// ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { var genState types.GenesisState if err := cdc.UnmarshalJSON(bz, &genState); err != nil { @@ -76,28 +74,28 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingCo return genState.Validate() } -// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) //nolint:errcheck } -// GetTxCmd returns the root Tx command for the module. The subcommands of this root command are used by end-users to generate new transactions containing messages defined in the module +// GetTxCmd returns the root Tx command for the module. The subcommands of this root command are used by end-users to generate new transactions containing messages defined in the module. func (a AppModuleBasic) GetTxCmd() *cobra.Command { return nil } -// GetQueryCmd returns the root query command for the module. The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module +// GetQueryCmd returns the root query command for the module. The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module. func (AppModuleBasic) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd(types.StoreKey) } -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------. // AppModule -// ---------------------------------------------------------------------------- +// ----------------------------------------------------------------------------. var _ appmodule.AppModule = AppModule{} -// AppModule implements the AppModule interface that defines the inter-dependent methods that modules need to implement +// AppModule implements the AppModule interface that defines the inter-dependent methods that modules need to implement. type AppModule struct { AppModuleBasic @@ -128,16 +126,16 @@ func (am AppModule) IsOnePerModuleType() { // marker func (am AppModule) IsAppModule() { // marker } -// Deprecated: use RegisterServices +// Deprecated: use RegisterServices. func (AppModule) QuerierRoute() string { return types.RouterKey } -// RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries +// RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.keeper) types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) } -// RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted) +// RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted). func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // InitGenesis performs the module's genesis initialization. It returns no validator updates. @@ -157,13 +155,13 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw return cdc.MustMarshalJSON(genState) } -// ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1 +// ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1. func (AppModule) ConsensusVersion() uint64 { return types.ConsensusVersion } -// BeginBlock contains the logic that is automatically triggered at the beginning of each block +// BeginBlock contains the logic that is automatically triggered at the beginning of each block. func (am AppModule) BeginBlock(_ sdk.Context) {} -// EndBlock contains the logic that is automatically triggered at the end of each block +// EndBlock contains the logic that is automatically triggered at the end of each block. func (am AppModule) EndBlock(_ sdk.Context) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } diff --git a/x/feerefunder/types/events.go b/x/feerefunder/types/events.go index e1b28b86..d4bdc03b 100644 --- a/x/feerefunder/types/events.go +++ b/x/feerefunder/types/events.go @@ -1,6 +1,6 @@ package types -// feerefunder module event types +// feerefunder module event types. const ( EventTypeDistributeAcknowledgementFee = "distribute_ack_fee" EventTypeDistributeTimeoutFee = "distribute_timeout_fee" diff --git a/x/feerefunder/types/expected_keepers.go b/x/feerefunder/types/expected_keepers.go index dacf78d4..4ea1cfd5 100644 --- a/x/feerefunder/types/expected_keepers.go +++ b/x/feerefunder/types/expected_keepers.go @@ -7,7 +7,7 @@ import ( channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" ) -// AccountKeeper defines the expected account keeper used for simulations (noalias) +// AccountKeeper defines the expected account keeper used for simulations (noalias). type AccountKeeper interface { GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI // Methods imported from account should be defined here @@ -22,7 +22,7 @@ type BankKeeper interface { // Methods imported from bank should be defined here } -// ChannelKeeper defines the expected IBC channel keeper +// ChannelKeeper defines the expected IBC channel keeper. type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) } diff --git a/x/feerefunder/types/fee.go b/x/feerefunder/types/fee.go index a3e09440..baea684a 100644 --- a/x/feerefunder/types/fee.go +++ b/x/feerefunder/types/fee.go @@ -17,7 +17,7 @@ func NewPacketID(portID, channelID string, sequence uint64) PacketID { } } -// NewFee creates and returns a new Fee struct encapsulating the receive, acknowledgement and timeout fees as sdk.Coins +// NewFee creates and returns a new Fee struct encapsulating the receive, acknowledgement and timeout fees as sdk.Coins. func NewFee(recvFee, ackFee, timeoutFee sdk.Coins) Fee { return Fee{ RecvFee: recvFee, @@ -26,14 +26,14 @@ func NewFee(recvFee, ackFee, timeoutFee sdk.Coins) Fee { } } -// Total returns the total amount for a given Fee +// Total returns the total amount for a given Fee. func (m Fee) Total() sdk.Coins { return m.RecvFee.Add(m.AckFee...).Add(m.TimeoutFee...) } // Validate asserts that each Fee is valid: // * RecvFee must be zero; -// * AckFee and TimeoutFee must be non-zero +// * AckFee and TimeoutFee must be non-zero. func (m Fee) Validate() error { var errFees []string if !m.AckFee.IsValid() { diff --git a/x/feerefunder/types/genesis.go b/x/feerefunder/types/genesis.go index a37d1ed3..a8634518 100644 --- a/x/feerefunder/types/genesis.go +++ b/x/feerefunder/types/genesis.go @@ -5,14 +5,13 @@ import ( "cosmossdk.io/errors" - // this line is used by starport scaffolding # genesis/types/import wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" host "github.com/cosmos/ibc-go/v8/modules/core/24-host" ) -// DefaultGenesis returns the default genesis state +// DefaultGenesis returns the default genesis state. func DefaultGenesis() *GenesisState { return &GenesisState{ Params: DefaultParams(), diff --git a/x/feerefunder/types/keys.go b/x/feerefunder/types/keys.go index 9c99c59b..5a6c7166 100644 --- a/x/feerefunder/types/keys.go +++ b/x/feerefunder/types/keys.go @@ -3,16 +3,16 @@ package types import sdk "github.com/cosmos/cosmos-sdk/types" const ( - // ModuleName defines the module name + // ModuleName defines the module name. ModuleName = "feerefunder" - // StoreKey defines the primary module store key + // StoreKey defines the primary module store key. StoreKey = ModuleName - // RouterKey defines the module's message routing key + // RouterKey defines the module's message routing key. RouterKey = ModuleName - // MemStoreKey defines the in-memory store key + // MemStoreKey defines the in-memory store key. MemStoreKey = "mem_" + ModuleName ) diff --git a/x/feerefunder/types/params.go b/x/feerefunder/types/params.go index b5aaa8d3..061c5125 100644 --- a/x/feerefunder/types/params.go +++ b/x/feerefunder/types/params.go @@ -22,27 +22,27 @@ var ( } ) -// ParamKeyTable the param key table for launch module +// ParamKeyTable the param key table for launch module. func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable(paramtypes.NewParamSetPair(KeyFees, DefaultFees, validateFee)) } -// NewParams creates a new Params instance +// NewParams creates a new Params instance. func NewParams(minfee Fee) Params { return Params{MinFee: minfee} } -// DefaultParams returns a default set of parameters +// DefaultParams returns a default set of parameters. func DefaultParams() Params { return NewParams(DefaultFees) } -// ParamSetPairs get the params.ParamSet +// ParamSetPairs get the params.ParamSet. func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{paramtypes.NewParamSetPair(KeyFees, &p.MinFee, validateFee)} } -// Validate validates the set of params +// Validate validates the set of params. func (p Params) Validate() error { return p.MinFee.Validate() } diff --git a/x/interchainqueries/client/cli/query.go b/x/interchainqueries/client/cli/query.go index 3cf84df5..ccd3bb38 100644 --- a/x/interchainqueries/client/cli/query.go +++ b/x/interchainqueries/client/cli/query.go @@ -17,7 +17,7 @@ const ( flagConnectionID = "connection_id" ) -// GetQueryCmd returns the cli query commands for this module +// GetQueryCmd returns the cli query commands for this module. func GetQueryCmd(_ string) *cobra.Command { // Group interchainqueries queries under a subcommand cmd := &cobra.Command{ diff --git a/x/interchainqueries/client/cli/tx.go b/x/interchainqueries/client/cli/tx.go index 2c87a749..baf7670b 100644 --- a/x/interchainqueries/client/cli/tx.go +++ b/x/interchainqueries/client/cli/tx.go @@ -14,7 +14,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/types" ) -// GetTxCmd returns the transaction commands for this module +// GetTxCmd returns the transaction commands for this module. func GetTxCmd() *cobra.Command { cmd := &cobra.Command{ Use: types.ModuleName, diff --git a/x/interchainqueries/genesis.go b/x/interchainqueries/genesis.go index baffefc8..40518587 100644 --- a/x/interchainqueries/genesis.go +++ b/x/interchainqueries/genesis.go @@ -22,7 +22,6 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) if err := k.SaveQuery(ctx, elem); err != nil { panic(err) } - } err := k.SetParams(ctx, genState.Params) diff --git a/x/interchainqueries/keeper/keeper.go b/x/interchainqueries/keeper/keeper.go index 8c9e089c..119d534a 100644 --- a/x/interchainqueries/keeper/keeper.go +++ b/x/interchainqueries/keeper/keeper.go @@ -110,7 +110,7 @@ func (k Keeper) GetQueryByID(ctx sdk.Context, id uint64) (*types.RegisteredQuery return &query, nil } -// GetAllRegisteredQueries returns all registered queries +// GetAllRegisteredQueries returns all registered queries. func (k Keeper) GetAllRegisteredQueries(ctx sdk.Context) []*types.RegisteredQuery { var ( store = prefix.NewStore(ctx.KVStore(k.storeKey), types.RegisteredQueryKey) @@ -213,7 +213,7 @@ func (k Keeper) CheckTransactionIsAlreadyProcessed(ctx sdk.Context, queryID uint return store.Has(key) } -// GetQueryResultByID returns a QueryResult for query with id +// GetQueryResultByID returns a QueryResult for query with id. func (k Keeper) GetQueryResultByID(ctx sdk.Context, id uint64) (*types.QueryResult, error) { store := ctx.KVStore(k.storeKey) @@ -284,7 +284,7 @@ func (k Keeper) updateLastLocalHeight(ctx sdk.Context, query *types.RegisteredQu k.Logger(ctx).Debug("Updated last local height on given query", "queryID", query.Id, "new_local_height", height) } -// checkLastRemoteHeight checks whether the given height is greater than the query's remote height +// checkLastRemoteHeight checks whether the given height is greater than the query's remote height. func (k Keeper) checkLastRemoteHeight(_ sdk.Context, query types.RegisteredQuery, height ibcclienttypes.Height) error { if query.LastSubmittedResultRemoteHeight != nil && query.LastSubmittedResultRemoteHeight.GTE(height) { return fmt.Errorf("result's remote height %d is less than or equal to last result's remote height %d", height, query.LastSubmittedResultRemoteHeight) @@ -313,7 +313,7 @@ func (k Keeper) getRegisteredQueryByID(ctx sdk.Context, queryID uint64) (*types. return &query, nil } -// We don't need to store proofs or transactions, so we just remove unnecessary fields +// We don't need to store proofs or transactions, so we just remove unnecessary fields. func clearQueryResult(result *types.QueryResult) types.QueryResult { storageValues := make([]*types.StorageValue, 0, len(result.KvResults)) for _, v := range result.KvResults { diff --git a/x/interchainqueries/keeper/msg_server.go b/x/interchainqueries/keeper/msg_server.go index 94ab7b55..c9632edc 100644 --- a/x/interchainqueries/keeper/msg_server.go +++ b/x/interchainqueries/keeper/msg_server.go @@ -327,7 +327,7 @@ func (m msgServer) validateUpdateInterchainQueryParams( return nil } -// UpdateParams updates the module parameters +// UpdateParams updates the module parameters. func (k Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { if err := req.Validate(); err != nil { return nil, errors.Wrap(err, "failed to validate MsgUpdateParams") diff --git a/x/interchainqueries/keeper/params.go b/x/interchainqueries/keeper/params.go index d8531f5e..dee8efeb 100644 --- a/x/interchainqueries/keeper/params.go +++ b/x/interchainqueries/keeper/params.go @@ -6,7 +6,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/types" ) -// GetParams get all parameters as types.Params +// GetParams get all parameters as types.Params. func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { store := ctx.KVStore(k.storeKey) bz := store.Get(types.ParamsKey) @@ -18,7 +18,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { return params } -// SetParams set the params +// SetParams set the params. func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { store := ctx.KVStore(k.storeKey) bz, err := k.cdc.Marshal(¶ms) diff --git a/x/interchainqueries/keeper/process_block_results.go b/x/interchainqueries/keeper/process_block_results.go index 3bac3497..c880fcc9 100644 --- a/x/interchainqueries/keeper/process_block_results.go +++ b/x/interchainqueries/keeper/process_block_results.go @@ -31,7 +31,7 @@ func deterministicExecTxResult(response *abci.ExecTxResult) *abci.ExecTxResult { } } -// checkHeadersOrder do some basic checks to verify that nextHeader is really next for the header +// checkHeadersOrder do some basic checks to verify that nextHeader is really next for the header. func checkHeadersOrder(header, nextHeader *tendermintLightClientTypes.Header) error { if nextHeader.Header.Height != header.Header.Height+1 { return errors.Wrapf(types.ErrInvalidHeader, "nextHeader.Height (%d) is not actually next for a header with height %d", nextHeader.Header.Height, header.Header.Height) @@ -60,7 +60,7 @@ func checkHeadersOrder(header, nextHeader *tendermintLightClientTypes.Header) er type Verifier struct{} // VerifyHeaders verify that headers are valid tendermint headers, checks them on validity by trying call ibcClient.UpdateClient(header) -// to update light client's consensus state and checks that they are sequential (tl;dr header.Height + 1 == nextHeader.Height) +// to update light client's consensus state and checks that they are sequential (tl;dr header.Height + 1 == nextHeader.Height). func (v Verifier) VerifyHeaders(ctx sdk.Context, clientKeeper clientkeeper.Keeper, clientID string, header, nextHeader exported.ClientMessage) error { // this IBC handler updates the consensus state and the state root from a provided header. // But more importantly in the current situation, it checks that header is valid. @@ -164,7 +164,7 @@ type TransactionVerifier struct{} // * transaction is included in block - header.DataHash merkle root contains transactions hash; // * transactions was executed successfully - transaction's responseDeliveryTx.Code == 0; // * transaction's responseDeliveryTx is legitimate - nextHeaderLastResultsDataHash merkle root contains -// deterministicExecTxResult(ResponseDeliveryTx).Bytes() +// deterministicExecTxResult(ResponseDeliveryTx).Bytes(). func (v TransactionVerifier) VerifyTransaction( header *tendermintLightClientTypes.Header, nextHeader *tendermintLightClientTypes.Header, diff --git a/x/interchainqueries/module.go b/x/interchainqueries/module.go index 603358a4..322f3e41 100644 --- a/x/interchainqueries/module.go +++ b/x/interchainqueries/module.go @@ -53,7 +53,7 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { types.RegisterCodec(cdc) } -// RegisterInterfaces registers the module's interface types +// RegisterInterfaces registers the module's interface types. func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { types.RegisterInterfaces(reg) } diff --git a/x/interchainqueries/module_simulation.go b/x/interchainqueries/module_simulation.go index 53e02c20..f8c66a2a 100644 --- a/x/interchainqueries/module_simulation.go +++ b/x/interchainqueries/module_simulation.go @@ -12,7 +12,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/interchainqueries/types" ) -// avoid unused import issue +// avoid unused import issue. var ( _ = sample.AccAddress _ = interchainqueriessimulation.FindAccount @@ -21,7 +21,7 @@ var ( _ = baseapp.Paramspace ) -// GenerateGenesisState creates a randomized GenState of the module +// GenerateGenesisState creates a randomized GenState of the module. func (AppModule) GenerateGenesisState(simState *module.SimulationState) { accs := make([]string, len(simState.Accounts)) for i, acc := range simState.Accounts { @@ -33,12 +33,12 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&interchainqueriesGenesis) } -// ProposalContents doesn't return any content functions for governance proposals +// ProposalContents doesn't return any content functions for governance proposals. func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { return nil } -// RegisterStoreDecoder registers a decoder +// RegisterStoreDecoder registers a decoder. func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) {} // WeightedOperations returns the all the gov module operations with their respective weights. diff --git a/x/interchainqueries/simulation/simap.go b/x/interchainqueries/simulation/simap.go index 92c437c0..b222cc5f 100644 --- a/x/interchainqueries/simulation/simap.go +++ b/x/interchainqueries/simulation/simap.go @@ -5,7 +5,7 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) -// FindAccount find a specific address from an account list +// FindAccount find a specific address from an account list. func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { creator, err := sdk.AccAddressFromBech32(address) if err != nil { diff --git a/x/interchainqueries/types/errors.go b/x/interchainqueries/types/errors.go index 4a3213cc..f9b3f2aa 100644 --- a/x/interchainqueries/types/errors.go +++ b/x/interchainqueries/types/errors.go @@ -4,7 +4,7 @@ import ( "cosmossdk.io/errors" ) -// x/interchainqueries module sentinel errors +// x/interchainqueries module sentinel errors. var ( ErrInvalidQueryID = errors.Register(ModuleName, 1100, "invalid query id") ErrEmptyResult = errors.Register(ModuleName, 1101, "empty result") diff --git a/x/interchainqueries/types/expected_keepers.go b/x/interchainqueries/types/expected_keepers.go index f1858160..ef0e8ffd 100644 --- a/x/interchainqueries/types/expected_keepers.go +++ b/x/interchainqueries/types/expected_keepers.go @@ -7,7 +7,7 @@ import ( ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" //nolint:staticcheck ) -// AccountKeeper defines the expected account keeper used for simulations (noalias) +// AccountKeeper defines the expected account keeper used for simulations (noalias). type AccountKeeper interface { GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI // Methods imported from account should be defined here diff --git a/x/interchainqueries/types/genesis.go b/x/interchainqueries/types/genesis.go index c00668e5..c8ba8f46 100644 --- a/x/interchainqueries/types/genesis.go +++ b/x/interchainqueries/types/genesis.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -// DefaultGenesis returns the default Capability genesis state +// DefaultGenesis returns the default Capability genesis state. func DefaultGenesis() *GenesisState { return &GenesisState{ Params: DefaultParams(), diff --git a/x/interchainqueries/types/keys.go b/x/interchainqueries/types/keys.go index 7e422b47..91444280 100644 --- a/x/interchainqueries/types/keys.go +++ b/x/interchainqueries/types/keys.go @@ -5,19 +5,19 @@ import ( ) const ( - // ModuleName defines the module name + // ModuleName defines the module name. ModuleName = "interchainqueries" - // StoreKey defines the primary module store key + // StoreKey defines the primary module store key. StoreKey = ModuleName - // RouterKey is the message route for slashing + // RouterKey is the message route for slashing. RouterKey = ModuleName - // QuerierRoute defines the module's query routing key + // QuerierRoute defines the module's query routing key. QuerierRoute = ModuleName - // MemStoreKey defines the in-memory store key + // MemStoreKey defines the in-memory store key. MemStoreKey = "mem_interchainqueries" ) @@ -38,7 +38,7 @@ var ( SubmittedTxKey = []byte{prefixSubmittedTx} // TxQueryToRemoveKey is the store key for TX queries marked to be removed. TxQueryToRemoveKey = []byte{prefixTxQueryToRemove} - // ParamsKey is the store key for the module params + // ParamsKey is the store key for the module params. ParamsKey = []byte{prefixParamsKey} // LastRegisteredQueryIDKey is the store key for last registered query ID. LastRegisteredQueryIDKey = []byte{0x64} diff --git a/x/interchainqueries/types/params.go b/x/interchainqueries/types/params.go index e2699c9b..0e2f0f56 100644 --- a/x/interchainqueries/types/params.go +++ b/x/interchainqueries/types/params.go @@ -22,7 +22,7 @@ var ( DefaultTxQueryRemovalLimit = uint64(10_000) ) -// ParamKeyTable the param key table for launch module +// ParamKeyTable the param key table for launch module. func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable( paramtypes.NewParamSetPair(KeyQuerySubmitTimeout, DefaultQuerySubmitTimeout, func(_ interface{}) error { return nil }), @@ -31,7 +31,7 @@ func ParamKeyTable() paramtypes.KeyTable { ) } -// NewParams creates a new Params instance +// NewParams creates a new Params instance. func NewParams(querySubmitTimeout uint64, queryDeposit sdk.Coins, txQueryRemovalLimit uint64) Params { return Params{ QuerySubmitTimeout: querySubmitTimeout, @@ -40,12 +40,12 @@ func NewParams(querySubmitTimeout uint64, queryDeposit sdk.Coins, txQueryRemoval } } -// DefaultParams returns a default set of parameters +// DefaultParams returns a default set of parameters. func DefaultParams() Params { return NewParams(DefaultQuerySubmitTimeout, DefaultQueryDeposit, DefaultTxQueryRemovalLimit) } -// ParamSetPairs get the params.ParamSet +// ParamSetPairs get the params.ParamSet. func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ paramtypes.NewParamSetPair(KeyQuerySubmitTimeout, &p.QuerySubmitTimeout, func(_ interface{}) error { return nil }), @@ -54,7 +54,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { } } -// Validate validates the set of params +// Validate validates the set of params. func (p Params) Validate() error { return nil } diff --git a/x/interchainqueries/types/tx.go b/x/interchainqueries/types/tx.go index 6bce7639..32740177 100644 --- a/x/interchainqueries/types/tx.go +++ b/x/interchainqueries/types/tx.go @@ -68,7 +68,7 @@ func (msg MsgSubmitQueryResult) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{senderAddr} } -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces. func (msg MsgSubmitQueryResult) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { var header exported.ClientMessage if err := unpacker.UnpackAny(msg.Result.GetBlock().GetHeader(), &header); err != nil { diff --git a/x/interchainqueries/types/types.go b/x/interchainqueries/types/types.go index 2591704d..0d230e20 100644 --- a/x/interchainqueries/types/types.go +++ b/x/interchainqueries/types/types.go @@ -24,7 +24,7 @@ const ( AttributeKeyConnectionID = "connection_id" // AttributeKeyQueryType represents the key for event attribute delivering the query type - // identifier (e.g. 'kv' or 'tx') + // identifier (e.g. 'kv' or 'tx'). AttributeKeyQueryType = "type" // AttributeKeyKVQuery represents the keys of the storage we want to get from remote chain for event attribute delivering the keys @@ -44,7 +44,7 @@ const ( // AttributeValueQueryRemoved represents the value for the 'action' event attribute. AttributeValueQueryRemoved = "query_removed" - // maxTransactionsFilters defines maximum allowed amount of tx filters in msgRegisterInterchainQuery + // maxTransactionsFilters defines maximum allowed amount of tx filters in msgRegisterInterchainQuery. maxTransactionsFilters = 32 ) diff --git a/x/interchaintxs/client/cli/query.go b/x/interchaintxs/client/cli/query.go index bfa2d6d3..e4947834 100644 --- a/x/interchaintxs/client/cli/query.go +++ b/x/interchaintxs/client/cli/query.go @@ -9,7 +9,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types" ) -// GetQueryCmd returns the cli query commands for this module +// GetQueryCmd returns the cli query commands for this module. func GetQueryCmd(_ string) *cobra.Command { // Group interchaintxs queries under a subcommand cmd := &cobra.Command{ diff --git a/x/interchaintxs/client/cli/tx.go b/x/interchaintxs/client/cli/tx.go index 713a2d96..3441ef0c 100644 --- a/x/interchaintxs/client/cli/tx.go +++ b/x/interchaintxs/client/cli/tx.go @@ -9,7 +9,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types" ) -// GetTxCmd returns the transaction commands for this module +// GetTxCmd returns the transaction commands for this module. func GetTxCmd() *cobra.Command { cmd := &cobra.Command{ Use: types.ModuleName, diff --git a/x/interchaintxs/ibc_module.go b/x/interchaintxs/ibc_module.go index a21033de..9fff1884 100644 --- a/x/interchaintxs/ibc_module.go +++ b/x/interchaintxs/ibc_module.go @@ -14,12 +14,12 @@ import ( var _ porttypes.IBCModule = IBCModule{} -// IBCModule implements the ICS26 interface for interchain accounts controller chains +// IBCModule implements the ICS26 interface for interchain accounts controller chains. type IBCModule struct { keeper keeper.Keeper } -// NewIBCModule creates a new IBCModule given the keeper +// NewIBCModule creates a new IBCModule given the keeper. func NewIBCModule(k keeper.Keeper) IBCModule { return IBCModule{ keeper: k, diff --git a/x/interchaintxs/keeper/keeper.go b/x/interchaintxs/keeper/keeper.go index 125b04ae..92e100f2 100644 --- a/x/interchaintxs/keeper/keeper.go +++ b/x/interchaintxs/keeper/keeper.go @@ -97,7 +97,7 @@ func (k Keeper) GetAuthority() string { return k.authority } -// GetICARegistrationFeeFirstCodeID returns code id, starting from which we charge fee for ICA registration +// GetICARegistrationFeeFirstCodeID returns code id, starting from which we charge fee for ICA registration. func (k Keeper) GetICARegistrationFeeFirstCodeID(ctx sdk.Context) (codeID uint64) { store := ctx.KVStore(k.storeKey) bytes := store.Get(types.ICARegistrationFeeFirstCodeID) diff --git a/x/interchaintxs/keeper/msg_server.go b/x/interchaintxs/keeper/msg_server.go index 3cb59915..ed2b5ea4 100644 --- a/x/interchaintxs/keeper/msg_server.go +++ b/x/interchaintxs/keeper/msg_server.go @@ -198,7 +198,7 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []*codectypes.Any) (bz []byte return bz, nil } -// UpdateParams updates the module parameters +// UpdateParams updates the module parameters. func (k Keeper) UpdateParams(goCtx context.Context, req *ictxtypes.MsgUpdateParams) (*ictxtypes.MsgUpdateParamsResponse, error) { if err := req.Validate(); err != nil { return nil, errors.Wrap(err, "failed to validate MsgUpdateParams") diff --git a/x/interchaintxs/keeper/params.go b/x/interchaintxs/keeper/params.go index dec4f951..4a99879e 100644 --- a/x/interchaintxs/keeper/params.go +++ b/x/interchaintxs/keeper/params.go @@ -6,7 +6,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types" ) -// GetParams get all parameters as types.Params +// GetParams get all parameters as types.Params. func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { store := ctx.KVStore(k.storeKey) bz := store.Get(types.ParamsKey) @@ -18,7 +18,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { return params } -// SetParams set the params +// SetParams set the params. func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { store := ctx.KVStore(k.storeKey) bz, err := k.Codec.Marshal(¶ms) diff --git a/x/interchaintxs/module.go b/x/interchaintxs/module.go index eacdeec7..718ece78 100644 --- a/x/interchaintxs/module.go +++ b/x/interchaintxs/module.go @@ -53,7 +53,7 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { types.RegisterLegacyAminoCodec(cdc) } -// RegisterInterfaces registers the module's interface types +// RegisterInterfaces registers the module's interface types. func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { types.RegisterInterfaces(reg) } diff --git a/x/interchaintxs/module_simulation.go b/x/interchaintxs/module_simulation.go index cde1f5fa..3afe2f50 100644 --- a/x/interchaintxs/module_simulation.go +++ b/x/interchaintxs/module_simulation.go @@ -11,7 +11,7 @@ import ( "github.com/Nolus-Protocol/nolus-core/x/interchaintxs/types" ) -// avoid unused import issue +// avoid unused import issue. var ( _ = interchaintxssimulation.FindAccount _ = sims.StakePerAccount @@ -19,7 +19,7 @@ var ( _ = baseapp.Paramspace ) -// GenerateGenesisState creates a randomized GenState of the module +// GenerateGenesisState creates a randomized GenState of the module. func (AppModule) GenerateGenesisState(simState *module.SimulationState) { accs := make([]string, len(simState.Accounts)) for i, acc := range simState.Accounts { @@ -31,12 +31,12 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&interchaintxsGenesis) } -// ProposalContents doesn't return any content functions for governance proposals +// ProposalContents doesn't return any content functions for governance proposals. func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { return nil } -// RegisterStoreDecoder registers a decoder +// RegisterStoreDecoder registers a decoder. func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) {} // WeightedOperations returns the all the gov module operations with their respective weights. diff --git a/x/interchaintxs/simulation/simap.go b/x/interchaintxs/simulation/simap.go index 92c437c0..b222cc5f 100644 --- a/x/interchaintxs/simulation/simap.go +++ b/x/interchaintxs/simulation/simap.go @@ -5,7 +5,7 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) -// FindAccount find a specific address from an account list +// FindAccount find a specific address from an account list. func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { creator, err := sdk.AccAddressFromBech32(address) if err != nil { diff --git a/x/interchaintxs/types/errors.go b/x/interchaintxs/types/errors.go index f32e3980..2ded7edd 100644 --- a/x/interchaintxs/types/errors.go +++ b/x/interchaintxs/types/errors.go @@ -4,7 +4,7 @@ import ( "cosmossdk.io/errors" ) -// x/interchaintxs module sentinel errors +// x/interchaintxs module sentinel errors. var ( ErrInvalidICAOwner = errors.Register(ModuleName, 1100, "invalid interchain account interchainAccountID") ErrInvalidAccountAddress = errors.Register(ModuleName, 1101, "invalid account address") diff --git a/x/interchaintxs/types/expected_keepers.go b/x/interchaintxs/types/expected_keepers.go index 8d90457c..eeca2801 100644 --- a/x/interchaintxs/types/expected_keepers.go +++ b/x/interchaintxs/types/expected_keepers.go @@ -12,7 +12,7 @@ import ( feerefundertypes "github.com/Nolus-Protocol/nolus-core/x/feerefunder/types" ) -// AccountKeeper defines the expected account keeper used for simulations (noalias) +// AccountKeeper defines the expected account keeper used for simulations (noalias). type AccountKeeper interface { GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI // Methods imported from account should be defined here @@ -47,7 +47,7 @@ type FeeRefunderKeeper interface { DistributeTimeoutFee(ctx context.Context, receiver sdk.AccAddress, packetID feerefundertypes.PacketID) } -// ChannelKeeper defines the expected IBC channel keeper +// ChannelKeeper defines the expected IBC channel keeper. type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) diff --git a/x/interchaintxs/types/genesis.go b/x/interchaintxs/types/genesis.go index ffd96d1a..870a4302 100644 --- a/x/interchaintxs/types/genesis.go +++ b/x/interchaintxs/types/genesis.go @@ -1,6 +1,6 @@ package types -// DefaultGenesis returns the default Capability genesis state +// DefaultGenesis returns the default Capability genesis state. func DefaultGenesis() *GenesisState { return &GenesisState{ Params: DefaultParams(), diff --git a/x/interchaintxs/types/keys.go b/x/interchaintxs/types/keys.go index ba4019d8..b6005421 100644 --- a/x/interchaintxs/types/keys.go +++ b/x/interchaintxs/types/keys.go @@ -1,26 +1,26 @@ package types const ( - // ModuleName defines the module name + // ModuleName defines the module name. ModuleName = "interchaintxs" - // StoreKey defines the primary module store key + // StoreKey defines the primary module store key. StoreKey = ModuleName - // RouterKey is the message route for slashing + // RouterKey is the message route for slashing. RouterKey = ModuleName - // QuerierRoute defines the module's query routing key + // QuerierRoute defines the module's query routing key. QuerierRoute = ModuleName - // MemStoreKey defines the in-memory store key + // MemStoreKey defines the in-memory store key. MemStoreKey = "mem_interchaintxs" ) const ( - // parameters key + // parameters key. prefixParamsKey = iota + 1 - // prefix of code id, starting from which we charge fee for ICA registration + // prefix of code id, starting from which we charge fee for ICA registration. prefixICARegistrationFeeFirstCodeID = iota + 2 ) diff --git a/x/interchaintxs/types/params.go b/x/interchaintxs/types/params.go index ceb568d6..5e3b90e7 100644 --- a/x/interchaintxs/types/params.go +++ b/x/interchaintxs/types/params.go @@ -30,7 +30,7 @@ func ParamKeyTable() paramtypes.KeyTable { ) } -// NewParams creates a new Params instance +// NewParams creates a new Params instance. func NewParams(msgSubmitTxMaxMessages uint64, registerFee sdk.Coins) Params { return Params{ MsgSubmitTxMaxMessages: msgSubmitTxMaxMessages, @@ -38,12 +38,12 @@ func NewParams(msgSubmitTxMaxMessages uint64, registerFee sdk.Coins) Params { } } -// DefaultParams returns a default set of parameters +// DefaultParams returns a default set of parameters. func DefaultParams() Params { return NewParams(DefaultMsgSubmitTxMaxMessages, DefaultRegisterFee) } -// ParamSetPairs get the params.ParamSet +// ParamSetPairs get the params.ParamSet. func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ paramtypes.NewParamSetPair( @@ -54,7 +54,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { } } -// Validate validates the set of params +// Validate validates the set of params. func (p Params) Validate() error { return validateMsgSubmitTxMaxMessages(p.GetMsgSubmitTxMaxMessages()) } diff --git a/x/interchaintxs/types/tx.go b/x/interchaintxs/types/tx.go index c5ce237a..de5ab6df 100644 --- a/x/interchaintxs/types/tx.go +++ b/x/interchaintxs/types/tx.go @@ -12,7 +12,7 @@ import ( "github.com/gogo/protobuf/proto" ) -// const interchainAccountIDLimit = 47 +// const interchainAccountIDLimit = 47. const interchainAccountIDLimit = 128 - len("icacontroller-") - len("nolus1unyuj8qnmygvzuex3dwmg9yzt9alhvyeat0uu0jedg2wj33efl5qmysp02") - // just a random contract address @@ -104,7 +104,7 @@ func (msg *MsgSubmitTx) GetSignBytes() []byte { return ModuleCdc.MustMarshalJSON(msg) } -// PackTxMsgAny marshals the sdk.Msg payload to a protobuf Any type +// PackTxMsgAny marshals the sdk.Msg payload to a protobuf Any type. func PackTxMsgAny(sdkMsg sdk.Msg) (*codectypes.Any, error) { msg, ok := sdkMsg.(proto.Message) if !ok { diff --git a/x/interchaintxs/types/types.go b/x/interchaintxs/types/types.go index 47a918e7..2f6daf9f 100644 --- a/x/interchaintxs/types/types.go +++ b/x/interchaintxs/types/types.go @@ -55,5 +55,5 @@ func (i ICAOwner) GetInterchainAccountID() string { return i.interchainAccountID } -// GetFeeCollectorAddr is a function to return the current fee collector address +// GetFeeCollectorAddr is a function to return the current fee collector address. type GetFeeCollectorAddr func(ctx sdk.Context) string diff --git a/x/transfer/keeper/keeper.go b/x/transfer/keeper/keeper.go index c4753d9d..3a5cd199 100644 --- a/x/transfer/keeper/keeper.go +++ b/x/transfer/keeper/keeper.go @@ -20,7 +20,7 @@ import ( wrappedtypes "github.com/Nolus-Protocol/nolus-core/x/transfer/types" ) -// KeeperTransferWrapper is a wrapper for original ibc keeper to override response for "Transfer" method +// KeeperTransferWrapper is a wrapper for original ibc keeper to override response for "Transfer" method. type KeeperTransferWrapper struct { keeper.Keeper channelKeeper wrappedtypes.ChannelKeeper @@ -82,7 +82,7 @@ func (k KeeperTransferWrapper) UpdateParams(goCtx context.Context, msg *wrappedt return &wrappedtypes.MsgUpdateParamsResponse{}, nil } -// NewKeeper creates a new IBC transfer Keeper(KeeperTransferWrapper) instance +// NewKeeper creates a new IBC transfer Keeper(KeeperTransferWrapper) instance. func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, ics4Wrapper porttypes.ICS4Wrapper, channelKeeper wrappedtypes.ChannelKeeper, portKeeper types.PortKeeper, diff --git a/x/transfer/module.go b/x/transfer/module.go index 8e81e0e1..5567de1f 100644 --- a/x/transfer/module.go +++ b/x/transfer/module.go @@ -31,7 +31,7 @@ type IBCModule struct { transfer.IBCModule } -// NewIBCModule creates a new IBCModule given the keeper +// NewIBCModule creates a new IBCModule given the keeper. func NewIBCModule(k wrapkeeper.KeeperTransferWrapper, sudoKeeper transfertypes.WasmKeeper) IBCModule { return IBCModule{ wrappedKeeper: k, @@ -76,7 +76,7 @@ type AppModule struct { keeper wrapkeeper.KeeperTransferWrapper } -// NewAppModule creates a new 20-transfer module +// NewAppModule creates a new 20-transfer module. func NewAppModule(k wrapkeeper.KeeperTransferWrapper) AppModule { return AppModule{ AppModule: transfer.NewAppModule(k.Keeper), @@ -134,7 +134,7 @@ func (am AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { am.AppModuleBasic.RegisterLegacyAminoCodec(cdc) } -// RegisterInterfaces registers the module's interface types +// RegisterInterfaces registers the module's interface types. func (am AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { transfertypes.RegisterInterfaces(reg) am.AppModuleBasic.RegisterInterfaces(reg) diff --git a/x/transfer/types/expected_keepers.go b/x/transfer/types/expected_keepers.go index 0318f411..b8325529 100644 --- a/x/transfer/types/expected_keepers.go +++ b/x/transfer/types/expected_keepers.go @@ -20,7 +20,7 @@ type FeeRefunderKeeper interface { DistributeTimeoutFee(ctx context.Context, receiver sdk.AccAddress, packetID feerefundertypes.PacketID) } -// ChannelKeeper defines the expected IBC channel keeper +// ChannelKeeper defines the expected IBC channel keeper. type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool)