Ethereum Virtual Machine (EVM)

Introduction

The abstract computer which runs the code stored in an eth1spec.eth_types.Account.

Package Contents

Classes

Environment

Items external to the virtual machine itself, provided by the environment.

Message

Items that are used by contract creation or message call.

Evm

The internal state of the virtual machine.

Package Details

Environment

Items external to the virtual machine itself, provided by the environment.

class Environment
caller :ethereum.constantinople.eth_types.Address:ethereum.istanbul.eth_types.Address
block_hashes :List[ethereum.crypto.hash.Hash32]
origin :ethereum.constantinople.eth_types.Address:ethereum.istanbul.eth_types.Address
coinbase :ethereum.constantinople.eth_types.Address:ethereum.istanbul.eth_types.Address
number :ethereum.base_types.Uint
gas_limit :ethereum.base_types.Uint
gas_price :ethereum.base_types.U256
time :ethereum.base_types.U256
difficulty :ethereum.base_types.Uint
state :ethereum.constantinople.state.State:ethereum.istanbul.state.State
chain_id :ethereum.base_types.Uint64

Message

Items that are used by contract creation or message call.

class Message
caller :ethereum.constantinople.eth_types.Address:ethereum.istanbul.eth_types.Address
target :Union[ethereum.base_types.Bytes0, ethereum.constantinople.eth_types.Address]ethereum.istanbul.eth_types.Address]
current_target :ethereum.constantinople.eth_types.Address:ethereum.istanbul.eth_types.Address
gas :ethereum.base_types.U256
value :ethereum.base_types.U256
data :ethereum.base_types.Bytes
code_address :Optional[ethereum.constantinople.eth_types.Address]:Optional[ethereum.istanbul.eth_types.Address]
code :ethereum.base_types.Bytes
depth :ethereum.base_types.Uint
should_transfer_value :bool
is_static :bool

Evm

The internal state of the virtual machine.

class Evm
pc :ethereum.base_types.Uint
stack :List[ethereum.base_types.U256]
memory :bytearray
code :ethereum.base_types.Bytes
gas_left :ethereum.base_types.U256
env :Environment
valid_jump_destinations :Set[ethereum.base_types.Uint]
logs :Tuple[ethereum.constantinople.eth_types.Log,:Tuple[ethereum.istanbul.eth_types.Log, Ellipsis]
refund_counter :ethereum.base_types.U256:int
running :bool
message :Message
output :ethereum.base_types.Bytes
accounts_to_delete :Set[ethereum.constantinople.eth_types.Address]:Set[ethereum.istanbul.eth_types.Address]
touched_accounts :Set[ethereum.constantinople.eth_types.Address]:Set[ethereum.istanbul.eth_types.Address]
has_erred :bool
return_data :ethereum.base_types.Bytes
error :Optional[Exception]