pub enum EthereumHardfork {
Show 19 variants
Frontier,
Homestead,
Dao,
Tangerine,
SpuriousDragon,
Byzantium,
Constantinople,
Petersburg,
Istanbul,
MuirGlacier,
Berlin,
London,
ArrowGlacier,
GrayGlacier,
Paris,
Shanghai,
Cancun,
Prague,
Osaka,
}Expand description
The name of an Ethereum hardfork.
Variants§
Frontier
Homestead
Homestead: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/homestead.md.
Dao
The DAO fork: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/dao-fork.md.
Tangerine
SpuriousDragon
Spurious Dragon: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/spurious-dragon.md.
Byzantium
Byzantium: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/byzantium.md.
Constantinople
Constantinople: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/constantinople.md.
Petersburg
Petersburg: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/petersburg.md.
Istanbul
MuirGlacier
Muir Glacier: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/muir-glacier.md.
Berlin
Berlin: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/berlin.md.
London
London: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/london.md.
ArrowGlacier
Arrow Glacier: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md.
GrayGlacier
Gray Glacier: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md.
Paris
Paris: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md.
Shanghai
Cancun
Cancun: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/cancun.md
Prague
Prague.
Osaka
Implementations§
Source§impl EthereumHardfork
impl EthereumHardfork
Sourcepub fn activation_block(&self, chain: Chain) -> Option<u64>
pub fn activation_block(&self, chain: Chain) -> Option<u64>
Retrieves the activation block for the specified hardfork on the given chain.
Sourcepub const fn mainnet_activation_block(&self) -> Option<u64>
pub const fn mainnet_activation_block(&self) -> Option<u64>
Retrieves the activation block for the specified hardfork on the Ethereum mainnet.
Sourcepub const fn sepolia_activation_block(&self) -> Option<u64>
pub const fn sepolia_activation_block(&self) -> Option<u64>
Retrieves the activation block for the specified hardfork on the Sepolia testnet.
Sourcepub const fn arbitrum_sepolia_activation_block(&self) -> Option<u64>
pub const fn arbitrum_sepolia_activation_block(&self) -> Option<u64>
Retrieves the activation block for the specified hardfork on the Arbitrum Sepolia testnet.
Sourcepub const fn arbitrum_activation_block(&self) -> Option<u64>
pub const fn arbitrum_activation_block(&self) -> Option<u64>
Retrieves the activation block for the specified hardfork on the Arbitrum One mainnet.
Sourcepub fn activation_timestamp(&self, chain: Chain) -> Option<u64>
pub fn activation_timestamp(&self, chain: Chain) -> Option<u64>
Retrieves the activation timestamp for the specified hardfork on the given chain.
Sourcepub const fn mainnet_activation_timestamp(&self) -> Option<u64>
pub const fn mainnet_activation_timestamp(&self) -> Option<u64>
Retrieves the activation timestamp for the specified hardfork on the Ethereum mainnet.
Sourcepub const fn sepolia_activation_timestamp(&self) -> Option<u64>
pub const fn sepolia_activation_timestamp(&self) -> Option<u64>
Retrieves the activation timestamp for the specified hardfork on the Sepolia testnet.
Sourcepub const fn holesky_activation_timestamp(&self) -> Option<u64>
pub const fn holesky_activation_timestamp(&self) -> Option<u64>
Retrieves the activation timestamp for the specified hardfork on the Holesky testnet.
Sourcepub const fn hoodi_activation_timestamp(&self) -> Option<u64>
pub const fn hoodi_activation_timestamp(&self) -> Option<u64>
Retrieves the activation timestamp for the specified hardfork on the Hoodi testnet.
Sourcepub const fn arbitrum_sepolia_activation_timestamp(&self) -> Option<u64>
pub const fn arbitrum_sepolia_activation_timestamp(&self) -> Option<u64>
Retrieves the activation timestamp for the specified hardfork on the Arbitrum Sepolia testnet.
Sourcepub const fn arbitrum_activation_timestamp(&self) -> Option<u64>
pub const fn arbitrum_activation_timestamp(&self) -> Option<u64>
Retrieves the activation timestamp for the specified hardfork on the Arbitrum One mainnet.
Sourcepub const fn mainnet() -> [(Self, ForkCondition); 18]
pub const fn mainnet() -> [(Self, ForkCondition); 18]
Ethereum mainnet list of hardforks.
Sourcepub const fn sepolia() -> [(Self, ForkCondition); 16]
pub const fn sepolia() -> [(Self, ForkCondition); 16]
Ethereum sepolia list of hardforks.
Sourcepub const fn holesky() -> [(Self, ForkCondition); 16]
pub const fn holesky() -> [(Self, ForkCondition); 16]
Ethereum holesky list of hardforks.
Sourcepub const fn hoodi() -> [(Self, ForkCondition); 16]
pub const fn hoodi() -> [(Self, ForkCondition); 16]
Ethereum Hoodi list of hardforks.
Sourcepub const fn from_mainnet_block_number(num: u64) -> Self
pub const fn from_mainnet_block_number(num: u64) -> Self
Convert an u64 into an EthereumHardfork.
Sourcepub fn from_chain_and_timestamp(chain: Chain, timestamp: u64) -> Option<Self>
pub fn from_chain_and_timestamp(chain: Chain, timestamp: u64) -> Option<Self>
Reverse lookup to find the hardfork given a chain ID and block timestamp. Returns the active hardfork at the given timestamp for the specified chain.
Trait Implementations§
Source§impl Clone for EthereumHardfork
impl Clone for EthereumHardfork
Source§fn clone(&self) -> EthereumHardfork
fn clone(&self) -> EthereumHardfork
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more