Trait EthereumHardforks

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

Source

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

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

Provided Methods§

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.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + EthereumHardforks + ?Sized> EthereumHardforks for &'a T

Source§

impl<T: EthereumHardforks + ?Sized> EthereumHardforks for Arc<T>

Implementors§