Trait EthereumHardforks
pub trait EthereumHardforks {
Show 13 methods
// Required method
fn ethereum_fork_activation(&self, fork: EthereumHardfork) -> ForkCondition;
// Provided methods
fn is_ethereum_fork_active_at_timestamp(
&self,
fork: EthereumHardfork,
timestamp: u64,
) -> bool { ... }
fn is_ethereum_fork_active_at_block(
&self,
fork: EthereumHardfork,
block_number: u64,
) -> bool { ... }
fn is_shanghai_active_at_timestamp(&self, timestamp: u64) -> bool { ... }
fn is_cancun_active_at_timestamp(&self, timestamp: u64) -> bool { ... }
fn is_prague_active_at_timestamp(&self, timestamp: u64) -> bool { ... }
fn is_osaka_active_at_timestamp(&self, timestamp: u64) -> bool { ... }
fn is_byzantium_active_at_block(&self, block_number: u64) -> bool { ... }
fn is_spurious_dragon_active_at_block(&self, block_number: u64) -> bool { ... }
fn is_homestead_active_at_block(&self, block_number: u64) -> bool { ... }
fn is_london_active_at_block(&self, block_number: u64) -> bool { ... }
fn is_constantinople_active_at_block(&self, block_number: u64) -> bool { ... }
fn is_paris_active_at_block(&self, block_number: u64) -> bool { ... }
}Expand description
Helper methods for Ethereum forks.
Required Methods§
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.
Provided Methods§
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.