diff --git a/crates/pop-cli/src/commands/build/parachain.rs b/crates/pop-cli/src/commands/build/parachain.rs index 67000e62f..13d8fe963 100644 --- a/crates/pop-cli/src/commands/build/parachain.rs +++ b/crates/pop-cli/src/commands/build/parachain.rs @@ -14,13 +14,13 @@ pub struct BuildParachainCommand { #[arg(long)] pub(crate) path: Option, /// The package to be built. - #[arg(short = 'p', long)] + #[arg(short, long)] pub(crate) package: Option, /// Build profile [default: debug]. #[clap(long, value_enum)] pub(crate) profile: Option, /// Parachain ID to be used when generating the chain spec files. - #[arg(short = 'i', long = "id")] + #[arg(short, long)] pub(crate) id: Option, // Deprecation flag, used to specify whether the deprecation warning is shown. #[clap(skip)] diff --git a/crates/pop-cli/src/commands/build/spec.rs b/crates/pop-cli/src/commands/build/spec.rs index 3cde4c61e..7e9ba052b 100644 --- a/crates/pop-cli/src/commands/build/spec.rs +++ b/crates/pop-cli/src/commands/build/spec.rs @@ -136,38 +136,38 @@ pub(crate) enum RelayChain { pub struct BuildSpecCommand { /// File name for the resulting spec. If a path is given, /// the necessary directories will be created - #[arg(short = 'o', long = "output")] + #[arg(short, long = "output")] pub(crate) output_file: Option, /// [DEPRECATED] and will be removed in v0.7.0, use `profile`. - #[arg(short = 'r', long, conflicts_with = "profile")] + #[arg(short = 'R', long, conflicts_with = "profile")] pub(crate) release: bool, /// Build profile for the binary to generate the chain specification. #[arg(long, value_enum)] pub(crate) profile: Option, /// Parachain ID to be used when generating the chain spec files. - #[arg(short = 'i', long)] + #[arg(short, long)] pub(crate) id: Option, /// Whether to keep localhost as a bootnode. - #[arg(long)] + #[arg(short = 'b', long)] pub(crate) default_bootnode: bool, /// Type of the chain. #[arg(short = 't', long = "type", value_enum)] pub(crate) chain_type: Option, /// Provide the chain specification to use (e.g. dev, local, custom or a path to an existing /// file). - #[arg(short = 'c', long = "chain")] + #[arg(short, long)] pub(crate) chain: Option, /// Relay chain this parachain will connect to. - #[arg(long, value_enum)] + #[arg(short = 'r', long, value_enum)] pub(crate) relay: Option, /// Protocol-id to use in the specification. - #[arg(long = "protocol-id")] + #[arg(short = 'P', long = "protocol-id")] pub(crate) protocol_id: Option, /// Whether the genesis state file should be generated. - #[arg(long = "genesis-state")] + #[arg(short = 'S', long = "genesis-state")] pub(crate) genesis_state: bool, /// Whether the genesis code file should be generated. - #[arg(long = "genesis-code")] + #[arg(short = 'C', long = "genesis-code")] pub(crate) genesis_code: bool, } diff --git a/crates/pop-cli/src/commands/call/chain.rs b/crates/pop-cli/src/commands/call/chain.rs index 9751b7dd9..36b4dbd1e 100644 --- a/crates/pop-cli/src/commands/call/chain.rs +++ b/crates/pop-cli/src/commands/call/chain.rs @@ -47,7 +47,7 @@ pub struct CallChainCommand { #[arg(short = 'S', long)] sudo: bool, /// Automatically signs and submits the extrinsic without prompting for confirmation. - #[arg(short('y'), long)] + #[arg(short = 'y', long)] skip_confirm: bool, } diff --git a/crates/pop-cli/src/commands/call/contract.rs b/crates/pop-cli/src/commands/call/contract.rs index 0b2815a85..e83a871d2 100644 --- a/crates/pop-cli/src/commands/call/contract.rs +++ b/crates/pop-cli/src/commands/call/contract.rs @@ -24,16 +24,16 @@ pub struct CallContractCommand { #[arg(short, long)] path: Option, /// The address of the contract to call. - #[arg(name = "contract", short, long, env = "CONTRACT")] + #[arg(short, long, env = "CONTRACT")] contract: Option, /// The name of the contract message to call. - #[arg(long, short)] + #[arg(short, long)] message: Option, /// The message arguments, encoded as strings. #[arg(short, long, num_args = 0..,)] args: Vec, /// The value to be transferred as part of the call. - #[arg(name = "value", short, long, default_value = DEFAULT_PAYABLE_VALUE)] + #[arg(short, long, default_value = DEFAULT_PAYABLE_VALUE)] value: String, /// Maximum amount of gas to be used for this command. /// If not specified it will perform a dry-run to estimate the gas consumed for the @@ -45,24 +45,24 @@ pub struct CallContractCommand { #[arg(short = 'P', long)] proof_size: Option, /// Websocket endpoint of a node. - #[arg(name = "url", short, long, value_parser, default_value = DEFAULT_URL)] + #[arg(short, long, value_parser, default_value = DEFAULT_URL)] url: url::Url, /// Secret key URI for the account calling the contract. /// /// e.g. /// - for a dev account "//Alice" /// - with a password "//Alice///SECRET_PASSWORD" - #[arg(name = "suri", long, short, default_value = DEFAULT_URI)] + #[arg(short, long, default_value = DEFAULT_URI)] suri: String, /// Submit an extrinsic for on-chain execution. - #[arg(short('x'), long)] + #[arg(short = 'x', long)] execute: bool, /// Perform a dry-run via RPC to estimate the gas usage. This does not submit a transaction. #[arg(short = 'D', long, conflicts_with = "execute")] dry_run: bool, /// Enables developer mode, bypassing certain user prompts for faster testing. /// Recommended for testing and local development only. - #[arg(name = "dev", long, short, default_value = "false")] + #[arg(name = "dev", short, long, default_value = "false")] dev_mode: bool, } impl CallContractCommand { diff --git a/crates/pop-cli/src/commands/clean.rs b/crates/pop-cli/src/commands/clean.rs index a2e219c18..63981fedf 100644 --- a/crates/pop-cli/src/commands/clean.rs +++ b/crates/pop-cli/src/commands/clean.rs @@ -26,7 +26,7 @@ pub(crate) enum Command { #[derive(Args)] pub struct CleanCommandArgs { /// Pass flag to remove all artifacts - #[arg(short = 'a', long)] + #[arg(short, long)] pub(crate) all: bool, } diff --git a/crates/pop-cli/src/commands/install/mod.rs b/crates/pop-cli/src/commands/install/mod.rs index 19b9fd3a2..137a4b117 100644 --- a/crates/pop-cli/src/commands/install/mod.rs +++ b/crates/pop-cli/src/commands/install/mod.rs @@ -53,7 +53,7 @@ pub enum Dependencies { #[command(args_conflicts_with_subcommands = true)] pub(crate) struct InstallArgs { /// Automatically install all dependencies required without prompting for confirmation. - #[clap(short('y'), long)] + #[clap(short = 'y', long)] skip_confirm: bool, } diff --git a/crates/pop-cli/src/commands/new/contract.rs b/crates/pop-cli/src/commands/new/contract.rs index 4c3055966..35a9132c6 100644 --- a/crates/pop-cli/src/commands/new/contract.rs +++ b/crates/pop-cli/src/commands/new/contract.rs @@ -32,17 +32,13 @@ pub struct NewContractCommand { /// The type of contract. #[arg( default_value = ContractType::Examples.as_ref(), - short = 'c', + short, long, value_parser = enum_variants!(ContractType) )] pub(crate) contract_type: Option, /// The template to use. - #[arg( - short = 't', - long, - value_parser = enum_variants!(Contract) - )] + #[arg(short, long, value_parser = enum_variants!(Contract))] pub(crate) template: Option, } diff --git a/crates/pop-cli/src/commands/test/contract.rs b/crates/pop-cli/src/commands/test/contract.rs index 7c5edfa74..190d9ac64 100644 --- a/crates/pop-cli/src/commands/test/contract.rs +++ b/crates/pop-cli/src/commands/test/contract.rs @@ -13,22 +13,18 @@ use {std::time::Duration, tokio::time::sleep}; #[derive(Args)] pub(crate) struct TestContractCommand { - #[arg(short = 'p', long, help = "Path for the contract project [default: current directory]")] + #[arg(short, long, help = "Path for the contract project [default: current directory]")] path: Option, /// [DEPRECATED] Run e2e tests - #[arg(short = 'f', long = "features", value_parser=["e2e-tests"])] + #[arg(short, long, value_parser=["e2e-tests"])] features: Option, /// Run end-to-end tests - #[arg(short = 'e', long = "e2e")] + #[arg(short, long)] e2e: bool, - #[arg( - short = 'n', - long = "node", - help = "Path to the contracts node to run e2e tests [default: none]" - )] + #[arg(short, long, help = "Path to the contracts node to run e2e tests [default: none]")] node: Option, /// Automatically source the needed binary required without prompting for confirmation. - #[clap(short('y'), long)] + #[clap(short = 'y', long)] skip_confirm: bool, } diff --git a/crates/pop-cli/src/commands/up/contract.rs b/crates/pop-cli/src/commands/up/contract.rs index 964237642..40e158032 100644 --- a/crates/pop-cli/src/commands/up/contract.rs +++ b/crates/pop-cli/src/commands/up/contract.rs @@ -30,49 +30,49 @@ const FAILED: &str = "🚫 Deployment failed."; #[derive(Args, Clone)] pub struct UpContractCommand { /// Path to the contract build directory. - #[arg(short = 'p', long)] + #[arg(short, long)] path: Option, /// The name of the contract constructor to call. - #[clap(name = "constructor", long, default_value = "new")] + #[clap(short, long, default_value = "new")] constructor: String, /// The constructor arguments, encoded as strings. - #[clap(long, num_args = 0..,)] + #[clap(short, long, num_args = 0..,)] args: Vec, /// Transfers an initial balance to the instantiated contract. - #[clap(name = "value", long, default_value = "0")] + #[clap(short, long, default_value = "0")] value: String, /// Maximum amount of gas to be used for this command. /// If not specified it will perform a dry-run to estimate the gas consumed for the /// instantiation. - #[clap(name = "gas", long)] + #[clap(name = "gas", short, long)] gas_limit: Option, /// Maximum proof size for the instantiation. /// If not specified it will perform a dry-run to estimate the proof size required. - #[clap(long)] + #[clap(short = 'P', long)] proof_size: Option, /// A salt used in the address derivation of the new contract. Use to create multiple /// instances of the same contract code from the same account. - #[clap(long, value_parser = parse_hex_bytes)] + #[clap(short = 'S', long, value_parser = parse_hex_bytes)] salt: Option, /// Websocket endpoint of a chain. - #[clap(name = "url", long, value_parser, default_value = DEFAULT_URL)] + #[clap(short, long, value_parser, default_value = DEFAULT_URL)] url: Url, /// Secret key URI for the account deploying the contract. /// /// e.g. /// - for a dev account "//Alice" /// - with a password "//Alice///SECRET_PASSWORD" - #[clap(name = "suri", long, short, default_value = "//Alice")] + #[clap(short, long, default_value = "//Alice")] suri: String, /// Perform a dry-run via RPC to estimate the gas usage. This does not submit a transaction. - #[clap(long)] + #[clap(short = 'D', long)] dry_run: bool, /// Uploads the contract only, without instantiation. - #[clap(short('u'), long)] + #[clap(short = 'U', long)] upload_only: bool, /// Automatically source or update the needed binary required without prompting for /// confirmation. - #[clap(short('y'), long)] + #[clap(short = 'y', long)] skip_confirm: bool, } diff --git a/crates/pop-cli/src/commands/up/parachain.rs b/crates/pop-cli/src/commands/up/parachain.rs index 2a8da10af..4d59646d0 100644 --- a/crates/pop-cli/src/commands/up/parachain.rs +++ b/crates/pop-cli/src/commands/up/parachain.rs @@ -40,13 +40,13 @@ pub(crate) struct ZombienetCommand { #[arg(short, long)] parachain: Option>, /// The command to run after the network has been launched. - #[clap(name = "cmd", short = 'c', long)] + #[clap(name = "cmd", short, long)] command: Option, /// Whether the output should be verbose. #[arg(short, long, action)] verbose: bool, /// Automatically source all needed binaries required without prompting for confirmation. - #[clap(short('y'), long)] + #[clap(short = 'y', long)] skip_confirm: bool, }