Skip to content

Commit

Permalink
fix builder api
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Sep 18, 2024
1 parent 76e1094 commit c42d544
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions crates/e2e-test-utils/src/transaction.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use alloy_consensus::{
BlobTransactionSidecar, EnvKzgSettings, SidecarBuilder, SimpleCoder, TxEip4844Variant,
TxEnvelope,
use alloy_consensus::{EnvKzgSettings, SidecarBuilder, SimpleCoder, TxEip4844Variant, TxEnvelope};
use alloy_network::{
eip2718::Encodable2718, Ethereum, EthereumWallet, TransactionBuilder, TransactionBuilder4844,
};
use alloy_network::{eip2718::Encodable2718, Ethereum, EthereumWallet, TransactionBuilder};
use alloy_primitives::{hex, Address, Bytes, TxKind, B256, U256};
use alloy_rpc_types::{TransactionInput, TransactionRequest};
use alloy_signer_local::PrivateKeySigner;
Expand Down Expand Up @@ -34,13 +33,8 @@ impl TransactionTestContext {

let mut builder = SidecarBuilder::<SimpleCoder>::new();
builder.ingest(b"dummy blob");
let sidecar: BlobTransactionSidecar = builder.build()?;

<TransactionRequest as TransactionBuilder<Ethereum>>::set_blob_sidecar(&mut tx, sidecar);
<TransactionRequest as TransactionBuilder<Ethereum>>::set_max_fee_per_blob_gas(
&mut tx,
15e9 as u128,
);
tx.set_blob_sidecar(builder.build()?);
tx.set_max_fee_per_blob_gas(15e9 as u128);

let signed = Self::sign_tx(wallet, tx).await;
Ok(signed)
Expand Down

0 comments on commit c42d544

Please sign in to comment.