Skip to content

Commit

Permalink
Add hooks to governance actions (cosmos#9133)
Browse files Browse the repository at this point in the history
* add governance hooks

* fix lint

* fix lint

* CHANGELOG

* sh -> gh

* improve comments

* add test

* add more tests

* rename two of the hooks

Co-authored-by: ahmedaly113 <ahmedaly113@outlook.com>
  • Loading branch information
sunnya97 and ahmedaly113 committed Apr 21, 2021
1 parent 7eda745 commit a93d69b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,17 @@ func NewSimApp(
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper))
app.GovKeeper = govkeeper.NewKeeper(
govKeeper := govkeeper.NewKeeper(
appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper,
&stakingKeeper, govRouter,
)

app.GovKeeper = *govKeeper.SetHooks(
govtypes.NewMultiGovHooks(
// register the governance hooks
),
)

// create evidence keeper with router
evidenceKeeper := evidencekeeper.NewKeeper(
appCodec, keys[evidencetypes.StoreKey], &app.StakingKeeper, app.SlashingKeeper,
Expand Down

0 comments on commit a93d69b

Please sign in to comment.