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§
Sourcefn 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.
Sourcefn 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.
Sourcefn deposit_contract(&self) -> Option<&DepositContract>
fn deposit_contract(&self) -> Option<&DepositContract>
Returns the deposit contract data for the chain, if it’s present
Sourcefn genesis_hash(&self) -> B256
fn genesis_hash(&self) -> B256
The genesis hash.
Sourcefn prune_delete_limit(&self) -> usize
fn prune_delete_limit(&self) -> usize
The delete limit for pruner, per run.
Sourcefn display_hardforks(&self) -> Box<dyn Display>
fn display_hardforks(&self) -> Box<dyn Display>
Returns a string representation of the hardforks.
Sourcefn genesis_header(&self) -> &Header
fn genesis_header(&self) -> &Header
The genesis header.
Sourcefn max_gas_limit(&self) -> u64
fn max_gas_limit(&self) -> u64
The block gas limit.
Provided Methods§
Sourcefn is_optimism(&self) -> bool
fn is_optimism(&self) -> bool
Returns true
if this chain contains Optimism configuration.
Sourcefn is_ethereum(&self) -> bool
fn is_ethereum(&self) -> bool
Returns true
if this chain contains Ethereum configuration.