Skip to content

Commit

Permalink
Including updates for these commits:
Browse files Browse the repository at this point in the history
keep up with alloy PRs
- alloy-rs/alloy#1807
- alloy-rs/alloy#1828
  • Loading branch information
MBerguer committed Jan 8, 2025
1 parent b196286 commit a1ef43b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
4 changes: 0 additions & 4 deletions src/network/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ impl alloy::consensus::BlockHeader for Header {
self.inner.requests_hash()
}

fn target_blobs_per_block(&self) -> Option<u64> {
self.inner.target_blobs_per_block()
}

fn extra_data(&self) -> &alloy::primitives::Bytes {
self.inner.extra_data()
}
Expand Down
9 changes: 3 additions & 6 deletions src/network/header_response.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use alloy::eips::eip7840::BlobParams;
use serde::{Deserialize, Serialize};

/// See [HeaderResponse](https://docs.rs/alloy/latest/alloy/network/primitives/trait.HeaderResponse.html).
Expand Down Expand Up @@ -25,8 +26,8 @@ impl alloy::consensus::BlockHeader for HeaderResponse {
self.inner.base_fee_per_gas()
}

fn next_block_blob_fee(&self) -> Option<u128> {
self.inner.next_block_blob_fee()
fn next_block_blob_fee(&self, blob_params: BlobParams) -> Option<u128> {
self.inner.next_block_blob_fee(blob_params)
}

fn gas_limit(&self) -> u64 {
Expand Down Expand Up @@ -96,10 +97,6 @@ impl alloy::consensus::BlockHeader for HeaderResponse {
fn requests_hash(&self) -> Option<alloy::primitives::B256> {
self.inner.requests_hash()
}

fn target_blobs_per_block(&self) -> Option<u64> {
self.inner.target_blobs_per_block()
}
}

impl alloy::network::primitives::HeaderResponse for HeaderResponse {
Expand Down
2 changes: 1 addition & 1 deletion src/network/receipt_envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ where
}
}

fn cumulative_gas_used(&self) -> u128 {
fn cumulative_gas_used(&self) -> u64 {
match self {
ReceiptEnvelope::Native(re) => re.cumulative_gas_used(),
ReceiptEnvelope::Eip712(re) => re.cumulative_gas_used(),
Expand Down
6 changes: 3 additions & 3 deletions src/network/receipt_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl<T: TxReceipt<Log = Log>> alloy::network::ReceiptResponse for ReceiptRespons
}

/// Gas used by this transaction alone.
fn gas_used(&self) -> u128 {
fn gas_used(&self) -> u64 {
self.inner.gas_used()
}

Expand All @@ -88,7 +88,7 @@ impl<T: TxReceipt<Log = Log>> alloy::network::ReceiptResponse for ReceiptRespons
}

/// Blob gas used by the eip-4844 transaction.
fn blob_gas_used(&self) -> Option<u128> {
fn blob_gas_used(&self) -> Option<u64> {
self.inner.blob_gas_used()
}

Expand All @@ -113,7 +113,7 @@ impl<T: TxReceipt<Log = Log>> alloy::network::ReceiptResponse for ReceiptRespons
}

/// Returns the cumulative gas used at this receipt.
fn cumulative_gas_used(&self) -> u128 {
fn cumulative_gas_used(&self) -> u64 {
self.inner.cumulative_gas_used()
}

Expand Down
4 changes: 0 additions & 4 deletions src/network/tx_envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,6 @@ mod serde_from {
TxEnvelope::Native(alloy::consensus::TxEnvelope::Eip7702(signed)) => {
Self::Eip7702(signed)
}
TxEnvelope::Native(tx) => panic!(
"Unsupported native Ethereum transaction type: {}",
tx.tx_type()
),
TxEnvelope::Eip712(signed) => Self::Eip712(signed),
}
}
Expand Down

0 comments on commit a1ef43b

Please sign in to comment.