diff --git a/CHANGELOG.md b/CHANGELOG.md index 07948798571..65d80d4d4a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -110,6 +110,11 @@ Fixes mainnet bugs w/ incorrect accumulation sumtrees, and CL handling for a bal * [#5964](https://github.com/osmosis-labs/osmosis/pull/5964) fix e2e test concurrency bugs * [#5948](https://github.com/osmosis-labs/osmosis/pull/5948) Parameterizing Pool Type Information in Protorev * [#6001](https://github.com/osmosis-labs/osmosis/pull/6001) feat: improve set-env CLI cmd +<<<<<<< HEAD +======= +* [#6005](https://github.com/osmosis-labs/osmosis/pull/6005) osmocli: parse Use field's arguments dynamically +* [#5953] (https://github.com/osmosis-labs/osmosis/pull/5953) Supporting two pool routes in ProtoRev +>>>>>>> c9cbb9cb (osmocli: parse `Use` field's arguments dynamically from a message (#6005)) * [#6012](https://github.com/osmosis-labs/osmosis/pull/6012) chore: add autocomplete to makefile ### Minor improvements & Bug Fixes diff --git a/go.mod b/go.mod index 33cd682b505..c3cfba530c3 100644 --- a/go.mod +++ b/go.mod @@ -21,10 +21,17 @@ require ( github.com/mattn/go-sqlite3 v1.14.17 github.com/ory/dockertest/v3 v3.10.0 github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 +<<<<<<< HEAD github.com/osmosis-labs/osmosis/osmomath v0.0.6 github.com/osmosis-labs/osmosis/osmoutils v0.0.6 github.com/osmosis-labs/osmosis/x/epochs v0.0.2 github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.8 +======= + github.com/osmosis-labs/osmosis/osmomath v0.0.3-dev.0.20230804142026-a81cfe3ddde7 + github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20230819081851-a85e510a6965 + github.com/osmosis-labs/osmosis/x/epochs v0.0.0-20230328024000-175ec88e4304 + github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.0-20230807183608-16c217dedde5 +>>>>>>> c9cbb9cb (osmocli: parse `Use` field's arguments dynamically from a message (#6005)) github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 github.com/spf13/cast v1.5.1 diff --git a/go.sum b/go.sum index 565f4a17de8..feb31156c52 100644 --- a/go.sum +++ b/go.sum @@ -961,6 +961,7 @@ github.com/osmosis-labs/cosmos-sdk v0.45.0-rc1.0.20230703010110-ed4eb883f2a6 h1: github.com/osmosis-labs/cosmos-sdk v0.45.0-rc1.0.20230703010110-ed4eb883f2a6/go.mod h1:9KGhMg+7ZWgZ50Wa/x8w/jN19O0TSqYLlqUj+2wwxLU= github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 h1:YlmchqTmlwdWSmrRmXKR+PcU96ntOd8u10vTaTZdcNY= github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI= +<<<<<<< HEAD github.com/osmosis-labs/osmosis/osmomath v0.0.6 h1:WNkVmeeudAqRFk5a4CChWsdxfiY/XLClT1i845L78ss= github.com/osmosis-labs/osmosis/osmomath v0.0.6/go.mod h1:UlftwozB+QObT3o0YfkuuyL9fsVdgoWt0dm6J7MLYnU= github.com/osmosis-labs/osmosis/osmoutils v0.0.6 h1:VI4wPzxXpdg5XEUaBugY9lADwxzw3H6lEJ0D+TZc4oE= @@ -969,6 +970,18 @@ github.com/osmosis-labs/osmosis/x/epochs v0.0.2 h1:aEeXHGCSJMgMtAvCucsD2RSaWZ8lI github.com/osmosis-labs/osmosis/x/epochs v0.0.2/go.mod h1:8dvJFHTpu6SIxmOaSaEw0tHnQ/Z9blf5qsF/ZJnMVHo= github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.8 h1:BUGowctYQT0vdPgULrvwraEsW+sS6DnbzndTLKLmWVY= github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.8/go.mod h1:sR0lpev9mcm9/9RY50T1og3UC3WpZAsINh/OmgrmFlg= +======= +github.com/osmosis-labs/osmosis/osmomath v0.0.3-dev.0.20230804142026-a81cfe3ddde7 h1:NTR4zfrPMP4pJ5T60zyZumBAnTWmTAQX/JSZLGrM9jI= +github.com/osmosis-labs/osmosis/osmomath v0.0.3-dev.0.20230804142026-a81cfe3ddde7/go.mod h1:UlftwozB+QObT3o0YfkuuyL9fsVdgoWt0dm6J7MLYnU= +github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230807183608-16c217dedde5 h1:j4ifxomFROGROHalqWwX7VPDgxOPotMB1GiAWdb03i4= +github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230807183608-16c217dedde5/go.mod h1:Pl8Nzx6O6ow/+aqfMoMSz4hX+zz6RrnDYsooptECGxM= +github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20230819081851-a85e510a6965 h1:K6tR6qLhz3bRUKBCsfpDu3JT0jyUELWZrhX3DBaqnjk= +github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20230819081851-a85e510a6965/go.mod h1:Pl8Nzx6O6ow/+aqfMoMSz4hX+zz6RrnDYsooptECGxM= +github.com/osmosis-labs/osmosis/x/epochs v0.0.0-20230328024000-175ec88e4304 h1:RIrWLzIiZN5Xd2JOfSOtGZaf6V3qEQYg6EaDTAkMnCo= +github.com/osmosis-labs/osmosis/x/epochs v0.0.0-20230328024000-175ec88e4304/go.mod h1:yPWoJTj5RKrXKUChAicp+G/4Ni/uVEpp27mi/FF/L9c= +github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.0-20230807183608-16c217dedde5 h1:clEegVniz0zTTBXKfg2oymKa63IYUxcrVXM+LtsvCpA= +github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.0-20230807183608-16c217dedde5/go.mod h1:sR0lpev9mcm9/9RY50T1og3UC3WpZAsINh/OmgrmFlg= +>>>>>>> c9cbb9cb (osmocli: parse `Use` field's arguments dynamically from a message (#6005)) github.com/osmosis-labs/wasmd v0.31.0-osmo-v16 h1:X747cZYdnqc/+RV48iPVeGprpVb/fUWSaKGsZUWrdbg= github.com/osmosis-labs/wasmd v0.31.0-osmo-v16/go.mod h1:Rf8zW/GgBQyFRRB4s62VQHWA6sTlMFSjoDQQpoq64iI= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= diff --git a/osmoutils/osmocli/dynamic.go b/osmoutils/osmocli/dynamic.go new file mode 100644 index 00000000000..c7cc1525bbc --- /dev/null +++ b/osmoutils/osmocli/dynamic.go @@ -0,0 +1,48 @@ +package osmocli + +import ( + "fmt" + "reflect" + "regexp" + "strings" + + "github.com/gogo/protobuf/proto" + + "github.com/osmosis-labs/osmosis/osmoutils" +) + +type Descriptor interface { + GetCustomFlagOverrides() map[string]string + AttachToUse(str string) +} + +// fields that are not provided as arguments +var nonAttachableFields []string = []string{"sender", "pagination", "owner", "admin"} + +// attachFieldsToUse extracts fields from reqP proto message and dynamically appends them into Use field +func attachFieldsToUse[reqP proto.Message](desc Descriptor) { + req := osmoutils.MakeNew[reqP]() + v := reflect.ValueOf(req).Type().Elem() // get underlying non-pointer struct + var useField string + for i := 0; i < v.NumField(); i++ { + fn := pascalToKebab(v.Field(i).Name) + + // if a field is parsed from a flag, skip it + if desc.GetCustomFlagOverrides()[fn] != "" || osmoutils.Contains(nonAttachableFields, fn) { + continue + } + + useField += fmt.Sprintf(" [%s]", fn) + } + + desc.AttachToUse(useField) +} + +// pascalToKebab converts PascalCase string to kebab-case string +func pascalToKebab(s string) string { + reg := regexp.MustCompile(`([a-z0-9])([A-Z])`) + s = reg.ReplaceAllString(s, `${1}-${2}`) + + // Convert everything to lowercase + return strings.ToLower(s) +} diff --git a/osmoutils/osmocli/dynamic_test.go b/osmoutils/osmocli/dynamic_test.go new file mode 100644 index 00000000000..32e60a13a5f --- /dev/null +++ b/osmoutils/osmocli/dynamic_test.go @@ -0,0 +1,116 @@ +package osmocli + +import ( + "testing" + + "github.com/stretchr/testify/require" + + clqueryproto "github.com/osmosis-labs/osmosis/v17/x/concentrated-liquidity/client/queryproto" + cltypes "github.com/osmosis-labs/osmosis/v17/x/concentrated-liquidity/types" + lockuptypes "github.com/osmosis-labs/osmosis/v17/x/lockup/types" +) + +// test-specific helper descriptor +type TestDescriptor interface { + Descriptor + GetUse() string +} + +type TestQueryDescriptor struct { + *QueryDescriptor +} + +func (tqd *TestQueryDescriptor) GetUse() string { + return tqd.Use +} + +type TestTxCliDescriptor struct { + *TxCliDesc +} + +func (ttxcd *TestTxCliDescriptor) GetUse() string { + return ttxcd.Use +} + +func TestAttachFieldsToUse(t *testing.T) { + tests := map[string]struct { + desc TestDescriptor + attachFunc func(Descriptor) + expectedUse string + }{ + "basic/TxCliDesc/attaches_2_args": { + desc: &TestTxCliDescriptor{ + &TxCliDesc{ + Use: "set-reward-receiver-address", + Short: "sets reward receiver address for the designated lock id", + Long: "sets reward receiver address for the designated lock id", + }, + }, + attachFunc: attachFieldsToUse[*lockuptypes.MsgSetRewardReceiverAddress], + expectedUse: "set-reward-receiver-address [lock-id] [reward-receiver]", + }, + "basic/QueryDescriptor/attaches_1_arg": { + desc: &TestQueryDescriptor{ + &QueryDescriptor{ + Use: "pool-accumulator-rewards", + Short: "Query pool accumulator rewards", + Long: `{{.Short}}{{.ExampleHeader}} + {{.CommandPrefix}} pool-accumulator-rewards 1`, + }, + }, + attachFunc: attachFieldsToUse[*clqueryproto.PoolAccumulatorRewardsRequest], + expectedUse: "pool-accumulator-rewards [pool-id]", + }, + "ignore_pagination/QueryDescriptor/no_args": { + desc: &TestQueryDescriptor{ + &QueryDescriptor{ + Use: "pools", + Short: "Query pools", + Long: `{{.Short}}{{.ExampleHeader}} + {{.CommandPrefix}} pools`, + }, + }, + attachFunc: attachFieldsToUse[*clqueryproto.PoolsRequest], + expectedUse: "pools", + }, + "ignore_owner/TxCliDesc/attach_2_args": { + desc: &TestTxCliDescriptor{ + &TxCliDesc{ + Use: "lock-tokens", + Short: "lock tokens into lockup pool from user account", + }, + }, + attachFunc: attachFieldsToUse[*lockuptypes.MsgLockTokens], + expectedUse: "lock-tokens [duration] [coins]", // in osmosis, this command takes duration from a flag, but here it is just for testing purposes + }, + "ignore_sender/TxCliDesc/attach_5_args": { // also tests that args are shown in kebab-case + desc: &TestTxCliDescriptor{ + &TxCliDesc{ + Use: "add-to-position", + Short: "add to an existing concentrated liquidity position", + Example: "osmosisd tx concentratedliquidity add-to-position 10 1000000000uosmo 10000000uion --from val --chain-id localosmosis -b block --keyring-backend test --fees 1000000uosmo", + }, + }, + attachFunc: attachFieldsToUse[*cltypes.MsgAddToPosition], + expectedUse: "add-to-position [position-id] [amount0] [amount1] [token-min-amount0] [token-min-amount1]", + }, + "ignore_custom_flag_overrides/TxCliDesc/": { + desc: &TestTxCliDescriptor{ + &TxCliDesc{ + Use: "lock-tokens", + Short: "lock tokens into lockup pool from user account", + CustomFlagOverrides: map[string]string{ + "duration": "duration", + }, + }, + }, + attachFunc: attachFieldsToUse[*lockuptypes.MsgLockTokens], + expectedUse: "lock-tokens [coins]", + }, + } + + for _, tt := range tests { + tt.attachFunc(tt.desc) + require.Equal(t, tt.desc.GetUse(), tt.expectedUse) + } +} diff --git a/osmoutils/osmocli/query_cmd_wrap.go b/osmoutils/osmocli/query_cmd_wrap.go index 86c8e777b2b..ef0b54d4fd6 100644 --- a/osmoutils/osmocli/query_cmd_wrap.go +++ b/osmoutils/osmocli/query_cmd_wrap.go @@ -39,6 +39,18 @@ type QueryDescriptor struct { numArgs int } +var _ Descriptor = &QueryDescriptor{} + +// Implement Descriptor interface +func (desc QueryDescriptor) GetCustomFlagOverrides() map[string]string { + return desc.CustomFlagOverrides +} + +// Implement Descriptor interface +func (desc *QueryDescriptor) AttachToUse(str string) { + desc.Use += str +} + func QueryIndexCmd(moduleName string) *cobra.Command { cmd := IndexCmd(moduleName) cmd.Short = fmt.Sprintf("Querying commands for the %s module", moduleName) @@ -89,6 +101,7 @@ func BuildQueryCli[reqP proto.Message, querier any](desc *QueryDescriptor, newQu } } + attachFieldsToUse[reqP](desc) cmd := &cobra.Command{ Use: desc.Use, Short: desc.Short, diff --git a/osmoutils/osmocli/tx_cmd_wrap.go b/osmoutils/osmocli/tx_cmd_wrap.go index 48725fe9e30..c1b07a54516 100644 --- a/osmoutils/osmocli/tx_cmd_wrap.go +++ b/osmoutils/osmocli/tx_cmd_wrap.go @@ -36,6 +36,18 @@ type TxCliDesc struct { CustomFieldParsers map[string]CustomFieldParserFn } +var _ Descriptor = &TxCliDesc{} + +// Implement Descriptor interface +func (desc TxCliDesc) GetCustomFlagOverrides() map[string]string { + return desc.CustomFlagOverrides +} + +// Implement Descriptor interface +func (desc *TxCliDesc) AttachToUse(str string) { + desc.Use += str +} + func AddTxCmd[M sdk.Msg](cmd *cobra.Command, f func() (*TxCliDesc, M)) { desc, _ := f() subCmd := BuildTxCli[M](desc) @@ -60,6 +72,8 @@ func BuildTxCli[M sdk.Msg](desc *TxCliDesc) *cobra.Command { return ParseFieldsFromFlagsAndArgs[M](flagAdvice, flags, args) } } + + attachFieldsToUse[M](desc) return desc.BuildCommandCustomFn() } diff --git a/x/concentrated-liquidity/client/cli/query.go b/x/concentrated-liquidity/client/cli/query.go index 4b5751f730f..e44fe07e280 100644 --- a/x/concentrated-liquidity/client/cli/query.go +++ b/x/concentrated-liquidity/client/cli/query.go @@ -31,7 +31,7 @@ func GetQueryCmd() *cobra.Command { func GetUserPositions() (*osmocli.QueryDescriptor, *queryproto.UserPositionsRequest) { return &osmocli.QueryDescriptor{ - Use: "user-positions [address]", + Use: "user-positions", Short: "Query user's positions", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} user-positions osmo12smx2wdlyttvyzvzg54y2vnqwq2qjateuf7thj`, @@ -43,7 +43,7 @@ func GetUserPositions() (*osmocli.QueryDescriptor, *queryproto.UserPositionsRequ func GetPositionById() (*osmocli.QueryDescriptor, *queryproto.PositionByIdRequest) { return &osmocli.QueryDescriptor{ - Use: "position-by-id [positionID]", + Use: "position-by-id", Short: "Query position by ID", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} position-by-id 53`, @@ -62,7 +62,7 @@ func GetCmdPools() (*osmocli.QueryDescriptor, *queryproto.PoolsRequest) { func GetClaimableSpreadRewards() (*osmocli.QueryDescriptor, *queryproto.ClaimableSpreadRewardsRequest) { return &osmocli.QueryDescriptor{ - Use: "claimable-spread-rewards [positionID]", + Use: "claimable-spread-rewards", Short: "Query claimable spread rewards", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} claimable-spread-rewards 53`, @@ -71,7 +71,7 @@ func GetClaimableSpreadRewards() (*osmocli.QueryDescriptor, *queryproto.Claimabl func GetClaimableIncentives() (*osmocli.QueryDescriptor, *queryproto.ClaimableIncentivesRequest) { return &osmocli.QueryDescriptor{ - Use: "claimable-incentives [positionID]", + Use: "claimable-incentives", Short: "Query claimable incentives", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} claimable-incentives 53`, @@ -80,7 +80,7 @@ func GetClaimableIncentives() (*osmocli.QueryDescriptor, *queryproto.ClaimableIn func GetIncentiveRecords() (*osmocli.QueryDescriptor, *queryproto.IncentiveRecordsRequest) { return &osmocli.QueryDescriptor{ - Use: "incentive-records [poolId]", + Use: "incentive-records", Short: "Query incentive records for a given pool", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} incentive-records 1`, @@ -89,7 +89,7 @@ func GetIncentiveRecords() (*osmocli.QueryDescriptor, *queryproto.IncentiveRecor func GetCFMMPoolIdLinkFromConcentratedPoolId() (*osmocli.QueryDescriptor, *queryproto.CFMMPoolIdLinkFromConcentratedPoolIdRequest) { return &osmocli.QueryDescriptor{ - Use: "cfmm-pool-link-from-cl [poolId]", + Use: "cfmm-pool-link-from-cl", Short: "Query cfmm pool id link from concentrated pool id", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} cfmm-pool-link-from-cl 1`, @@ -107,7 +107,7 @@ func GetTotalLiquidity() (*osmocli.QueryDescriptor, *queryproto.GetTotalLiquidit func GetTickLiquidityNetInDirection() (*osmocli.QueryDescriptor, *queryproto.LiquidityNetInDirectionRequest) { return &osmocli.QueryDescriptor{ - Use: "liquidity-net-in-direction [pool-id] [token-in-denom] [start-tick] [use-current-tick] [bound-tick] [use-no-bound]", + Use: "liquidity-net-in-direction", Short: "Query liquidity net in direction", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} 4 uosmo "[-18000000]" true "[-9000000]" true`, @@ -116,7 +116,7 @@ func GetTickLiquidityNetInDirection() (*osmocli.QueryDescriptor, *queryproto.Liq func GetPoolAccumulatorRewards() (*osmocli.QueryDescriptor, *queryproto.PoolAccumulatorRewardsRequest) { return &osmocli.QueryDescriptor{ - Use: "pool-accumulator-rewards [pool-id]", + Use: "pool-accumulator-rewards", Short: "Query pool accumulator rewards", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} pool-accumulator-rewards 1`, @@ -125,7 +125,7 @@ func GetPoolAccumulatorRewards() (*osmocli.QueryDescriptor, *queryproto.PoolAccu func GetTickAccumulatorTrackers() (*osmocli.QueryDescriptor, *queryproto.TickAccumulatorTrackersRequest) { return &osmocli.QueryDescriptor{ - Use: "tick-accumulator-trackers [pool-id] [tick-index]", + Use: "tick-accumulator-trackers", Short: "Query tick accumulator trackers", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} tick-accumulator-trackers 1 "[-18000000]"`, diff --git a/x/concentrated-liquidity/client/cli/tx.go b/x/concentrated-liquidity/client/cli/tx.go index f9f09ceb266..623e9b882cf 100644 --- a/x/concentrated-liquidity/client/cli/tx.go +++ b/x/concentrated-liquidity/client/cli/tx.go @@ -38,7 +38,7 @@ var poolIdFlagOverride = map[string]string{ func NewCreateConcentratedPoolCmd() (*osmocli.TxCliDesc, *clmodel.MsgCreateConcentratedPool) { return &osmocli.TxCliDesc{ - Use: "create-pool [denom-0] [denom-1] [tick-spacing] [spread-factor]", + Use: "create-pool", Short: "create a concentrated liquidity pool with the given denom pair, tick spacing, and spread factor", Long: "denom-1 (the quote denom), tick spacing, and spread factors must all be authorized by the concentrated liquidity module", Example: "osmosisd tx concentratedliquidity create-pool uion uosmo 100 0.01 --from val --chain-id osmosis-1 -b block --keyring-backend test --fees 1000uosmo", @@ -47,7 +47,7 @@ func NewCreateConcentratedPoolCmd() (*osmocli.TxCliDesc, *clmodel.MsgCreateConce func NewCreatePositionCmd() (*osmocli.TxCliDesc, *types.MsgCreatePosition) { return &osmocli.TxCliDesc{ - Use: "create-position [pool-id] [lower-tick] [upper-tick] [tokensProvided] [token-0-min-amount] [token-1-min-amount]", + Use: "create-position", Short: "create or add to existing concentrated liquidity position", Example: "osmosisd tx concentratedliquidity create-position 1 \"[-69082]\" 69082 10000uosmo,10000uion 0 0 --from val --chain-id osmosis-1 -b block --keyring-backend test --fees 1000uosmo", }, &types.MsgCreatePosition{} @@ -55,7 +55,7 @@ func NewCreatePositionCmd() (*osmocli.TxCliDesc, *types.MsgCreatePosition) { func NewAddToPositionCmd() (*osmocli.TxCliDesc, *types.MsgAddToPosition) { return &osmocli.TxCliDesc{ - Use: "add-to-position [position-id] [token-0] [token-1]", + Use: "add-to-position", Short: "add to an existing concentrated liquidity position", Example: "osmosisd tx concentratedliquidity add-to-position 10 1000000000uosmo 10000000uion --from val --chain-id localosmosis -b block --keyring-backend test --fees 1000000uosmo", }, &types.MsgAddToPosition{} @@ -63,7 +63,7 @@ func NewAddToPositionCmd() (*osmocli.TxCliDesc, *types.MsgAddToPosition) { func NewWithdrawPositionCmd() (*osmocli.TxCliDesc, *types.MsgWithdrawPosition) { return &osmocli.TxCliDesc{ - Use: "withdraw-position [position-id] [liquidity]", + Use: "withdraw-position", Short: "withdraw from an existing concentrated liquidity position", Example: "osmosisd tx concentratedliquidity withdraw-position 1 1000 --from val --chain-id localosmosis --keyring-backend=test --fees=1000uosmo", }, &types.MsgWithdrawPosition{} @@ -71,7 +71,7 @@ func NewWithdrawPositionCmd() (*osmocli.TxCliDesc, *types.MsgWithdrawPosition) { func NewCollectSpreadRewardsCmd() (*osmocli.TxCliDesc, *types.MsgCollectSpreadRewards) { return &osmocli.TxCliDesc{ - Use: "collect-spread-rewards [position-ids]", + Use: "collect-spread-rewards", Short: "collect spread rewards from liquidity position(s)", Example: "osmosisd tx concentratedliquidity collect-spread-rewards 998 --from val --chain-id localosmosis -b block --keyring-backend test --fees 1000000uosmo", }, &types.MsgCollectSpreadRewards{} @@ -79,7 +79,7 @@ func NewCollectSpreadRewardsCmd() (*osmocli.TxCliDesc, *types.MsgCollectSpreadRe func NewCollectIncentivesCmd() (*osmocli.TxCliDesc, *types.MsgCollectIncentives) { return &osmocli.TxCliDesc{ - Use: "collect-incentives [position-ids]", + Use: "collect-incentives", Short: "collect incentives from liquidity position(s)", Example: "osmosisd tx concentratedliquidity collect-incentives 1 --from val --chain-id localosmosis -b block --keyring-backend test --fees 10000uosmo", }, &types.MsgCollectIncentives{} @@ -87,7 +87,7 @@ func NewCollectIncentivesCmd() (*osmocli.TxCliDesc, *types.MsgCollectIncentives) func NewFungifyChargedPositionsCmd() (*osmocli.TxCliDesc, *types.MsgFungifyChargedPositions) { return &osmocli.TxCliDesc{ - Use: "fungify-positions [position-ids]", + Use: "fungify-positions", Short: "Combine fully charged positions within the same range into a new single fully charged position", Example: "osmosisd tx concentratedliquidity fungify-positions 1,2 --from val --keyring-backend test -b=block --chain-id=localosmosis --gas=1000000 --fees 20000uosmo", }, &types.MsgFungifyChargedPositions{} diff --git a/x/cosmwasmpool/client/cli/query.go b/x/cosmwasmpool/client/cli/query.go index e784e408162..2a38f96461a 100644 --- a/x/cosmwasmpool/client/cli/query.go +++ b/x/cosmwasmpool/client/cli/query.go @@ -34,7 +34,7 @@ func GetCmdPools() (*osmocli.QueryDescriptor, *queryproto.PoolsRequest) { func GetCmdContractInfoByPoolId() (*osmocli.QueryDescriptor, *queryproto.ContractInfoByPoolIdRequest) { return &osmocli.QueryDescriptor{ - Use: "contract-info [pool-id]", + Use: "contract-info", Short: "Query contract info by pool id", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} pools`, diff --git a/x/cosmwasmpool/client/cli/tx.go b/x/cosmwasmpool/client/cli/tx.go index 72ccf2f803c..b05e6be6c1b 100644 --- a/x/cosmwasmpool/client/cli/tx.go +++ b/x/cosmwasmpool/client/cli/tx.go @@ -30,7 +30,7 @@ func NewTxCmd() *cobra.Command { func NewCreateCWPoolCmd() (*osmocli.TxCliDesc, *model.MsgCreateCosmWasmPool) { return &osmocli.TxCliDesc{ - Use: "create-pool [code-id] [instantiate-msg] [sender]", + Use: "create-pool", Short: "create a cosmwasm pool", Example: "osmosisd tx cosmwasmpool create-pool 1 uion,uosmo --from lo-test1 --keyring-backend test --chain-id localosmosis --fees 875uosmo -b=block", NumArgs: 2, diff --git a/x/gamm/client/cli/query.go b/x/gamm/client/cli/query.go index ed9e6441a5e..ffe4aff670b 100644 --- a/x/gamm/client/cli/query.go +++ b/x/gamm/client/cli/query.go @@ -52,7 +52,7 @@ var customRouterFlagOverride = map[string]string{ // nolint: staticcheck func GetCmdPool() (*osmocli.QueryDescriptor, *types.QueryPoolRequest) { return &osmocli.QueryDescriptor{ - Use: "pool [poolID]", + Use: "pool", Short: "Query pool", // Deprecated: use x/poolmanager's Pool query. // nolint: staticcheck @@ -164,7 +164,7 @@ $ %s query gamm pool-params 1 func GetCmdTotalShares() *cobra.Command { return osmocli.SimpleQueryCmd[*types.QueryTotalSharesRequest]( - "total-share [poolID]", + "total-share", "Query total-share", `Query total-share. Example: @@ -189,7 +189,7 @@ Example: // Deprecated: use alternate in x/poolmanager. func GetCmdSpotPrice() (*osmocli.QueryDescriptor, *types.QuerySpotPriceRequest) { return &osmocli.QueryDescriptor{ - Use: "spot-price [quote-asset-denom] [base-asset-denom]", + Use: "spot-price", Short: "Query spot-price (LEGACY, arguments are reversed!!)", Long: `Query spot price (Legacy).{{.ExampleHeader}} {{.CommandPrefix}} spot-price 1 uosmo ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2 @@ -200,7 +200,7 @@ func GetCmdSpotPrice() (*osmocli.QueryDescriptor, *types.QuerySpotPriceRequest) // Deprecated: use alternate in x/poolmanager. func GetCmdEstimateSwapExactAmountIn() (*osmocli.QueryDescriptor, *types.QuerySwapExactAmountInRequest) { return &osmocli.QueryDescriptor{ - Use: "estimate-swap-exact-amount-in ", + Use: "estimate-swap-exact-amount-in", Short: "Query estimate-swap-exact-amount-in", Long: `Query estimate-swap-exact-amount-in.{{.ExampleHeader}} {{.CommandPrefix}} estimate-swap-exact-amount-in 1 osm11vmx8jtggpd9u7qr0t8vxclycz85u925sazglr7 1000stake --swap-route-pool-ids=2 --swap-route-pool-ids=3`, @@ -214,7 +214,7 @@ func GetCmdEstimateSwapExactAmountIn() (*osmocli.QueryDescriptor, *types.QuerySw // Deprecated: use alternate in x/poolmanager. func GetCmdEstimateSwapExactAmountOut() (*osmocli.QueryDescriptor, *types.QuerySwapExactAmountOutRequest) { return &osmocli.QueryDescriptor{ - Use: "estimate-swap-exact-amount-out ", + Use: "estimate-swap-exact-amount-out", Short: "Query estimate-swap-exact-amount-out", Long: `Query estimate-swap-exact-amount-out.{{.ExampleHeader}} {{.CommandPrefix}} estimate-swap-exact-amount-out 1 osm11vmx8jtggpd9u7qr0t8vxclycz85u925sazglr7 1000stake --swap-route-pool-ids=2 --swap-route-pool-ids=3`, @@ -317,7 +317,7 @@ $ %s query gamm pools-with-filter // GetCmdPoolType returns pool type given pool id. func GetCmdPoolType() *cobra.Command { return osmocli.SimpleQueryCmd[*types.QueryPoolTypeRequest]( - "pool-type ", + "pool-type", "Query pool type", `Query pool type Example: @@ -330,7 +330,7 @@ Example: // GetConcentratedPoolIdLinkFromCFMMRequest returns concentrated pool id that is linked to the given cfmm pool id. func GetConcentratedPoolIdLinkFromCFMMRequest() (*osmocli.QueryDescriptor, *types.QueryConcentratedPoolIdLinkFromCFMMRequest) { return &osmocli.QueryDescriptor{ - Use: "cl-pool-link-from-cfmm [poolID]", + Use: "cl-pool-link-from-cfmm", Short: "Query concentrated pool id link from cfmm pool id", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} cl-pool-link-from-cfmm 1`, @@ -342,7 +342,7 @@ func GetConcentratedPoolIdLinkFromCFMMRequest() (*osmocli.QueryDescriptor, *type // nolint: staticcheck func GetCmdTotalPoolLiquidity() *cobra.Command { return osmocli.SimpleQueryCmd[*types.QueryTotalPoolLiquidityRequest]( - "total-pool-liquidity [poolID]", + "total-pool-liquidity", "Query total-pool-liquidity", `Query total-pool-liquidity. Example: diff --git a/x/gamm/client/cli/tx.go b/x/gamm/client/cli/tx.go index f2d03f8b8d6..ff51c49d55c 100644 --- a/x/gamm/client/cli/tx.go +++ b/x/gamm/client/cli/tx.go @@ -49,7 +49,7 @@ var poolIdFlagOverride = map[string]string{ func NewCreatePoolCmd() *osmocli.TxCliDesc { desc := osmocli.TxCliDesc{ - Use: "create-pool [flags]", + Use: "create-pool", Short: "create a new pool and provide the liquidity to it", Long: `Must provide path to a pool JSON file (--pool-file) describing the pool to be created Sample pool JSON file contents for balancer: @@ -112,7 +112,7 @@ func NewExitPoolCmd() (*osmocli.TxCliDesc, *types.MsgExitPool) { func NewSwapExactAmountInCmd() (*osmocli.TxCliDesc, *types.MsgSwapExactAmountIn) { return &osmocli.TxCliDesc{ - Use: "swap-exact-amount-in [token-in] [token-out-min-amount]", + Use: "swap-exact-amount-in", Short: "swap exact amount in", CustomFieldParsers: map[string]osmocli.CustomFieldParserFn{ "Routes": osmocli.FlagOnlyParser(swapAmountInRoutes), @@ -124,7 +124,7 @@ func NewSwapExactAmountInCmd() (*osmocli.TxCliDesc, *types.MsgSwapExactAmountIn) func NewSwapExactAmountOutCmd() (*osmocli.TxCliDesc, *types.MsgSwapExactAmountOut) { // Can't get rid of this parser without a break, because the args are out of order. return &osmocli.TxCliDesc{ - Use: "swap-exact-amount-out [token-out] [token-in-max-amount]", + Use: "swap-exact-amount-out", Short: "swap exact amount out", NumArgs: 2, ParseAndBuildMsg: NewBuildSwapExactAmountOutMsg, @@ -134,7 +134,7 @@ func NewSwapExactAmountOutCmd() (*osmocli.TxCliDesc, *types.MsgSwapExactAmountOu func NewJoinSwapExternAmountIn() (*osmocli.TxCliDesc, *types.MsgJoinSwapExternAmountIn) { return &osmocli.TxCliDesc{ - Use: "join-swap-extern-amount-in [token-in] [share-out-min-amount]", + Use: "join-swap-extern-amount-in", Short: "join swap extern amount in", CustomFlagOverrides: poolIdFlagOverride, Flags: osmocli.FlagDesc{RequiredFlags: []*flag.FlagSet{FlagSetJustPoolId()}}, @@ -143,7 +143,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] [share-out-amount] [token-in-max-amount] ", + Use: "join-swap-share-amount-out", Short: "join swap share amount out", CustomFlagOverrides: poolIdFlagOverride, Flags: osmocli.FlagDesc{RequiredFlags: []*flag.FlagSet{FlagSetJustPoolId()}}, @@ -152,7 +152,7 @@ func NewJoinSwapShareAmountOut() (*osmocli.TxCliDesc, *types.MsgJoinSwapShareAmo func NewExitSwapExternAmountOut() (*osmocli.TxCliDesc, *types.MsgExitSwapExternAmountOut) { return &osmocli.TxCliDesc{ - Use: "exit-swap-extern-amount-out [token-out] [share-in-max-amount]", + Use: "exit-swap-extern-amount-out", Short: "exit swap extern amount out", CustomFlagOverrides: poolIdFlagOverride, Flags: osmocli.FlagDesc{RequiredFlags: []*flag.FlagSet{FlagSetJustPoolId()}}, @@ -161,7 +161,7 @@ func NewExitSwapExternAmountOut() (*osmocli.TxCliDesc, *types.MsgExitSwapExternA func NewExitSwapShareAmountIn() (*osmocli.TxCliDesc, *types.MsgExitSwapShareAmountIn) { return &osmocli.TxCliDesc{ - Use: "exit-swap-share-amount-in [token-out-denom] [share-in-amount] [token-out-min-amount]", + Use: "exit-swap-share-amount-in", Short: "exit swap share amount in", CustomFlagOverrides: poolIdFlagOverride, Flags: osmocli.FlagDesc{RequiredFlags: []*flag.FlagSet{FlagSetJustPoolId()}}, @@ -171,7 +171,7 @@ func NewExitSwapShareAmountIn() (*osmocli.TxCliDesc, *types.MsgExitSwapShareAmou // TODO: Change these flags to args. Required flags don't make that much sense. func NewStableSwapAdjustScalingFactorsCmd() *cobra.Command { cmd := osmocli.TxCliDesc{ - Use: "adjust-scaling-factors --pool-id=[pool-id] --scaling-factors=[scaling-factors]", + Use: "adjust-scaling-factors --pool-id=[pool-id] --scaling-factors=[scaling-factors]", Short: "adjust scaling factors", Example: "osmosisd adjust-scaling-factors --pool-id=1 --scaling-factors=\"100, 100\"", NumArgs: 0, diff --git a/x/gamm/pool-models/stableswap/util_test.go b/x/gamm/pool-models/stableswap/util_test.go index dc3c5b4ef47..900d0ad8a1f 100644 --- a/x/gamm/pool-models/stableswap/util_test.go +++ b/x/gamm/pool-models/stableswap/util_test.go @@ -15,7 +15,7 @@ func createTestPool(t *testing.T, poolLiquidity sdk.Coins, spreadFactor, exitFee pool, err := NewStableswapPool(1, PoolParams{ SwapFee: spreadFactor, - ExitFee: exitFee, + ExitFee: exitFee, }, poolLiquidity, scalingFactors, "", "") require.NoError(t, err) diff --git a/x/ibc-hooks/client/cli/query.go b/x/ibc-hooks/client/cli/query.go index 2a4eb3f5813..819579041cd 100644 --- a/x/ibc-hooks/client/cli/query.go +++ b/x/ibc-hooks/client/cli/query.go @@ -7,9 +7,10 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - "github.com/osmosis-labs/osmosis/x/ibc-hooks/keeper" "github.com/spf13/cobra" + "github.com/osmosis-labs/osmosis/x/ibc-hooks/keeper" + "github.com/osmosis-labs/osmosis/x/ibc-hooks/types" ) diff --git a/x/incentives/client/cli/cli_test.go b/x/incentives/client/cli/cli_test.go index 58262e27af4..4599f0326eb 100644 --- a/x/incentives/client/cli/cli_test.go +++ b/x/incentives/client/cli/cli_test.go @@ -9,7 +9,6 @@ import ( "github.com/osmosis-labs/osmosis/v18/x/incentives/types" ) - func TestGetCmdGauges(t *testing.T) { desc, _ := GetCmdGauges() tcs := map[string]osmocli.QueryCliTestCase[*types.GaugesRequest]{ diff --git a/x/incentives/client/cli/query.go b/x/incentives/client/cli/query.go index 01c751c1591..770a1202dd5 100644 --- a/x/incentives/client/cli/query.go +++ b/x/incentives/client/cli/query.go @@ -55,7 +55,7 @@ func GetCmdToDistributeCoins() (*osmocli.QueryDescriptor, *types.ModuleToDistrib // GetCmdGaugeByID returns a gauge by ID. func GetCmdGaugeByID() (*osmocli.QueryDescriptor, *types.GaugeByIDRequest) { return &osmocli.QueryDescriptor{ - Use: "gauge-by-id [id]", + Use: "gauge-by-id", Short: "Query gauge by id.", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} gauge-by-id 1 @@ -75,7 +75,7 @@ func GetCmdActiveGauges() (*osmocli.QueryDescriptor, *types.ActiveGaugesRequest) // GetCmdActiveGaugesPerDenom returns active gauges for a specified denom. func GetCmdActiveGaugesPerDenom() (*osmocli.QueryDescriptor, *types.ActiveGaugesPerDenomRequest) { return &osmocli.QueryDescriptor{ - Use: "active-gauges-per-den [den]denom [denom]", + Use: "active-gauges-per-denom", Short: "Query active gauges per denom", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} active-gauges-per-denom gamm/pool/1`, @@ -94,7 +94,7 @@ func GetCmdUpcomingGauges() (*osmocli.QueryDescriptor, *types.UpcomingGaugesRequ // GetCmdUpcomingGaugesPerDenom returns scheduled gauges for specified denom.. func GetCmdUpcomingGaugesPerDenom() (*osmocli.QueryDescriptor, *types.UpcomingGaugesPerDenomRequest) { return &osmocli.QueryDescriptor{ - Use: "upcoming-gauges-per-denom [denom]", + Use: "upcoming-gauges-per-denom", Short: "Query scheduled gauges per denom", Long: `{{.Short}}`, }, &types.UpcomingGaugesPerDenomRequest{} diff --git a/x/incentives/client/cli/tx.go b/x/incentives/client/cli/tx.go index ecb4da331d3..e526c7ce89a 100644 --- a/x/incentives/client/cli/tx.go +++ b/x/incentives/client/cli/tx.go @@ -124,7 +124,7 @@ func NewCreateGaugeCmd() *cobra.Command { func NewAddToGaugeCmd() *cobra.Command { return osmocli.BuildTxCli[*types.MsgAddToGauge](&osmocli.TxCliDesc{ - Use: "add-to-gauge [gauge_id] [rewards] [flags]", + Use: "add-to-gauge", Short: "add coins to gauge to distribute more rewards to users", }) } diff --git a/x/lockup/client/cli/query.go b/x/lockup/client/cli/query.go index 73be1498c67..d289ed7b21f 100644 --- a/x/lockup/client/cli/query.go +++ b/x/lockup/client/cli/query.go @@ -116,7 +116,7 @@ $ %s query lockup account-unlockable-coins
// GetCmdAccountUnlockingCoins returns unlocking coins of a specific account. func GetCmdAccountUnlockingCoins() (*osmocli.QueryDescriptor, *types.AccountUnlockingCoinsRequest) { return &osmocli.QueryDescriptor{ - Use: "account-unlocking-coins
", + Use: "account-unlocking-coins", Short: "Query account's unlocking coins", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} account-unlocking-coins
`, @@ -126,7 +126,7 @@ func GetCmdAccountUnlockingCoins() (*osmocli.QueryDescriptor, *types.AccountUnlo // GetCmdAccountLockedCoins returns locked coins that that are still in a locked state from the specified account. func GetCmdAccountLockedCoins() *cobra.Command { return osmocli.SimpleQueryCmd[*types.AccountLockedCoinsRequest]( - "account-locked-coins
", + "account-locked-coins", "Query account's locked coins", `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} account-locked-coins
@@ -136,7 +136,7 @@ func GetCmdAccountLockedCoins() *cobra.Command { // GetCmdAccountLockedPastTime returns locks of an account with unlock time beyond timestamp. func GetCmdAccountLockedPastTime() (*osmocli.QueryDescriptor, *types.AccountLockedPastTimeRequest) { return &osmocli.QueryDescriptor{ - Use: "account-locked-pastime
", + Use: "account-locked-pastime", Short: "Query locked records of an account with unlock time beyond timestamp", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} account-locked-pastime
@@ -148,7 +148,7 @@ func GetCmdAccountLockedPastTime() (*osmocli.QueryDescriptor, *types.AccountLock // amongst the locks that are in the unlocking queue. func GetCmdAccountLockedPastTimeNotUnlockingOnly() (*osmocli.QueryDescriptor, *types.AccountLockedPastTimeNotUnlockingOnlyRequest) { return &osmocli.QueryDescriptor{ - Use: "account-locked-pastime-not-unlocking
", + Use: "account-locked-pastime-not-unlocking", Short: "Query locked records of an account with unlock time beyond timestamp within not unlocking queue.", Long: `{{.Short}} Timestamp is UNIX time in seconds.{{.ExampleHeader}} @@ -160,7 +160,7 @@ Timestamp is UNIX time in seconds.{{.ExampleHeader}} // GetCmdAccountUnlockedBeforeTime returns locks with unlock time before the provided timestamp. func GetCmdAccountUnlockedBeforeTime() *cobra.Command { return osmocli.SimpleQueryCmd[*types.AccountUnlockedBeforeTimeRequest]( - "account-locked-beforetime
", + "account-locked-beforetime", "Query account's unlocked records before specific time", `{{.Short}} Timestamp is UNIX time in seconds.{{.ExampleHeader}} @@ -172,7 +172,7 @@ Timestamp is UNIX time in seconds.{{.ExampleHeader}} // beyond given timestamp, and locks with the specified denom. func GetCmdAccountLockedPastTimeDenom() *cobra.Command { return osmocli.SimpleQueryCmd[*types.AccountLockedPastTimeDenomRequest]( - "account-locked-pastime-denom
", + "account-locked-pastime-denom", "Query account's lock records by address, timestamp, denom", `{{.Short}} Timestamp is UNIX time in seconds.{{.ExampleHeader}} @@ -183,7 +183,7 @@ Timestamp is UNIX time in seconds.{{.ExampleHeader}} // GetCmdLockedByID returns lock by id. func GetCmdLockedByID() *cobra.Command { q := osmocli.QueryDescriptor{ - Use: "lock-by-id ", + Use: "lock-by-id", Short: "Query account's lock record by id", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} lock-by-id 1`, @@ -196,7 +196,7 @@ func GetCmdLockedByID() *cobra.Command { // GetCmdLockRewardReceiver returns reward receiver for the given lock id func GetCmdLockRewardReceiver() *cobra.Command { q := osmocli.QueryDescriptor{ - Use: "lock-reward-receiver ", + Use: "lock-reward-receiver", Short: "Query lock's reward receiver", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} lock-reward-receiver 1`, @@ -218,7 +218,7 @@ func GetCmdNextLockID() *cobra.Command { // nolint: staticcheck func GetCmdSyntheticLockupsByLockupID() *cobra.Command { return osmocli.SimpleQueryCmd[*types.SyntheticLockupsByLockupIDRequest]( - "synthetic-lockups-by-lock-id ", + "synthetic-lockups-by-lock-id", "Query synthetic lockups by lockup id (is deprecated for synthetic-lockup-by-lock-id)", `{{.Short}}`, types.ModuleName, types.NewQueryClient) } @@ -226,7 +226,7 @@ func GetCmdSyntheticLockupsByLockupID() *cobra.Command { // GetCmdSyntheticLockupByLockupID returns synthetic lockup by lockup id. func GetCmdSyntheticLockupByLockupID() *cobra.Command { return osmocli.SimpleQueryCmd[*types.SyntheticLockupByLockupIDRequest]( - "synthetic-lockup-by-lock-id ", + "synthetic-lockup-by-lock-id", "Query synthetic lock by underlying lockup id", `{{.Short}}`, types.ModuleName, types.NewQueryClient) } @@ -234,7 +234,7 @@ func GetCmdSyntheticLockupByLockupID() *cobra.Command { // GetCmdAccountLockedLongerDuration returns account locked records with longer duration. func GetCmdAccountLockedLongerDuration() *cobra.Command { return osmocli.SimpleQueryCmd[*types.AccountLockedLongerDurationRequest]( - "account-locked-longer-duration
", + "account-locked-longer-duration", "Query account locked records with longer duration", `{{.Short}}`, types.ModuleName, types.NewQueryClient) } @@ -242,7 +242,7 @@ func GetCmdAccountLockedLongerDuration() *cobra.Command { // GetCmdAccountLockedLongerDuration returns account locked records with longer duration. func GetCmdAccountLockedDuration() *cobra.Command { return osmocli.SimpleQueryCmd[*types.AccountLockedDurationRequest]( - "account-locked-duration
", + "account-locked-duration", "Query account locked records with a specific duration", `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} account-locked-duration osmo1yl6hdjhmkf37639730gffanpzndzdpmhxy9ep3 604800s`, types.ModuleName, types.NewQueryClient) @@ -251,7 +251,7 @@ func GetCmdAccountLockedDuration() *cobra.Command { // GetCmdAccountLockedLongerDurationNotUnlockingOnly returns account locked records with longer duration from unlocking only queue. func GetCmdAccountLockedLongerDurationNotUnlockingOnly() *cobra.Command { return osmocli.SimpleQueryCmd[*types.AccountLockedLongerDurationNotUnlockingOnlyRequest]( - "account-locked-longer-duration-not-unlocking
", + "account-locked-longer-duration-not-unlocking ", "Query account locked records with longer duration from unlocking only queue", `{{.Short}}`, types.ModuleName, types.NewQueryClient) } @@ -260,14 +260,14 @@ func GetCmdAccountLockedLongerDurationNotUnlockingOnly() *cobra.Command { // with longer duration than the given duration. func GetCmdAccountLockedLongerDurationDenom() *cobra.Command { return osmocli.SimpleQueryCmd[*types.AccountLockedLongerDurationDenomRequest]( - "account-locked-longer-duration-denom
", + "account-locked-longer-duration-denom", "Query locked records for a denom with longer duration", `{{.Short}}`, types.ModuleName, types.NewQueryClient) } func GetCmdTotalLockedByDenom() (*osmocli.QueryDescriptor, *types.LockedDenomRequest) { return &osmocli.QueryDescriptor{ - Use: "total-locked-of-denom ", + Use: "total-locked-of-denom", Short: "Query locked amount for a specific denom bigger then duration provided", Long: osmocli.FormatLongDescDirect(`{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} total-locked-of-denom uosmo --min-duration=0s`, types.ModuleName), diff --git a/x/lockup/client/cli/tx.go b/x/lockup/client/cli/tx.go index d8867375013..8a302f7434c 100644 --- a/x/lockup/client/cli/tx.go +++ b/x/lockup/client/cli/tx.go @@ -22,7 +22,7 @@ func GetTxCmd() *cobra.Command { func NewLockTokensCmd() (*osmocli.TxCliDesc, *types.MsgLockTokens) { return &osmocli.TxCliDesc{ - Use: "lock-tokens [tokens]", + Use: "lock-tokens", Short: "lock tokens into lockup pool from user account", CustomFlagOverrides: map[string]string{ "duration": FlagDuration, @@ -42,7 +42,7 @@ func NewBeginUnlockingAllCmd() (*osmocli.TxCliDesc, *types.MsgBeginUnlockingAll) // NewBeginUnlockByIDCmd unlocks individual period lock by ID. func NewBeginUnlockByIDCmd() (*osmocli.TxCliDesc, *types.MsgBeginUnlocking) { return &osmocli.TxCliDesc{ - Use: "begin-unlock-by-id [id]", + Use: "begin-unlock-by-id", Short: "begin unlock individual period lock by ID", CustomFlagOverrides: map[string]string{ "coins": FlagAmount, @@ -54,7 +54,7 @@ func NewBeginUnlockByIDCmd() (*osmocli.TxCliDesc, *types.MsgBeginUnlocking) { // NewForceUnlockByIdCmd force unlocks individual period lock by ID if proper permissions exist. func NewForceUnlockByIdCmd() (*osmocli.TxCliDesc, *types.MsgForceUnlock) { return &osmocli.TxCliDesc{ - Use: "force-unlock-by-id [id]", + Use: "force-unlock-by-id", Short: "force unlocks individual period lock by ID", Long: "force unlocks individual period lock by ID. if no amount provided, entire lock is unlocked", CustomFlagOverrides: map[string]string{ @@ -67,7 +67,7 @@ func NewForceUnlockByIdCmd() (*osmocli.TxCliDesc, *types.MsgForceUnlock) { // NewSetRewardReceiverAddress sets the reward receiver address. func NewSetRewardReceiverAddress() (*osmocli.TxCliDesc, *types.MsgSetRewardReceiverAddress) { return &osmocli.TxCliDesc{ - Use: "set-reward-receiver-address [lock-id] [reward-receiver]", + Use: "set-reward-receiver-address", Short: "sets reward receiver address for the designated lock id", Long: "sets reward receiver address for the designated lock id", }, &types.MsgSetRewardReceiverAddress{} diff --git a/x/pool-incentives/client/cli/query.go b/x/pool-incentives/client/cli/query.go index ec6503f1821..e807cdbc41e 100644 --- a/x/pool-incentives/client/cli/query.go +++ b/x/pool-incentives/client/cli/query.go @@ -27,7 +27,7 @@ func GetQueryCmd() *cobra.Command { // GetCmdGaugeIds takes the pool id and returns the matching gauge ids and durations. func GetCmdGaugeIds() *cobra.Command { return osmocli.SimpleQueryCmd[*types.QueryGaugeIdsRequest]( - "gauge-ids [pool-id]", + "gauge-ids", "Query the matching gauge ids and durations by pool id", `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} gauge-ids 1 diff --git a/x/poolmanager/client/cli/query.go b/x/poolmanager/client/cli/query.go index 0871c3794f7..77dcc019762 100644 --- a/x/poolmanager/client/cli/query.go +++ b/x/poolmanager/client/cli/query.go @@ -36,7 +36,7 @@ func GetQueryCmd() *cobra.Command { // GetCmdEstimateSwapExactAmountIn returns estimation of output coin when amount of x token input. func GetCmdEstimateSwapExactAmountIn() (*osmocli.QueryDescriptor, *queryproto.EstimateSwapExactAmountInRequest) { return &osmocli.QueryDescriptor{ - Use: "estimate-swap-exact-amount-in ", + Use: "estimate-swap-exact-amount-in", Short: "Query estimate-swap-exact-amount-in", Long: `Query estimate-swap-exact-amount-in.{{.ExampleHeader}} {{.CommandPrefix}} estimate-swap-exact-amount-in 1 1000stake --swap-route-pool-ids=2 --swap-route-pool-ids=3`, @@ -50,7 +50,7 @@ func GetCmdEstimateSwapExactAmountIn() (*osmocli.QueryDescriptor, *queryproto.Es // GetCmdEstimateSwapExactAmountOut returns estimation of input coin to get exact amount of x token output. func GetCmdEstimateSwapExactAmountOut() (*osmocli.QueryDescriptor, *queryproto.EstimateSwapExactAmountOutRequest) { return &osmocli.QueryDescriptor{ - Use: "estimate-swap-exact-amount-out ", + Use: "estimate-swap-exact-amount-out", Short: "Query estimate-swap-exact-amount-out", Long: `Query estimate-swap-exact-amount-out.{{.ExampleHeader}} {{.CommandPrefix}} estimate-swap-exact-amount-out 1 1000stake --swap-route-pool-ids=2 --swap-route-pool-ids=3`, @@ -82,7 +82,7 @@ func GetCmdAllPools() (*osmocli.QueryDescriptor, *queryproto.AllPoolsRequest) { // GetCmdPool returns pool information. func GetCmdPool() (*osmocli.QueryDescriptor, *queryproto.PoolRequest) { return &osmocli.QueryDescriptor{ - Use: "pool [poolID]", + Use: "pool", Short: "Query pool", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} pool 1`, @@ -91,7 +91,7 @@ func GetCmdPool() (*osmocli.QueryDescriptor, *queryproto.PoolRequest) { func GetCmdSpotPrice() (*osmocli.QueryDescriptor, *queryproto.SpotPriceRequest) { return &osmocli.QueryDescriptor{ - Use: "spot-price [base-asset-denom] [quote-asset-denom]", + Use: "spot-price", Short: "Query spot-price", Long: `Query spot-price {{.CommandPrefix}} spot-price 1 uosmo ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2 @@ -138,7 +138,7 @@ func EstimateSwapExactAmountOutParseArgs(args []string, fs *flag.FlagSet) (proto // GetCmdEstimateSinglePoolSwapExactAmountIn returns estimation of output coin when amount of x token input. func GetCmdEstimateSinglePoolSwapExactAmountIn() (*osmocli.QueryDescriptor, *queryproto.EstimateSinglePoolSwapExactAmountInRequest) { return &osmocli.QueryDescriptor{ - Use: "estimate-single-pool-swap-exact-amount-in ", + Use: "estimate-single-pool-swap-exact-amount-in", Short: "Query estimate-single-pool-swap-exact-amount-in", Long: `Query estimate-single-pool-swap-exact-amount-in.{{.ExampleHeader}} {{.CommandPrefix}} estimate-single-pool-swap-exact-amount-in 1 1000stake uosmo`, @@ -149,7 +149,7 @@ func GetCmdEstimateSinglePoolSwapExactAmountIn() (*osmocli.QueryDescriptor, *que // GetCmdEstimateSinglePoolSwapExactAmountOut returns estimation of input coin to get exact amount of x token output. func GetCmdEstimateSinglePoolSwapExactAmountOut() (*osmocli.QueryDescriptor, *queryproto.EstimateSinglePoolSwapExactAmountOutRequest) { return &osmocli.QueryDescriptor{ - Use: "estimate-single-pool-swap-exact-amount-out ", + Use: "estimate-single-pool-swap-exact-amount-out", Short: "Query estimate-single-pool-swap-exact-amount-out", Long: `Query estimate-single-pool-swap-exact-amount-out.{{.ExampleHeader}} {{.CommandPrefix}} estimate-single-pool-swap-exact-amount-out 1 uosmo 1000stake`, @@ -159,7 +159,7 @@ func GetCmdEstimateSinglePoolSwapExactAmountOut() (*osmocli.QueryDescriptor, *qu func GetCmdTotalPoolLiquidity() (*osmocli.QueryDescriptor, *queryproto.TotalPoolLiquidityRequest) { return &osmocli.QueryDescriptor{ - Use: "total-pool-liquidity [poolID]", + Use: "total-pool-liquidity", Short: "Query total-pool-liquidity", Long: `{{.Short}} {{.CommandPrefix}} total-pool-liquidity 1`, diff --git a/x/poolmanager/client/cli/tx.go b/x/poolmanager/client/cli/tx.go index 2f7ee1c7d74..9901e5426a7 100644 --- a/x/poolmanager/client/cli/tx.go +++ b/x/poolmanager/client/cli/tx.go @@ -41,7 +41,7 @@ func NewTxCmd() *cobra.Command { func NewSwapExactAmountInCmd() (*osmocli.TxCliDesc, *types.MsgSwapExactAmountIn) { return &osmocli.TxCliDesc{ - Use: "swap-exact-amount-in [token-in] [token-out-min-amount]", + Use: "swap-exact-amount-in", Short: "swap exact amount in", Example: "osmosisd tx poolmanager swap-exact-amount-in 2000000uosmo 1 --swap-route-pool-ids 5 --swap-route-denoms uion --from val --keyring-backend test -b=block --chain-id=localosmosis --fees 10000uosmo", CustomFieldParsers: map[string]osmocli.CustomFieldParserFn{ @@ -54,7 +54,7 @@ func NewSwapExactAmountInCmd() (*osmocli.TxCliDesc, *types.MsgSwapExactAmountIn) func NewSwapExactAmountOutCmd() (*osmocli.TxCliDesc, *types.MsgSwapExactAmountOut) { // Can't get rid of this parser without a break, because the args are out of order. return &osmocli.TxCliDesc{ - Use: "swap-exact-amount-out [token-out] [token-in-max-amount]", + Use: "swap-exact-amount-out", Short: "swap exact amount out", Example: "osmosisd tx poolmanager swap-exact-amount-out 100uion 1000000 --swap-route-pool-ids 1 --swap-route-denoms uosmo --from val --keyring-backend test -b=block --chain-id=localosmosis --fees 10000uosmo", NumArgs: 2, @@ -65,7 +65,7 @@ func NewSwapExactAmountOutCmd() (*osmocli.TxCliDesc, *types.MsgSwapExactAmountOu func NewSplitRouteSwapExactAmountIn() (*osmocli.TxCliDesc, *types.MsgSplitRouteSwapExactAmountIn) { return &osmocli.TxCliDesc{ - Use: "split-route-swap-exact-amount-in [token-in-denom] [token-out-min-amount] [flags]", + Use: "split-route-swap-exact-amount-in", Short: "split route swap exact amount in", Example: `osmosisd tx poolmanager split-route-swap-exact-amount-in uosmo 1 --routes-file="./routes.json" --from val --keyring-backend test -b=block --chain-id=localosmosis --fees 10000uosmo - routes.json @@ -111,7 +111,7 @@ func NewSplitRouteSwapExactAmountIn() (*osmocli.TxCliDesc, *types.MsgSplitRouteS func NewSplitRouteSwapExactAmountOut() (*osmocli.TxCliDesc, *types.MsgSplitRouteSwapExactAmountOut) { return &osmocli.TxCliDesc{ - Use: "split-route-swap-exact-amount-out [token-out-denom] [token-in-max-amount] [flags]", + Use: "split-route-swap-exact-amount-out", Short: "split route swap exact amount out", Example: `osmosisd tx poolmanager split-route-swap-exact-amount-out uosmo 1 --routes-file="./routes.json" --from val --keyring-backend test -b=block --chain-id=localosmosis --fees 10000uosmo - routes.json diff --git a/x/protorev/client/cli/query.go b/x/protorev/client/cli/query.go index e19224c1b60..e937ca8c351 100644 --- a/x/protorev/client/cli/query.go +++ b/x/protorev/client/cli/query.go @@ -53,7 +53,7 @@ func NewQueryNumberOfTradesCmd() (*osmocli.QueryDescriptor, *types.QueryGetProto // NewQueryProfitsByDenomCmd returns the command to query the profits of protorev by denom func NewQueryProfitsByDenomCmd() (*osmocli.QueryDescriptor, *types.QueryGetProtoRevProfitsByDenomRequest) { return &osmocli.QueryDescriptor{ - Use: "profits-by-denom [denom]", + Use: "profits-by-denom", Short: "Query the profits of protorev by denom", Long: `{{.Short}}{{.ExampleHeader}}{{.CommandPrefix}} profits-by-denom uosmo`, }, &types.QueryGetProtoRevProfitsByDenomRequest{} @@ -70,9 +70,9 @@ func NewQueryAllProfitsCmd() (*osmocli.QueryDescriptor, *types.QueryGetProtoRevA // NewQueryStatisticsByRoute returns the command to query the statistics of protorev by route func NewQueryStatisticsByRouteCmd() (*osmocli.QueryDescriptor, *types.QueryGetProtoRevStatisticsByRouteRequest) { return &osmocli.QueryDescriptor{ - Use: "statistics-by-route [route]", + Use: "statistics-by-route", Short: "Query statistics about a specific arbitrage route", - Long: `{{.Short}}{{.ExampleHeader}}{{.CommandPrefix}} statistics-by-route [1,2,3]`, + Long: `{{.Short}}{{.ExampleHeader}}{{.CommandPrefix}} statistics-by-route [1,2,3] `, CustomFieldParsers: map[string]osmocli.CustomFieldParserFn{"Route": parseRoute}, }, &types.QueryGetProtoRevStatisticsByRouteRequest{} } @@ -152,7 +152,7 @@ func NewQueryInfoByPoolTypeCmd() (*osmocli.QueryDescriptor, *types.QueryGetProto // NewQueryPoolCmd returns the command to query the pool id for a given denom pair stored via the highest liquidity method in ProtoRev func NewQueryPoolCmd() (*osmocli.QueryDescriptor, *types.QueryGetProtoRevPoolRequest) { return &osmocli.QueryDescriptor{ - Use: "pool [base_denom] [other_denom]", + Use: "pool", Short: "Query the pool id for a given denom pair stored via the highest liquidity method in ProtoRev", }, &types.QueryGetProtoRevPoolRequest{} } diff --git a/x/protorev/client/cli/tx.go b/x/protorev/client/cli/tx.go index ee8fc00bd15..ec07767b127 100644 --- a/x/protorev/client/cli/tx.go +++ b/x/protorev/client/cli/tx.go @@ -40,7 +40,7 @@ func NewCmdTx() *cobra.Command { // CmdSetDeveloperHotRoutes implements the command to set the protorev hot routes func CmdSetDeveloperHotRoutes() *osmocli.TxCliDesc { desc := osmocli.TxCliDesc{ - Use: "set-hot-routes [path/to/routes.json]", + Use: "set-hot-routes", Short: "set the protorev hot routes", Long: `Must provide a json file with all of the hot routes that will be set. Sample json file: @@ -84,7 +84,7 @@ func CmdSetDeveloperHotRoutes() *osmocli.TxCliDesc { // CmdSetDeveloperAccount implements the command to set the protorev developer account func CmdSetDeveloperAccount() (*osmocli.TxCliDesc, *types.MsgSetDeveloperAccount) { return &osmocli.TxCliDesc{ - Use: "set-developer-account [sdk.AccAddress]", + Use: "set-developer-account", Short: "set the protorev developer account", NumArgs: 1, ParseAndBuildMsg: func(clientCtx client.Context, args []string, flags *pflag.FlagSet) (sdk.Msg, error) { @@ -104,7 +104,7 @@ func CmdSetDeveloperAccount() (*osmocli.TxCliDesc, *types.MsgSetDeveloperAccount // CmdSetMaxPoolPointsPerTx implements the command to set the max pool points per tx func CmdSetMaxPoolPointsPerTx() (*osmocli.TxCliDesc, *types.MsgSetMaxPoolPointsPerTx) { return &osmocli.TxCliDesc{ - Use: "set-max-pool-points-per-tx [uint64]", + Use: "set-max-pool-points-per-tx", Short: "set the max pool points that can be consumed per tx", NumArgs: 1, ParseAndBuildMsg: func(clientCtx client.Context, args []string, flags *pflag.FlagSet) (sdk.Msg, error) { @@ -124,7 +124,7 @@ func CmdSetMaxPoolPointsPerTx() (*osmocli.TxCliDesc, *types.MsgSetMaxPoolPointsP // CmdSetMaxPoolPointsPerBlock implements the command to set the max pool points per block func CmdSetMaxPoolPointsPerBlock() (*osmocli.TxCliDesc, *types.MsgSetMaxPoolPointsPerBlock) { return &osmocli.TxCliDesc{ - Use: "set-max-pool-points-per-block [uint64]", + Use: "set-max-pool-points-per-block", Short: "set the max pool points that can be consumed per block", NumArgs: 1, ParseAndBuildMsg: func(clientCtx client.Context, args []string, flags *pflag.FlagSet) (sdk.Msg, error) { @@ -144,7 +144,7 @@ func CmdSetMaxPoolPointsPerBlock() (*osmocli.TxCliDesc, *types.MsgSetMaxPoolPoin // CmdSetInfoByPoolType implements the command to set the pool information used throughout the module func CmdSetInfoByPoolType() *osmocli.TxCliDesc { desc := osmocli.TxCliDesc{ - Use: "set-info-by-pool-type [path/to/pool_info.json]", + Use: "set-info-by-pool-type", Short: "set the protorev pool type info", Long: `Must provide a json file with all the pool info that will be set. This does NOT set info for a single pool type. All information must be provided across all pool types in the json file. @@ -178,7 +178,7 @@ func CmdSetInfoByPoolType() *osmocli.TxCliDesc { // CmdSetBaseDenoms implements the command to set the base denoms used in the highest liquidity method func CmdSetBaseDenoms() *osmocli.TxCliDesc { desc := osmocli.TxCliDesc{ - Use: "set-base-denoms [path/to/denoms.json]", + Use: "set-base-denoms", Short: "set the protorev base denoms", Long: `Must provide a json file with all the base denoms that will be set. Sample json file: diff --git a/x/superfluid/client/cli/query.go b/x/superfluid/client/cli/query.go index 4d7157816ea..2ad51bebd90 100644 --- a/x/superfluid/client/cli/query.go +++ b/x/superfluid/client/cli/query.go @@ -76,7 +76,7 @@ func GetCmdAllSuperfluidAssets() *cobra.Command { func GetCmdAssetMultiplier() *cobra.Command { return osmocli.SimpleQueryCmd[*types.AssetMultiplierRequest]( - "asset-multiplier [denom]", + "asset-multiplier", "Query asset multiplier by denom", `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} asset-multiplier gamm/pool/1 @@ -96,7 +96,7 @@ func GetCmdAllIntermediaryAccounts() *cobra.Command { func GetCmdConnectedIntermediaryAccount() *cobra.Command { return osmocli.SimpleQueryCmd[*types.ConnectedIntermediaryAccountRequest]( - "connected-intermediary-account [lock_id]", + "connected-intermediary-account", "Query connected intermediary account", `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} connected-intermediary-account 1 @@ -109,7 +109,7 @@ func GetCmdConnectedIntermediaryAccount() *cobra.Command { // delegator, validator, denom. func GetCmdSuperfluidDelegationAmount() *cobra.Command { return osmocli.SimpleQueryCmd[*types.SuperfluidDelegationAmountRequest]( - "superfluid-delegation-amount [delegator_address] [validator_address] [denom]", + "superfluid-delegation-amount", "Query coins superfluid delegated for a delegator, validator, denom", "", types.ModuleName, types.NewQueryClient, ) @@ -118,7 +118,7 @@ func GetCmdSuperfluidDelegationAmount() *cobra.Command { // GetCmdSuperfluidDelegationsByDelegator returns the coins superfluid delegated for the specified delegator. func GetCmdSuperfluidDelegationsByDelegator() *cobra.Command { return osmocli.SimpleQueryCmd[*types.SuperfluidDelegationAmountRequest]( - "superfluid-delegation-by-delegator [delegator_address]", + "superfluid-delegation-by-delegator", "Query coins superfluid delegated for the specified delegator", "", types.ModuleName, types.NewQueryClient, ) @@ -127,7 +127,7 @@ func GetCmdSuperfluidDelegationsByDelegator() *cobra.Command { // GetCmdSuperfluidUndelegationsByDelegator returns the coins superfluid undelegated for the specified delegator. func GetCmdSuperfluidUndelegationsByDelegator() *cobra.Command { return osmocli.SimpleQueryCmd[*types.SuperfluidUndelegationsByDelegatorRequest]( - "superfluid-undelegation-by-delegator [delegator_address]", + "superfluid-undelegation-by-delegator", "Query coins superfluid undelegated for the specified delegator", "", types.ModuleName, types.NewQueryClient, ) @@ -144,7 +144,7 @@ func GetCmdTotalSuperfluidDelegations() *cobra.Command { func GetCmdTotalDelegationByDelegator() *cobra.Command { return osmocli.SimpleQueryCmd[*types.QueryTotalDelegationByDelegatorRequest]( - "total-delegation-by-delegator [delegator_address]", + "total-delegation-by-delegator", "Query both superfluid delegation and normal delegation", "", types.ModuleName, types.NewQueryClient, ) diff --git a/x/superfluid/client/cli/tx.go b/x/superfluid/client/cli/tx.go index 898dd557e95..6de7db36762 100644 --- a/x/superfluid/client/cli/tx.go +++ b/x/superfluid/client/cli/tx.go @@ -83,21 +83,21 @@ func NewSuperfluidDelegateCmd() *cobra.Command { func NewSuperfluidUndelegateCmd() *cobra.Command { return osmocli.BuildTxCli[*types.MsgSuperfluidUndelegate](&osmocli.TxCliDesc{ - Use: "undelegate [lock_id] [flags]", + Use: "undelegate", Short: "superfluid undelegate a lock from a validator", }) } func NewSuperfluidUnbondLockCmd() *cobra.Command { return osmocli.BuildTxCli[*types.MsgSuperfluidUnbondLock](&osmocli.TxCliDesc{ - Use: "unbond-lock [lock_id] [flags]", + Use: "unbond-lock", Short: "unbond lock that has been superfluid staked", }) } func NewSuperfluidUndelegateAndUnbondLockCmd() *cobra.Command { return osmocli.BuildTxCli[*types.MsgSuperfluidUndelegateAndUnbondLock](&osmocli.TxCliDesc{ - Use: "undelegate-and-unbond-lock [lock_id] [coin]", + Use: "undelegate-and-unbond-lock", Short: "superfluid undelegate and unbond lock for the given amount of coin", }) } @@ -307,7 +307,7 @@ func NewCmdLockAndSuperfluidDelegate() *cobra.Command { func NewCmdUnPoolWhitelistedPool() *cobra.Command { return osmocli.BuildTxCli[*types.MsgUnPoolWhitelistedPool](&osmocli.TxCliDesc{ - Use: "unpool-whitelisted-pool [pool_id] [flags]", + Use: "unpool-whitelisted-pool", Short: "unpool whitelisted pool", }) } @@ -368,7 +368,7 @@ func NewCmdUpdateUnpoolWhitelistProposal() *cobra.Command { func NewCreateFullRangePositionAndSuperfluidDelegateCmd() (*osmocli.TxCliDesc, *types.MsgCreateFullRangePositionAndSuperfluidDelegate) { return &osmocli.TxCliDesc{ - Use: "create-full-range-position-and-sf-delegate [coins] [val_addr] [pool-id]", + Use: "create-full-range-position-and-sf-delegate", Short: "creates a full range concentrated position and superfluid delegates it to the provided validator", Example: "create-full-range-position-and-sf-delegate 100000000uosmo,10000udai 45 --from val --chain-id osmosis-1", }, &types.MsgCreateFullRangePositionAndSuperfluidDelegate{} @@ -411,7 +411,7 @@ func parseUpdateUnpoolWhitelistArgsToContent(flags *flag.FlagSet) (govtypes.Cont func NewAddToConcentratedLiquiditySuperfluidPositionCmd() (*osmocli.TxCliDesc, *types.MsgAddToConcentratedLiquiditySuperfluidPosition) { return &osmocli.TxCliDesc{ - Use: "add-to-superfluid-cl-position [position-id] [token-0] [token-1]", + Use: "add-to-superfluid-cl-position", Short: "add to an existing superfluid staked concentrated liquidity position", Example: "add-to-superfluid-cl-position 10 1000000000uosmo 10000000uion", }, &types.MsgAddToConcentratedLiquiditySuperfluidPosition{} @@ -419,7 +419,7 @@ func NewAddToConcentratedLiquiditySuperfluidPositionCmd() (*osmocli.TxCliDesc, * func NewUnlockAndMigrateSharesToFullRangeConcentratedPositionCmd() (*osmocli.TxCliDesc, *types.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition) { return &osmocli.TxCliDesc{ - Use: "unlock-and-migrate-to-cl [lock-id] [shares-to-migrate] [token-out-mins]", + Use: "unlock-and-migrate-to-cl", Short: "unlock and migrate gamm shares to full range concentrated position", Example: "unlock-and-migrate-cl 10 25000000000gamm/pool/2 1000000000uosmo,10000000uion", }, &types.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition{} diff --git a/x/tokenfactory/client/cli/query.go b/x/tokenfactory/client/cli/query.go index 2f3e2c255e6..8fd5a7ea346 100644 --- a/x/tokenfactory/client/cli/query.go +++ b/x/tokenfactory/client/cli/query.go @@ -32,7 +32,7 @@ func GetQueryCmd() *cobra.Command { func GetCmdDenomAuthorityMetadata() (*osmocli.QueryDescriptor, *types.QueryDenomAuthorityMetadataRequest) { return &osmocli.QueryDescriptor{ - Use: "denom-authority-metadata [denom] [flags]", + Use: "denom-authority-metadata", Short: "Get the authority metadata for a specific denom", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}} uatom`, @@ -41,7 +41,7 @@ func GetCmdDenomAuthorityMetadata() (*osmocli.QueryDescriptor, *types.QueryDenom func GetCmdDenomsFromCreator() (*osmocli.QueryDescriptor, *types.QueryDenomsFromCreatorRequest) { return &osmocli.QueryDescriptor{ - Use: "denoms-from-creator [creator address] [flags]", + Use: "denoms-from-creator", Short: "Returns a list of all tokens created by a specific creator address", Long: `{{.Short}}{{.ExampleHeader}} {{.CommandPrefix}}
`, diff --git a/x/tokenfactory/client/cli/tx.go b/x/tokenfactory/client/cli/tx.go index ad8267d0f91..5a5464e5b48 100644 --- a/x/tokenfactory/client/cli/tx.go +++ b/x/tokenfactory/client/cli/tx.go @@ -28,28 +28,28 @@ func GetTxCmd() *cobra.Command { func NewCreateDenomCmd() *cobra.Command { return osmocli.BuildTxCli[*types.MsgCreateDenom](&osmocli.TxCliDesc{ - Use: "create-denom [subdenom] [flags]", + Use: "create-denom", Short: "create a new denom from an account. (Costs osmo though!)", }) } func NewMintCmd() *cobra.Command { return osmocli.BuildTxCli[*types.MsgMint](&osmocli.TxCliDesc{ - Use: "mint [amount] [mint-to-address] [flags]", + Use: "mint", Short: "Mint a denom to an address. Must have admin authority to do so.", }) } func NewBurnCmd() *cobra.Command { return osmocli.BuildTxCli[*types.MsgBurn](&osmocli.TxCliDesc{ - Use: "burn [amount] [burn-from-address] [flags]", + Use: "burn", Short: "Burn tokens from an address. Must have admin authority to do so.", }) } func NewChangeAdminCmd() *cobra.Command { return osmocli.BuildTxCli[*types.MsgChangeAdmin](&osmocli.TxCliDesc{ - Use: "change-admin [denom] [new-admin-address] [flags]", + Use: "change-admin", Short: "Changes the admin address for a factory-created denom. Must have admin authority to do so.", }) } diff --git a/x/valset-pref/client/cli/query.go b/x/valset-pref/client/cli/query.go index dce94471902..2032fab4c75 100644 --- a/x/valset-pref/client/cli/query.go +++ b/x/valset-pref/client/cli/query.go @@ -18,7 +18,7 @@ func GetQueryCmd() *cobra.Command { // GetCmdValSetPref takes the address and returns the existing validator set for that address. func GetCmdValSetPref() *cobra.Command { return osmocli.SimpleQueryCmd[*queryproto.UserValidatorPreferencesRequest]( - "val-set [address]", + "val-set", "Query the validator set for a specific user address", "", types.ModuleName, queryproto.NewQueryClient, ) diff --git a/x/valset-pref/client/cli/tx.go b/x/valset-pref/client/cli/tx.go index 88cf636ee77..2ca198cdaf2 100644 --- a/x/valset-pref/client/cli/tx.go +++ b/x/valset-pref/client/cli/tx.go @@ -9,6 +9,7 @@ import ( "github.com/spf13/pflag" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/osmosis-labs/osmosis/osmoutils" "github.com/osmosis-labs/osmosis/osmoutils/osmocli" "github.com/osmosis-labs/osmosis/v18/x/valset-pref/types" @@ -26,7 +27,7 @@ func GetTxCmd() *cobra.Command { func NewSetValSetCmd() (*osmocli.TxCliDesc, *types.MsgSetValidatorSetPreference) { return &osmocli.TxCliDesc{ - Use: "set-valset [delegator_addr] [validators] [weights]", + Use: "set-valset", Short: "Creates a new validator set for the delegator with valOperAddress and weight", Example: "osmosisd tx valset-pref set-valset osmo1... osmovaloper1abc...,osmovaloper1def... 0.56,0.44", NumArgs: 3, @@ -36,7 +37,7 @@ func NewSetValSetCmd() (*osmocli.TxCliDesc, *types.MsgSetValidatorSetPreference) func NewDelValSetCmd() (*osmocli.TxCliDesc, *types.MsgDelegateToValidatorSet) { return &osmocli.TxCliDesc{ - Use: "delegate-valset [delegator_addr] [amount]", + Use: "delegate-valset", Short: "Delegate tokens to existing valset using delegatorAddress and tokenAmount.", Example: "osmosisd tx valset-pref delegate-valset osmo1... 100stake", NumArgs: 2, @@ -45,7 +46,7 @@ func NewDelValSetCmd() (*osmocli.TxCliDesc, *types.MsgDelegateToValidatorSet) { func NewUnDelValSetCmd() (*osmocli.TxCliDesc, *types.MsgUndelegateFromValidatorSet) { return &osmocli.TxCliDesc{ - Use: "undelegate-valset [delegator_addr] [amount]", + Use: "undelegate-valset", Short: "UnDelegate tokens from existing valset using delegatorAddress and tokenAmount.", Example: "osmosisd tx valset-pref undelegate-valset osmo1... 100stake", NumArgs: 2, @@ -54,7 +55,7 @@ func NewUnDelValSetCmd() (*osmocli.TxCliDesc, *types.MsgUndelegateFromValidatorS func NewReDelValSetCmd() (*osmocli.TxCliDesc, *types.MsgRedelegateValidatorSet) { return &osmocli.TxCliDesc{ - Use: "redelegate-valset [delegator_addr] [validators] [weights]", + Use: "redelegate-valset", Short: "Redelegate tokens from existing validators to new sets of validators", Example: "osmosisd tx valset-pref redelegate-valset osmo1... osmovaloper1efg...,osmovaloper1hij... 0.56,0.44", NumArgs: 3, @@ -64,7 +65,7 @@ func NewReDelValSetCmd() (*osmocli.TxCliDesc, *types.MsgRedelegateValidatorSet) func NewWithRewValSetCmd() (*osmocli.TxCliDesc, *types.MsgWithdrawDelegationRewards) { return &osmocli.TxCliDesc{ - Use: "withdraw-reward-valset [delegator_addr]", + Use: "withdraw-reward-valset", Short: "Withdraw delegation reward form the new validator set.", Example: "osmosisd tx valset-pref withdraw-valset osmo1...", NumArgs: 1,