Struct ethers_core::utils::Genesis
source · pub struct Genesis {Show 13 fields
pub config: ChainConfig,
pub nonce: U64,
pub timestamp: U64,
pub extra_data: Bytes,
pub gas_limit: U64,
pub difficulty: U256,
pub mix_hash: H256,
pub coinbase: Address,
pub alloc: HashMap<Address, GenesisAccount>,
pub number: Option<U64>,
pub gas_used: Option<U64>,
pub parent_hash: Option<H256>,
pub base_fee_per_gas: Option<U256>,
}Expand description
This represents the chain configuration, specifying the genesis block, header fields, and hard fork switch blocks.
Fields§
§config: ChainConfigThe fork configuration for this network.
nonce: U64The genesis header nonce.
timestamp: U64The genesis header timestamp.
extra_data: BytesThe genesis header extra data.
gas_limit: U64The genesis header gas limit.
difficulty: U256The genesis header difficulty.
mix_hash: H256The genesis header mix hash.
coinbase: AddressThe genesis header coinbase address.
alloc: HashMap<Address, GenesisAccount>The initial state of the genesis block.
number: Option<U64>The block number
gas_used: Option<U64>The block gas gasUsed
parent_hash: Option<H256>The block parent hash
base_fee_per_gas: Option<U256>The base fee
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Genesis
impl<'de> Deserialize<'de> for Genesis
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>,
Deserialize this value from the given Serde deserializer. Read more