reth_chainspec

Trait EthChainSpec

Source
pub trait EthChainSpec:
    Send
    + Sync
    + Unpin
    + Debug {
Show 14 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) -> &Header; fn genesis(&self) -> &Genesis; fn max_gas_limit(&self) -> u64; 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 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) -> &Header

The genesis header.

Source

fn genesis(&self) -> &Genesis

The genesis block specification.

Source

fn max_gas_limit(&self) -> u64

The block gas limit.

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§