diff --git a/ignite/templates/app/files/app/app_config.go.plush b/ignite/templates/app/files/app/app_config.go.plush index c0ff5f726e..8c0d34a74a 100644 --- a/ignite/templates/app/files/app/app_config.go.plush +++ b/ignite/templates/app/files/app/app_config.go.plush @@ -43,6 +43,7 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects + consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" _ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" @@ -81,7 +82,8 @@ var ( // so that other modules that want to create or claim capabilities afterwards in InitChain // can do so safely. genesisModuleOrder = []string{ - // cosmos sdk modules + // cosmos-sdk/ibc modules + capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, @@ -90,21 +92,21 @@ var ( govtypes.ModuleName, minttypes.ModuleName, crisistypes.ModuleName, + ibcexported.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, authz.ModuleName, + ibctransfertypes.ModuleName, + icatypes.ModuleName, + ibcfeetypes.ModuleName, feegrant.ModuleName, - group.ModuleName, paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, circuittypes.ModuleName, - // ibc modules - capabilitytypes.ModuleName, - ibcexported.ModuleName, - ibctransfertypes.ModuleName, - icatypes.ModuleName, - ibcfeetypes.ModuleName, + group.ModuleName, + consensusparamtypes.ModuleName, + circuittypes.ModuleName, // chain modules // this line is used by starport scaffolding # stargate/app/initGenesis } @@ -115,13 +117,14 @@ var ( // NOTE: staking module is required if HistoricalEntries param > 0 // NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC) beginBlockers = []string{ - // cosmos sdk modules + // cosmos sdk modules minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, evidencetypes.ModuleName, stakingtypes.ModuleName, authz.ModuleName, + genutiltypes.ModuleName, // ibc modules capabilitytypes.ModuleName, ibcexported.ModuleName, @@ -133,12 +136,13 @@ var ( } endBlockers = []string{ - // cosmos sdk modules + // cosmos sdk modules crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName, feegrant.ModuleName, group.ModuleName, + genutiltypes.ModuleName, // ibc modules ibcexported.ModuleName, ibctransfertypes.ModuleName, diff --git a/ignite/templates/app/files/app/ibc.go.plush b/ignite/templates/app/files/app/ibc.go.plush index f80ba216c1..52b59a83a5 100644 --- a/ignite/templates/app/files/app/ibc.go.plush +++ b/ignite/templates/app/files/app/ibc.go.plush @@ -6,6 +6,7 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + "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" icamodule "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" @@ -50,8 +51,8 @@ func (app *App) registerIBCModules() { for _, m := range []string{ ibctransfertypes.ModuleName, ibcexported.ModuleName, - icahosttypes.SubModuleName, icacontrollertypes.SubModuleName, + icahosttypes.SubModuleName, } { app.ParamsKeeper.Subspace(m) } @@ -161,12 +162,16 @@ func (app *App) registerIBCModules() { app.ScopedICAHostKeeper = scopedICAHostKeeper app.ScopedICAControllerKeeper = scopedICAControllerKeeper - app.RegisterModules( + // register IBC modules + if err := app.RegisterModules( ibc.NewAppModule(app.IBCKeeper), ibctransfer.NewAppModule(app.TransferKeeper), ibcfee.NewAppModule(app.IBCFeeKeeper), icamodule.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), + capability.NewAppModule(app.appCodec, *app.CapabilityKeeper, false), ibctm.AppModule{}, solomachine.AppModule{}, - ) + ); err != nil { + panic(err) + } }