Struct alloy_eips::eip7840::BlobParams
source · pub struct BlobParams {
pub target_blob_count: u64,
pub max_blob_count: u64,
pub update_fraction: u128,
pub min_blob_fee: u128,
}
Expand description
Configuration for the blob-related calculations.
Fields§
§target_blob_count: u64
Target blob count for the block.
max_blob_count: u64
Max blob count for the block.
update_fraction: u128
Update fraction for excess blob gas calculation.
min_blob_fee: u128
Minimum gas price for a data blob.
Implementations§
source§impl BlobParams
impl BlobParams
sourcepub const fn cancun() -> Self
pub const fn cancun() -> Self
Returns BlobParams
configuration activated with Cancun hardfork.
sourcepub const fn prague() -> Self
pub const fn prague() -> Self
Returns BlobParams
configuration activated with Prague hardfork.
sourcepub const fn next_block_excess_blob_gas(
&self,
excess_blob_gas: u64,
blob_gas_used: u64,
) -> u64
pub const fn next_block_excess_blob_gas( &self, excess_blob_gas: u64, blob_gas_used: u64, ) -> u64
Calculates the excess_blob_gas
value for the next block based on the current block
excess_blob_gas
and blob_gas_used
.
sourcepub const fn calc_blob_fee(&self, excess_blob_gas: u64) -> u128
pub const fn calc_blob_fee(&self, excess_blob_gas: u64) -> u128
Calculates the blob fee for block based on its excess_blob_gas
.
Trait Implementations§
source§impl Clone for BlobParams
impl Clone for BlobParams
source§fn clone(&self) -> BlobParams
fn clone(&self) -> BlobParams
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BlobParams
impl Debug for BlobParams
source§impl PartialEq for BlobParams
impl PartialEq for BlobParams
source§fn eq(&self, other: &BlobParams) -> bool
fn eq(&self, other: &BlobParams) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for BlobParams
impl Eq for BlobParams
impl StructuralPartialEq for BlobParams
Auto Trait Implementations§
impl Freeze for BlobParams
impl RefUnwindSafe for BlobParams
impl Send for BlobParams
impl Sync for BlobParams
impl Unpin for BlobParams
impl UnwindSafe for BlobParams
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.