26 if (strcmp(name,
"example-option") == 0)
31 static void evm_release_result(
struct evm_result const* result)
50 ret.
release = evm_release_result;
62 struct evm_instance*
interface = &vm->
instance;
63 interface->
destroy = evm_destroy;
64 interface->execute = evm_execute;
int evm_set_option(struct evm_instance *evm, char const *name, char const *value)
Example options.
Big-endian 256-bit integer.
struct evm_instance instance
int64_t gas_left
The amount of gas left after the execution.
evm_release_result_fn release
The pointer to the result release implementation.
struct evm_factory examplevm_get_factory()
Example of a function creating uninitialized instance of an example VM.
The EVM instance factory.
enum evm_result_code code
The execution result code.
evm_destroy_fn destroy
Pointer to function destroying the EVM instance.
evm_mode
EVM compatibility mode aka chain mode.
The EVM code execution result.
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.
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.
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.