Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enable taker fee cli (backport #6334) #6335

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions app/keepers/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -89,6 +90,7 @@ var AppModuleBasics = []module.AppModuleBasic{
cwpoolclient.UploadCodeIdAndWhitelistProposalHandler,
cwpoolclient.MigratePoolContractsProposalHandler,
txfeesclient.SubmitUpdateFeeTokenProposalHandler,
poolmanagerclient.DenomPairTakerFeeProposalHandler,
)...,
),
params.AppModuleBasic{},
Expand Down
1 change: 1 addition & 0 deletions x/poolmanager/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
12 changes: 12 additions & 0 deletions x/poolmanager/client/proposal_handler.go
Original file line number Diff line number Diff line change
@@ -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)
)
20 changes: 20 additions & 0 deletions x/poolmanager/client/rest/tx.go
Original file line number Diff line number Diff line change
@@ -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) {
}
}