EVMC
evmc_message Struct Reference

The message describing an EVM call, including a zero-depth calls from a transaction origin. More...

#include <evmc.h>

Public Attributes

enum evmc_call_kind kind
 The kind of the call.
 
uint32_t flags
 Additional flags modifying the call execution behavior.
 
int32_t depth
 The present depth of the message call stack.
 
int64_t gas
 The amount of gas available to the message execution.
 
evmc_address recipient
 The recipient of the message.
 
evmc_address sender
 The sender of the message.
 
const uint8_t * input_data
 The message input data.
 
size_t input_size
 The size of the message input data.
 
evmc_uint256be value
 The amount of Ether transferred with the message.
 
evmc_bytes32 create2_salt
 The optional value used in new contract address construction.
 
evmc_address code_address
 The address of the code to be executed.
 
const uint8_t * code
 The code to be executed.
 
size_t code_size
 The length of the code to be executed.
 

Detailed Description

The message describing an EVM call, including a zero-depth calls from a transaction origin.

Most of the fields are modelled by the section 8. Message Call of the Ethereum Yellow Paper.

Definition at line 97 of file evmc.h.

Member Data Documentation

◆ code

const uint8_t* evmc_message::code

The code to be executed.

Definition at line 196 of file evmc.h.

◆ code_address

evmc_address evmc_message::code_address

The address of the code to be executed.

For EVMC_CALLCODE or EVMC_DELEGATECALL this may be different from the evmc_message::recipient. Not required when invoking evmc_execute_fn(), only when invoking evmc_call_fn(). Ignored if kind is EVMC_CREATE, EVMC_CREATE2 or EVMC_EOFCREATE.

In case of EVMC_CAPABILITY_PRECOMPILES implementation, this fields should be inspected to identify the requested precompile.

Defined as c in the Yellow Paper.

Definition at line 191 of file evmc.h.

◆ code_size

size_t evmc_message::code_size

The length of the code to be executed.

Definition at line 201 of file evmc.h.

◆ create2_salt

evmc_bytes32 evmc_message::create2_salt

The optional value used in new contract address construction.

Needed only for a Host to calculate created address when kind is EVMC_CREATE2 or EVMC_EOFCREATE. Ignored in evmc_execute_fn().

Definition at line 176 of file evmc.h.

◆ depth

int32_t evmc_message::depth

The present depth of the message call stack.

Defined as e in the Yellow Paper.

Definition at line 113 of file evmc.h.

◆ flags

uint32_t evmc_message::flags

Additional flags modifying the call execution behavior.

In the current version the only valid values are EVMC_STATIC or 0.

Definition at line 106 of file evmc.h.

◆ gas

int64_t evmc_message::gas

The amount of gas available to the message execution.

Defined as g in the Yellow Paper.

Definition at line 120 of file evmc.h.

◆ input_data

const uint8_t* evmc_message::input_data

The message input data.

The arbitrary length byte array of the input data of the call, defined as d in the Yellow Paper. This MAY be NULL.

Definition at line 152 of file evmc.h.

◆ input_size

size_t evmc_message::input_size

The size of the message input data.

If input_data is NULL this MUST be 0.

Definition at line 159 of file evmc.h.

◆ kind

enum evmc_call_kind evmc_message::kind

The kind of the call.

For zero-depth calls EVMC_CALL SHOULD be used.

Definition at line 100 of file evmc.h.

◆ recipient

evmc_address evmc_message::recipient

The recipient of the message.

This is the address of the account which storage/balance/nonce is going to be modified by the message execution. In case of EVMC_CALL, this is also the account where the message value evmc_message::value is going to be transferred. For EVMC_CALLCODE or EVMC_DELEGATECALL, this may be different from the evmc_message::code_address.

Defined as r in the Yellow Paper.

Definition at line 133 of file evmc.h.

◆ sender

evmc_address evmc_message::sender

The sender of the message.

The address of the sender of a message call defined as s in the Yellow Paper. This must be the message recipient of the message at the previous (lower) depth, except for the EVMC_DELEGATECALL where recipient is the 2 levels above the present depth. At the depth 0 this must be the transaction origin.

Definition at line 143 of file evmc.h.

◆ value

evmc_uint256be evmc_message::value

The amount of Ether transferred with the message.

This is transferred value for EVMC_CALL or apparent value for EVMC_DELEGATECALL. Defined as v or v~ in the Yellow Paper.

Definition at line 167 of file evmc.h.


The documentation for this struct was generated from the following file: