From ba0f7ce07d19f935aecfd3834521368921d8d45a Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 24 Sep 2024 12:37:22 +0200 Subject: [PATCH] linting fixes --- .../apps/27-interchain-accounts/controller/types/codec.go | 1 + modules/apps/27-interchain-accounts/host/types/codec.go | 5 +++-- modules/apps/27-interchain-accounts/types/codec.go | 4 ++-- modules/apps/29-fee/types/codec.go | 7 ++++--- modules/apps/callbacks/callbacks_test.go | 1 + modules/apps/callbacks/testing/simapp/export.go | 6 ++++-- modules/apps/transfer/types/codec.go | 6 +++--- modules/core/02-client/types/codec.go | 4 ++-- modules/core/03-connection/types/codec.go | 5 +++-- modules/core/04-channel/types/codec.go | 5 +++-- modules/core/23-commitment/types/codec.go | 5 +++-- modules/core/types/codec.go | 1 + modules/light-clients/06-solomachine/codec.go | 4 ++-- modules/light-clients/07-tendermint/codec.go | 1 + modules/light-clients/08-wasm/testing/simapp/export.go | 6 ++++-- modules/light-clients/08-wasm/types/codec.go | 1 + 16 files changed, 38 insertions(+), 24 deletions(-) diff --git a/modules/apps/27-interchain-accounts/controller/types/codec.go b/modules/apps/27-interchain-accounts/controller/types/codec.go index 06a7e07bfc3..700bd6ff014 100644 --- a/modules/apps/27-interchain-accounts/controller/types/codec.go +++ b/modules/apps/27-interchain-accounts/controller/types/codec.go @@ -2,6 +2,7 @@ package types import ( "cosmossdk.io/core/registry" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" ) diff --git a/modules/apps/27-interchain-accounts/host/types/codec.go b/modules/apps/27-interchain-accounts/host/types/codec.go index 3780db619ad..c4122f67aed 100644 --- a/modules/apps/27-interchain-accounts/host/types/codec.go +++ b/modules/apps/27-interchain-accounts/host/types/codec.go @@ -1,13 +1,14 @@ package types import ( - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" ) // RegisterInterfaces registers the interchain accounts host message types using the provided InterfaceRegistry -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgUpdateParams{}, diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index fb46220acca..06f33b15f41 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -3,7 +3,7 @@ package types import ( "github.com/cosmos/gogoproto/proto" - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" @@ -23,7 +23,7 @@ var ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) // RegisterInterfaces registers the interchain accounts controller types and the concrete InterchainAccount implementation // against the associated x/auth AccountI and GenesisAccount interfaces. -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { registry.RegisterImplementations((*sdk.AccountI)(nil), &InterchainAccount{}) registry.RegisterImplementations((*authtypes.GenesisAccount)(nil), &InterchainAccount{}) } diff --git a/modules/apps/29-fee/types/codec.go b/modules/apps/29-fee/types/codec.go index 9e52ead9025..2648cd0a8f4 100644 --- a/modules/apps/29-fee/types/codec.go +++ b/modules/apps/29-fee/types/codec.go @@ -1,7 +1,8 @@ package types import ( - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -11,7 +12,7 @@ import ( // RegisterLegacyAminoCodec registers the necessary x/ibc 29-fee interfaces and concrete types // on the provided LegacyAmino codec. These types are used for Amino JSON serialization. -func RegisterLegacyAminoCodec(cdc registry.AminoRegistrar) { +func RegisterLegacyAminoCodec(cdc coreregistry.AminoRegistrar) { legacy.RegisterAminoMsg(cdc, &MsgPayPacketFee{}, "cosmos-sdk/MsgPayPacketFee") legacy.RegisterAminoMsg(cdc, &MsgPayPacketFeeAsync{}, "cosmos-sdk/MsgPayPacketFeeAsync") legacy.RegisterAminoMsg(cdc, &MsgRegisterPayee{}, "cosmos-sdk/MsgRegisterPayee") @@ -20,7 +21,7 @@ func RegisterLegacyAminoCodec(cdc registry.AminoRegistrar) { // RegisterInterfaces register the 29-fee module interfaces to protobuf // Any. -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgPayPacketFee{}, diff --git a/modules/apps/callbacks/callbacks_test.go b/modules/apps/callbacks/callbacks_test.go index 8c5dda9a529..9272014ec03 100644 --- a/modules/apps/callbacks/callbacks_test.go +++ b/modules/apps/callbacks/callbacks_test.go @@ -157,6 +157,7 @@ func (s *CallbacksTestSuite) RegisterInterchainAccount(owner string) { s.Require().NotEmpty(res) s.Require().NoError(err) + fmt.Println(res.Events) channelID, err := ibctesting.ParseChannelIDFromEvents(res.Events) s.Require().NoError(err) diff --git a/modules/apps/callbacks/testing/simapp/export.go b/modules/apps/callbacks/testing/simapp/export.go index e32a671f181..bbdcf491ea0 100644 --- a/modules/apps/callbacks/testing/simapp/export.go +++ b/modules/apps/callbacks/testing/simapp/export.go @@ -9,11 +9,13 @@ import ( slashingtypes "cosmossdk.io/x/slashing/types" "cosmossdk.io/x/staking" stakingtypes "cosmossdk.io/x/staking/types" - cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" - cmttypes "github.com/cometbft/cometbft/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" + + cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" + cmttypes "github.com/cometbft/cometbft/types" ) // ExportAppStateAndValidators exports the state of the application for a genesis diff --git a/modules/apps/transfer/types/codec.go b/modules/apps/transfer/types/codec.go index 51df2fcc0cc..5b2e5f8560b 100644 --- a/modules/apps/transfer/types/codec.go +++ b/modules/apps/transfer/types/codec.go @@ -1,7 +1,7 @@ package types import ( - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" "cosmossdk.io/x/authz" "github.com/cosmos/cosmos-sdk/codec" @@ -13,13 +13,13 @@ import ( // RegisterLegacyAminoCodec registers the necessary x/ibc transfer interfaces and concrete types // on the provided LegacyAmino codec. These types are used for Amino JSON serialization. -func RegisterLegacyAminoCodec(cdc registry.AminoRegistrar) { +func RegisterLegacyAminoCodec(cdc coreregistry.AminoRegistrar) { legacy.RegisterAminoMsg(cdc, &MsgTransfer{}, "cosmos-sdk/MsgTransfer") } // RegisterInterfaces register the ibc transfer module interfaces to protobuf // Any. -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgTransfer{}, &MsgUpdateParams{}) registry.RegisterImplementations( diff --git a/modules/core/02-client/types/codec.go b/modules/core/02-client/types/codec.go index 076400b3f20..b6f8d84d4cb 100644 --- a/modules/core/02-client/types/codec.go +++ b/modules/core/02-client/types/codec.go @@ -3,7 +3,7 @@ package types import ( "github.com/cosmos/gogoproto/proto" - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" errorsmod "cosmossdk.io/errors" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -15,7 +15,7 @@ import ( ) // RegisterInterfaces registers the client interfaces to protobuf Any. -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { registry.RegisterInterface( "ibc.core.client.v1.ClientState", (*exported.ClientState)(nil), diff --git a/modules/core/03-connection/types/codec.go b/modules/core/03-connection/types/codec.go index 83e94bb6bab..8f47e20b56e 100644 --- a/modules/core/03-connection/types/codec.go +++ b/modules/core/03-connection/types/codec.go @@ -1,7 +1,8 @@ package types import ( - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -10,7 +11,7 @@ import ( // RegisterInterfaces register the ibc interfaces submodule implementations to protobuf // Any. -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgConnectionOpenInit{}, diff --git a/modules/core/04-channel/types/codec.go b/modules/core/04-channel/types/codec.go index c2a21b58322..32750c8271e 100644 --- a/modules/core/04-channel/types/codec.go +++ b/modules/core/04-channel/types/codec.go @@ -1,7 +1,8 @@ package types import ( - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,7 +13,7 @@ import ( // RegisterInterfaces register the ibc channel submodule interfaces to protobuf // Any. -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { registry.RegisterInterface( "ibc.core.channel.v1.PacketI", (*exported.PacketI)(nil), diff --git a/modules/core/23-commitment/types/codec.go b/modules/core/23-commitment/types/codec.go index 86852f25948..53c8f85383e 100644 --- a/modules/core/23-commitment/types/codec.go +++ b/modules/core/23-commitment/types/codec.go @@ -1,13 +1,14 @@ package types import ( - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" + v2 "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types/v2" "github.com/cosmos/ibc-go/v9/modules/core/exported" ) // RegisterInterfaces registers the commitment interfaces to protobuf Any. -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { registry.RegisterInterface( "ibc.core.commitment.v1.Root", (*exported.Root)(nil), diff --git a/modules/core/types/codec.go b/modules/core/types/codec.go index bfc54e94cb9..1280eb6cfcc 100644 --- a/modules/core/types/codec.go +++ b/modules/core/types/codec.go @@ -2,6 +2,7 @@ package types import ( "cosmossdk.io/core/registry" + clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" connectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" diff --git a/modules/light-clients/06-solomachine/codec.go b/modules/light-clients/06-solomachine/codec.go index 2e53f0cdc74..d04e8476037 100644 --- a/modules/light-clients/06-solomachine/codec.go +++ b/modules/light-clients/06-solomachine/codec.go @@ -1,7 +1,7 @@ package solomachine import ( - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" @@ -12,7 +12,7 @@ import ( // RegisterInterfaces register the ibc channel submodule interfaces to protobuf // Any. -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { registry.RegisterImplementations( (*exported.ClientState)(nil), &ClientState{}, diff --git a/modules/light-clients/07-tendermint/codec.go b/modules/light-clients/07-tendermint/codec.go index f61c0868e13..d5ef5fc0acf 100644 --- a/modules/light-clients/07-tendermint/codec.go +++ b/modules/light-clients/07-tendermint/codec.go @@ -2,6 +2,7 @@ package tendermint import ( "cosmossdk.io/core/registry" + "github.com/cosmos/ibc-go/v9/modules/core/exported" ) diff --git a/modules/light-clients/08-wasm/testing/simapp/export.go b/modules/light-clients/08-wasm/testing/simapp/export.go index e32a671f181..bbdcf491ea0 100644 --- a/modules/light-clients/08-wasm/testing/simapp/export.go +++ b/modules/light-clients/08-wasm/testing/simapp/export.go @@ -9,11 +9,13 @@ import ( slashingtypes "cosmossdk.io/x/slashing/types" "cosmossdk.io/x/staking" stakingtypes "cosmossdk.io/x/staking/types" - cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" - cmttypes "github.com/cometbft/cometbft/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" + + cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" + cmttypes "github.com/cometbft/cometbft/types" ) // ExportAppStateAndValidators exports the state of the application for a genesis diff --git a/modules/light-clients/08-wasm/types/codec.go b/modules/light-clients/08-wasm/types/codec.go index dd0bb1aed80..13268f6046c 100644 --- a/modules/light-clients/08-wasm/types/codec.go +++ b/modules/light-clients/08-wasm/types/codec.go @@ -2,6 +2,7 @@ package types import ( "cosmossdk.io/core/registry" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice"