pub struct GenesisAccount {
pub nonce: Option<u64>,
pub balance: U256,
pub code: Option<Bytes>,
pub storage: Option<BTreeMap<B256, B256>>,
pub private_key: Option<B256>,
}
Expand description
An account in the state of the genesis block.
Fields§
§nonce: Option<u64>
The nonce of the account at genesis.
balance: U256
The balance of the account at genesis.
code: Option<Bytes>
The account’s bytecode at genesis.
storage: Option<BTreeMap<B256, B256>>
The account’s storage at genesis.
private_key: Option<B256>
The account’s private key. Should only be used for testing.
Implementations§
Source§impl GenesisAccount
impl GenesisAccount
Sourcepub const fn with_nonce(self, nonce: Option<u64>) -> Self
pub const fn with_nonce(self, nonce: Option<u64>) -> Self
Set the nonce.
Sourcepub const fn with_balance(self, balance: U256) -> Self
pub const fn with_balance(self, balance: U256) -> Self
Set the balance.
Trait Implementations§
Source§impl Clone for GenesisAccount
impl Clone for GenesisAccount
Source§fn clone(&self) -> GenesisAccount
fn clone(&self) -> GenesisAccount
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GenesisAccount
impl Debug for GenesisAccount
Source§impl Default for GenesisAccount
impl Default for GenesisAccount
Source§fn default() -> GenesisAccount
fn default() -> GenesisAccount
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GenesisAccount
impl<'de> Deserialize<'de> for GenesisAccount
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
Source§impl PartialEq for GenesisAccount
impl PartialEq for GenesisAccount
Source§impl Serialize for GenesisAccount
impl Serialize for GenesisAccount
impl Eq for GenesisAccount
impl StructuralPartialEq for GenesisAccount
Auto Trait Implementations§
impl !Freeze for GenesisAccount
impl RefUnwindSafe for GenesisAccount
impl Send for GenesisAccount
impl Sync for GenesisAccount
impl Unpin for GenesisAccount
impl UnwindSafe for GenesisAccount
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)