pub struct EthereumChainHardforks { /* private fields */ }
Expand description
A type allowing to configure activation ForkCondition
s for a given list of
EthereumHardfork
s.
Implementations§
Source§impl EthereumChainHardforks
impl EthereumChainHardforks
Sourcepub fn new(
forks: impl IntoIterator<Item = (EthereumHardfork, ForkCondition)>,
) -> Self
pub fn new( forks: impl IntoIterator<Item = (EthereumHardfork, ForkCondition)>, ) -> Self
Creates a new EthereumChainHardforks
with the given list of forks.
Sourcepub fn mainnet() -> Self
pub fn mainnet() -> Self
Creates a new EthereumChainHardforks
with Mainnet configuration.
Sourcepub fn sepolia() -> Self
pub fn sepolia() -> Self
Creates a new EthereumChainHardforks
with Sepolia configuration.
Sourcepub fn holesky() -> Self
pub fn holesky() -> Self
Creates a new EthereumChainHardforks
with Holesky configuration.
Sourcepub fn hoodi() -> Self
pub fn hoodi() -> Self
Creates a new EthereumChainHardforks
with Hoodi configuration.
Trait Implementations§
Source§impl Clone for EthereumChainHardforks
impl Clone for EthereumChainHardforks
Source§fn clone(&self) -> EthereumChainHardforks
fn clone(&self) -> EthereumChainHardforks
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 EthereumChainHardforks
impl Debug for EthereumChainHardforks
Source§impl EthereumHardforks for EthereumChainHardforks
impl EthereumHardforks for EthereumChainHardforks
Source§fn ethereum_fork_activation(&self, fork: EthereumHardfork) -> ForkCondition
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
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
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
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
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
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
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
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
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
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
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
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
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§
impl Freeze for EthereumChainHardforks
impl RefUnwindSafe for EthereumChainHardforks
impl Send for EthereumChainHardforks
impl Sync for EthereumChainHardforks
impl Unpin for EthereumChainHardforks
impl UnwindSafe for EthereumChainHardforks
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