evm v0.1.11 EVM.ExecEnv

Stores information about the execution environment which led to this EVM being called. This is, for instance, the sender of a payment or message to a contract, or a sub-contract call.

We’ve added our interfaces for interacting with contracts and accounts to this struct as well.

This generally relates to I in the Yellow Paper, defined in Section 9.3.

Link to this section Summary

Functions

Returns the base execution environment for a message call. This is generally defined as equations 107-114 in the Yellow Paper

Link to this section Types

Link to this type t()
t() :: %EVM.ExecEnv{account_interface: EVM.Interface.AccountInterface.t, address: EVM.address, block_interface: EVM.Interface.BlockInterface.t, contract_interface: EVM.Interface.ContractInterface.t, data: binary, gas_price: EVM.Gas.gas_price, machine_code: EVM.MachineCode.t, originator: EVM.address, sender: EVM.address, stack_depth: integer, value_in_wei: EVM.Wei.t}

Link to this section Functions

Link to this function exec_env_for_message_call(recipient, originator, gas_price, data, sender, value_in_wei, stack_depth, machine_code, block_interface, account_interface, contract_interface)

Returns the base execution environment for a message call. This is generally defined as equations 107-114 in the Yellow Paper.

TODO: Machine code may be passed in as a hash TODO: How is block header passed in?

TODO: Examples