pub struct ChainSpecBuilder { /* private fields */ }Expand description
A helper to build custom chain specs
Implementations§
Source§impl ChainSpecBuilder
impl ChainSpecBuilder
Sourcepub fn with_fork<H: Hardfork>(self, fork: H, condition: ForkCondition) -> Self
pub fn with_fork<H: Hardfork>(self, fork: H, condition: ForkCondition) -> Self
Add the given fork with the given activation condition to the spec.
Sourcepub fn with_forks(self, forks: ChainHardforks) -> Self
pub fn with_forks(self, forks: ChainHardforks) -> Self
Add the given chain hardforks to the spec.
Sourcepub fn without_fork<H: Hardfork>(self, fork: H) -> Self
pub fn without_fork<H: Hardfork>(self, fork: H) -> Self
Remove the given fork from the spec.
Sourcepub fn paris_at_ttd(
self,
ttd: U256,
activation_block_number: BlockNumber,
) -> Self
pub fn paris_at_ttd( self, ttd: U256, activation_block_number: BlockNumber, ) -> Self
Enable the Paris hardfork at the given TTD.
Does not set the merge netsplit block.
Sourcepub fn frontier_activated(self) -> Self
pub fn frontier_activated(self) -> Self
Enable Frontier at genesis.
Sourcepub fn dao_activated(self) -> Self
pub fn dao_activated(self) -> Self
Enable Dao at genesis.
Sourcepub fn homestead_activated(self) -> Self
pub fn homestead_activated(self) -> Self
Enable Homestead at genesis.
Sourcepub fn tangerine_whistle_activated(self) -> Self
pub fn tangerine_whistle_activated(self) -> Self
Enable Tangerine at genesis.
Sourcepub fn spurious_dragon_activated(self) -> Self
pub fn spurious_dragon_activated(self) -> Self
Enable Spurious Dragon at genesis.
Sourcepub fn byzantium_activated(self) -> Self
pub fn byzantium_activated(self) -> Self
Enable Byzantium at genesis.
Sourcepub fn constantinople_activated(self) -> Self
pub fn constantinople_activated(self) -> Self
Enable Constantinople at genesis.
Sourcepub fn petersburg_activated(self) -> Self
pub fn petersburg_activated(self) -> Self
Enable Petersburg at genesis.
Sourcepub fn istanbul_activated(self) -> Self
pub fn istanbul_activated(self) -> Self
Enable Istanbul at genesis.
Sourcepub fn muirglacier_activated(self) -> Self
pub fn muirglacier_activated(self) -> Self
Enable Muir Glacier at genesis.
Sourcepub fn berlin_activated(self) -> Self
pub fn berlin_activated(self) -> Self
Enable Berlin at genesis.
Sourcepub fn london_activated(self) -> Self
pub fn london_activated(self) -> Self
Enable London at genesis.
Sourcepub fn arrowglacier_activated(self) -> Self
pub fn arrowglacier_activated(self) -> Self
Enable Arrow Glacier at genesis.
Sourcepub fn grayglacier_activated(self) -> Self
pub fn grayglacier_activated(self) -> Self
Enable Gray Glacier at genesis.
Sourcepub fn paris_activated(self) -> Self
pub fn paris_activated(self) -> Self
Enable Paris at genesis.
Sourcepub fn shanghai_activated(self) -> Self
pub fn shanghai_activated(self) -> Self
Enable Shanghai at genesis.
Sourcepub fn cancun_activated(self) -> Self
pub fn cancun_activated(self) -> Self
Enable Cancun at genesis.
Sourcepub fn prague_activated(self) -> Self
pub fn prague_activated(self) -> Self
Enable Prague at genesis.
Sourcepub fn with_prague_at(self, timestamp: u64) -> Self
pub fn with_prague_at(self, timestamp: u64) -> Self
Enable Prague at the given timestamp.
Sourcepub fn osaka_activated(self) -> Self
pub fn osaka_activated(self) -> Self
Enable Osaka at genesis.
Sourcepub fn with_osaka_at(self, timestamp: u64) -> Self
pub fn with_osaka_at(self, timestamp: u64) -> Self
Enable Osaka at the given timestamp.
Sourcepub fn amsterdam_activated(self) -> Self
pub fn amsterdam_activated(self) -> Self
Enable Amsterdam at genesis.
Sourcepub fn with_amsterdam_at(self, timestamp: u64) -> Self
pub fn with_amsterdam_at(self, timestamp: u64) -> Self
Enable Amsterdam at the given timestamp.
Sourcepub fn bogota_activated(self) -> Self
pub fn bogota_activated(self) -> Self
Enable Bogota at genesis.
Sourcepub fn with_bogota_at(self, timestamp: u64) -> Self
pub fn with_bogota_at(self, timestamp: u64) -> Self
Enable Bogota at the given timestamp.
Sourcepub fn build(self) -> ChainSpec
pub fn build(self) -> ChainSpec
Build the resulting ChainSpec.
§Panics
This function panics if the chain ID and genesis is not set (Self::chain and
Self::genesis)
Trait Implementations§
Source§impl Clone for ChainSpecBuilder
impl Clone for ChainSpecBuilder
Source§impl Debug for ChainSpecBuilder
impl Debug for ChainSpecBuilder
Source§impl Default for ChainSpecBuilder
impl Default for ChainSpecBuilder
Auto Trait Implementations§
impl !Freeze for ChainSpecBuilder
impl !RefUnwindSafe for ChainSpecBuilder
impl !UnwindSafe for ChainSpecBuilder
impl Send for ChainSpecBuilder
impl Sync for ChainSpecBuilder
impl Unpin for ChainSpecBuilder
impl UnsafeUnpin for ChainSpecBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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 more§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
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: 976 bytes