Skip to content

Commit

Permalink
Merge pull request #892 from public-awesome/spoorthi/migrate-globalfe…
Browse files Browse the repository at this point in the history
…e-props

feat: migrate the x/globalfee proposals to gov v1 type
  • Loading branch information
jhernandezb authored Oct 17, 2023
2 parents a84bcf2 + 22f05e0 commit 4acfd0b
Show file tree
Hide file tree
Showing 27 changed files with 1,025 additions and 1,230 deletions.
12 changes: 7 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ import (
cronmoduletypes "github.com/public-awesome/stargaze/v12/x/cron/types"

globalfeemodule "github.com/public-awesome/stargaze/v12/x/globalfee"
globalfeeclient "github.com/public-awesome/stargaze/v12/x/globalfee/client"
globalfeemodulekeeper "github.com/public-awesome/stargaze/v12/x/globalfee/keeper"
globalfeemoduletypes "github.com/public-awesome/stargaze/v12/x/globalfee/types"

Expand Down Expand Up @@ -173,8 +172,6 @@ func getGovProposalHandlers() []govclient.ProposalHandler {
upgradeclient.LegacyProposalHandler,
upgradeclient.LegacyCancelProposalHandler,
ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler,
globalfeeclient.SetCodeAuthorizationProposalHandler, globalfeeclient.RemoveCodeAuthorizationProposalHandler,
globalfeeclient.SetContractAuthorizationProposalHandler, globalfeeclient.RemoveContractAuthorizationProposalHandler,
// this line is used by starport scaffolding # stargate/app/govProposalHandler
)
return govProposalHandlers
Expand Down Expand Up @@ -641,9 +638,14 @@ func NewStargazeApp(
authtypes.NewModuleAddress(govtypes.ModuleName).String())
cronModule := cronmodule.NewAppModule(appCodec, app.CronKeeper, app.WasmKeeper)

app.GlobalFeeKeeper = globalfeemodulekeeper.NewKeeper(appCodec, keys[globalfeemoduletypes.StoreKey], app.GetSubspace(globalfeemoduletypes.ModuleName), app.WasmKeeper)
app.GlobalFeeKeeper = globalfeemodulekeeper.NewKeeper(
appCodec,
keys[globalfeemoduletypes.StoreKey],
app.GetSubspace(globalfeemoduletypes.ModuleName),
app.WasmKeeper,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
globalfeeModule := globalfeemodule.NewAppModule(appCodec, app.GlobalFeeKeeper)
govRouter.AddRoute(globalfeemoduletypes.RouterKey, globalfeemodulekeeper.NewProposalHandler(app.GlobalFeeKeeper))

ibcRouter.AddRoute(wasmtypes.ModuleName, wasm.NewIBCHandler(app.WasmKeeper, app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper))
app.IBCKeeper.SetRouter(ibcRouter)
Expand Down
Loading

0 comments on commit 4acfd0b

Please sign in to comment.