Skip to content
Merged
Changes from 1 commit
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
21 changes: 1 addition & 20 deletions crates/anvil/src/eth/backend/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3120,26 +3120,7 @@ impl Backend {
alloy_eips::eip4844::calc_blob_gasprice(excess_blob_gas.unwrap_or_default());
let blob_gas_used = transaction.blob_gas_used();

let effective_gas_price = match transaction.transaction {
TypedTransaction::Legacy(t) => t.tx().gas_price,
TypedTransaction::EIP2930(t) => t.tx().gas_price,
TypedTransaction::EIP1559(t) => block
.header
.base_fee_per_gas
.map_or(self.base_fee() as u128, |g| g as u128)
.saturating_add(t.tx().max_priority_fee_per_gas),
TypedTransaction::EIP4844(t) => block
.header
.base_fee_per_gas
.map_or(self.base_fee() as u128, |g| g as u128)
.saturating_add(t.tx().tx().max_priority_fee_per_gas),
TypedTransaction::EIP7702(t) => block
.header
.base_fee_per_gas
.map_or(self.base_fee() as u128, |g| g as u128)
.saturating_add(t.tx().max_priority_fee_per_gas),
TypedTransaction::Deposit(_) => 0_u128,
};
let effective_gas_price = transaction.effective_gas_price(Some(self.base_fee()));

let receipts = self.get_receipts(block.body.transactions.iter().map(|tx| tx.hash()));
let next_log_index = receipts[..index].iter().map(|r| r.logs().len()).sum::<usize>();
Expand Down
Loading