Skip to content

Commit

Permalink
chore: remove the monitoringp module (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev authored Mar 23, 2023
1 parent 07e2e21 commit 9fda0cc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 460 deletions.
36 changes: 3 additions & 33 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ import (
"github.com/ignite/cli/ignite/pkg/cosmoscmd"
"github.com/ignite/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/dymensionxyz/dymension/docs"
rollappmodule "github.com/dymensionxyz/dymension/x/rollapp"
rollappmodulekeeper "github.com/dymensionxyz/dymension/x/rollapp/keeper"
Expand Down Expand Up @@ -180,7 +176,6 @@ var (
evidence.AppModuleBasic{},
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
monitoringp.AppModuleBasic{},
rollappmodule.AppModuleBasic{},
sequencermodule.AppModuleBasic{},
router.AppModuleBasic{},
Expand Down Expand Up @@ -256,13 +251,11 @@ type App struct {
EvidenceKeeper evidencekeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
FeeGrantKeeper feegrantkeeper.Keeper
MonitoringKeeper monitoringpkeeper.Keeper
RouterKeeper routerkeeper.Keeper

// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
ScopedMonitoringKeeper capabilitykeeper.ScopedKeeper
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper

RollappKeeper rollappmodulekeeper.Keeper

Expand Down Expand Up @@ -341,7 +334,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,
rollappmoduletypes.StoreKey,
sequencermoduletypes.StoreKey,
routertypes.StoreKey,
Expand Down Expand Up @@ -491,21 +484,6 @@ 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)

app.IRCKeeper = ircmodulekeeper.NewKeeper(
appCodec,
keys[ircmoduletypes.StoreKey],
Expand Down Expand Up @@ -540,7 +518,6 @@ func New(
// Create static IBC router, add transfer route, then set and seal it
ibcRouter := ibcporttypes.NewRouter()
ibcRouter.AddRoute(ibctransfertypes.ModuleName, routerModule)
ibcRouter.AddRoute(monitoringptypes.ModuleName, monitoringModule)
// this line is used by starport scaffolding # ibc/app/router
app.IBCKeeper.SetRouter(ibcRouter)

Expand Down Expand Up @@ -576,7 +553,6 @@ func New(
params.NewAppModule(app.ParamsKeeper),
routerModule,
transferModule,
monitoringModule,
rollappModule,
sequencerModule,
ircModule,
Expand Down Expand Up @@ -607,7 +583,6 @@ func New(
genutiltypes.ModuleName,
feegrant.ModuleName,
paramstypes.ModuleName,
monitoringptypes.ModuleName,
rollappmoduletypes.ModuleName,
sequencermoduletypes.ModuleName,
ircmoduletypes.ModuleName,
Expand All @@ -634,7 +609,6 @@ func New(
ibchost.ModuleName,
ibctransfertypes.ModuleName,
routertypes.ModuleName,
monitoringptypes.ModuleName,
rollappmoduletypes.ModuleName,
sequencermoduletypes.ModuleName,
ircmoduletypes.ModuleName,
Expand Down Expand Up @@ -666,7 +640,6 @@ func New(
ibctransfertypes.ModuleName,
routertypes.ModuleName,
feegrant.ModuleName,
monitoringptypes.ModuleName,
rollappmoduletypes.ModuleName,
sequencermoduletypes.ModuleName,
ircmoduletypes.ModuleName,
Expand Down Expand Up @@ -694,7 +667,6 @@ func New(
ibcModule,
transferModule,
routerModule,
monitoringModule,
rollappModule,
sequencerModule,
ircModule,
Expand Down Expand Up @@ -735,7 +707,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 @@ -887,7 +858,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(routertypes.ModuleName).WithKeyTable(routertypes.ParamKeyTable())
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(monitoringptypes.ModuleName)
paramsKeeper.Subspace(rollappmoduletypes.ModuleName)
paramsKeeper.Subspace(sequencermoduletypes.ModuleName)
paramsKeeper.Subspace(ircmoduletypes.ModuleName)
Expand Down
Loading

0 comments on commit 9fda0cc

Please sign in to comment.