pub trait Machine: Send + Sync {
    type EngineClient: ?Sized;
    type Error;
    fn balance(
        &self,
        live: &ExecutedBlock,
        address: &Address
    ) -> Result<U256, Self::Error>;
fn add_balance(
        &self,
        live: &mut ExecutedBlock,
        address: &Address,
        amount: &U256
    ) -> Result<(), Self::Error>; }
Expand description

Generalization of types surrounding blockchain-suitable state machines.

Associated Types

A handle to a blockchain client for this machine.

Errors which can occur when querying or interacting with the machine.

Required methods

Get the balance, in base units, associated with an account. Extracts data from the live block.

Increment the balance of an account in the state of the live block.

Implementors