Skip to content

Commit

Permalink
feat: extend FeeHistory type with eip-4844 fields (#188)
Browse files Browse the repository at this point in the history
* feat: extend FeeHistory type with eip-4844 fields

* feat: add skip_serializing for the new fields
  • Loading branch information
allnil authored Feb 6, 2024
1 parent 70fc87c commit 48f1c0f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/rpc-types/src/eth/fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ pub struct FeeHistory {
///
/// The `Option` is only for compatability with Erigon and Geth.
pub gas_used_ratio: Vec<f64>,
/// An array of block base fees per blob gas. This includes the next block after the newest
/// of the returned range, because this value can be derived from the newest block. Zeroes
/// are returned for pre-EIP-4844 blocks.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub base_fee_per_blob_gas: Vec<U256>,
/// An array of block blob gas used ratios. These are calculated as the ratio of gasUsed and
/// gasLimit.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub blob_gas_used_ratio: Vec<f64>,
/// Lowest number block of the returned range.
pub oldest_block: U256,
/// An (optional) array of effective priority fee per gas data points from a single
Expand Down

0 comments on commit 48f1c0f

Please sign in to comment.