pub struct FixedHardfork { /* private fields */ }Expand description
Fixed hardfork configuration for replay
Implementations§
Source§impl FixedHardfork
impl FixedHardfork
Sourcepub fn new(spec: MegaSpecId) -> Self
pub fn new(spec: MegaSpecId) -> Self
Create a new FixedHardfork with the given spec
Trait Implementations§
Source§impl Clone for FixedHardfork
impl Clone for FixedHardfork
Source§fn clone(&self) -> FixedHardfork
fn clone(&self) -> FixedHardfork
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FixedHardfork
Source§impl Debug for FixedHardfork
impl Debug for FixedHardfork
Source§impl EthereumHardforks for FixedHardfork
impl EthereumHardforks for FixedHardfork
Source§fn ethereum_fork_activation(&self, fork: EthereumHardfork) -> ForkCondition
fn ethereum_fork_activation(&self, fork: EthereumHardfork) -> ForkCondition
Retrieves
ForkCondition by an EthereumHardfork. If fork is not present, returns
ForkCondition::Never.Source§fn is_ethereum_fork_active_at_timestamp(
&self,
fork: EthereumHardfork,
timestamp: u64,
) -> bool
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
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
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
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
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
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
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
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
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
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
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
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.Source§impl MegaHardforks for FixedHardfork
impl MegaHardforks for FixedHardfork
Source§fn mega_fork_activation(&self, fork: MegaHardfork) -> ForkCondition
fn mega_fork_activation(&self, fork: MegaHardfork) -> ForkCondition
Source§fn fork_params_any(
&self,
_fork: MegaHardfork,
) -> Option<&(dyn Any + Sync + Send + 'static)>
fn fork_params_any( &self, _fork: MegaHardfork, ) -> Option<&(dyn Any + Sync + Send + 'static)>
Returns a type-erased reference to per-fork parameters, if configured. Read more
Source§fn fork_params<P>(&self) -> Option<&P>where
P: HardforkParams,
fn fork_params<P>(&self) -> Option<&P>where
P: HardforkParams,
Returns a typed reference to per-fork parameters. Read more
Source§fn hardfork(&self, timestamp: u64) -> Option<MegaHardfork>
fn hardfork(&self, timestamp: u64) -> Option<MegaHardfork>
Returns the current
MegaHardfork active at the given timestamp.Source§fn spec_id(&self, timestamp: u64) -> MegaSpecId
fn spec_id(&self, timestamp: u64) -> MegaSpecId
Returns the current
MegaSpecId for the given block timestamp.Source§fn is_mini_rex_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_mini_rex_active_at_timestamp(&self, timestamp: u64) -> bool
Returns
true if MegaHardfork::MiniRex is active at given block timestamp.Source§fn is_mini_rex_1_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_mini_rex_1_active_at_timestamp(&self, timestamp: u64) -> bool
Returns
true if MegaHardfork::MiniRex1 is active at given block timestamp.Source§fn is_mini_rex_2_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_mini_rex_2_active_at_timestamp(&self, timestamp: u64) -> bool
Returns
true if MegaHardfork::MiniRex2 is active at given block timestamp.Source§fn is_rex_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_rex_active_at_timestamp(&self, timestamp: u64) -> bool
Returns
true if MegaHardfork::Rex is active at given block timestamp.Source§fn is_rex_1_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_rex_1_active_at_timestamp(&self, timestamp: u64) -> bool
Returns
true if MegaHardfork::Rex1 is active at given block timestamp.Source§fn is_rex_2_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_rex_2_active_at_timestamp(&self, timestamp: u64) -> bool
Returns
true if MegaHardfork::Rex2 is active at given block timestamp.Source§fn is_rex_3_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_rex_3_active_at_timestamp(&self, timestamp: u64) -> bool
Returns
true if MegaHardfork::Rex3 is active at given block timestamp.Source§fn is_rex_4_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_rex_4_active_at_timestamp(&self, timestamp: u64) -> bool
Returns
true if MegaHardfork::Rex4 is active at given block timestamp.Source§fn is_rex_5_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_rex_5_active_at_timestamp(&self, timestamp: u64) -> bool
Returns
true if MegaHardfork::Rex5 is active at given block timestamp.Source§impl OpHardforks for FixedHardfork
impl OpHardforks for FixedHardfork
Source§fn op_fork_activation(&self, fork: OpHardfork) -> ForkCondition
fn op_fork_activation(&self, fork: OpHardfork) -> ForkCondition
Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Auto Trait Implementations§
impl Freeze for FixedHardfork
impl RefUnwindSafe for FixedHardfork
impl Send for FixedHardfork
impl Sync for FixedHardfork
impl Unpin for FixedHardfork
impl UnsafeUnpin for FixedHardfork
impl UnwindSafe for FixedHardfork
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.Source§impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
Source§impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnvwhere
TxEnv: FromTxWithEncoded<T>,
impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnvwhere
TxEnv: FromTxWithEncoded<T>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeDebug for T
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.