diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e01e39e8c2..a3e6dfcec4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Bug Fixes + +* [#6334](https://github.com/osmosis-labs/osmosis/pull/6334) fix: enable taker fee cli + ### API Breaks * [#6256](https://github.com/osmosis-labs/osmosis/pull/6256) Refactor CalcPriceToTick to operate on BigDec price to support new price range. diff --git a/app/keepers/modules.go b/app/keepers/modules.go index b3875966948..d305eb48f7b 100644 --- a/app/keepers/modules.go +++ b/app/keepers/modules.go @@ -43,6 +43,7 @@ import ( "github.com/osmosis-labs/osmosis/v19/x/mint" poolincentives "github.com/osmosis-labs/osmosis/v19/x/pool-incentives" poolincentivesclient "github.com/osmosis-labs/osmosis/v19/x/pool-incentives/client" + poolmanagerclient "github.com/osmosis-labs/osmosis/v19/x/poolmanager/client" poolmanager "github.com/osmosis-labs/osmosis/v19/x/poolmanager/module" "github.com/osmosis-labs/osmosis/v19/x/protorev" superfluid "github.com/osmosis-labs/osmosis/v19/x/superfluid" @@ -89,6 +90,7 @@ var AppModuleBasics = []module.AppModuleBasic{ cwpoolclient.UploadCodeIdAndWhitelistProposalHandler, cwpoolclient.MigratePoolContractsProposalHandler, txfeesclient.SubmitUpdateFeeTokenProposalHandler, + poolmanagerclient.DenomPairTakerFeeProposalHandler, )..., ), params.AppModuleBasic{}, diff --git a/x/poolmanager/client/cli/tx.go b/x/poolmanager/client/cli/tx.go index c41ff646fd3..98174561a08 100644 --- a/x/poolmanager/client/cli/tx.go +++ b/x/poolmanager/client/cli/tx.go @@ -34,6 +34,7 @@ func NewTxCmd() *cobra.Command { osmocli.AddTxCmd(txCmd, NewSwapExactAmountOutCmd) osmocli.AddTxCmd(txCmd, NewSplitRouteSwapExactAmountIn) osmocli.AddTxCmd(txCmd, NewSplitRouteSwapExactAmountOut) + txCmd.AddCommand(NewSetDenomPairTakerFeeCmd()) txCmd.AddCommand( NewCreatePoolCmd(), diff --git a/x/poolmanager/client/proposal_handler.go b/x/poolmanager/client/proposal_handler.go new file mode 100644 index 00000000000..8ac1788cdf5 --- /dev/null +++ b/x/poolmanager/client/proposal_handler.go @@ -0,0 +1,12 @@ +package client + +import ( + "github.com/osmosis-labs/osmosis/v19/x/poolmanager/client/cli" + "github.com/osmosis-labs/osmosis/v19/x/poolmanager/client/rest" + + govclient "github.com/cosmos/cosmos-sdk/x/gov/client" +) + +var ( + DenomPairTakerFeeProposalHandler = govclient.NewProposalHandler(cli.NewCmdHandleDenomPairTakerFeeProposal, rest.ProposalDenomPairTakerFeeRESTHandler) +) diff --git a/x/poolmanager/client/rest/tx.go b/x/poolmanager/client/rest/tx.go new file mode 100644 index 00000000000..def4d83f901 --- /dev/null +++ b/x/poolmanager/client/rest/tx.go @@ -0,0 +1,20 @@ +package rest + +import ( + "net/http" + + "github.com/cosmos/cosmos-sdk/client" + govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" +) + +func ProposalDenomPairTakerFeeRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { + return govrest.ProposalRESTHandler{ + SubRoute: "denom-pair-taker-fee", + Handler: emptyHandler(clientCtx), + } +} + +func emptyHandler(clientCtx client.Context) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + } +}