Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[token-cli] Upgrade to clap-v3 #6376

Merged
merged 22 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7e2df7b
upgrade clap version to `3.2.23`
samkim-crypto Mar 9, 2024
12a68e3
remove lifetime parameters from `ArgMatches`
samkim-crypto Mar 9, 2024
529229b
remove extra lifetime parameters from `Arg`
samkim-crypto Mar 9, 2024
5d1c9ec
remove extra lifetime parameters from `App`
samkim-crypto Mar 9, 2024
6dd2a6c
use `usize` type parameters for `min_values` and `max_values`
samkim-crypto Mar 9, 2024
6fccefe
use `char` type parameters for `short` arguments
samkim-crypto Mar 9, 2024
81dfff1
update syntax for custom validator functions
samkim-crypto Mar 9, 2024
d0648fb
update pattern matching syntax for `subcommand`
samkim-crypto Mar 9, 2024
39905c2
update for new `possible_values` syntax
samkim-crypto Mar 9, 2024
5163cde
allow deprecated input validation for now
samkim-crypto Mar 9, 2024
c26a85a
resolve lifetime specifier issue with higher order validator functions
samkim-crypto Mar 9, 2024
6aecfbd
directly specify positional parameter indices
samkim-crypto Mar 9, 2024
bb18b53
remove non-functioning `owner` alias in some subcommands
samkim-crypto Mar 9, 2024
c712268
remove long names for positional arguments
samkim-crypto Mar 9, 2024
ea67826
remove potential panice from `value_of` and `is_present`
samkim-crypto Mar 11, 2024
6779d26
add custom `signer_from_path` and `signer_from_path_with_config`
samkim-crypto Mar 11, 2024
2d6565f
cargo fmt
samkim-crypto Mar 11, 2024
7367595
remove duplicate addition of args in invalid config test
samkim-crypto Mar 11, 2024
19ee7ba
use `try_get_one` to parse `compute_unit_price` and `compute_unit_limit`
samkim-crypto Mar 29, 2024
f040679
hard-code `signer_arg` and `OfflineArgs`
samkim-crypto Apr 28, 2024
f420049
replace `value_of` function
samkim-crypto Sep 10, 2024
6e7265d
revert direct parser for `is_amount` validation
samkim-crypto Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions token/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ walkdir = "2"

[dependencies]
base64 = "0.22.1"
clap = "2.33.3"
clap = "3.2.23"
console = "0.15.8"
futures = "0.3"
serde = "1.0.209"
serde_derive = "1.0.103"
serde_json = "1.0.128"
solana-account-decoder = "2.0.3"
solana-clap-utils = "2.0.3"
solana-clap-v3-utils = "2.0.3"
solana-cli-config = "2.0.3"
solana-cli-output = "2.0.3"
solana-client = "2.0.3"
Expand Down
12 changes: 6 additions & 6 deletions token/cli/src/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use {
crate::{clap_app::Error, command::CommandResult, config::Config},
clap::{value_t_or_exit, ArgMatches},
solana_clap_utils::input_parsers::pubkey_of_signer,
solana_clap_v3_utils::input_parsers::pubkey_of_signer,
solana_client::{
nonblocking::rpc_client::RpcClient, rpc_client::RpcClient as BlockingRpcClient,
tpu_client::TpuClient, tpu_client::TpuClientConfig,
Expand All @@ -22,15 +22,15 @@ use {
};

pub(crate) async fn bench_process_command(
matches: &ArgMatches<'_>,
matches: &ArgMatches,
config: &Config<'_>,
mut signers: Vec<Arc<dyn Signer>>,
wallet_manager: &mut Option<Rc<RemoteWalletManager>>,
) -> CommandResult {
assert!(!config.sign_only);

match matches.subcommand() {
("create-accounts", Some(arg_matches)) => {
Some(("create-accounts", arg_matches)) => {
let token = pubkey_of_signer(arg_matches, "token", wallet_manager)
.unwrap()
.unwrap();
Expand All @@ -42,7 +42,7 @@ pub(crate) async fn bench_process_command(

command_create_accounts(config, signers, &token, n, &owner).await?;
}
("close-accounts", Some(arg_matches)) => {
Some(("close-accounts", arg_matches)) => {
let token = pubkey_of_signer(arg_matches, "token", wallet_manager)
.unwrap()
.unwrap();
Expand All @@ -53,7 +53,7 @@ pub(crate) async fn bench_process_command(

command_close_accounts(config, signers, &token, n, &owner).await?;
}
("deposit-into", Some(arg_matches)) => {
Some(("deposit-into", arg_matches)) => {
let token = pubkey_of_signer(arg_matches, "token", wallet_manager)
.unwrap()
.unwrap();
Expand All @@ -68,7 +68,7 @@ pub(crate) async fn bench_process_command(
)
.await?;
}
("withdraw-from", Some(arg_matches)) => {
Some(("withdraw-from", arg_matches)) => {
let token = pubkey_of_signer(arg_matches, "token", wallet_manager)
.unwrap()
.unwrap();
Expand Down
Loading
Loading