package poj import ( "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" "cosmossdk.io/depinject/appconfig" "git.cw.tr/mukan-network/mukan-sdk/codec" authtypes "git.cw.tr/mukan-network/mukan-sdk/x/auth/types" stakingkeeper "git.cw.tr/mukan-network/mukan-sdk/x/staking/keeper" "mukan/x/poj/keeper" "mukan/x/poj/types" ) var _ depinject.OnePerModuleType = AppModule{} // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (AppModule) IsOnePerModuleType() {} func init() { appconfig.Register( &types.Module{}, appconfig.Provide(ProvideModule), ) } type ModuleInputs struct { depinject.In Config *types.Module StoreService store.KVStoreService Cdc codec.Codec AddressCodec address.Codec AuthKeeper types.AuthKeeper BankKeeper types.BankKeeper StakingKeeper *stakingkeeper.Keeper } type ModuleOutputs struct { depinject.Out PojKeeper keeper.Keeper Module appmodule.AppModule } func ProvideModule(in ModuleInputs) ModuleOutputs { // default to governance authority if not provided authority := authtypes.NewModuleAddress(types.GovModuleName) if in.Config.Authority != "" { authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) } k := keeper.NewKeeper( in.StoreService, in.Cdc, in.AddressCodec, authority, in.BankKeeper, in.AuthKeeper, in.StakingKeeper, ) m := NewAppModule(in.Cdc, k, in.AuthKeeper, in.BankKeeper, in.StakingKeeper) return ModuleOutputs{PojKeeper: k, Module: m} }