Struct ethers_core::utils::ChainConfig
source · pub struct ChainConfig {Show 24 fields
pub chain_id: u64,
pub homestead_block: Option<u64>,
pub dao_fork_block: Option<u64>,
pub dao_fork_support: bool,
pub eip150_block: Option<u64>,
pub eip150_hash: Option<H256>,
pub eip155_block: Option<u64>,
pub eip158_block: Option<u64>,
pub byzantium_block: Option<u64>,
pub constantinople_block: Option<u64>,
pub petersburg_block: Option<u64>,
pub istanbul_block: Option<u64>,
pub muir_glacier_block: Option<u64>,
pub berlin_block: Option<u64>,
pub london_block: Option<u64>,
pub arrow_glacier_block: Option<u64>,
pub gray_glacier_block: Option<u64>,
pub merge_netsplit_block: Option<u64>,
pub shanghai_time: Option<u64>,
pub cancun_time: Option<u64>,
pub terminal_total_difficulty: Option<U256>,
pub terminal_total_difficulty_passed: bool,
pub ethash: Option<EthashConfig>,
pub clique: Option<CliqueConfig>,
}
Expand description
Represents a node’s chain configuration.
See geth’s ChainConfig
struct
for the source of each field.
Fields§
§chain_id: u64
The network’s chain ID.
homestead_block: Option<u64>
The homestead switch block (None = no fork, 0 = already homestead).
dao_fork_block: Option<u64>
The DAO fork switch block (None = no fork).
dao_fork_support: bool
Whether or not the node supports the DAO hard-fork.
eip150_block: Option<u64>
The EIP-150 hard fork block (None = no fork).
eip150_hash: Option<H256>
The EIP-150 hard fork hash.
eip155_block: Option<u64>
The EIP-155 hard fork block.
eip158_block: Option<u64>
The EIP-158 hard fork block.
byzantium_block: Option<u64>
The Byzantium hard fork block.
constantinople_block: Option<u64>
The Constantinople hard fork block.
petersburg_block: Option<u64>
The Petersburg hard fork block.
istanbul_block: Option<u64>
The Istanbul hard fork block.
muir_glacier_block: Option<u64>
The Muir Glacier hard fork block.
berlin_block: Option<u64>
The Berlin hard fork block.
london_block: Option<u64>
The London hard fork block.
arrow_glacier_block: Option<u64>
The Arrow Glacier hard fork block.
gray_glacier_block: Option<u64>
The Gray Glacier hard fork block.
merge_netsplit_block: Option<u64>
Virtual fork after the merge to use as a network splitter.
shanghai_time: Option<u64>
Shanghai switch time.
cancun_time: Option<u64>
Cancun switch time.
terminal_total_difficulty: Option<U256>
Total difficulty reached that triggers the merge consensus upgrade.
terminal_total_difficulty_passed: bool
A flag specifying that the network already passed the terminal total difficulty. Its purpose is to disable legacy sync without having seen the TTD locally.
ethash: Option<EthashConfig>
Ethash parameters.
clique: Option<CliqueConfig>
Clique parameters.
Trait Implementations§
source§impl Clone for ChainConfig
impl Clone for ChainConfig
source§fn clone(&self) -> ChainConfig
fn clone(&self) -> ChainConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ChainConfig
impl Debug for ChainConfig
source§impl Default for ChainConfig
impl Default for ChainConfig
source§fn default() -> ChainConfig
fn default() -> ChainConfig
source§impl<'de> Deserialize<'de> for ChainConfigwhere
ChainConfig: Default,
impl<'de> Deserialize<'de> for ChainConfigwhere
ChainConfig: Default,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for ChainConfig
impl PartialEq for ChainConfig
source§fn eq(&self, other: &ChainConfig) -> bool
fn eq(&self, other: &ChainConfig) -> bool
self
and other
values to be equal, and is used
by ==
.