483
uint8_t bytes[32]
The 32 bytes of the big-endian integer or hash.
void(* evm_prepare_code_fn)(struct evm_instance *instance, enum evm_mode mode, struct evm_uint256be code_hash, uint8_t const *code, size_t code_size)
Request preparation of the code for faster execution.
evm_get_code_status_fn get_code_status
Optional pointer to function returning a status of a code.
Big-endian 256-bit integer.
char const * error_message
The error message explaining the result code.
uint8_t const * output_data
The reference to output data.
Current block difficulty for DIFFICULTY.
int64_t gas_left
The amount of gas left after the execution.
Current block number for NUMBER.
evm_release_result_fn release
The pointer to the result release implementation.
Execution finished with success.
uint8_t const * data
Pointer to the data.
evm_prepare_code_fn prepare_code
Optional pointer to function compiling a code.
int(* evm_set_option_fn)(struct evm_instance *evm, char const *name, char const *value)
Configures the EVM instance.
Transaction gas price for GASPRICE.
struct evm_instance *(* evm_create_fn)(evm_query_fn query_fn, evm_update_fn update_fn, evm_call_fn call_fn)
Forward declaration.
The code has been compiled and is available in memory.
evm_code_status
Status of a code in VM. Useful for JIT-like implementations.
int64_t int64
A host-endian 64-bit integer.
struct evm_factory examplevm_get_factory(void)
Example of a function creating uninitialized instance of an example VM.
evm_set_option_fn set_option
Optional pointer to function modifying VM's options.
Address of the contract for ADDRESS.
evm_create_fn create
Pointer to function creating and initializing the EVM instance.
Request CREATE. Semantic of some params changes.
Message sender address for CALLER.
evm_update_key
The update callback key.
Variant type to represent possible types of values used in EVM.
The EVM instance factory.
size_t output_size
The size of the output data.
Current block timestamp for TIMESTAMP.
Balance of a given address for BALANCE.
void * internal_memory
The pointer to EVM-owned memory.
evm_destroy_fn destroy
Pointer to function destroying the EVM instance.
Transaction origin address for ORIGIN.
Big-endian 160-bit hash suitable for keeping an Ethereum address.
int abi_version
EVM-C ABI version implemented by the EVM factory and instance.
evm_call_kind
The kind of call-like instruction.
Current block miner address for COINBASE.
Block hash of by block number for BLOCKHASH.
Check if an account exists.
evm_mode
EVM compatibility mode aka chain mode.
Request DELEGATECALL. The value param ignored.
Code by an address for EXTCODECOPY.
The compiled version of the code is available in on-disk cache.
evm_execute_fn execute
Pointer to function executing a code by the EVM instance.
void(* evm_destroy_fn)(struct evm_instance *evm)
Destroys the EVM instance.
The EVM code execution result.
enum evm_code_status(* evm_get_code_status_fn)(struct evm_instance *instance, enum evm_mode mode, struct evm_uint256be code_hash)
Get information the status of the code in the VM.
evm_result_code
The execution result code.
struct evm_result(* evm_execute_fn)(struct evm_instance *instance, struct evm_env *env, enum evm_mode mode, struct evm_uint256be code_hash, uint8_t const *code, size_t code_size, int64_t gas, uint8_t const *input, size_t input_size, struct evm_uint256be value)
Generates and executes machine code for given EVM bytecode.
Storage value of a given key for SLOAD.
void(* evm_update_fn)(struct evm_env *env, enum evm_update_key key, const union evm_variant *arg1, const union evm_variant *arg2)
Update callback function.
Mark contract as selfdestructed and set beneficiary address.
Code size by an address for EXTCODESIZE.
void(* evm_query_fn)(union evm_variant *result, struct evm_env *env, enum evm_query_key key, const union evm_variant *arg)
Query callback function.
Current block gas limit for GASLIMIT.
The code is uknown to the VM.
struct evm_uint160be address(struct evm_env *env)
size_t data_size
Size of the referenced memory/data.
void(* evm_release_result_fn)(struct evm_result const *result)
Forward declaration.
evm_query_key
The query callback key.
int64_t(* evm_call_fn)(struct evm_env *env, enum evm_call_kind kind, int64_t gas, const struct evm_uint160be *address, const struct evm_uint256be *value, uint8_t const *input, size_t input_size, uint8_t *output, size_t output_size)
Pointer to the callback function supporting EVM calls.
Generic execution failure.