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. More...
 
uint32_t flags
 Additional flags modifying the call execution behavior. More...
 
int32_t depth
 The present depth of the message call stack. More...
 
int64_t gas
 The amount of gas available to the message execution. More...
 
evmc_address recipient
 The recipient of the message. More...
 
evmc_address sender
 The sender of the message. More...
 
const uint8_t * input_data
 The message input data. More...
 
size_t input_size
 The size of the message input data. More...
 
evmc_uint256be value
 The amount of Ether transferred with the message. More...
 
evmc_bytes32 create2_salt
 The optional value used in new contract address construction. More...
 
evmc_address code_address
 The address of the code to be executed. More...
 

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 96 of file evmc.h.

Member Data Documentation

◆ 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 or EVMC_CREATE2.

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 189 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. Ignored in evmc_execute_fn().

Definition at line 174 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 112 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 105 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 119 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 151 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 158 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 71 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 132 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 142 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 166 of file evmc.h.


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