From 49a00ae3ebf2bf19e37c37fbc40a0cb8430db4be Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 8 Jan 2023 23:19:25 -0500 Subject: [PATCH] Fix order for JoinSwapShareAmountOut CLI args (#3942) (#3949) * fix order for JoinSwapShareAmountOut args * Revert "fix order for JoinSwapShareAmountOut args" This reverts commit 7991c1c2f6042b10b7c8621f07c7eec692fcea2e. * change help text * add line to changelog (cherry picked from commit 3e26ec2e1bf66becfbf8d9b8606fce7dd3e0cbe5) Co-authored-by: Richard Liu --- CHANGELOG.md | 1 + x/gamm/README.md | 6 +++--- x/gamm/client/cli/tx.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbd1c2639ab..cc387055563 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -94,6 +94,7 @@ Additionally, the swagger files for v13 have been updated to improve compatibili * [#3634](https://github.com/osmosis-labs/osmosis/pull/3634) (Makefile) Ensure correct golang version in make build and make install. (Thank you @jhernandezb ) * [#3712](https://github.com/osmosis-labs/osmosis/pull/3712) replace `osmomath.BigDec` `Power` with `PowerInteger` * [#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` ### Bug fixes diff --git a/x/gamm/README.md b/x/gamm/README.md index 0b5be0da411..7f4ea58582d 100644 --- a/x/gamm/README.md +++ b/x/gamm/README.md @@ -366,7 +366,7 @@ 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 @@ -374,7 +374,7 @@ osmosisd tx gamm join-swap-share-amount-out [token-in-denom] [token-in-max-amoun 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 ``` ::: @@ -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. \ No newline at end of file + * The value is the string representation of the tokens being swapped out. diff --git a/x/gamm/client/cli/tx.go b/x/gamm/client/cli/tx.go index 7c8851a71c5..0e0964a4e83 100644 --- a/x/gamm/client/cli/tx.go +++ b/x/gamm/client/cli/tx.go @@ -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()}},