Enum casper_execution_engine::core::engine_state::genesis::GenesisAccount[][src]

pub enum GenesisAccount {
    System,
    Account {
        public_key: PublicKey,
        balance: Motes,
        validator: Option<GenesisValidator>,
    },
    Delegator {
        validator_public_key: PublicKey,
        delegator_public_key: PublicKey,
        balance: Motes,
        delegated_amount: Motes,
    },
}

Variants

System
Account

Fields of Account

public_key: PublicKeybalance: Motesvalidator: Option<GenesisValidator>
Delegator

Fields of Delegator

validator_public_key: PublicKeydelegator_public_key: PublicKeybalance: Motesdelegated_amount: Motes

Implementations

impl GenesisAccount[src]

pub fn system() -> Self[src]

Create a system account variant.

pub fn account(
    public_key: PublicKey,
    balance: Motes,
    validator: Option<GenesisValidator>
) -> Self
[src]

Create a standard account variant.

pub fn delegator(
    validator_public_key: PublicKey,
    delegator_public_key: PublicKey,
    balance: Motes,
    delegated_amount: Motes
) -> Self
[src]

Create a delegator account variant.

pub fn public_key(&self) -> PublicKey[src]

The public key (if any) associated with the account.

pub fn account_hash(&self) -> AccountHash[src]

The account hash for the account.

pub fn balance(&self) -> Motes[src]

How many motes are to be deposited in the account’s main purse.

pub fn staked_amount(&self) -> Motes[src]

How many motes are to be staked.

Staked accounts are either validators with some amount of bonded stake or delgators with some amount of delegated stake.

pub fn delegation_rate(&self) -> DelegationRate[src]

What is the delegation rate of a validator.

pub fn is_system_account(&self) -> bool[src]

Is this a virtual system account.

pub fn is_validator(&self) -> bool[src]

Is this a validator account.

pub fn validator(&self) -> Option<&GenesisValidator>[src]

Details about the genesis validator.

pub fn is_delegator(&self) -> bool[src]

Is this a delegator account.

pub fn as_delegator(&self) -> Option<(&PublicKey, &PublicKey, &Motes, &Motes)>[src]

Details about the genesis delegator.

Trait Implementations

impl Clone for GenesisAccount[src]

impl Copy for GenesisAccount[src]

impl DataSize for GenesisAccount[src]

impl Debug for GenesisAccount[src]

impl<'de> Deserialize<'de> for GenesisAccount[src]

impl Eq for GenesisAccount[src]

impl FromBytes for GenesisAccount[src]

impl PartialEq<GenesisAccount> for GenesisAccount[src]

impl Serialize for GenesisAccount[src]

impl StructuralEq for GenesisAccount[src]

impl StructuralPartialEq for GenesisAccount[src]

impl ToBytes for GenesisAccount[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> DynClone for T where
    T: Clone
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,