Skip to content

Commit

Permalink
feat: remove monitoringp module
Browse files Browse the repository at this point in the history
The `monitoringp` module is used to exposing stats from the chain.
  • Loading branch information
ccamel committed Jun 17, 2022
1 parent 6be3175 commit f97b8b9
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ import (
"github.com/ignite-hq/cli/ignite/pkg/cosmoscmd"
"github.com/ignite-hq/cli/ignite/pkg/openapiconsole"

monitoringp "github.com/tendermint/spn/x/monitoringp"
monitoringpkeeper "github.com/tendermint/spn/x/monitoringp/keeper"
monitoringptypes "github.com/tendermint/spn/x/monitoringp/types"

"github.com/okp4/okp4d/docs"
// this line is used by starport scaffolding # stargate/app/moduleImport
)
Expand Down Expand Up @@ -152,7 +148,6 @@ var (
evidence.AppModuleBasic{},
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
monitoringp.AppModuleBasic{},
// this line is used by starport scaffolding # stargate/app/moduleBasic
)

Expand Down Expand Up @@ -218,7 +213,6 @@ type App struct {
EvidenceKeeper evidencekeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
FeeGrantKeeper feegrantkeeper.Keeper
MonitoringKeeper monitoringpkeeper.Keeper

// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
Expand Down Expand Up @@ -261,7 +255,7 @@ func New(
authtypes.StoreKey, authz.ModuleName, banktypes.StoreKey, stakingtypes.StoreKey,
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, monitoringptypes.StoreKey,
evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey,
// this line is used by starport scaffolding # stargate/app/storeKey
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
Expand Down Expand Up @@ -365,27 +359,11 @@ func New(
&stakingKeeper, govRouter,
)

scopedMonitoringKeeper := app.CapabilityKeeper.ScopeToModule(monitoringptypes.ModuleName)
app.MonitoringKeeper = *monitoringpkeeper.NewKeeper(
appCodec,
keys[monitoringptypes.StoreKey],
keys[monitoringptypes.MemStoreKey],
app.GetSubspace(monitoringptypes.ModuleName),
app.StakingKeeper,
app.IBCKeeper.ClientKeeper,
app.IBCKeeper.ConnectionKeeper,
app.IBCKeeper.ChannelKeeper,
&app.IBCKeeper.PortKeeper,
scopedMonitoringKeeper,
)
monitoringModule := monitoringp.NewAppModule(appCodec, app.MonitoringKeeper)

// this line is used by starport scaffolding # stargate/app/keeperDefinition

// Create static IBC router, add transfer route, then set and seal it
ibcRouter := ibcporttypes.NewRouter()
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferModule)
ibcRouter.AddRoute(monitoringptypes.ModuleName, monitoringModule)
// this line is used by starport scaffolding # ibc/app/router
app.IBCKeeper.SetRouter(ibcRouter)

Expand Down Expand Up @@ -420,7 +398,6 @@ func New(
ibc.NewAppModule(app.IBCKeeper),
params.NewAppModule(app.ParamsKeeper),
transferModule,
monitoringModule,
// this line is used by starport scaffolding # stargate/app/appModule
)

Expand All @@ -447,7 +424,6 @@ func New(
genutiltypes.ModuleName,
feegrant.ModuleName,
paramstypes.ModuleName,
monitoringptypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/beginBlockers
)

Expand All @@ -470,7 +446,6 @@ func New(
upgradetypes.ModuleName,
ibchost.ModuleName,
ibctransfertypes.ModuleName,
monitoringptypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/endBlockers
)

Expand Down Expand Up @@ -498,7 +473,6 @@ func New(
upgradetypes.ModuleName,
ibctransfertypes.ModuleName,
feegrant.ModuleName,
monitoringptypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/initGenesis
)

Expand All @@ -522,7 +496,6 @@ func New(
evidence.NewAppModule(app.EvidenceKeeper),
ibc.NewAppModule(app.IBCKeeper),
transferModule,
monitoringModule,
// this line is used by starport scaffolding # stargate/app/appModule
)
app.sm.RegisterStoreDecoders()
Expand Down Expand Up @@ -560,7 +533,6 @@ func New(

app.ScopedIBCKeeper = scopedIBCKeeper
app.ScopedTransferKeeper = scopedTransferKeeper
app.ScopedMonitoringKeeper = scopedMonitoringKeeper
// this line is used by starport scaffolding # stargate/app/beforeInitReturn

return app
Expand Down Expand Up @@ -711,7 +683,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(crisistypes.ModuleName)
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(monitoringptypes.ModuleName)
// this line is used by starport scaffolding # stargate/app/paramSubspace

return paramsKeeper
Expand Down

0 comments on commit f97b8b9

Please sign in to comment.