Cli: expose `--with-memo` to nonce and stake commands (#18404)

* Fmt memo_arg

* Add --with-memo to nonce and stake cli commands
This commit is contained in:
Tyera Eulberg 2021-07-03 11:46:52 -06:00 committed by GitHub
parent 2af5ec4f57
commit 1dd730d685
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 13 deletions

View File

@ -12,7 +12,7 @@ use solana_clap_utils::{
input_parsers::*, input_parsers::*,
input_validators::*, input_validators::*,
keypair::{DefaultSigner, SignerIndex}, keypair::{DefaultSigner, SignerIndex},
memo::MEMO_ARG, memo::{memo_arg, MEMO_ARG},
nonce::*, nonce::*,
}; };
use solana_cli_output::CliNonceAccount; use solana_cli_output::CliNonceAccount;
@ -56,7 +56,8 @@ impl NonceSubCommands for App<'_, '_> {
.required(true), .required(true),
"Account to be granted authority of the nonce account. "), "Account to be granted authority of the nonce account. "),
) )
.arg(nonce_authority_arg()), .arg(nonce_authority_arg())
.arg(memo_arg()),
) )
.subcommand( .subcommand(
SubCommand::with_name("create-nonce-account") SubCommand::with_name("create-nonce-account")
@ -91,7 +92,8 @@ impl NonceSubCommands for App<'_, '_> {
.value_name("STRING") .value_name("STRING")
.takes_value(true) .takes_value(true)
.help("Seed for address generation; if specified, the resulting account will be at a derived address of the NONCE_ACCOUNT pubkey") .help("Seed for address generation; if specified, the resulting account will be at a derived address of the NONCE_ACCOUNT pubkey")
), )
.arg(memo_arg()),
) )
.subcommand( .subcommand(
SubCommand::with_name("nonce") SubCommand::with_name("nonce")
@ -115,7 +117,8 @@ impl NonceSubCommands for App<'_, '_> {
.required(true), .required(true),
"Address of the nonce account. "), "Address of the nonce account. "),
) )
.arg(nonce_authority_arg()), .arg(nonce_authority_arg())
.arg(memo_arg()),
) )
.subcommand( .subcommand(
SubCommand::with_name("nonce-account") SubCommand::with_name("nonce-account")
@ -161,7 +164,8 @@ impl NonceSubCommands for App<'_, '_> {
.validator(is_amount) .validator(is_amount)
.help("The amount to withdraw from the nonce account, in SOL"), .help("The amount to withdraw from the nonce account, in SOL"),
) )
.arg(nonce_authority_arg()), .arg(nonce_authority_arg())
.arg(memo_arg()),
) )
} }
} }

View File

@ -14,7 +14,7 @@ use solana_clap_utils::{
input_parsers::*, input_parsers::*,
input_validators::*, input_validators::*,
keypair::{DefaultSigner, SignerIndex}, keypair::{DefaultSigner, SignerIndex},
memo::MEMO_ARG, memo::{memo_arg, MEMO_ARG},
nonce::*, nonce::*,
offline::*, offline::*,
ArgConstant, ArgConstant,
@ -179,6 +179,7 @@ impl StakeSubCommands for App<'_, '_> {
.offline_args() .offline_args()
.nonce_args(false) .nonce_args(false)
.arg(fee_payer_arg()) .arg(fee_payer_arg())
.arg(memo_arg())
) )
.subcommand( .subcommand(
SubCommand::with_name("delegate-stake") SubCommand::with_name("delegate-stake")
@ -208,6 +209,7 @@ impl StakeSubCommands for App<'_, '_> {
.offline_args() .offline_args()
.nonce_args(false) .nonce_args(false)
.arg(fee_payer_arg()) .arg(fee_payer_arg())
.arg(memo_arg())
) )
.subcommand( .subcommand(
SubCommand::with_name("stake-authorize") SubCommand::with_name("stake-authorize")
@ -245,6 +247,7 @@ impl StakeSubCommands for App<'_, '_> {
.takes_value(false) .takes_value(false)
.help("Return signature immediately after submitting the transaction, instead of waiting for confirmations"), .help("Return signature immediately after submitting the transaction, instead of waiting for confirmations"),
) )
.arg(memo_arg())
) )
.subcommand( .subcommand(
SubCommand::with_name("deactivate-stake") SubCommand::with_name("deactivate-stake")
@ -268,6 +271,7 @@ impl StakeSubCommands for App<'_, '_> {
.offline_args() .offline_args()
.nonce_args(false) .nonce_args(false)
.arg(fee_payer_arg()) .arg(fee_payer_arg())
.arg(memo_arg())
) )
.subcommand( .subcommand(
SubCommand::with_name("split-stake") SubCommand::with_name("split-stake")
@ -309,6 +313,7 @@ impl StakeSubCommands for App<'_, '_> {
.offline_args() .offline_args()
.nonce_args(false) .nonce_args(false)
.arg(fee_payer_arg()) .arg(fee_payer_arg())
.arg(memo_arg())
) )
.subcommand( .subcommand(
SubCommand::with_name("merge-stake") SubCommand::with_name("merge-stake")
@ -332,6 +337,7 @@ impl StakeSubCommands for App<'_, '_> {
.offline_args() .offline_args()
.nonce_args(false) .nonce_args(false)
.arg(fee_payer_arg()) .arg(fee_payer_arg())
.arg(memo_arg())
) )
.subcommand( .subcommand(
SubCommand::with_name("withdraw-stake") SubCommand::with_name("withdraw-stake")
@ -372,6 +378,7 @@ impl StakeSubCommands for App<'_, '_> {
.nonce_args(false) .nonce_args(false)
.arg(fee_payer_arg()) .arg(fee_payer_arg())
.arg(custodian_arg()) .arg(custodian_arg())
.arg(memo_arg())
) )
.subcommand( .subcommand(
SubCommand::with_name("stake-set-lockup") SubCommand::with_name("stake-set-lockup")
@ -419,6 +426,7 @@ impl StakeSubCommands for App<'_, '_> {
.offline_args() .offline_args()
.nonce_args(false) .nonce_args(false)
.arg(fee_payer_arg()) .arg(fee_payer_arg())
.arg(memo_arg())
) )
.subcommand( .subcommand(
SubCommand::with_name("stake-account") SubCommand::with_name("stake-account")