Created
July 5, 2022 00:40
-
-
Save zeroFruit/22daf2c5d9c8bc71fbd2e498ff140ce0 to your computer and use it in GitHub Desktop.
Cosmos Dev Series: Cosmos-SDK-based Blockchain Upgrade - NewSimApp x/gov handler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func NewSimApp(...) *SimApp { | |
... | |
// register the proposal types | |
govRouter := govtypes.NewRouter() | |
govRouter.AddRoute(govtypes.RouterKey, govtypes.ProposalHandler). | |
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)) | |
govKeeper := govkeeper.NewKeeper( | |
appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, | |
&stakingKeeper, govRouter, | |
) | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment