From dc7bd8b324ff743999ac4dd0bf8b6520a3319703 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 17 Nov 2023 14:00:29 +0100 Subject: [PATCH] fix: fix ibc registration in 0.59 --- ignite/templates/app/files/app/ibc.go.plush | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ignite/templates/app/files/app/ibc.go.plush b/ignite/templates/app/files/app/ibc.go.plush index 43bf80e041..534616648f 100644 --- a/ignite/templates/app/files/app/ibc.go.plush +++ b/ignite/templates/app/files/app/ibc.go.plush @@ -8,6 +8,7 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + icamodule "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller" icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" @@ -20,12 +21,12 @@ import ( ibctransfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer" ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v8/modules/core" porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" solomachine "github.com/cosmos/ibc-go/v8/modules/light-clients/06-solomachine" ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" - // this line is used by starport scaffolding # ibc/app/import ) @@ -154,12 +155,17 @@ func (app *App) registerIBCModules() { app.IBCKeeper.SetRouter(ibcRouter) - // register additional types - ibctm.AppModuleBasic{}.RegisterInterfaces(app.interfaceRegistry) - solomachine.AppModuleBasic{}.RegisterInterfaces(app.interfaceRegistry) - app.ScopedIBCKeeper = scopedIBCKeeper app.ScopedIBCTransferKeeper = scopedIBCTransferKeeper app.ScopedICAHostKeeper = scopedICAHostKeeper app.ScopedICAControllerKeeper = scopedICAControllerKeeper + + app.RegisterModules( + ibc.NewAppModule(app.IBCKeeper), + ibctransfer.NewAppModule(app.TransferKeeper), + ibcfee.NewAppModule(app.IBCFeeKeeper), + icamodule.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), + ibctm.AppModule{}, + solomachine.AppModule{}, + ) }