Skip to content

Commit

Permalink
feat(spammer): add blob flag
Browse files Browse the repository at this point in the history
  • Loading branch information
namn-grg committed Jul 17, 2024
1 parent b30d832 commit 960ab5d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bolt-spammer-helder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ use beacon_api_client::mainnet::Client as BeaconApiClient;
use bolt_spammer_helder::{
constants::SLOTS_PER_EPOCH,
onchain_registry::BoltRegistry,
utils::{current_slot, generate_random_tx, prepare_rpc_request, sign_transaction},
utils::{
current_slot, generate_random_blob_tx, generate_random_tx, prepare_rpc_request,
sign_transaction,
},
};
use clap::Parser;
use eyre::Result;
Expand All @@ -31,6 +34,9 @@ struct Opts {
private_key: String,
#[clap(short = 'a', long, env, default_value = "./registry_abi.json")]
registry_abi_path: PathBuf,
// Flag for blob mode
#[clap(short, long, default_value = "false")]
blob: bool,
}

#[tokio::main]
Expand Down Expand Up @@ -81,7 +87,7 @@ async fn main() -> Result<()> {
}
};

let mut tx = generate_random_tx();
let mut tx = if opts.blob { generate_random_blob_tx() } else { generate_random_tx() };

let (tx_hash, tx_rlp) = sign_transaction(&transaction_signer, tx).await?;

Expand Down

0 comments on commit 960ab5d

Please sign in to comment.