feat: bring autocli module config to v0.50 (#18111)
This commit is contained in:
parent
9c2c424a1e
commit
18733a684e
@ -76,6 +76,14 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
},
|
||||
},
|
||||
},
|
||||
// Tx is purposely left empty, as the only tx is MsgUpdateParams which is gov gated.
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: authv1beta1.Msg_ServiceDesc.ServiceName,
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "UpdateParams",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
48
x/auth/vesting/autocli.go
Normal file
48
x/auth/vesting/autocli.go
Normal file
@ -0,0 +1,48 @@
|
||||
package vesting
|
||||
|
||||
import (
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
vestingv1beta1 "cosmossdk.io/api/cosmos/vesting/v1beta1"
|
||||
)
|
||||
|
||||
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
|
||||
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
return &autocliv1.ModuleOptions{
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: vestingv1beta1.Msg_ServiceDesc.ServiceName,
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "CreateVestingAccount",
|
||||
Use: "create-vesting-account [to_address] [end_time] [amount]",
|
||||
Short: "Create a new vesting account funded with an allocation of tokens.",
|
||||
Long: `Create a new vesting account funded with an allocation of tokens. The
|
||||
account can either be a delayed or continuous vesting account, which is determined
|
||||
by the '--delayed' flag. All vesting accounts created will have their start time
|
||||
set by the committed block's time. The end_time must be provided as a UNIX epoch
|
||||
timestamp.`,
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "to_address"},
|
||||
{ProtoField: "end_time"},
|
||||
{ProtoField: "amount", Varargs: true},
|
||||
},
|
||||
FlagOptions: map[string]*autocliv1.FlagOptions{
|
||||
"delayed": {Name: "delayed", Usage: "Create a delayed vesting account if true"},
|
||||
},
|
||||
},
|
||||
{
|
||||
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.`,
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "to_address"},
|
||||
{ProtoField: "amount", Varargs: true},
|
||||
},
|
||||
},
|
||||
},
|
||||
EnhanceCustomCommand: false, // use custom commands only until v0.51
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -47,7 +47,30 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
},
|
||||
},
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: authzv1beta1.Msg_ServiceDesc.ServiceName,
|
||||
Service: authzv1beta1.Msg_ServiceDesc.ServiceName,
|
||||
EnhanceCustomCommand: false, // use custom commands only until v0.51
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "Exec",
|
||||
Use: "exec [msg-json-file] --from [grantee]",
|
||||
Short: "Execute tx on behalf of granter account",
|
||||
Example: fmt.Sprintf("$ %s tx authz exec msg.json --from grantee\n $ %[1]s tx bank send [granter] [recipient] [amount] --generate-only | jq .body.messages > msg.json && %[1]s tx authz exec msg.json --from grantee", version.AppName),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "msgs", Varargs: true},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "Revoke",
|
||||
Use: "revoke [grantee] [msg-type-url] --from [granter]",
|
||||
Short: `Revoke authorization from a granter to a grantee`,
|
||||
Example: fmt.Sprintf(`%s tx authz revoke cosmos1skj.. %s --from=cosmos1skj..`,
|
||||
version.AppName, bank.SendAuthorization{}.MsgTypeURL()),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "grantee"},
|
||||
{ProtoField: "msg_type_url"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,5 +87,33 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
},
|
||||
},
|
||||
},
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: bankv1beta1.Msg_ServiceDesc.ServiceName,
|
||||
EnhanceCustomCommand: false, // use custom commands only until v0.51
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "Send",
|
||||
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.`,
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "from_address"}, {ProtoField: "to_address"}, {ProtoField: "amount", Varargs: true}},
|
||||
},
|
||||
{
|
||||
RpcMethod: "UpdateParams",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
{
|
||||
RpcMethod: "SetSendEnabled",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
{
|
||||
RpcMethod: "Burn",
|
||||
Skip: true, // skipped because available from v0.51
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,6 +23,14 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
"comet": cmtservice.CometBFTAutoCLIDescriptor,
|
||||
},
|
||||
},
|
||||
// Tx is purposely left empty, as the only tx is MsgUpdateParams which is gov gated.
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: consensusv1.Msg_ServiceDesc.ServiceName,
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "UpdateParams",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package distribution
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
distirbuitonv1beta1 "cosmossdk.io/api/cosmos/distribution/v1beta1"
|
||||
@ -17,11 +16,6 @@ var (
|
||||
|
||||
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
|
||||
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
exAccAddress, err := am.ac.BytesToString([]byte("A58856F0FD53BF058B4909A21AEC019107BA6A58856F0FD53BF058B4909A21AEC019107BA6"))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return &autocliv1.ModuleOptions{
|
||||
Query: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: distirbuitonv1beta1.Query_ServiceDesc.ServiceName,
|
||||
@ -35,9 +29,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
RpcMethod: "ValidatorDistributionInfo",
|
||||
Use: "validator-distribution-info [validator]",
|
||||
Short: "Query validator distribution info",
|
||||
Example: fmt.Sprintf(`Example: $ %s query distribution validator-distribution-info %s`,
|
||||
version.AppName, exAccAddress,
|
||||
),
|
||||
Example: fmt.Sprintf(`Example: $ %s query distribution validator-distribution-info [validator-address]`, version.AppName),
|
||||
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "validator_address"},
|
||||
@ -77,14 +69,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
Use: "rewards [delegator-addr] [validator-addr]",
|
||||
Short: "Query all distribution delegator rewards or rewards from a particular validator",
|
||||
Long: "Query all rewards earned by a delegator, optionally restrict to rewards from a single validator.",
|
||||
Example: strings.TrimSpace(
|
||||
fmt.Sprintf(`
|
||||
$ %s query distribution rewards %s
|
||||
$ %s query distribution rewards %s [validator-address]
|
||||
`,
|
||||
version.AppName, exAccAddress, version.AppName, exAccAddress,
|
||||
),
|
||||
),
|
||||
Example: fmt.Sprintf("$ %s query distribution rewards [delegator-address] [validator-address]", version.AppName),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "delegator_address"},
|
||||
{ProtoField: "validator_address"},
|
||||
@ -100,6 +85,61 @@ $ %s query distribution rewards %s [validator-address]
|
||||
},
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: distirbuitonv1beta1.Msg_ServiceDesc.ServiceName,
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "SetWithdrawAddress",
|
||||
Use: "set-withdraw-addr [withdraw-addr]",
|
||||
Short: "Change the default withdraw address for rewards associated with an address",
|
||||
Example: fmt.Sprintf("%s tx distribution set-withdraw-addr cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p --from mykey", version.AppName),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "withdraw_address"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "WithdrawDelegatorReward",
|
||||
Use: "withdraw-rewards [validator-addr]",
|
||||
Short: "Withdraw rewards from a given delegation address",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "validator_address"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "WithdrawValidatorCommission",
|
||||
Use: "withdraw-validator-commission [validator-addr]",
|
||||
Short: "Withdraw commissions from a validator address (must be a validator operator)",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "validator_address"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "DepositValidatorRewardsPool",
|
||||
Use: "fund-validator-rewards-pool [validator-addr] [amount]",
|
||||
Short: "Fund the validator rewards pool with the specified amount",
|
||||
Example: fmt.Sprintf("%s tx distribution fund-validator-rewards-pool cosmosvaloper1x20lytyf6zkcrv5edpkfkn8sz578qg5sqfyqnp 100uatom --from mykey", version.AppName),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "validator_address"},
|
||||
{ProtoField: "amount", Varargs: true},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "FundCommunityPool",
|
||||
Use: "fund-community-pool [amount]",
|
||||
Short: "Funds the community pool with the specified amount",
|
||||
Example: fmt.Sprintf(`$ %s tx distribution fund-community-pool 100uatom --from mykey`, version.AppName),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "amount", Varargs: true},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "UpdateParams",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
{
|
||||
RpcMethod: "CommunityPoolSpend",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
},
|
||||
EnhanceCustomCommand: false, // use custom commands only until v0.51
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ import (
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
govv1 "cosmossdk.io/api/cosmos/gov/v1"
|
||||
govv1beta1 "cosmossdk.io/api/cosmos/gov/v1beta1"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/version"
|
||||
)
|
||||
@ -91,22 +90,51 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
Short: "Query the current chain constitution",
|
||||
},
|
||||
},
|
||||
// map v1beta1 as a sub-command
|
||||
SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{
|
||||
"v1beta1": {
|
||||
Service: govv1beta1.Query_ServiceDesc.ServiceName,
|
||||
},
|
||||
},
|
||||
EnhanceCustomCommand: true, // We still have manual commands in gov that we want to keep
|
||||
},
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: govv1.Msg_ServiceDesc.ServiceName,
|
||||
// map v1beta1 as a sub-command
|
||||
SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{
|
||||
"v1beta1": {
|
||||
Service: govv1beta1.Msg_ServiceDesc.ServiceName,
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "Deposit",
|
||||
Use: "deposit [proposal-id] [deposit]",
|
||||
Short: "Deposit tokens for an active proposal",
|
||||
Long: fmt.Sprintf(`Submit a deposit for an active proposal. You can find the proposal-id by running "%s query gov proposals"`, version.AppName),
|
||||
Example: fmt.Sprintf(`$ %s tx gov deposit 1 10stake --from mykey`, version.AppName),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "proposal_id"},
|
||||
{ProtoField: "amount", Varargs: true},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "CancelProposal",
|
||||
Use: "cancel-proposal [proposal-id]",
|
||||
Short: "Cancel governance proposal before the voting period ends. Must be signed by the proposal creator.",
|
||||
Example: fmt.Sprintf(`$ %s tx gov cancel-proposal 1 --from mykey`, version.AppName),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "proposal_id"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "Vote",
|
||||
Use: "vote [proposal-id] [option]",
|
||||
Short: "Vote for an active proposal, options: yes/no/no-with-veto/abstain",
|
||||
Long: fmt.Sprintf(`Submit a vote for an active proposal. Use the --metadata to optionally give a reason. You can find the proposal-id by running "%s query gov proposals"`, version.AppName),
|
||||
Example: fmt.Sprintf("$ %s tx gov vote 1 yes --from mykey", version.AppName),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "proposal_id"},
|
||||
{ProtoField: "option"},
|
||||
},
|
||||
FlagOptions: map[string]*autocliv1.FlagOptions{
|
||||
"metadata": {Name: "metadata", Usage: "Add a description to the vote"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "UpdateParams",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
},
|
||||
EnhanceCustomCommand: false, // use custom commands only until v0.51
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,7 +124,88 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
},
|
||||
},
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: groupv1.Query_ServiceDesc.ServiceName,
|
||||
Service: groupv1.Msg_ServiceDesc.ServiceName,
|
||||
EnhanceCustomCommand: false, // use custom commands only until v0.51
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "UpdateGroupAdmin",
|
||||
Use: "update-group-admin [admin] [group-id] [new-admin]",
|
||||
Short: "Update a group's admin",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "admin"}, {ProtoField: "group_id"}, {ProtoField: "new_admin"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "UpdateGroupMetadata",
|
||||
Use: "update-group-metadata [admin] [group-id] [metadata]",
|
||||
Short: "Update a group's metadata",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "admin"}, {ProtoField: "group_id"}, {ProtoField: "metadata"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "UpdateGroupPolicyAdmin",
|
||||
Use: "update-group-policy-admin [admin] [group-policy-account] [new-admin]",
|
||||
Short: "Update a group policy admin",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "admin"}, {ProtoField: "group_policy_address"}, {ProtoField: "new_admin"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "UpdateGroupPolicyMetadata",
|
||||
Use: "update-group-policy-metadata [admin] [group-policy-account] [new-metadata]",
|
||||
Short: "Update a group policy metadata",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "admin"}, {ProtoField: "group_policy_address"}, {ProtoField: "metadata"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "WithdrawProposal",
|
||||
Use: "withdraw-proposal [proposal-id] [group-policy-admin-or-proposer]",
|
||||
Short: "Withdraw a submitted proposal",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "proposal_id"}, {ProtoField: "address"},
|
||||
},
|
||||
},
|
||||
{
|
||||
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
|
||||
`,
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "proposal_id"}, {ProtoField: "voter"}, {ProtoField: "option"}, {ProtoField: "metadata"},
|
||||
},
|
||||
FlagOptions: map[string]*autocliv1.FlagOptions{
|
||||
"exec": {Name: "exec", DefaultValue: "", Usage: "Set to 'try' for trying to execute proposal immediately after voting"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "Exec",
|
||||
Use: "exec [proposal-id]",
|
||||
Short: "Execute a proposal",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "proposal_id"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "LeaveGroup",
|
||||
Use: "leave-group [member-address] [group-id]",
|
||||
Short: "Remove member from the group",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "address"}, {ProtoField: "group_id"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,7 +28,13 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
},
|
||||
},
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: mintv1beta1.Query_ServiceDesc.ServiceName,
|
||||
Service: mintv1beta1.Msg_ServiceDesc.ServiceName,
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "UpdateParams",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -142,6 +142,44 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
},
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: stakingv1beta.Msg_ServiceDesc.ServiceName,
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "Delegate",
|
||||
Use: "delegate [validator-addr] [amount] --from [delegator_address]",
|
||||
Short: "Delegate liquid tokens to a validator",
|
||||
Long: "Delegate an amount of liquid coins to a validator from your wallet.",
|
||||
Example: fmt.Sprintf("%s tx staking delegate cosmosvaloper... 1000stake --from mykey", version.AppName),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}, {ProtoField: "amount"}},
|
||||
},
|
||||
{
|
||||
RpcMethod: "BeginRedelegate",
|
||||
Use: "redelegate [src-validator-addr] [dst-validator-addr] [amount] --from [delegator]",
|
||||
Short: "Generate multisig signatures for transactions generated offline",
|
||||
Long: "Redelegate an amount of illiquid staking tokens from one validator to another.",
|
||||
Example: fmt.Sprintf(`%s tx staking redelegate cosmosvaloper... cosmosvaloper... 100stake --from mykey`, version.AppName),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_src_address"}, {ProtoField: "validator_dst_address"}, {ProtoField: "amount"}},
|
||||
},
|
||||
{
|
||||
RpcMethod: "Undelegate",
|
||||
Use: "unbond [validator-addr] [amount] --from [delegator_address]",
|
||||
Short: "Unbond shares from a validator",
|
||||
Long: "Unbond an amount of bonded shares from a validator.",
|
||||
Example: fmt.Sprintf(`%s tx staking unbond cosmosvaloper... 100stake --from mykey`, version.AppName),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}, {ProtoField: "amount"}},
|
||||
},
|
||||
{
|
||||
RpcMethod: "CancelUnbondingDelegation",
|
||||
Use: "cancel-unbond [validator-addr] [amount] [creation-height]",
|
||||
Short: "Cancel unbonding delegation and delegate back to the validator",
|
||||
Example: fmt.Sprintf(`%s tx staking cancel-unbond cosmosvaloper... 100stake 2 --from mykey`, version.AppName),
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}, {ProtoField: "amount"}, {ProtoField: "creation_height"}},
|
||||
},
|
||||
{
|
||||
RpcMethod: "UpdateParams",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
},
|
||||
EnhanceCustomCommand: false, // use custom commands only until v0.51
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,17 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
},
|
||||
},
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: upgradev1beta1.Query_ServiceDesc.ServiceName,
|
||||
Service: upgradev1beta1.Msg_ServiceDesc.ServiceName,
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "SoftwareUpgrade",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
{
|
||||
RpcMethod: "CancelUpgrade",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user