pub enum OpHardfork {
Bedrock,
Regolith,
Canyon,
Ecotone,
Fjord,
Granite,
Holocene,
Isthmus,
}
Expand description
The name of an optimism hardfork.
When building a list of hardforks for a chain, it’s still expected to mix with
[EthereumHardfork
].
Variants§
Bedrock
Regolith
Regolith: https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/superchain-upgrades.md#regolith.
Canyon
Ecotone
Ecotone: https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/superchain-upgrades.md#ecotone.
Fjord
Fjord: https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/superchain-upgrades.md#fjord
Granite
Granite: https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/superchain-upgrades.md#granite
Holocene
Holocene: https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/superchain-upgrades.md#holocene
Isthmus
Implementations§
Source§impl OpHardfork
impl OpHardfork
Source§impl OpHardfork
impl OpHardfork
Sourcepub fn activation_block<H: Hardfork>(self, fork: H, chain: Chain) -> Option<u64>
pub fn activation_block<H: Hardfork>(self, fork: H, chain: Chain) -> Option<u64>
Retrieves the activation block for the specified hardfork on the given chain.
Sourcepub fn activation_timestamp<H: Hardfork>(
self,
fork: H,
chain: Chain,
) -> Option<u64>
pub fn activation_timestamp<H: Hardfork>( self, fork: H, chain: Chain, ) -> Option<u64>
Retrieves the activation timestamp for the specified hardfork on the given chain.
Sourcepub fn base_sepolia_activation_block<H: Hardfork>(fork: H) -> Option<u64>
pub fn base_sepolia_activation_block<H: Hardfork>(fork: H) -> Option<u64>
Retrieves the activation block for the specified hardfork on the Base Sepolia testnet.
Sourcepub fn base_mainnet_activation_block<H: Hardfork>(fork: H) -> Option<u64>
pub fn base_mainnet_activation_block<H: Hardfork>(fork: H) -> Option<u64>
Retrieves the activation block for the specified hardfork on the Base mainnet.
Sourcepub fn base_sepolia_activation_timestamp<H: Hardfork>(fork: H) -> Option<u64>
pub fn base_sepolia_activation_timestamp<H: Hardfork>(fork: H) -> Option<u64>
Retrieves the activation timestamp for the specified hardfork on the Base Sepolia testnet.
Sourcepub fn base_mainnet_activation_timestamp<H: Hardfork>(fork: H) -> Option<u64>
pub fn base_mainnet_activation_timestamp<H: Hardfork>(fork: H) -> Option<u64>
Retrieves the activation timestamp for the specified hardfork on the Base mainnet.
Sourcepub fn op_mainnet() -> ChainHardforks
pub fn op_mainnet() -> ChainHardforks
Optimism mainnet list of hardforks.
Sourcepub fn op_sepolia() -> ChainHardforks
pub fn op_sepolia() -> ChainHardforks
Optimism sepolia list of hardforks.
Sourcepub fn base_sepolia() -> ChainHardforks
pub fn base_sepolia() -> ChainHardforks
Base sepolia list of hardforks.
Sourcepub fn base_mainnet() -> ChainHardforks
pub fn base_mainnet() -> ChainHardforks
Base mainnet list of hardforks.
Trait Implementations§
Source§impl Clone for OpHardfork
impl Clone for OpHardfork
Source§fn clone(&self) -> OpHardfork
fn clone(&self) -> OpHardfork
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OpHardfork
impl Debug for OpHardfork
Source§impl<'de> Deserialize<'de> for OpHardfork
impl<'de> Deserialize<'de> for OpHardfork
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for OpHardfork
impl Display for OpHardfork
Source§impl FromStr for OpHardfork
impl FromStr for OpHardfork
Source§impl Hash for OpHardfork
impl Hash for OpHardfork
Source§impl Ord for OpHardfork
impl Ord for OpHardfork
Source§fn cmp(&self, other: &OpHardfork) -> Ordering
fn cmp(&self, other: &OpHardfork) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for OpHardfork
impl PartialEq for OpHardfork
Source§impl PartialOrd for OpHardfork
impl PartialOrd for OpHardfork
Source§impl Serialize for OpHardfork
impl Serialize for OpHardfork
impl Copy for OpHardfork
impl Eq for OpHardfork
impl StructuralPartialEq for OpHardfork
Auto Trait Implementations§
impl Freeze for OpHardfork
impl RefUnwindSafe for OpHardfork
impl Send for OpHardfork
impl Sync for OpHardfork
impl Unpin for OpHardfork
impl UnwindSafe for OpHardfork
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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: 1 byte
Size for each variant:
Bedrock
: 0 bytesRegolith
: 0 bytesCanyon
: 0 bytesEcotone
: 0 bytesFjord
: 0 bytesGranite
: 0 bytesHolocene
: 0 bytesIsthmus
: 0 bytes