14 #if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 6) 21 #define EVMC_DEPRECATED __attribute__((deprecated)) 23 #define EVMC_DEPRECATED 566 uint8_t* buffer_data,
601 size_t topics_count);
676 EVMC_SET_OPTION_SUCCESS = 0,
677 EVMC_SET_OPTION_INVALID_NAME = 1,
678 EVMC_SET_OPTION_INVALID_VALUE = 2
917 #if EVMC_DOCUMENTATION evmc_set_storage_fn set_storage
Set storage callback function.
evmc_bytes32(* evmc_get_code_hash_fn)(struct evmc_host_context *context, const evmc_address *address)
Get code hash callback function.
struct evmc_vm * evmc_create_example_vm(void)
Example of a function creating an instance of an example EVM implementation.
The Tangerine Whistle revision.
void(* evmc_destroy_fn)(struct evmc_vm *vm)
Destroys the VM instance.
A storage item has been deleted: X -> 0.
struct evmc_address evmc_address
Big-endian 160-bit hash suitable for keeping an Ethereum address.
evmc_flags
The flags for evmc_message.
evmc_bytes32(* evmc_get_storage_fn)(struct evmc_host_context *context, const evmc_address *address, const evmc_bytes32 *key)
Get storage callback function.
evmc_capabilities_flagset(* evmc_get_capabilities_fn)(struct evmc_vm *vm)
Return the supported capabilities of the VM instance.
evmc_selfdestruct_fn selfdestruct
Selfdestruct callback function.
evmc_status_code
The execution status code.
evmc_address destination
The destination of the message.
const char * name
The name of the EVMC VM implementation.
evmc_bytes32(* evmc_get_block_hash_fn)(struct evmc_host_context *context, int64_t number)
Get block hash callback function.
The VM failed to allocate the amount of memory needed for execution.
evmc_call_kind
The kind of call-like instruction.
Tried to execute an operation which is restricted in static mode.
void(* evmc_selfdestruct_fn)(struct evmc_host_context *context, const evmc_address *address, const evmc_address *beneficiary)
Selfdestruct callback function.
evmc_storage_status
The effect of an attempt to modify a contract storage item.
size_t(* evmc_get_code_size_fn)(struct evmc_host_context *context, const evmc_address *address)
Get code size callback function.
uint32_t flags
Additional flags modifying the call execution behavior.
bool(* evmc_account_exists_fn)(struct evmc_host_context *context, const evmc_address *address)
Check account existence callback function.
The execution has attempted to put more items on the EVM stack than the specified limit...
Execution of an opcode has required more items on the EVM stack.
Call depth has exceeded the limit (if any)
The VM is capable of executing ewasm bytecode.
size_t(* evmc_copy_code_fn)(struct evmc_host_context *context, const evmc_address *address, size_t code_offset, uint8_t *buffer_data, size_t buffer_size)
Copy code callback function.
const int abi_version
EVMC ABI version implemented by the VM instance.
const char * version
The version of the EVMC VM implementation, e.g.
int64_t block_gas_limit
The block gas limit.
The Constantinople revision.
void(* evmc_release_result_fn)(const struct evmc_result *result)
Releases resources assigned to an execution result.
The execution of the given code and/or message has been rejected by the EVM implementation.
evmc_release_result_fn release
The method releasing all resources associated with the result object.
An argument to a state accessing method has a value outside of the accepted range of values...
struct evmc_tx_context(* evmc_get_tx_context_fn)(struct evmc_host_context *context)
Get transaction context callback function.
The VM is capable of executing EVM1 bytecode.
A WebAssembly unreachable instruction has been hit during execution.
evmc_address tx_origin
The transaction origin account.
A WebAssembly trap has been hit during execution.
evmc_uint256be tx_gas_price
The transaction gas price.
evmc_copy_code_fn copy_code
Copy code callback function.
The value of a storage item has been modified: X -> Y.
Tried to read outside memory bounds.
An undefined instruction has been encountered.
evmc_get_block_hash_fn get_block_hash
Get block hash callback function.
uint8_t bytes[32]
The 32 bytes.
The VM is capable of executing the precompiled contracts defined for the range of destination address...
size_t output_size
The size of the output data.
size_t input_size
The size of the message input data.
int64_t gas_left
The amount of gas left after the execution.
The EVMC ABI version number of the interface declared in this file.
enum evmc_storage_status(* evmc_set_storage_fn)(struct evmc_host_context *context, const evmc_address *address, const evmc_bytes32 *key, const evmc_bytes32 *value)
Set storage callback function.
EVM implementation generic internal error.
evmc_address create_address
The address of the contract created by create instructions.
struct evmc_bytes32 evmc_bytes32
The fixed size array of 32 bytes.
evmc_get_code_size_fn get_code_size
Get code size callback function.
evmc_get_storage_fn get_storage
Get storage callback function.
uint32_t evmc_capabilities_flagset
Alias for unsigned integer representing a set of bit flags of EVMC capabilities.
The opaque data type representing the Host execution context.
enum evmc_set_option_result(* evmc_set_option_fn)(struct evmc_vm *vm, char const *name, char const *value)
Configures the VM instance.
int32_t depth
The call depth.
evmc_uint256be block_difficulty
The block difficulty.
The Spurious Dragon revision.
evmc_get_tx_context_fn get_tx_context
Get transaction context callback function.
evmc_uint256be(* evmc_get_balance_fn)(struct evmc_host_context *context, const evmc_address *address)
Get balance callback function.
The designated INVALID instruction has been hit during execution.
The message describing an EVM call, including a zero-depth calls from a transaction origin...
Execution terminated with REVERT opcode.
struct evmc_bytes32 evmc_uint256be
The alias for evmc_bytes32 to represent a big-endian 256-bit integer.
evmc_set_option_result
Possible outcomes of evmc_set_option.
evmc_set_option_fn set_option
Optional pointer to function modifying VM's options.
Big-endian 160-bit hash suitable for keeping an Ethereum address.
struct evmc_result(* evmc_call_fn)(struct evmc_host_context *context, const struct evmc_message *msg)
Pointer to the callback function supporting EVM calls.
Execution has violated the jump destination restrictions.
evmc_emit_log_fn emit_log
Emit log callback function.
int64_t block_number
The block number.
evmc_get_balance_fn get_balance
Get balance callback function.
evmc_bytes32 create2_salt
The optional value used in new contract address construction.
evmc_call_fn call
Call callback function.
A call to a precompiled or system contract has ended with a failure.
evmc_uint256be chain_id
The blockchain's ChainID.
int64_t gas
The amount of gas for message execution.
A storage item has been modified after being modified before: X -> Y -> Z.
The EVM code execution result.
int64_t block_timestamp
The block timestamp.
void(* evmc_emit_log_fn)(struct evmc_host_context *context, const evmc_address *address, const uint8_t *data, size_t data_size, const evmc_bytes32 topics[], size_t topics_count)
Log callback function.
The maximum EVM revision supported.
The value of a storage item has been left unchanged: 0 -> 0 and X -> X.
evmc_destroy_fn destroy
Pointer to function destroying the VM instance.
Contract validation has failed (e.g.
evmc_uint256be value
The amount of Ether transferred with the message.
evmc_account_exists_fn account_exists
Check account existence callback function.
The fixed size array of 32 bytes.
evmc_address sender
The sender of the message.
evmc_execute_fn execute
Pointer to function executing a code by the VM instance.
const uint8_t * output_data
The reference to output data.
The execution has run out of gas.
evmc_get_code_hash_fn get_code_hash
Get code hash callback function.
A new storage item has been added: 0 -> X.
struct evmc_result(* evmc_execute_fn)(struct evmc_vm *vm, const struct evmc_host_interface *host, struct evmc_host_context *context, enum evmc_revision rev, const struct evmc_message *msg, uint8_t const *code, size_t code_size)
Executes the given code using the input from the message.
const uint8_t * input_data
The message input data.
evmc_address block_coinbase
The miner of the block.
evmc_revision
EVM revision.
Generic execution failure.
evmc_get_capabilities_fn get_capabilities
A method returning capabilities supported by the VM instance.
The transaction and block data for execution.
Execution finished with success.
evmc_capabilities
Possible capabilities of a VM.