Skip to content

Commit

Permalink
fix(spammer): random blob data and calldata, higher price
Browse files Browse the repository at this point in the history
  • Loading branch information
thedevbirb committed Jul 19, 2024
1 parent d53da9b commit 69c6357
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bolt-spammer/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ pub fn generate_random_tx() -> TransactionRequest {

/// Generate random transaction with blob (eip4844)
pub fn generate_random_blob_tx() -> TransactionRequest {
let sidecar: SidecarBuilder<SimpleCoder> = SidecarBuilder::from_slice(b"Blobs are fun!");
let random_bytes = thread_rng().gen::<[u8; 32]>();
let sidecar: SidecarBuilder<SimpleCoder> = SidecarBuilder::from_slice(random_bytes.as_slice());
let sidecar: BlobTransactionSidecar = sidecar.build().unwrap();

let dead_address = Address::from_str(DEAD_ADDRESS).unwrap();
Expand All @@ -35,10 +36,11 @@ pub fn generate_random_blob_tx() -> TransactionRequest {
.with_chain_id(KURTOSIS_CHAIN_ID)
.with_value(U256::from(100))
.with_max_fee_per_blob_gas(100u128)
.max_fee_per_gas(100u128)
.max_priority_fee_per_gas(50u128)
.max_fee_per_gas(NOICE_GAS_PRICE)
.max_priority_fee_per_gas(NOICE_GAS_PRICE / 10)
.with_gas_limit(1_000_000u128)
.with_blob_sidecar(sidecar)
.with_input(random_bytes)
}

pub fn prepare_rpc_request(method: &str, params: Vec<Value>) -> Value {
Expand Down

0 comments on commit 69c6357

Please sign in to comment.