Skip to content

Commit

Permalink
Added Curry and Run to CLI, Fixed Raise and Modified Program from vec
Browse files Browse the repository at this point in the history
  • Loading branch information
DaOneLuna committed Oct 24, 2024
1 parent 83fea61 commit 8823b5b
Show file tree
Hide file tree
Showing 8 changed files with 913 additions and 772 deletions.
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage = "https://github.com/GalactechsLLC/dg_xch_utils"
repository = "https://github.com/GalactechsLLC/dg_xch_utils"

[lib]
name = "dg_xch_cli"
name = "dg_xch_cli_lib"
path = "src/lib.rs"

[[bin]]
Expand Down
27 changes: 26 additions & 1 deletion cli/src/cli/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use bip39::Mnemonic;
use clap::{Parser, Subcommand};
use clap::{Parser, Subcommand, ValueEnum};
use dg_xch_core::blockchain::sized_bytes::Bytes32;
use dialoguer::theme::ColorfulTheme;
use dialoguer::Input;
Expand Down Expand Up @@ -317,6 +317,31 @@ pub enum RootCommands {
#[command(subcommand)]
action: WalletAction,
},
#[command(about = "Create a cold wallet or a PlotNFT wallet", long_about = None)]
Curry {
#[arg(short = 'p', long = "program")]
program: String,
#[arg(short = 'a', long = "args")]
args: String,
#[arg(short = 'o', long = "output")]
output: Option<ProgramOutput>,
},
#[command(about = "Create a cold wallet or a PlotNFT wallet", long_about = None)]
Run {
#[arg(short = 'p', long = "program")]
program: String,
#[arg(short = 'a', long = "args")]
args: String,
#[arg(short = 'o', long = "output")]
output: Option<ProgramOutput>,
},
}

#[derive(Default, ValueEnum, Copy, Clone, Debug)]
pub enum ProgramOutput {
#[default]
Hex,
String,
}

#[derive(Debug, Subcommand)]
Expand Down
Loading

0 comments on commit 8823b5b

Please sign in to comment.