cargo_unc/commands/
mod.rs

1use strum::{EnumDiscriminants, EnumIter, EnumMessage};
2
3pub mod abi_command;
4pub mod build_command;
5pub mod create_dev_account;
6pub mod deploy;
7pub mod new;
8
9#[derive(Debug, EnumDiscriminants, Clone, interactive_clap::InteractiveClap)]
10#[interactive_clap(context = utility_cli_rs::GlobalContext)]
11#[strum_discriminants(derive(EnumMessage, EnumIter))]
12#[interactive_clap(disable_back)]
13#[non_exhaustive]
14/// What are you up to? (select one of the options with the up-down arrows on your keyboard and press Enter)
15pub enum UncCommand {
16    #[strum_discriminants(strum(
17        message = "new                 -  Initializes a new project to create a contract"
18    ))]
19    /// Initializes a new project to create a contract
20    New(self::new::New),
21    #[strum_discriminants(strum(
22        message = "build               -  Build a UNC contract with embed ABI (opt out by passing `--no-embed-abi`)"
23    ))]
24    /// Build a UNC contract with embed ABI (opt out by passing `--no-embed-abi`)
25    Build(self::build_command::BuildCommand),
26    #[strum_discriminants(strum(
27        message = "abi                 -  Generates ABI for the contract"
28    ))]
29    /// Generates ABI for the contract
30    Abi(self::abi_command::AbiCommand),
31    #[strum_discriminants(strum(
32        message = "create-dev-account  -  Create a development account using a faucet service sponsor to receive some UNC tokens (testnet only).
33                         To create an account on a different network, use UNC CLI [https://unc.cli.rs]"
34    ))]
35    /// Create a development account using the faucet service sponsor to receive some UNC tokens (testnet only)
36    /// To create an account on a different network, use UNC CLI [https://unc.cli.rs]
37    CreateDevAccount(self::create_dev_account::CreateAccount),
38    #[strum_discriminants(strum(message = "deploy              -  Add a new contract code"))]
39    /// Add a new contract code
40    Deploy(self::deploy::Contract),
41}