blockchain v0.1.7 Blockchain.Interface.AccountInterface

Defines an interface for methods to interact with contracts and accounts.

Link to this section Summary

Functions

Returns a new account interface

Link to this section Types

Link to this type t()
t() :: %Blockchain.Interface.AccountInterface{state: EVM.state}

Link to this section Functions

Returns a new account interface.

Examples

iex> state = MerklePatriciaTree.Trie.new(MerklePatriciaTree.Test.random_ets_db(:account_interface_new))
iex> Blockchain.Interface.AccountInterface.new(state)
%Blockchain.Interface.AccountInterface{
  state: %MerklePatriciaTree.Trie{
    db: { MerklePatriciaTree.DB.ETS, :account_interface_new },
    root_hash: <<86, 232, 31, 23, 27, 204, 85, 166, 255, 131, 69, 230, 146, 192, 248, 110, 91, 72, 224, 27, 153, 108, 173, 192, 1, 98, 47, 181, 227, 99, 180, 33>>
  }
}