EVMC
Result Optional Storage

Helpers for optional storage of evmc_result. More...

Classes

union  evmc_result_optional_storage
 The union representing evmc_result "optional storage". More...
 

Functions

static union evmc_result_optional_storageevmc_get_optional_storage (struct evmc_result *result)
 Provides read-write access to evmc_result "optional storage". More...
 
static const union evmc_result_optional_storageevmc_get_const_optional_storage (const struct evmc_result *result)
 Provides read-only access to evmc_result "optional storage". More...
 

Detailed Description

Helpers for optional storage of evmc_result.

In some contexts (i.e. evmc_result::create_address is unused) objects of type evmc_result contains a memory storage that MAY be used by the object owner. This group defines helper types and functions for accessing the optional storage.

Function Documentation

◆ evmc_get_const_optional_storage()

static const union evmc_result_optional_storage* evmc_get_const_optional_storage ( const struct evmc_result result)
static

Provides read-only access to evmc_result "optional storage".

Definition at line 204 of file helpers.h.

206 {
207  return (const union evmc_result_optional_storage*)&result->create_address;
208 }
The union representing evmc_result "optional storage".
Definition: helpers.h:190
evmc_address create_address
The address of the contract created by create instructions.
Definition: evmc.h:403

◆ evmc_get_optional_storage()

static union evmc_result_optional_storage* evmc_get_optional_storage ( struct evmc_result result)
static

Provides read-write access to evmc_result "optional storage".

Definition at line 197 of file helpers.h.

199 {
200  return (union evmc_result_optional_storage*)&result->create_address;
201 }
The union representing evmc_result "optional storage".
Definition: helpers.h:190
evmc_address create_address
The address of the contract created by create instructions.
Definition: evmc.h:403