diff --git a/app/app.go b/app/app.go index 2118fe371..b59532ed9 100644 --- a/app/app.go +++ b/app/app.go @@ -31,6 +31,7 @@ import ( ibcporttypes "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" + ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" "github.com/spf13/cast" _ "github.com/tellor-io/layer/app/config" appflags "github.com/tellor-io/layer/app/flags" @@ -489,7 +490,6 @@ func New( scopedTransferKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - transferModule := transfer.NewAppModule(app.TransferKeeper) transferIBCModule := transfer.NewIBCModule(app.TransferKeeper) app.ICAHostKeeper = icahostkeeper.NewKeeper( @@ -511,7 +511,7 @@ func New( scopedICAControllerKeeper, app.MsgServiceRouter(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - icaModule := ica.NewAppModule(&icaControllerKeeper, &app.ICAHostKeeper) + icaHostIBCModule := icahost.NewIBCModule(app.ICAHostKeeper) // Create evidence Keeper for to register the IBC light client misbehavior evidence route @@ -550,7 +550,6 @@ func New( runtime.NewKVStoreService(keys[registrymoduletypes.StoreKey]), authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - registryModule := registrymodule.NewAppModule(appCodec, app.RegistryKeeper, app.AccountKeeper, app.BankKeeper) app.ReporterKeeper = reportermodulekeeper.NewKeeper( appCodec, @@ -561,7 +560,6 @@ func New( app.BankKeeper, app.RegistryKeeper, ) - reporterModule := reportermodule.NewAppModule(appCodec, app.ReporterKeeper, app.AccountKeeper, app.BankKeeper) app.OracleKeeper = oraclemodulekeeper.NewKeeper( appCodec, @@ -572,7 +570,6 @@ func New( app.ReporterKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - oracleModule := oraclemodule.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper) app.DisputeKeeper = disputemodulekeeper.NewKeeper( appCodec, @@ -582,7 +579,6 @@ func New( app.OracleKeeper, app.ReporterKeeper, ) - disputeModule := disputemodule.NewAppModule(appCodec, app.DisputeKeeper, app.AccountKeeper, app.BankKeeper) app.BridgeKeeper = bridgemodulekeeper.NewKeeper( appCodec, @@ -593,7 +589,6 @@ func New( app.BankKeeper, app.ReporterKeeper, ) - bridgeModule := bridgemodule.NewAppModule(appCodec, app.BridgeKeeper, app.AccountKeeper, app.BankKeeper) // this line is used by starport scaffolding # stargate/app/keeperDefinition appFlags := appflags.GetFlagValuesFromOptions(appOpts) @@ -763,21 +758,26 @@ 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, nil), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, nil, app.interfaceRegistry), distrModule{distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, nil)}, stakingModule{staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, nil)}, upgrade.NewAppModule(app.UpgradeKeeper, app.AccountKeeper.AddressCodec()), evidence.NewAppModule(app.EvidenceKeeper), consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper), + + // Layer modules + mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), + oraclemodule.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper), + registrymodule.NewAppModule(appCodec, app.RegistryKeeper, app.AccountKeeper, app.BankKeeper), + disputemodule.NewAppModule(appCodec, app.DisputeKeeper, app.AccountKeeper, app.BankKeeper), + bridgemodule.NewAppModule(appCodec, app.BridgeKeeper, app.AccountKeeper, app.BankKeeper), + reportermodule.NewAppModule(appCodec, app.ReporterKeeper, app.AccountKeeper, app.BankKeeper), + + // IBC modules + ibctm.AppModule{}, ibc.NewAppModule(app.IBCKeeper), - transferModule, - icaModule, - oracleModule, - registryModule, - disputeModule, - bridgeModule, - reporterModule, + transfer.NewAppModule(app.TransferKeeper), + ica.NewAppModule(&icaControllerKeeper, &app.ICAHostKeeper), // this line is used by starport scaffolding # stargate/app/appModule ) @@ -810,7 +810,6 @@ func New( authtypes.ModuleName, banktypes.ModuleName, govtypes.ModuleName, - ibctransfertypes.ModuleName, ibcexported.ModuleName, icatypes.ModuleName, genutiltypes.ModuleName,