Ethereum Virtual Machine (EVM)

Introduction

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

Subpackages

Submodules

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.gray_glacier.fork_types.Address
block_hashes :List[ethereum.crypto.hash.Hash32]
origin :ethereum.gray_glacier.fork_types.Address
coinbase :ethereum.gray_glacier.fork_types.Address
number :ethereum.base_types.Uint
base_fee_per_gas :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.gray_glacier.state.State
chain_id :ethereum.base_types.U64

Message

Items that are used by contract creation or message call.

class Message
caller :ethereum.gray_glacier.fork_types.Address
target :Union[ethereum.base_types.Bytes0, ethereum.gray_glacier.fork_types.Address]
current_target :ethereum.gray_glacier.fork_types.Address
gas :ethereum.base_types.U256
value :ethereum.base_types.U256
data :ethereum.base_types.Bytes
code_address :Optional[ethereum.gray_glacier.fork_types.Address]
code :ethereum.base_types.Bytes
depth :ethereum.base_types.Uint
should_transfer_value :bool
is_static :bool
accessed_addresses :Set[ethereum.gray_glacier.fork_types.Address]
accessed_storage_keys :Set[Tuple[ethereum.gray_glacier.fork_types.Address, ethereum.base_types.Bytes32]]

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.gray_glacier.fork_types.Log, Ellipsis]
refund_counter :int
running :bool
message :Message
output :ethereum.base_types.Bytes
accounts_to_delete :Set[ethereum.gray_glacier.fork_types.Address]
touched_accounts :Set[ethereum.gray_glacier.fork_types.Address]
has_erred :bool
return_data :ethereum.base_types.Bytes
error :Optional[Exception]
accessed_addresses :Set[ethereum.gray_glacier.fork_types.Address]
accessed_storage_keys :Set[Tuple[ethereum.gray_glacier.fork_types.Address, ethereum.base_types.Bytes32]]