Skip to content

feat(iota): add --faucet-coin-count to start cmd #6846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion crates/iota/src/iota_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ pub enum IotaCommand {
/// Defaults to `200000000000`(200 IOTA).
#[arg(long)]
faucet_amount: Option<u64>,
/// Set the amount of coin objects the faucet will send for each
/// request. Defaults to 5.
#[arg(long)]
faucet_coin_count: Option<usize>,
#[cfg(feature = "indexer")]
#[command(flatten)]
indexer_feature_args: IndexerFeatureArgs,
Expand Down Expand Up @@ -392,6 +396,7 @@ impl IotaCommand {
force_regenesis,
with_faucet,
faucet_amount,
faucet_coin_count,
#[cfg(feature = "indexer")]
indexer_feature_args,
fullnode_rpc_port,
Expand All @@ -408,6 +413,7 @@ impl IotaCommand {
config_dir.clone(),
with_faucet,
faucet_amount,
faucet_coin_count,
#[cfg(feature = "indexer")]
indexer_feature_args,
force_regenesis,
Expand Down Expand Up @@ -640,6 +646,7 @@ async fn start(
config_dir: Option<PathBuf>,
with_faucet: Option<String>,
faucet_amount: Option<u64>,
faucet_coin_count: Option<usize>,
#[cfg(feature = "indexer")] indexer_feature_args: IndexerFeatureArgs,
force_regenesis: bool,
epoch_duration_ms: Option<u64>,
Expand Down Expand Up @@ -911,7 +918,7 @@ async fn start(
let config = FaucetConfig {
host_ip,
port: faucet_address.port(),
num_coins: DEFAULT_FAUCET_NUM_COINS,
num_coins: faucet_coin_count.unwrap_or(DEFAULT_FAUCET_NUM_COINS),
amount: faucet_amount.unwrap_or(DEFAULT_FAUCET_NANOS_AMOUNT),
..Default::default()
};
Expand Down
1 change: 1 addition & 0 deletions crates/iota/tests/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ async fn test_start() -> Result<(), anyhow::Error> {
force_regenesis: false,
with_faucet: None,
faucet_amount: None,
faucet_coin_count: None,
fullnode_rpc_port: 9000,
committee_size: None,
epoch_duration_ms: None,
Expand Down
Loading