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".
 
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".
 

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 212 of file helpers.h.

214{
215 return (const union evmc_result_optional_storage*)&result->create_address;
216}
evmc_address create_address
The address of the possibly created contract.
Definition: evmc.h:486
The union representing evmc_result "optional storage".
Definition: helpers.h:199

◆ 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 205 of file helpers.h.

207{
208 return (union evmc_result_optional_storage*)&result->create_address;
209}