pub struct Genesis {Show 13 fields
pub config: Option<ChainConfig>,
pub nonce: BigInt,
pub timestamp: BigInt,
pub extra_data: Option<String>,
pub gas_limit: BigInt,
pub difficulty: BigInt,
pub mix_hash: Option<String>,
pub coinbase: Option<String>,
pub alloc: Option<BTreeMap<String, AllocAccount>>,
pub number: BigInt,
pub gas_used: BigInt,
pub parent_hash: Option<String>,
pub base_fee: Option<String>,
}
Expand description
ref. https://pkg.go.dev/github.com/ava-labs/coreth/core#Genesis ref. https://pkg.go.dev/github.com/ava-labs/coreth/params#ChainConfig ref. https://github.com/ava-labs/avalanchego/tree/dev/genesis ref. https://github.com/ava-labs/avalanche-network-runner/blob/main/local/default/genesis.json
Fields
config: Option<ChainConfig>
nonce: BigInt
timestamp: BigInt
extra_data: Option<String>
gas_limit: BigInt
difficulty: BigInt
mix_hash: Option<String>
coinbase: Option<String>
alloc: Option<BTreeMap<String, AllocAccount>>
MUST BE ordered by its key in order for all nodes to have the same JSON outputs. ref. https://doc.rust-lang.org/std/collections/index.html#use-a-btreemap-when
number: BigInt
gas_used: BigInt
parent_hash: Option<String>
base_fee: Option<String>
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Genesis
impl<'de> Deserialize<'de> for Genesis
sourcefn 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
impl Eq for Genesis
impl StructuralEq for Genesis
impl StructuralPartialEq for Genesis
Auto Trait Implementations
impl RefUnwindSafe for Genesis
impl Send for Genesis
impl Sync for Genesis
impl Unpin for Genesis
impl UnwindSafe for Genesis
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.