use clap::{Args, Subcommand};
use std::path::PathBuf;
#[derive(Args, Debug, Clone)]
pub struct TokenArgs {
#[arg(short, long)]
pub wallet: Option<PathBuf>,
#[arg(short, long)]
pub password: Option<String>,
#[clap(subcommand)]
pub command: TokenCommands,
}
#[derive(Subcommand, Debug, Clone)]
pub enum TokenCommands {
Info {
contract: String,
},
Balance {
contract: String,
address: Option<String>,
},
Transfer {
token: String,
to: String,
amount: String,
data: Option<String>,
},
}
#[derive(Args, Debug, Clone)]
pub struct SwapArgs {
#[arg(short, long)]
pub wallet: Option<PathBuf>,
#[arg(short, long)]
pub password: Option<String>,
#[clap(subcommand)]
pub command: SwapCommands,
}
#[derive(Subcommand, Debug, Clone)]
pub enum SwapCommands {
Swap {
#[arg(long)]
from_token: String,
#[arg(long)]
to_token: String,
#[arg(long)]
amount: String,
#[arg(long, default_value = "1.0")]
slippage: f64,
},
Quote {
#[arg(long)]
from_token: String,
#[arg(long)]
to_token: String,
#[arg(long)]
amount: String,
},
}
#[derive(Args, Debug, Clone)]
pub struct LiquidityArgs {
#[arg(short, long)]
pub wallet: Option<PathBuf>,
#[arg(short, long)]
pub password: Option<String>,
#[clap(subcommand)]
pub command: LiquidityCommands,
}
#[derive(Subcommand, Debug, Clone)]
pub enum LiquidityCommands {
Add {
#[arg(long)]
token_a: String,
#[arg(long)]
token_b: String,
#[arg(long)]
amount_a: String,
#[arg(long)]
amount_b: String,
},
Remove {
#[arg(long)]
token_a: String,
#[arg(long)]
token_b: String,
#[arg(long)]
percentage: f64,
},
List,
}
#[derive(Args, Debug, Clone)]
pub struct StakingArgs {
#[arg(short, long)]
pub wallet: Option<PathBuf>,
#[arg(short, long)]
pub password: Option<String>,
#[clap(subcommand)]
pub command: StakingCommands,
}
#[derive(Subcommand, Debug, Clone)]
pub enum StakingCommands {
Stake {
token: String,
amount: String,
#[arg(long)]
period: Option<u32>,
},
Unstake {
token: String,
amount: String,
},
Claim {
token: String,
},
Info {
token: Option<String>,
},
}