Struct EthereumChainHardforks

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

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

Implementations§

Source§

impl EthereumChainHardforks

Source

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

Creates a new EthereumChainHardforks with the given list of forks.

Source

pub fn mainnet() -> Self

Creates a new EthereumChainHardforks with Mainnet configuration.

Source

pub fn sepolia() -> Self

Creates a new EthereumChainHardforks with Sepolia configuration.

Source

pub fn holesky() -> Self

Creates a new EthereumChainHardforks with Holesky configuration.

Source

pub fn hoodi() -> Self

Creates a new EthereumChainHardforks with Hoodi configuration.

Trait Implementations§

Source§

impl Clone for EthereumChainHardforks

Source§

fn clone(&self) -> EthereumChainHardforks

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for EthereumChainHardforks

Source§

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

Formats the value using the given formatter. Read more
Source§

impl EthereumHardforks for EthereumChainHardforks

Source§

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

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

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.
Source§

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.
Source§

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

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

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

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

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

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

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

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

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.
Source§

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.
Source§

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.
Source§

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.
Source§

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.
Source§

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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.