diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bd0b665581..4964f48603b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#655](https://github.com/osmosis-labs/osmosis/pull/655) Make the default genesis for pool-incentives work by default - [97ac2a8](https://github.com/osmosis-labs/osmosis/commit/97ac2a86303fc8966a4c169107e0945775107e67) Fix InitGenesis bug for gauges - [#686](https://github.com/osmosis-labs/osmosis/pull/686) Add silence usage to cli to surpress unnecessary help logs +- [#731](https://github.com/osmosis-labs/osmosis/pull/731) Add UpdateFeeToken proposal handler to app.go ## [v6.0.0](https://github.com/osmosis-labs/osmosis/releases/tag/v6.0.0) diff --git a/app/keepers.go b/app/keepers.go index 5b6465433af..03da59b789d 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -56,6 +56,7 @@ import ( poolincentives "github.com/osmosis-labs/osmosis/x/pool-incentives" poolincentiveskeeper "github.com/osmosis-labs/osmosis/x/pool-incentives/keeper" poolincentivestypes "github.com/osmosis-labs/osmosis/x/pool-incentives/types" + "github.com/osmosis-labs/osmosis/x/txfees" txfeeskeeper "github.com/osmosis-labs/osmosis/x/txfees/keeper" txfeestypes "github.com/osmosis-labs/osmosis/x/txfees/types" ) @@ -260,7 +261,8 @@ func (app *OsmosisApp) InitNormalKeepers() { AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(*app.UpgradeKeeper)). AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)). AddRoute(poolincentivestypes.RouterKey, poolincentives.NewPoolIncentivesProposalHandler(*app.PoolIncentivesKeeper)). - AddRoute(bech32ibctypes.RouterKey, bech32ibc.NewBech32IBCProposalHandler(*app.Bech32IBCKeeper)) + AddRoute(bech32ibctypes.RouterKey, bech32ibc.NewBech32IBCProposalHandler(*app.Bech32IBCKeeper)). + AddRoute(txfeestypes.RouterKey, txfees.NewUpdateFeeTokenProposalHandler(*app.TxFeesKeeper)) govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], diff --git a/x/txfees/handler.go b/x/txfees/handler.go new file mode 100644 index 00000000000..c8b141f07a1 --- /dev/null +++ b/x/txfees/handler.go @@ -0,0 +1,25 @@ +package txfees + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "github.com/osmosis-labs/osmosis/x/txfees/keeper" + "github.com/osmosis-labs/osmosis/x/txfees/types" +) + +func NewUpdateFeeTokenProposalHandler(k keeper.Keeper) govtypes.Handler { + return func(ctx sdk.Context, content govtypes.Content) error { + switch c := content.(type) { + case *types.UpdateFeeTokenProposal: + return handleUpdateFeeTokenProposal(ctx, k, c) + default: + return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized txfees proposal content type: %T", c) + } + } +} + +func handleUpdateFeeTokenProposal(ctx sdk.Context, k keeper.Keeper, p *types.UpdateFeeTokenProposal) error { + return k.HandleUpdateFeeTokenProposal(ctx, p) +}