reth::chainspec

Trait EthChainSpec

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

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) -> FixedBytes<32>; fn prune_delete_limit(&self) -> usize; fn display_hardforks(&self) -> Box<dyn Display>; fn genesis_header(&self) -> &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 Associated Types§

type Header

The header type of the network.

Required Methods§

fn chain(&self) -> Chain

Returns the Chain object this spec targets.

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

Get the BaseFeeParams for the chain at the given block.

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

Get the BaseFeeParams for the chain at the given timestamp.

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

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

fn genesis_hash(&self) -> FixedBytes<32>

The genesis hash.

fn prune_delete_limit(&self) -> usize

The delete limit for pruner, per run.

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

Returns a string representation of the hardforks.

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

The genesis header.

fn genesis(&self) -> &Genesis

The genesis block specification.

fn max_gas_limit(&self) -> u64

The block gas limit.

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

The bootnodes for the chain, if any.

Provided Methods§

fn chain_id(&self) -> u64

Returns the chain id number

fn is_optimism(&self) -> bool

Returns true if this chain contains Optimism configuration.

fn is_ethereum(&self) -> bool

Returns true if this chain contains Ethereum configuration.

Implementations on Foreign Types§

§

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

§

type Header = <T as EthChainSpec>::Header

§

fn chain(&self) -> Chain

§

fn chain_id(&self) -> u64

§

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) -> FixedBytes<32>

§

fn prune_delete_limit(&self) -> usize

§

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

§

fn genesis_header(&self) -> &<&'a T as EthChainSpec>::Header

§

fn genesis(&self) -> &Genesis

§

fn max_gas_limit(&self) -> u64

§

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

§

fn is_optimism(&self) -> bool

§

fn is_ethereum(&self) -> bool

§

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

§

type Header = <T as EthChainSpec>::Header

§

fn chain(&self) -> Chain

§

fn chain_id(&self) -> u64

§

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) -> FixedBytes<32>

§

fn prune_delete_limit(&self) -> usize

§

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

§

fn genesis_header(&self) -> &<Arc<T> as EthChainSpec>::Header

§

fn genesis(&self) -> &Genesis

§

fn max_gas_limit(&self) -> u64

§

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

§

fn is_optimism(&self) -> bool

§

fn is_ethereum(&self) -> bool

Implementors§