Trait EthChainSpec
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) -> 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 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
type Header
The header type of the network.
Required Methods§
fn base_fee_params_at_block(&self, block_number: u64) -> BaseFeeParams
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
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>
fn deposit_contract(&self) -> Option<&DepositContract>
Returns the deposit contract data for the chain, if it’s present
fn genesis_hash(&self) -> FixedBytes<32>
fn genesis_hash(&self) -> FixedBytes<32>
The genesis hash.
fn prune_delete_limit(&self) -> usize
fn prune_delete_limit(&self) -> usize
The delete limit for pruner, per run.
fn display_hardforks(&self) -> Box<dyn Display>
fn display_hardforks(&self) -> Box<dyn Display>
Returns a string representation of the hardforks.
fn genesis_header(&self) -> &Self::Header
fn genesis_header(&self) -> &Self::Header
The genesis header.
fn genesis(&self) -> &Genesis
fn genesis(&self) -> &Genesis
The genesis block specification.
Provided Methods§
fn is_optimism(&self) -> bool
fn is_optimism(&self) -> bool
Returns true
if this chain contains Optimism configuration.
fn is_ethereum(&self) -> bool
fn is_ethereum(&self) -> bool
Returns true
if this chain contains Ethereum configuration.