reth_chainspec

Trait EthChainSpec

Source
pub trait EthChainSpec:
    Send
    + Sync
    + Unpin
    + Debug {
    type Header;

Show 13 methods // Required methods fn chain(&self) -> Chain; fn base_fee_params_at_block(&self, block_number: u64) -> BaseFeeParams; fn base_fee_params_at_timestamp(&self, timestamp: u64) -> BaseFeeParams; fn deposit_contract(&self) -> Option<&DepositContract>; fn genesis_hash(&self) -> B256; fn prune_delete_limit(&self) -> usize; fn display_hardforks(&self) -> Box<dyn Display>; fn genesis_header(&self) -> &Self::Header; fn genesis(&self) -> &Genesis; fn bootnodes(&self) -> Option<Vec<NodeRecord>>; // Provided methods fn chain_id(&self) -> u64 { ... } fn is_optimism(&self) -> bool { ... } fn is_ethereum(&self) -> bool { ... }
}
Expand description

Trait representing type configuring a chain spec.

Required Associated Types§

Source

type Header

The header type of the network.

Required Methods§

Source

fn chain(&self) -> Chain

Returns the Chain object this spec targets.

Source

fn base_fee_params_at_block(&self, block_number: u64) -> BaseFeeParams

Get the BaseFeeParams for the chain at the given block.

Source

fn base_fee_params_at_timestamp(&self, timestamp: u64) -> BaseFeeParams

Get the BaseFeeParams for the chain at the given timestamp.

Source

fn deposit_contract(&self) -> Option<&DepositContract>

Returns the deposit contract data for the chain, if it’s present

Source

fn genesis_hash(&self) -> B256

The genesis hash.

Source

fn prune_delete_limit(&self) -> usize

The delete limit for pruner, per run.

Source

fn display_hardforks(&self) -> Box<dyn Display>

Returns a string representation of the hardforks.

Source

fn genesis_header(&self) -> &Self::Header

The genesis header.

Source

fn genesis(&self) -> &Genesis

The genesis block specification.

Source

fn bootnodes(&self) -> Option<Vec<NodeRecord>>

The bootnodes for the chain, if any.

Provided Methods§

Source

fn chain_id(&self) -> u64

Returns the chain id number

Source

fn is_optimism(&self) -> bool

Returns true if this chain contains Optimism configuration.

Source

fn is_ethereum(&self) -> bool

Returns true if this chain contains Ethereum configuration.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + EthChainSpec + ?Sized> EthChainSpec for &'a T
where &'a T: Send + Sync + Unpin + Debug,

Source§

impl<T: EthChainSpec + ?Sized> EthChainSpec for Arc<T>
where Arc<T>: Send + Sync + Unpin + Debug,

Implementors§