Skip to content

Commit

Permalink
Fix order for JoinSwapShareAmountOut CLI args (#3942)
Browse files Browse the repository at this point in the history
* fix order for JoinSwapShareAmountOut args

* Revert "fix order for JoinSwapShareAmountOut args"

This reverts commit 7991c1c.

* change help text

* add line to changelog

(cherry picked from commit 3e26ec2)

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
rrrliu authored and mergify[bot] committed Jan 9, 2023
1 parent 40e5320 commit 18be662
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [#3634](https://github.com/osmosis-labs/osmosis/pull/3634) (Makefile) Ensure correct golang version in make build and make install. (Thank you @jhernandezb )
<<<<<<< HEAD
* [#3712](https://github.com/osmosis-labs/osmosis/pull/3712) replace `osmomath.BigDec` `Power` with `PowerInteger`
<<<<<<< HEAD
=======
* [#3711](https://github.com/osmosis-labs/osmosis/pull/3711) Use Dec instead of Int for additive `ErrTolerace` in `osmoutils`.
* [3647](https://github.com/osmosis-labs/osmosis/pull/3647), [3942](https://github.com/osmosis-labs/osmosis/pull/3942) (CLI) re-order the command line arguments for `osmosisd tx gamm join-swap-share-amount-out`
>>>>>>> 3e26ec2e (Fix order for JoinSwapShareAmountOut CLI args (#3942))
=======
* [#3711](https://github.com/osmosis-labs/osmosis/pull/3711) Use Dec instead of Int for additive `ErrTolerace` in `osmoutils`.
Expand Down
6 changes: 3 additions & 3 deletions x/gamm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,15 @@ osmosisd tx gamm exit-swap-extern-amount-out 199430ibc/1480B8FD20AD5FCAE81EA8758
Swap a **maximum** amount of a specified token for another token, similar to swapping a token on the trade screen GUI (i.e. takes the specified asset and swaps it to the other asset needed to join the specified pool) and then adds an **exact** amount of LP shares to the specified pool.

```sh
osmosisd tx gamm join-swap-share-amount-out [token-in-denom] [token-in-max-amount] [share-out-amount] --pool-id --from --chain-id
osmosisd tx gamm join-swap-share-amount-out [token-in-denom] [share-out-amount] [token-in-max-amount] --pool-id --from --chain-id
```

::: details Example

Swap a **maximum** of `0.312466 OSMO` for the corresponding amount of `AKT`, then join `pool 3` and receive **exactly** `1.4481270389710236872 gamm/pool/3`:

```sh
osmosisd tx gamm join-swap-share-amount-out uosmo 312466 14481270389710236872 --pool-id 3 --from WALLET_NAME --chain-id osmosis-1
osmosisd tx gamm join-swap-share-amount-out uosmo 14481270389710236872 312466 --pool-id 3 --from WALLET_NAME --chain-id osmosis-1
```

:::
Expand Down Expand Up @@ -663,4 +663,4 @@ It consists of the following attributes:
* types.AttributeKeyTokensIn
* The value is the string representation of the tokens being swapped in.
* types.AttributeKeyTokensOut
* The value is the string representation of the tokens being swapped out.
* The value is the string representation of the tokens being swapped out.
2 changes: 1 addition & 1 deletion x/gamm/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func NewJoinSwapExternAmountIn() (*osmocli.TxCliDesc, *types.MsgJoinSwapExternAm

func NewJoinSwapShareAmountOut() (*osmocli.TxCliDesc, *types.MsgJoinSwapShareAmountOut) {
return &osmocli.TxCliDesc{
Use: "join-swap-share-amount-out [token-in-denom] [token-in-max-amount] [share-out-amount]",
Use: "join-swap-share-amount-out [token-in-denom] [share-out-amount] [token-in-max-amount] ",
Short: "join swap share amount out",
CustomFlagOverrides: poolIdFlagOverride,
Flags: osmocli.FlagDesc{RequiredFlags: []*flag.FlagSet{FlagSetJustPoolId()}},
Expand Down

0 comments on commit 18be662

Please sign in to comment.