EVMC
|
The EVM code execution result. More...
#include <evmc.h>
Inherited by evmc::result [private]
.
Public Attributes | |
enum evmc_status_code | status_code |
The execution status code. More... | |
int64_t | gas_left |
The amount of gas left after the execution. More... | |
const uint8_t * | output_data |
The reference to output data. More... | |
size_t | output_size |
The size of the output data. More... | |
evmc_release_result_fn | release |
The method releasing all resources associated with the result object. More... | |
evmc_address | create_address |
The address of the contract created by create instructions. More... | |
uint8_t | padding [4] |
Reserved data that MAY be used by a evmc_result object creator. More... | |
evmc_address evmc_result::create_address |
The address of the contract created by create instructions.
This field has valid value only if:
int64_t evmc_result::gas_left |
The amount of gas left after the execution.
If evmc_result::status_code is neither EVMC_SUCCESS nor EVMC_REVERT the value MUST be 0.
const uint8_t* evmc_result::output_data |
The reference to output data.
The output contains data coming from RETURN opcode (iff evmc_result::code field is EVMC_SUCCESS) or from REVERT opcode.
The memory containing the output data is owned by EVM and has to be freed with evmc_result::release().
This MAY be NULL.
size_t evmc_result::output_size |
uint8_t evmc_result::padding[4] |
Reserved data that MAY be used by a evmc_result object creator.
This reserved 4 bytes together with 20 bytes from create_address form 24 bytes of memory called "optional data" within evmc_result struct to be optionally used by the evmc_result object creator.
Also extends the size of the evmc_result to 64 bytes (full cache line).
evmc_release_result_fn evmc_result::release |
The method releasing all resources associated with the result object.
This method (function pointer) is optional (MAY be NULL) and MAY be set by the VM implementation. If set it MUST be called by the user once to release memory and other resources associated with the result object. Once the resources are released the result object MUST NOT be used again.
The suggested code pattern for releasing execution results:
enum evmc_status_code evmc_result::status_code |