Struct EthereumChainHardforks
pub struct EthereumChainHardforks { /* private fields */ }
Expand description
A type allowing to configure activation ForkCondition
s for a given list of
EthereumHardfork
s.
Implementations§
§impl EthereumChainHardforks
impl EthereumChainHardforks
pub fn new(
forks: impl IntoIterator<Item = (EthereumHardfork, ForkCondition)>,
) -> 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
pub fn mainnet() -> EthereumChainHardforks
Creates a new EthereumChainHardforks
with Mainnet configuration.
pub fn sepolia() -> EthereumChainHardforks
pub fn sepolia() -> EthereumChainHardforks
Creates a new EthereumChainHardforks
with Sepolia configuration.
pub fn holesky() -> EthereumChainHardforks
pub fn holesky() -> EthereumChainHardforks
Creates a new EthereumChainHardforks
with Holesky configuration.
pub fn hoodi() -> EthereumChainHardforks
pub fn hoodi() -> EthereumChainHardforks
Creates a new EthereumChainHardforks
with Hoodi configuration.
Trait Implementations§
§impl Clone for EthereumChainHardforks
impl Clone for EthereumChainHardforks
§fn clone(&self) -> 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)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for EthereumChainHardforks
impl Debug for EthereumChainHardforks
§impl EthereumHardforks for EthereumChainHardforks
impl EthereumHardforks for EthereumChainHardforks
§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
.§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.§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.§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.§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.§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.§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.§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.§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.§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.§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.§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.§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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