diff --git a/token/transfer-hook/cli/src/main.rs b/token/transfer-hook/cli/src/main.rs index 747fcd232ce..f492274345a 100644 --- a/token/transfer-hook/cli/src/main.rs +++ b/token/transfer-hook/cli/src/main.rs @@ -2,7 +2,7 @@ pub mod meta; use { crate::meta::parse_transfer_hook_account_arg, - clap::{crate_description, crate_name, crate_version, Arg, Command}, + clap::{crate_description, crate_name, crate_version, Arg, ArgAction, Command}, solana_clap_v3_utils::{ input_parsers::{ parse_url_or_moniker, pubkey_of_signer, signer::SignerSourceParserBuilder, @@ -254,7 +254,7 @@ async fn main() -> Result<(), Box> { .value_parser(parse_transfer_hook_account_arg) .value_name("TRANSFER_HOOK_ACCOUNTS") .takes_value(true) - .multiple(true) + .action(ArgAction::Append) .min_values(0) .index(3) .help(r#"Additional account(s) required for a transfer hook and their respective configurations, whether they are a fixed address or PDA. @@ -338,7 +338,7 @@ extraMetas: .value_parser(parse_transfer_hook_account_arg) .value_name("TRANSFER_HOOK_ACCOUNTS") .takes_value(true) - .multiple(true) + .action(ArgAction::Append) .min_values(0) .index(3) .help(r#"Additional account(s) required for a transfer hook and their respective configurations, whether they are a fixed address or PDA. @@ -400,7 +400,7 @@ extraMetas: let (command, matches) = app_matches.subcommand().unwrap(); let mut wallet_manager: Option> = None; - let cli_config = if let Some(config_file) = matches.value_of("config_file") { + let cli_config = if let Some(config_file) = matches.try_get_one::("config_file")? { solana_cli_config::Config::load(config_file).unwrap_or_default() } else { solana_cli_config::Config::default() @@ -417,7 +417,7 @@ extraMetas: let json_rpc_url = normalize_to_url_if_moniker( matches - .value_of("json_rpc_url") + .try_get_one::("json_rpc_url")? .unwrap_or(&cli_config.json_rpc_url), ); @@ -430,7 +430,7 @@ extraMetas: exit(1); }), json_rpc_url, - verbose: matches.is_present("verbose"), + verbose: matches.try_contains_id("verbose")?, } }; solana_logger::setup_with_default("solana=info");