Skip to content

Commit

Permalink
feat: migrate x/slashing to use app wiring (cosmos#12200)
Browse files Browse the repository at this point in the history
* feat: migrate `x/slashing` to use app wiring

* Update proto/cosmos/slashing/module/v1/module.proto
  • Loading branch information
atheeshp authored Jun 9, 2022
1 parent 2702691 commit 155fef5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ func NewSimApp(
&app.FeeGrantKeeper,
&app.StakingKeeper,
&app.NFTKeeper,
&app.SlashingKeeper,
&msgServiceRouter,
); err != nil {
panic(err)
Expand All @@ -236,7 +237,7 @@ func NewSimApp(

app.keys = sdk.NewKVStoreKeys(
minttypes.StoreKey, distrtypes.StoreKey,
slashingtypes.StoreKey, govtypes.StoreKey, upgradetypes.StoreKey,
govtypes.StoreKey, upgradetypes.StoreKey,
evidencetypes.StoreKey,
group.StoreKey,
)
Expand All @@ -260,9 +261,6 @@ func NewSimApp(
app.appCodec, app.keys[distrtypes.StoreKey], app.GetSubspace(distrtypes.ModuleName), app.AccountKeeper, app.BankKeeper,
app.StakingKeeper, authtypes.FeeCollectorName,
)
app.SlashingKeeper = slashingkeeper.NewKeeper(
app.appCodec, app.keys[slashingtypes.StoreKey], app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName),
)
app.CrisisKeeper = crisiskeeper.NewKeeper(
app.GetSubspace(crisistypes.ModuleName), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName,
)
Expand Down Expand Up @@ -326,7 +324,6 @@ func NewSimApp(
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants),
gov.NewAppModule(app.appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper),
mint.NewAppModule(app.appCodec, app.MintKeeper, app.AccountKeeper, nil),
slashing.NewAppModule(app.appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
distr.NewAppModule(app.appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
upgrade.NewAppModule(app.UpgradeKeeper),
evidence.NewAppModule(app.EvidenceKeeper),
Expand Down Expand Up @@ -562,7 +559,6 @@ func GetMaccPerms() map[string][]string {
func initParamsKeeper(paramsKeeper paramskeeper.Keeper) {
paramsKeeper.Subspace(minttypes.ModuleName)
paramsKeeper.Subspace(distrtypes.ModuleName)
paramsKeeper.Subspace(slashingtypes.ModuleName)
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable())
paramsKeeper.Subspace(crisistypes.ModuleName)
}
4 changes: 4 additions & 0 deletions app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,7 @@ modules:
- name: nft
config:
"@type": cosmos.nft.module.v1.Module

- name: slashing
config:
"@type": cosmos.slashing.module.v1.Module

0 comments on commit 155fef5

Please sign in to comment.