@@ -71,15 +71,9 @@ pub struct Cli {
71
71
72
72
#[ derive( Clone , Debug , Subcommand ) ]
73
73
pub enum Command {
74
- /// Permissionlessly create the single-validator stake pool for a given validator vote account
75
- /// if one does not already exist. The fee payer also pays rent-exemption for accounts,
76
- /// along with the cluster-configured minimum stake delegation
77
- Initialize ( InitializeCli ) ,
78
-
79
- /// Permissionlessly re-stake the pool stake account in the case when it has been deactivated.
80
- /// This may happen if the validator is force-deactivated, and then later reactivated using
81
- /// the same address for its vote account.
82
- Reactivate ( ReactivateCli ) ,
74
+ /// Commands used to initialize or manage existing single-validator stake pools.
75
+ /// Other than initializing new pools, most users should never need to use these.
76
+ Manage ( ManageCli ) ,
83
77
84
78
/// Deposit delegated stake into a pool in exchange for pool tokens, closing out
85
79
/// the original stake account. Provide either a stake account address, or a
@@ -92,20 +86,39 @@ pub enum Command {
92
86
/// or the ALL keyword to burn all.
93
87
Withdraw ( WithdrawCli ) ,
94
88
89
+ /// Create and delegate a new stake account to a given validator, using a default address
90
+ /// linked to the intended depository pool
91
+ CreateDefaultStake ( CreateStakeCli ) ,
92
+
93
+ /// Display info for one or all single single-validator stake pool(s)
94
+ Display ( DisplayCli ) ,
95
+ }
96
+
97
+ #[ derive( Clone , Debug , Parser ) ]
98
+ pub struct ManageCli {
99
+ #[ clap( subcommand) ]
100
+ pub manage : ManageCommand ,
101
+ }
102
+
103
+ #[ derive( Clone , Debug , Subcommand ) ]
104
+ pub enum ManageCommand {
105
+ /// Permissionlessly create the single-validator stake pool for a given validator vote account
106
+ /// if one does not already exist. The fee payer also pays rent-exemption for accounts,
107
+ /// along with the cluster-configured minimum stake delegation
108
+ Initialize ( InitializeCli ) ,
109
+
110
+ /// Permissionlessly re-stake the pool stake account in the case when it has been deactivated.
111
+ /// This may happen if the validator is force-deactivated, and then later reactivated using
112
+ /// the same address for its vote account.
113
+ Reactivate ( ReactivateCli ) ,
114
+
95
115
/// Permissionlessly create default MPL token metadata for the pool mint. Normally this is done
96
116
/// automatically upon initialization, so this does not need to be called.
97
117
CreateTokenMetadata ( CreateMetadataCli ) ,
98
118
99
119
/// Modify the MPL token metadata associated with the pool mint. This action can only be
100
120
/// performed by the validator vote account's withdraw authority
101
121
UpdateTokenMetadata ( UpdateMetadataCli ) ,
102
-
103
- /// Create and delegate a new stake account to a given validator, using a default address
104
- /// linked to the intended depository pool
105
- CreateDefaultStake ( CreateStakeCli ) ,
106
-
107
- /// Display info for one or all single single-validator stake pool(s)
108
- Display ( DisplayCli ) ,
109
122
}
110
123
111
124
#[ derive( Clone , Debug , Args ) ]
@@ -408,7 +421,9 @@ impl Command {
408
421
"token_authority" ,
409
422
) ?;
410
423
}
411
- Command :: UpdateTokenMetadata ( ref mut config) => {
424
+ Command :: Manage ( ManageCli {
425
+ manage : ManageCommand :: UpdateTokenMetadata ( ref mut config) ,
426
+ } ) => {
412
427
config. authorized_withdrawer = with_signer (
413
428
matches,
414
429
wallet_manager,
0 commit comments