Struct EthereumChainHardforks

pub struct EthereumChainHardforks { /* private fields */ }
Expand description

A type allowing to configure activation ForkConditions for a given list of EthereumHardforks.

Implementations§

§

impl EthereumChainHardforks

pub fn new( forks: impl IntoIterator<Item = (EthereumHardfork, ForkCondition)>, ) -> EthereumChainHardforks

Creates a new EthereumChainHardforks with the given list of forks.

pub fn mainnet() -> EthereumChainHardforks

Creates a new EthereumChainHardforks with Mainnet configuration.

pub fn sepolia() -> EthereumChainHardforks

Creates a new EthereumChainHardforks with Sepolia configuration.

pub fn holesky() -> EthereumChainHardforks

Creates a new EthereumChainHardforks with Holesky configuration.

pub fn hoodi() -> EthereumChainHardforks

Creates a new EthereumChainHardforks with Hoodi configuration.

Trait Implementations§

§

impl Clone for EthereumChainHardforks

§

fn clone(&self) -> EthereumChainHardforks

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for EthereumChainHardforks

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl EthereumHardforks for EthereumChainHardforks

§

fn ethereum_fork_activation(&self, fork: EthereumHardfork) -> ForkCondition

Retrieves ForkCondition by an EthereumHardfork. If fork is not present, returns ForkCondition::Never.
§

fn is_ethereum_fork_active_at_timestamp( &self, fork: EthereumHardfork, timestamp: u64, ) -> bool

Convenience method to check if an EthereumHardfork is active at a given timestamp.
§

fn is_ethereum_fork_active_at_block( &self, fork: EthereumHardfork, block_number: u64, ) -> bool

Convenience method to check if an EthereumHardfork is active at a given block number.
§

fn is_shanghai_active_at_timestamp(&self, timestamp: u64) -> bool

Convenience method to check if EthereumHardfork::Shanghai is active at a given timestamp.
§

fn is_cancun_active_at_timestamp(&self, timestamp: u64) -> bool

Convenience method to check if EthereumHardfork::Cancun is active at a given timestamp.
§

fn is_prague_active_at_timestamp(&self, timestamp: u64) -> bool

Convenience method to check if EthereumHardfork::Prague is active at a given timestamp.
§

fn is_osaka_active_at_timestamp(&self, timestamp: u64) -> bool

Convenience method to check if EthereumHardfork::Osaka is active at a given timestamp.
§

fn is_byzantium_active_at_block(&self, block_number: u64) -> bool

Convenience method to check if EthereumHardfork::Byzantium is active at a given block number.
§

fn is_spurious_dragon_active_at_block(&self, block_number: u64) -> bool

Convenience method to check if EthereumHardfork::SpuriousDragon is active at a given block number.
§

fn is_homestead_active_at_block(&self, block_number: u64) -> bool

Convenience method to check if EthereumHardfork::Homestead is active at a given block number.
§

fn is_london_active_at_block(&self, block_number: u64) -> bool

Convenience method to check if EthereumHardfork::London is active at a given block number.
§

fn is_constantinople_active_at_block(&self, block_number: u64) -> bool

Convenience method to check if EthereumHardfork::Constantinople is active at a given block number.
§

fn is_paris_active_at_block(&self, block_number: u64) -> bool

Convenience method to check if EthereumHardfork::Paris is active at a given block number.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 24 bytes