chore: improve align cli help (#18179)

This commit is contained in:
Julien Robert 2023-10-20 12:29:46 +02:00 committed by GitHub
parent 2ad6a33bbc
commit 7421783eda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 33 deletions

View File

@ -33,9 +33,8 @@ timestamp.`,
RpcMethod: "CreatePermanentLockedAccount",
Use: "create-permanent-locked-account [to_address] [amount]",
Short: "Create a new permanently locked account funded with an allocation of tokens.",
Long: `Create a new account funded with an allocation of permanently locked tokens. These
tokens may be used for staking but are non-transferable. Staking rewards will acrue as liquid and transferable
tokens.`,
Long: `Create a new account funded with an allocation of permanently locked tokens.
These tokens may be used for staking but are non-transferable. Staking rewards will acrue as liquid and transferable tokens.`,
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "to_address"},
{ProtoField: "amount", Varargs: true},

View File

@ -79,9 +79,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
Short: "Query for send enabled entries",
Long: strings.TrimSpace(`Query for send enabled entries that have been specifically set.
To look up one or more specific denoms, supply them as arguments to this command.
To look up all denoms, do not provide any arguments.
`,
To look up one or more specific denoms, supply them as arguments to this command.
To look up all denoms, do not provide any arguments.`,
),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "denoms"}},
},
@ -96,9 +95,9 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
Use: "send [from_key_or_address] [to_address] [amount]",
Short: "Send funds from one account to another.",
Long: `Send funds from one account to another.
Note, the '--from' flag is ignored as it is implied from [from_key_or_address].
When using '--dry-run' a key name cannot be used, only a bech32 address.
Note: multiple coins can be send by space separated.`,
Note, the '--from' flag is ignored as it is implied from [from_key_or_address].
When using '--dry-run' a key name cannot be used, only a bech32 address.
Note: multiple coins can be send by space separated.`,
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "from_address"}, {ProtoField: "to_address"}, {ProtoField: "amount", Varargs: true}},
},
{

View File

@ -40,9 +40,9 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
Use: "authorize [grantee] [permissions_json] --from [granter]",
Short: "Authorize an account to trip the circuit breaker.",
Long: `Authorize an account to trip the circuit breaker.
"SOME_MSGS" = 1,
"ALL_MSGS" = 2,
"SUPER_ADMIN" = 3,`,
"SOME_MSGS" = 1,
"ALL_MSGS" = 2,
"SUPER_ADMIN" = 3,`,
Example: fmt.Sprintf(`%s circuit authorize [address] '{"level":1,"limit_type_urls":["cosmos.bank.v1beta1.MsgSend,cosmos.bank.v1beta1.MsgMultiSend"]}'"`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "grantee"},

View File

@ -9,11 +9,6 @@ import (
"github.com/cosmos/cosmos-sdk/version"
)
var (
FlagCommission = "commission"
FlagMaxMessagesPerTx = "max-msgs"
)
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
return &autocliv1.ModuleOptions{

View File

@ -2,7 +2,6 @@ package module
import (
"fmt"
"strings"
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
feegrantv1beta1 "cosmossdk.io/api/cosmos/feegrant/v1beta1"
@ -19,10 +18,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
RpcMethod: "Allowance",
Use: "grant [granter] [grantee]",
Short: "Query details of a single grant",
Long: strings.TrimSpace(
`Query details for a grant.
You can find the fee-grant of a granter and grantee.`),
Example: fmt.Sprintf(`$ %s query feegrant grant [granter] [grantee]`, version.AppName),
Long: "Query details for a grant. You can find the fee-grant of a granter and grantee.",
Example: fmt.Sprintf(`$ %s query feegrant grant [granter] [grantee]`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "granter"},
{ProtoField: "grantee"},

View File

@ -171,16 +171,16 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
RpcMethod: "Vote",
Use: "vote [proposal-id] [voter] [vote-option] [metadata]",
Long: `Vote on a proposal.
Parameters:
proposal-id: unique ID of the proposal
voter: voter account addresses.
vote-option: choice of the voter(s)
VOTE_OPTION_UNSPECIFIED: no-op
VOTE_OPTION_NO: no
VOTE_OPTION_YES: yes
VOTE_OPTION_ABSTAIN: abstain
VOTE_OPTION_NO_WITH_VETO: no-with-veto
Metadata: metadata for the vote
Parameters:
proposal-id: unique ID of the proposal
voter: voter account addresses.
vote-option: choice of the voter(s)
VOTE_OPTION_UNSPECIFIED: no-op
VOTE_OPTION_NO: no
VOTE_OPTION_YES: yes
VOTE_OPTION_ABSTAIN: abstain
VOTE_OPTION_NO_WITH_VETO: no-with-veto
Metadata: metadata for the vote
`,
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "proposal_id"}, {ProtoField: "voter"}, {ProtoField: "option"}, {ProtoField: "metadata"},

View File

@ -120,7 +120,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
RpcMethod: "HistoricalInfo",
Use: "historical-info [height]",
Short: "Query historical info at given height",
Long: "Query historical info at given height.",
Example: fmt.Sprintf("$ %s query staking historical-info 5", version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "height"},