pub enum OptimismHardfork {
Bedrock,
Regolith,
Canyon,
Ecotone,
Fjord,
Granite,
Holocene,
}
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
Implementations§
Source§impl OptimismHardfork
impl OptimismHardfork
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 OptimismHardfork
impl Clone for OptimismHardfork
Source§fn clone(&self) -> OptimismHardfork
fn clone(&self) -> OptimismHardfork
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OptimismHardfork
impl Debug for OptimismHardfork
Source§impl<'de> Deserialize<'de> for OptimismHardfork
impl<'de> Deserialize<'de> for OptimismHardfork
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 OptimismHardfork
impl Display for OptimismHardfork
Source§impl FromStr for OptimismHardfork
impl FromStr for OptimismHardfork
Source§impl Hash for OptimismHardfork
impl Hash for OptimismHardfork
Source§impl Ord for OptimismHardfork
impl Ord for OptimismHardfork
Source§fn cmp(&self, other: &OptimismHardfork) -> Ordering
fn cmp(&self, other: &OptimismHardfork) -> 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 OptimismHardfork
impl PartialEq for OptimismHardfork
Source§impl PartialOrd for OptimismHardfork
impl PartialOrd for OptimismHardfork
Source§impl Serialize for OptimismHardfork
impl Serialize for OptimismHardfork
impl Copy for OptimismHardfork
impl Eq for OptimismHardfork
impl StructuralPartialEq for OptimismHardfork
Auto Trait Implementations§
impl Freeze for OptimismHardfork
impl RefUnwindSafe for OptimismHardfork
impl Send for OptimismHardfork
impl Sync for OptimismHardfork
impl Unpin for OptimismHardfork
impl UnwindSafe for OptimismHardfork
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 bytes