Skip to content

Commit

Permalink
feat: iac overhaul (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalabru authored Feb 10, 2025
1 parent c7c34c4 commit 25ed3a5
Show file tree
Hide file tree
Showing 15 changed files with 480 additions and 284 deletions.
41 changes: 37 additions & 4 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ url = "2.5.4"
dialoguer = "0.11.0"
mustache = "0.9.0"
crossbeam = "0.8.4"
dirs = "6.0.0"

[features]
default = ["cli"]
Expand Down
23 changes: 19 additions & 4 deletions crates/cli/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ pub const DEFAULT_SLOT_TIME_MS: &str = "400";
pub const DEFAULT_BINDING_PORT: &str = "8899";
pub const DEFAULT_BINDING_ADDRESS: &str = "127.0.0.1";
pub const DEFAULT_RPC_URL: &str = "https://api.mainnet-beta.solana.com";
pub const DEFAULT_RUNBOOK: &str = "deployment";
pub const DEFAULT_AIRDROP_AMOUNT: &str = "10000000000000";
pub const DEFAULT_AIRDROPPED_KEYPAIR_PATH: &str = "~/.config/solana/id.json";

#[allow(dead_code)]
impl Context {
Expand Down Expand Up @@ -75,17 +78,29 @@ pub struct StartSimnet {
#[arg(long = "slot-time", short = 's', default_value = DEFAULT_SLOT_TIME_MS)]
pub slot_time: u64,
/// Set the ip
#[arg(long = "rpc-url", short = 'r', default_value = DEFAULT_RPC_URL)]
#[arg(long = "rpc-url", short = 'u', default_value = DEFAULT_RPC_URL)]
pub rpc_url: String,
/// Display streams of logs instead of terminal UI dashboard (default: false)
#[clap(long = "no-tui")]
pub no_tui: bool,
/// Disable auto deployments
#[clap(long = "no-deploy")]
pub no_deploy: bool,
/// Include debug logs (default: false)
#[clap(long = "debug", action=ArgAction::SetTrue)]
pub debug: bool,
/// Disable auto deployments (default: false)
#[clap(long = "no-deploy")]
pub no_deploy: bool,
/// List of runbooks-id to run
#[arg(long = "runbook", short = 'r', default_value = DEFAULT_RUNBOOK)]
pub runbooks: Vec<String>,
/// List of pubkeys to airdrop
#[arg(long = "airdrop", short = 'a')]
pub airdrop_addresses: Vec<String>,
/// Quantity of tokens to airdrop
#[arg(long = "airdrop-amount", short = 'q', default_value = DEFAULT_AIRDROP_AMOUNT)]
pub airdrop_token_amount: u64,
/// List of keypair paths to airdrop
#[arg(long = "airdrop-keypair-path", short = 'k', default_value = DEFAULT_AIRDROPPED_KEYPAIR_PATH)]
pub airdrop_keypair_path: Vec<String>,
}

#[derive(Parser, PartialEq, Clone, Debug)]
Expand Down
Loading

0 comments on commit 25ed3a5

Please sign in to comment.