Trait OpHardforks
pub trait OpHardforks: EthereumHardforks {
// Required method
fn op_fork_activation(&self, fork: OpHardfork) -> ForkCondition;
// Provided methods
fn is_bedrock_active_at_block(&self, block_number: u64) -> bool { ... }
fn is_regolith_active_at_timestamp(&self, timestamp: u64) -> bool { ... }
fn is_canyon_active_at_timestamp(&self, timestamp: u64) -> bool { ... }
fn is_ecotone_active_at_timestamp(&self, timestamp: u64) -> bool { ... }
fn is_fjord_active_at_timestamp(&self, timestamp: u64) -> bool { ... }
fn is_granite_active_at_timestamp(&self, timestamp: u64) -> bool { ... }
fn is_holocene_active_at_timestamp(&self, timestamp: u64) -> bool { ... }
fn is_isthmus_active_at_timestamp(&self, timestamp: u64) -> bool { ... }
fn is_interop_active_at_timestamp(&self, timestamp: u64) -> bool { ... }
}
Expand description
Extends [EthereumHardforks
] with optimism helper methods.
Required Methods§
fn op_fork_activation(&self, fork: OpHardfork) -> ForkCondition
fn op_fork_activation(&self, fork: OpHardfork) -> ForkCondition
Retrieves [ForkCondition
] by an OpHardfork
. If fork
is not present, returns
[ForkCondition::Never
].
Provided Methods§
fn is_bedrock_active_at_block(&self, block_number: u64) -> bool
fn is_bedrock_active_at_block(&self, block_number: u64) -> bool
Convenience method to check if OpHardfork::Bedrock
is active at a given block
number.
fn is_regolith_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_regolith_active_at_timestamp(&self, timestamp: u64) -> bool
Returns true
if Regolith
is active at given block
timestamp.
fn is_canyon_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_canyon_active_at_timestamp(&self, timestamp: u64) -> bool
Returns true
if Canyon
is active at given block timestamp.
fn is_ecotone_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_ecotone_active_at_timestamp(&self, timestamp: u64) -> bool
Returns true
if Ecotone
is active at given block timestamp.
fn is_fjord_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_fjord_active_at_timestamp(&self, timestamp: u64) -> bool
Returns true
if Fjord
is active at given block timestamp.
fn is_granite_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_granite_active_at_timestamp(&self, timestamp: u64) -> bool
Returns true
if Granite
is active at given block timestamp.
fn is_holocene_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_holocene_active_at_timestamp(&self, timestamp: u64) -> bool
Returns true
if Holocene
is active at given block
timestamp.
fn is_isthmus_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_isthmus_active_at_timestamp(&self, timestamp: u64) -> bool
Returns true
if Isthmus
is active at given block
timestamp.
fn is_interop_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_interop_active_at_timestamp(&self, timestamp: u64) -> bool
Returns true
if Interop
is active at given block
timestamp.