From 7c1f93aeaf973446d35e0d31dc642cbf9c7357ba Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 4 Apr 2025 10:43:52 +0200 Subject: [PATCH 1/4] feat(x): enable autocli for txs in modules --- x/auth/autocli.go | 3 ++- x/auth/vesting/autocli.go | 4 ++-- x/authz/module/autocli.go | 2 +- x/circuit/autocli.go | 3 ++- x/consensus/autocli.go | 3 ++- x/crisis/autocli.go | 3 ++- x/distribution/autocli.go | 4 ++-- x/feegrant/module/autocli.go | 4 ++-- x/gov/autocli.go | 4 ++-- x/group/module/autocli.go | 2 +- x/mint/autocli.go | 3 ++- x/nft/module/autocli.go | 3 ++- x/protocolpool/autocli.go | 3 ++- x/slashing/autocli.go | 3 ++- x/staking/autocli.go | 4 ++-- x/upgrade/autocli.go | 4 ++-- 16 files changed, 30 insertions(+), 22 deletions(-) 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/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/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 99586c26b2cd..09696e1b2696 100644 --- a/x/crisis/autocli.go +++ b/x/crisis/autocli.go @@ -12,7 +12,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/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 95079e246781..e7bb4de4889d 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/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 5a9d8289fc5c..19dbd171e8a4 100644 --- a/x/nft/module/autocli.go +++ b/x/nft/module/autocli.go @@ -82,7 +82,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 886dcf181c23..afb7b514541d 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/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, }, } } From 924c52013fbb851f29e43718c69d76fe0d47d15d Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 4 Apr 2025 10:55:50 +0200 Subject: [PATCH 2/4] use bank send autocli --- x/bank/client/cli/tx.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]", From 4a15864cdc7890faf0d75a78a818e8348e4e67b6 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Tue, 8 Apr 2025 13:18:31 +0200 Subject: [PATCH 3/4] tACK --- CHANGELOG.md | 2 ++ x/auth/vesting/client/cli/tx.go | 9 +++++---- x/authz/client/cli/tx.go | 3 ++- x/distribution/client/cli/tx.go | 12 ++++++++---- x/gov/client/cli/tx.go | 9 ++++++--- x/group/client/cli/tx.go | 24 ++++++++++++++++-------- x/staking/client/cli/tx.go | 12 ++++++++---- x/upgrade/client/cli/tx.go | 3 ++- 8 files changed, 49 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd60b380fe30..091f2ac1722a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,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. ### Bug Fixes 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/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/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 ed0af47bfdf4..76ca18ab048c 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -38,19 +38,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(), ) @@ -196,6 +188,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]", @@ -240,6 +234,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]", @@ -457,6 +453,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]", @@ -537,6 +535,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]", @@ -660,6 +660,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]", @@ -706,6 +708,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]", @@ -766,6 +770,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]", @@ -797,6 +803,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/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index f2bdf0f2c6c9..2a02e56a1e60 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/client/cli/tx.go b/x/upgrade/client/cli/tx.go index d798dd79895e..ecd066b735c4 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]", From a21ef733384cdd231b5a8d8782fe3b332fb436a2 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Mon, 5 May 2025 12:17:22 -0400 Subject: [PATCH 4/4] tidy --- x/feegrant/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index 265730e6a6f4..af1b9c81df53 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -4,6 +4,7 @@ go 1.23.2 require ( cosmossdk.io/api v0.9.2 + cosmossdk.io/collections v1.2.0 cosmossdk.io/core v0.11.3 cosmossdk.io/depinject v1.2.0 cosmossdk.io/errors v1.0.2 @@ -26,7 +27,6 @@ require ( ) require ( - cosmossdk.io/collections v1.2.0 // indirect cosmossdk.io/schema v1.1.0 // indirect cosmossdk.io/x/tx v0.14.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect