diff --git a/CHANGELOG.md b/CHANGELOG.md index fdc922305554..79a98c35faa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -123,6 +123,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (server) [#24072](https://github.com/cosmos/cosmos-sdk/pull/24072) Return BlockHeader by shallow copy in server Context. * (x/bank) [#24053](https://github.com/cosmos/cosmos-sdk/pull/24053) Resolve a foot-gun by swapping send restrictions check in `InputOutputCoins` before coin deduction. * (codec/types) [#24336](https://github.com/cosmos/cosmos-sdk/pull/24336) Most types definitions were moved to `github.com/cosmos/gogoproto/types/any` with aliases to these left in `codec/types` so that there should be no breakage to existing code. This allows protobuf generated code to optionally reference the SDK's custom `Any` type without a direct dependency on the SDK. This can be done by changing the `protoc` `M` parameter for `any.proto` to `Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any`. +* [#24387](https://github.com/cosmos/cosmos-sdk/pull/24387) Add commands for all proposals thanks to AutoCLI. Additionally, improve UX commands thanks to AutoCLI: + * f.e ` tx bank send alice $(simd keys show bob -a) 100stake` can be directly ` tx bank send alice bob 100stake` now. This is true for all fields that take an address. ### API Breaking Changes diff --git a/x/auth/autocli.go b/x/auth/autocli.go index d80fac0afdfb..b3b909fa5503 100644 --- a/x/auth/autocli.go +++ b/x/auth/autocli.go @@ -77,7 +77,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: authv1beta1.Msg_ServiceDesc.ServiceName, + Service: authv1beta1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "UpdateParams", diff --git a/x/auth/vesting/autocli.go b/x/auth/vesting/autocli.go index 2ff4585db1ae..ade7286a0c4f 100644 --- a/x/auth/vesting/autocli.go +++ b/x/auth/vesting/autocli.go @@ -9,7 +9,8 @@ import ( func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ Tx: &autocliv1.ServiceCommandDescriptor{ - Service: vestingv1beta1.Msg_ServiceDesc.ServiceName, + Service: vestingv1beta1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "CreateVestingAccount", @@ -41,7 +42,6 @@ These tokens may be used for staking but are non-transferable. Staking rewards w }, }, }, - EnhanceCustomCommand: false, // use custom commands only until v0.51 }, } } diff --git a/x/auth/vesting/client/cli/tx.go b/x/auth/vesting/client/cli/tx.go index fe6a0c341f21..f71880c5f982 100644 --- a/x/auth/vesting/client/cli/tx.go +++ b/x/auth/vesting/client/cli/tx.go @@ -34,8 +34,6 @@ func GetTxCmd(ac address.Codec) *cobra.Command { } txCmd.AddCommand( - NewMsgCreateVestingAccountCmd(ac), - NewMsgCreatePermanentLockedAccountCmd(ac), NewMsgCreatePeriodicVestingAccountCmd(ac), ) @@ -44,6 +42,8 @@ func GetTxCmd(ac address.Codec) *cobra.Command { // NewMsgCreateVestingAccountCmd returns a CLI command handler for creating a // MsgCreateVestingAccount transaction. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewMsgCreateVestingAccountCmd(ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "create-vesting-account [to_address] [amount] [end_time]", @@ -91,8 +91,9 @@ timestamp.`, return cmd } -// NewMsgCreatePermanentLockedAccountCmd returns a CLI command handler for creating a -// MsgCreatePermanentLockedAccount transaction. +// NewMsgCreatePermanentLockedAccountCmd returns a CLI command handler for creating a MsgCreatePermanentLockedAccount transaction. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewMsgCreatePermanentLockedAccountCmd(ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "create-permanent-locked-account [to_address] [amount]", diff --git a/x/authz/client/cli/tx.go b/x/authz/client/cli/tx.go index a5abd432f690..00f92d9d5174 100644 --- a/x/authz/client/cli/tx.go +++ b/x/authz/client/cli/tx.go @@ -47,7 +47,6 @@ func GetTxCmd(ac address.Codec) *cobra.Command { AuthorizationTxCmd.AddCommand( NewCmdGrantAuthorization(ac), - NewCmdRevokeAuthorization(ac), NewCmdExecAuthorization(), ) @@ -229,6 +228,8 @@ func getExpireTime(cmd *cobra.Command) (*time.Time, error) { } // NewCmdRevokeAuthorization returns a CLI command handler for creating a MsgRevoke transaction. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewCmdRevokeAuthorization(ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "revoke [grantee] [msg-type-url] --from=[granter]", diff --git a/x/authz/module/autocli.go b/x/authz/module/autocli.go index fc551183e475..93057d5f960c 100644 --- a/x/authz/module/autocli.go +++ b/x/authz/module/autocli.go @@ -48,7 +48,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, Tx: &autocliv1.ServiceCommandDescriptor{ Service: authzv1beta1.Msg_ServiceDesc.ServiceName, - EnhanceCustomCommand: false, // use custom commands only until v0.51 + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Exec", diff --git a/x/bank/client/cli/tx.go b/x/bank/client/cli/tx.go index 1edc19883d91..a413bbc70aeb 100644 --- a/x/bank/client/cli/tx.go +++ b/x/bank/client/cli/tx.go @@ -29,7 +29,6 @@ func NewTxCmd(ac address.Codec) *cobra.Command { } txCmd.AddCommand( - NewSendTxCmd(ac), NewMultiSendTxCmd(ac), ) @@ -37,6 +36,9 @@ func NewTxCmd(ac address.Codec) *cobra.Command { } // NewSendTxCmd returns a CLI command handler for creating a MsgSend transaction. +// Deprecated: The module uses the AutoCLI generated command with a better UX. +// This command should be removed in the future, but this requires reworking the +// bank send helper: the solution is here: https://github.com/cosmos/cosmos-sdk/pull/17868. func NewSendTxCmd(ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "send [from_key_or_address] [to_address] [amount]", diff --git a/x/circuit/autocli.go b/x/circuit/autocli.go index ca6ffe5bd03c..cd9dcd2addb1 100644 --- a/x/circuit/autocli.go +++ b/x/circuit/autocli.go @@ -33,7 +33,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: circuitv1.Msg_ServiceDesc.ServiceName, + Service: circuitv1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "AuthorizeCircuitBreaker", diff --git a/x/consensus/autocli.go b/x/consensus/autocli.go index 14784dced7f4..4a7449ac258f 100644 --- a/x/consensus/autocli.go +++ b/x/consensus/autocli.go @@ -27,7 +27,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: consensusv1.Msg_ServiceDesc.ServiceName, + Service: consensusv1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "UpdateParams", diff --git a/x/crisis/autocli.go b/x/crisis/autocli.go index d8926f4b8688..62c4a119a2d7 100644 --- a/x/crisis/autocli.go +++ b/x/crisis/autocli.go @@ -9,7 +9,8 @@ import ( func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ Tx: &autocliv1.ServiceCommandDescriptor{ - Service: crisisv1beta1.Msg_ServiceDesc.ServiceName, + Service: crisisv1beta1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "VerifyInvariant", diff --git a/x/distribution/autocli.go b/x/distribution/autocli.go index a74f999f5dd5..ffb14ee4bbed 100644 --- a/x/distribution/autocli.go +++ b/x/distribution/autocli.go @@ -88,7 +88,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: distributionv1beta1.Msg_ServiceDesc.ServiceName, + Service: distributionv1beta1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "SetWithdrawAddress", @@ -154,7 +155,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { GovProposal: true, }, }, - EnhanceCustomCommand: true, }, } } diff --git a/x/distribution/client/cli/tx.go b/x/distribution/client/cli/tx.go index a668117bc6db..07b642a88be3 100644 --- a/x/distribution/client/cli/tx.go +++ b/x/distribution/client/cli/tx.go @@ -38,11 +38,7 @@ func NewTxCmd(valAc, ac address.Codec) *cobra.Command { } distTxCmd.AddCommand( - NewWithdrawRewardsCmd(valAc, ac), NewWithdrawAllRewardsCmd(valAc, ac), - NewSetWithdrawAddrCmd(ac), - NewFundCommunityPoolCmd(ac), - NewDepositValidatorRewardsPoolCmd(valAc, ac), ) return distTxCmd @@ -72,6 +68,8 @@ func newSplitAndApply( } // NewWithdrawRewardsCmd returns a CLI command handler for creating a MsgWithdrawDelegatorReward transaction. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewWithdrawRewardsCmd(valCodec, ac address.Codec) *cobra.Command { bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() @@ -185,6 +183,8 @@ $ %[1]s tx distribution withdraw-all-rewards --from mykey } // NewSetWithdrawAddrCmd returns a CLI command handler for creating a MsgSetWithdrawAddress transaction. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewSetWithdrawAddrCmd(ac address.Codec) *cobra.Command { bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() @@ -224,6 +224,8 @@ $ %s tx distribution set-withdraw-addr %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p } // NewFundCommunityPoolCmd returns a CLI command handler for creating a MsgFundCommunityPool transaction. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewFundCommunityPoolCmd(ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "fund-community-pool [amount]", @@ -265,6 +267,8 @@ $ %s tx distribution fund-community-pool 100uatom --from mykey // NewDepositValidatorRewardsPoolCmd returns a CLI command handler for creating // a MsgDepositValidatorRewardsPool transaction. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewDepositValidatorRewardsPoolCmd(valCodec, ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "fund-validator-rewards-pool [val_addr] [amount]", diff --git a/x/feegrant/module/autocli.go b/x/feegrant/module/autocli.go index f3bbd0597728..3386fe18f969 100644 --- a/x/feegrant/module/autocli.go +++ b/x/feegrant/module/autocli.go @@ -47,7 +47,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: feegrantv1beta1.Msg_ServiceDesc.ServiceName, + Service: feegrantv1beta1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "RevokeAllowance", @@ -68,7 +69,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Example: fmt.Sprintf(`$ %s tx feegrant prune --from [mykey]`, version.AppName), }, }, - EnhanceCustomCommand: true, }, } } diff --git a/x/gov/autocli.go b/x/gov/autocli.go index 9261ae3d33da..6e0724b7065e 100644 --- a/x/gov/autocli.go +++ b/x/gov/autocli.go @@ -94,7 +94,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { EnhanceCustomCommand: true, // We still have manual commands in gov that we want to keep }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: govv1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, + Service: govv1.Msg_ServiceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Deposit", @@ -140,7 +141,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { GovProposal: true, }, }, - EnhanceCustomCommand: false, // use custom commands only until v0.51 }, } } diff --git a/x/gov/client/cli/tx.go b/x/gov/client/cli/tx.go index d6c4a79d6722..3b1b6f0ec6f9 100644 --- a/x/gov/client/cli/tx.go +++ b/x/gov/client/cli/tx.go @@ -68,12 +68,9 @@ func NewTxCmd(legacyPropCmds []*cobra.Command) *cobra.Command { } govTxCmd.AddCommand( - NewCmdDeposit(), - NewCmdVote(), NewCmdWeightedVote(), NewCmdSubmitProposal(), NewCmdDraftProposal(), - NewCmdCancelProposal(), // Deprecated cmdSubmitLegacyProp, @@ -155,6 +152,8 @@ metadata example: } // NewCmdCancelProposal implements submitting a cancel proposal transaction command. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewCmdCancelProposal() *cobra.Command { cmd := &cobra.Command{ Use: "cancel-proposal [proposal-id]", @@ -254,6 +253,8 @@ $ %s tx gov submit-legacy-proposal --title="Test Proposal" --description="My awe } // NewCmdDeposit implements depositing tokens for an active proposal. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewCmdDeposit() *cobra.Command { cmd := &cobra.Command{ Use: "deposit [proposal-id] [deposit]", @@ -302,6 +303,8 @@ $ %s tx gov deposit 1 10stake --from mykey } // NewCmdVote implements creating a new vote command. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewCmdVote() *cobra.Command { cmd := &cobra.Command{ Use: "vote [proposal-id] [option]", diff --git a/x/group/client/cli/tx.go b/x/group/client/cli/tx.go index b5d3f052399b..1fe72a53868e 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -39,19 +39,11 @@ func TxCmd(name string, ac address.Codec) *cobra.Command { txCmd.AddCommand( MsgCreateGroupCmd(), - MsgUpdateGroupAdminCmd(), - MsgUpdateGroupMetadataCmd(), MsgUpdateGroupMembersCmd(), MsgCreateGroupWithPolicyCmd(), MsgCreateGroupPolicyCmd(), - MsgUpdateGroupPolicyAdminCmd(), MsgUpdateGroupPolicyDecisionPolicyCmd(ac), - MsgUpdateGroupPolicyMetadataCmd(), - MsgWithdrawProposalCmd(), MsgSubmitProposalCmd(), - MsgVoteCmd(), - MsgExecCmd(), - MsgLeaveGroupCmd(), NewCmdDraftProposal(), ) @@ -197,6 +189,8 @@ Set a member's weight to "0" to delete it. } // MsgUpdateGroupAdminCmd creates a CLI command for Msg/UpdateGroupAdmin. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func MsgUpdateGroupAdminCmd() *cobra.Command { cmd := &cobra.Command{ Use: "update-group-admin [admin] [group-id] [new-admin]", @@ -241,6 +235,8 @@ func MsgUpdateGroupAdminCmd() *cobra.Command { } // MsgUpdateGroupMetadataCmd creates a CLI command for Msg/UpdateGroupMetadata. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func MsgUpdateGroupMetadataCmd() *cobra.Command { cmd := &cobra.Command{ Use: "update-group-metadata [admin] [group-id] [metadata]", @@ -458,6 +454,8 @@ Here, we can use percentage decision policy when needed, where 0 < percentage <= } // MsgUpdateGroupPolicyAdminCmd creates a CLI command for Msg/UpdateGroupPolicyAdmin. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func MsgUpdateGroupPolicyAdminCmd() *cobra.Command { cmd := &cobra.Command{ Use: "update-group-policy-admin [admin] [group-policy-account] [new-admin]", @@ -538,6 +536,8 @@ func MsgUpdateGroupPolicyDecisionPolicyCmd(ac address.Codec) *cobra.Command { } // MsgUpdateGroupPolicyMetadataCmd creates a CLI command for Msg/UpdateGroupPolicyMetadata. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func MsgUpdateGroupPolicyMetadataCmd() *cobra.Command { cmd := &cobra.Command{ Use: "update-group-policy-metadata [admin] [group-policy-account] [new-metadata]", @@ -661,6 +661,8 @@ metadata example: } // MsgWithdrawProposalCmd creates a CLI command for Msg/WithdrawProposal. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func MsgWithdrawProposalCmd() *cobra.Command { cmd := &cobra.Command{ Use: "withdraw-proposal [proposal-id] [group-policy-admin-or-proposer]", @@ -707,6 +709,8 @@ Parameters: } // MsgVoteCmd creates a CLI command for Msg/Vote. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func MsgVoteCmd() *cobra.Command { cmd := &cobra.Command{ Use: "vote [proposal-id] [voter] [vote-option] [metadata]", @@ -767,6 +771,8 @@ Parameters: } // MsgExecCmd creates a CLI command for Msg/Exec. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func MsgExecCmd() *cobra.Command { cmd := &cobra.Command{ Use: "exec [proposal-id]", @@ -798,6 +804,8 @@ func MsgExecCmd() *cobra.Command { } // MsgLeaveGroupCmd creates a CLI command for Msg/LeaveGroup. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func MsgLeaveGroupCmd() *cobra.Command { cmd := &cobra.Command{ Use: "leave-group [member-address] [group-id]", diff --git a/x/group/module/autocli.go b/x/group/module/autocli.go index e51f310dfeed..1fbbed959563 100644 --- a/x/group/module/autocli.go +++ b/x/group/module/autocli.go @@ -125,7 +125,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, Tx: &autocliv1.ServiceCommandDescriptor{ Service: groupv1.Msg_ServiceDesc.ServiceName, - EnhanceCustomCommand: false, // use custom commands only until v0.51 + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "UpdateGroupAdmin", diff --git a/x/mint/autocli.go b/x/mint/autocli.go index 9b096043b5e3..98951d58c391 100644 --- a/x/mint/autocli.go +++ b/x/mint/autocli.go @@ -32,7 +32,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: mintv1beta1.Msg_ServiceDesc.ServiceName, + Service: mintv1beta1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "UpdateParams", diff --git a/x/nft/module/autocli.go b/x/nft/module/autocli.go index e0364cd0bb2b..7bdac608eb7d 100644 --- a/x/nft/module/autocli.go +++ b/x/nft/module/autocli.go @@ -83,7 +83,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: nftv1beta1.Msg_ServiceDesc.ServiceName, + Service: nftv1beta1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Send", diff --git a/x/protocolpool/autocli.go b/x/protocolpool/autocli.go index 371a3d5f0449..b893c3db70c7 100644 --- a/x/protocolpool/autocli.go +++ b/x/protocolpool/autocli.go @@ -37,7 +37,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: poolv1.Msg_ServiceDesc.ServiceName, + Service: poolv1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "FundCommunityPool", diff --git a/x/slashing/autocli.go b/x/slashing/autocli.go index 2966d331125d..2ec02f064f26 100644 --- a/x/slashing/autocli.go +++ b/x/slashing/autocli.go @@ -37,7 +37,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: slashingv1beta.Msg_ServiceDesc.ServiceName, + Service: slashingv1beta.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Unjail", diff --git a/x/staking/autocli.go b/x/staking/autocli.go index 67cef2c1e8cc..18d6d8f3a872 100644 --- a/x/staking/autocli.go +++ b/x/staking/autocli.go @@ -140,7 +140,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: stakingv1beta.Msg_ServiceDesc.ServiceName, + Service: stakingv1beta.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Delegate", @@ -183,7 +184,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { GovProposal: true, }, }, - EnhanceCustomCommand: false, // use custom commands only until v0.51 }, } } diff --git a/x/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index fecc99925cf5..5501766e43b0 100644 --- a/x/staking/client/cli/tx.go +++ b/x/staking/client/cli/tx.go @@ -46,10 +46,6 @@ func NewTxCmd(valAddrCodec, ac address.Codec) *cobra.Command { stakingTxCmd.AddCommand( NewCreateValidatorCmd(valAddrCodec), NewEditValidatorCmd(valAddrCodec), - NewDelegateCmd(valAddrCodec, ac), - NewRedelegateCmd(valAddrCodec, ac), - NewUnbondCmd(valAddrCodec, ac), - NewCancelUnbondingDelegation(valAddrCodec, ac), ) return stakingTxCmd @@ -178,6 +174,8 @@ func NewEditValidatorCmd(ac address.Codec) *cobra.Command { } // NewDelegateCmd returns a CLI command handler for creating a MsgDelegate transaction. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewDelegateCmd(valAddrCodec, ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "delegate [validator-addr] [amount]", @@ -224,6 +222,8 @@ $ %s tx staking delegate cosmosvalopers1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 1 } // NewRedelegateCmd returns a CLI command handler for creating a MsgBeginRedelegate transaction. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewRedelegateCmd(valAddrCodec, ac address.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "redelegate [src-validator-addr] [dst-validator-addr] [amount]", @@ -275,6 +275,8 @@ $ %s tx staking redelegate cosmosvalopers1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj } // NewUnbondCmd returns a CLI command handler for creating a MsgUndelegate transaction. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewUnbondCmd(valAddrCodec, ac address.Codec) *cobra.Command { bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() @@ -323,6 +325,8 @@ $ %s tx staking unbond %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake --from } // NewCancelUnbondingDelegation returns a CLI command handler for creating a MsgCancelUnbondingDelegation transaction. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewCancelUnbondingDelegation(valAddrCodec, ac address.Codec) *cobra.Command { bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() diff --git a/x/upgrade/autocli.go b/x/upgrade/autocli.go index 36265aea3283..94e08cfedf56 100644 --- a/x/upgrade/autocli.go +++ b/x/upgrade/autocli.go @@ -47,7 +47,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: upgradev1beta1.Msg_ServiceDesc.ServiceName, + Service: upgradev1beta1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "CancelUpgrade", @@ -60,7 +61,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Skip: true, // skipped because authority gated }, }, - EnhanceCustomCommand: true, }, } } diff --git a/x/upgrade/client/cli/tx.go b/x/upgrade/client/cli/tx.go index 697c6d21a44b..4b068f4e46d7 100644 --- a/x/upgrade/client/cli/tx.go +++ b/x/upgrade/client/cli/tx.go @@ -37,7 +37,6 @@ func GetTxCmd(ac addresscodec.Codec) *cobra.Command { cmd.AddCommand( NewCmdSubmitUpgradeProposal(ac), - NewCmdSubmitCancelUpgradeProposal(ac), ) return cmd @@ -133,6 +132,8 @@ func NewCmdSubmitUpgradeProposal(ac addresscodec.Codec) *cobra.Command { } // NewCmdSubmitCancelUpgradeProposal implements a command handler for submitting a software upgrade cancel proposal transaction. +// Deprecated: This command is deprecated and will be removed in a future release. +// The module is using its AutoCLI command instead. func NewCmdSubmitCancelUpgradeProposal(ac addresscodec.Codec) *cobra.Command { cmd := &cobra.Command{ Use: "cancel-software-upgrade [flags]",