class eosio::chain::webassembly::interface

Class List > eosio :: chain :: webassembly :: interface

Public Functions

Type Name
interface (apply_context & ctx)
apply_context & get_context ()
const apply_context & get_context () const
int32_t get_context_free_data (uint32_t index, legacy_span< char > buffer) const
int32_t is_feature_active (int64_t feature_name) const
void activate_feature (int64_t feature_name) const
void preactivate_feature (legacy_ptr< const digest_type > feature_digest)
void set_resource_limits (account_name account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight)
void get_resource_limits (account_name account, legacy_ptr< int64_t, 8 > ram_bytes, legacy_ptr< int64_t, 8 > net_weight, legacy_ptr< int64_t, 8 > cpu_weight) const
uint32_t get_wasm_parameters_packed (span< char > packed_parameters, uint32_t max_version) const
void set_wasm_parameters_packed (span< const char > packed_parameters)
void set_resource_limit (account_name account, name resource, int64_t limit)
int64_t get_resource_limit (account_name account, name resource) const
int64_t set_proposed_producers (legacy_span< const char > packed_producer_schedule)
int64_t set_proposed_producers_ex (uint64_t packed_producer_format, legacy_span< const char > packed_producer_schedule)
uint32_t get_blockchain_parameters_packed (legacy_span< char > packed_blockchain_parameters) const
void set_blockchain_parameters_packed (legacy_span< const char > packed_blockchain_parameters)
uint32_t get_parameters_packed (span< const char > packed_parameter_ids, span< char > packed_parameters) const
Retrieve the blockchain config parameters.
void set_parameters_packed (span< const char > packed_parameters)
Set the blockchain parameters in a flexible manner.
uint32_t get_kv_parameters_packed (span< char > packed_kv_parameters, uint32_t max_version) const
void set_kv_parameters_packed (span< const char > packed_kv_parameters)
bool is_privileged (account_name account) const
void set_privileged (account_name account, bool is_priv)
float _eosio_f32_add (float, float) const
float _eosio_f32_sub (float, float) const
float _eosio_f32_div (float, float) const
float _eosio_f32_mul (float, float) const
float _eosio_f32_min (float, float) const
float _eosio_f32_max (float, float) const
float _eosio_f32_copysign (float, float) const
float _eosio_f32_abs (float) const
float _eosio_f32_neg (float) const
float _eosio_f32_sqrt (float) const
float _eosio_f32_ceil (float) const
float _eosio_f32_floor (float) const
float _eosio_f32_trunc (float) const
float _eosio_f32_nearest (float) const
bool _eosio_f32_eq (float, float) const
bool _eosio_f32_ne (float, float) const
bool _eosio_f32_lt (float, float) const
bool _eosio_f32_le (float, float) const
bool _eosio_f32_gt (float, float) const
bool _eosio_f32_ge (float, float) const
double _eosio_f64_add (double, double) const
double _eosio_f64_sub (double, double) const
double _eosio_f64_div (double, double) const
double _eosio_f64_mul (double, double) const
double _eosio_f64_min (double, double) const
double _eosio_f64_max (double, double) const
double _eosio_f64_copysign (double, double) const
double _eosio_f64_abs (double) const
double _eosio_f64_neg (double) const
double _eosio_f64_sqrt (double) const
double _eosio_f64_ceil (double) const
double _eosio_f64_floor (double) const
double _eosio_f64_trunc (double) const
double _eosio_f64_nearest (double) const
bool _eosio_f64_eq (double, double) const
bool _eosio_f64_ne (double, double) const
bool _eosio_f64_lt (double, double) const
bool _eosio_f64_le (double, double) const
bool _eosio_f64_gt (double, double) const
bool _eosio_f64_ge (double, double) const
double _eosio_f32_promote (float) const
float _eosio_f64_demote (double) const
int32_t _eosio_f32_trunc_i32s (float) const
int32_t _eosio_f64_trunc_i32s (double) const
uint32_t _eosio_f32_trunc_i32u (float) const
uint32_t _eosio_f64_trunc_i32u (double) const
int64_t _eosio_f32_trunc_i64s (float) const
int64_t _eosio_f64_trunc_i64s (double) const
uint64_t _eosio_f32_trunc_i64u (float) const
uint64_t _eosio_f64_trunc_i64u (double) const
float _eosio_i32_to_f32 (int32_t) const
float _eosio_i64_to_f32 (int64_t) const
float _eosio_ui32_to_f32 (uint32_t) const
float _eosio_ui64_to_f32 (uint64_t) const
double _eosio_i32_to_f64 (int32_t) const
double _eosio_i64_to_f64 (int64_t) const
double _eosio_ui32_to_f64 (uint32_t) const
double _eosio_ui64_to_f64 (uint64_t) const
int32_t get_active_producers (legacy_span< account_name > producers) const
void assert_recover_key (legacy_ptr< const fc::sha256 > digest, legacy_span< const char > sig, legacy_span< const char > pub) const
int32_t recover_key (legacy_ptr< const fc::sha256 > digest, legacy_span< const char > sig, legacy_span< char > pub) const
void assert_sha256 (legacy_span< const char > data, legacy_ptr< const fc::sha256 > hash_val) const
void assert_sha1 (legacy_span< const char > data, legacy_ptr< const fc::sha1 > hash_val) const
void assert_sha512 (legacy_span< const char > data, legacy_ptr< const fc::sha512 > hash_val) const
void assert_ripemd160 (legacy_span< const char > data, legacy_ptr< const fc::ripemd160 > hash_val) const
void sha256 (legacy_span< const char > data, legacy_ptr< fc::sha256 > hash_val) const
void sha1 (legacy_span< const char > data, legacy_ptr< fc::sha1 > hash_val) const
void sha512 (legacy_span< const char > data, legacy_ptr< fc::sha512 > hash_val) const
void ripemd160 (legacy_span< const char > data, legacy_ptr< fc::ripemd160 > hash_val) const
bool check_transaction_authorization (legacy_span< const char > trx_data, legacy_span< const char > pubkeys_data, legacy_span< const char > perms_data) const
bool check_permission_authorization (account_name account, permission_name permission, legacy_span< const char > pubkeys_data, legacy_span< const char > perms_data, uint64_t delay_us) const
int64_t get_permission_last_used (account_name account, permission_name permission) const
int64_t get_account_creation_time (account_name account) const
void require_auth (account_name account) const
void require_auth2 (account_name account, permission_name permission) const
bool has_auth (account_name account) const
void require_recipient (account_name recipient)
bool is_account (account_name account) const
uint64_t current_time () const
uint64_t publication_time () const
bool is_feature_activated (legacy_ptr< const digest_type > feature_digest) const
name get_sender () const
void abort () const
void eosio_assert (bool condition, null_terminated_ptr msg) const
void eosio_assert_message (bool condition, legacy_span< const char > msg) const
void eosio_assert_code (bool condition, uint64_t error_code) const
void eosio_exit (int32_t code) const
int32_t read_action_data (legacy_span< char > memory) const
int32_t action_data_size () const
name current_receiver () const
void set_action_return_value (span< const char > packed_blob)
void prints (null_terminated_ptr str)
void prints_l (legacy_span< const char > str)
void printi (int64_t val)
void printui (uint64_t val)
void printi128 (legacy_ptr< const __int128 > val)
void printui128 (legacy_ptr< const unsigned __int128 > val)
void printsf (float32_t val)
void printdf (float64_t val)
void printqf (legacy_ptr< const float128_t > val)
void printn (name value)
void printhex (legacy_span< const char > data)
int32_t db_store_i64 (uint64_t scope, uint64_t table, uint64_t payer, uint64_t id, legacy_span< const char > buffer)
void db_update_i64 (int32_t itr, uint64_t payer, legacy_span< const char > buffer)
void db_remove_i64 (int32_t itr)
int32_t db_get_i64 (int32_t itr, legacy_span< char > buffer)
int32_t db_next_i64 (int32_t itr, legacy_ptr< uint64_t > primary)
int32_t db_previous_i64 (int32_t itr, legacy_ptr< uint64_t > primary)
int32_t db_find_i64 (uint64_t code, uint64_t scope, uint64_t table, uint64_t id)
int32_t db_lowerbound_i64 (uint64_t code, uint64_t scope, uint64_t table, uint64_t id)
int32_t db_upperbound_i64 (uint64_t code, uint64_t scope, uint64_t table, uint64_t id)
int32_t db_end_i64 (uint64_t code, uint64_t scope, uint64_t table)
int32_t db_idx64_store (uint64_t scope, uint64_t table, uint64_t payer, uint64_t id, legacy_ptr< const uint64_t > secondary)
void db_idx64_update (int32_t iterator, uint64_t payer, legacy_ptr< const uint64_t > secondary)
void db_idx64_remove (int32_t iterator)
int32_t db_idx64_find_secondary (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< const uint64_t > secondary, legacy_ptr< uint64_t > primary)
int32_t db_idx64_find_primary (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< uint64_t > secondary, uint64_t primary)
int32_t db_idx64_lowerbound (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< uint64_t, 8 > secondary, legacy_ptr< uint64_t, 8 > primary)
int32_t db_idx64_upperbound (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< uint64_t, 8 > secondary, legacy_ptr< uint64_t, 8 > primary)
int32_t db_idx64_end (uint64_t code, uint64_t scope, uint64_t table)
int32_t db_idx64_next (int32_t iterator, legacy_ptr< uint64_t > primary)
int32_t db_idx64_previous (int32_t iterator, legacy_ptr< uint64_t > primary)
int32_t db_idx128_store (uint64_t scope, uint64_t table, uint64_t payer, uint64_t id, legacy_ptr< const uint128_t > secondary)
void db_idx128_update (int32_t iterator, uint64_t payer, legacy_ptr< const uint128_t > secondary)
void db_idx128_remove (int32_t iterator)
int32_t db_idx128_find_secondary (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< const uint128_t > secondary, legacy_ptr< uint64_t > primary)
int32_t db_idx128_find_primary (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< uint128_t > secondary, uint64_t primary)
int32_t db_idx128_lowerbound (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< uint128_t, 16 > secondary, legacy_ptr< uint64_t, 8 > primary)
int32_t db_idx128_upperbound (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< uint128_t, 16 > secondary, legacy_ptr< uint64_t, 8 > primary)
int32_t db_idx128_end (uint64_t code, uint64_t scope, uint64_t table)
int32_t db_idx128_next (int32_t iterator, legacy_ptr< uint64_t > primary)
int32_t db_idx128_previous (int32_t iterator, legacy_ptr< uint64_t > primary)
int32_t db_idx256_store (uint64_t scope, uint64_t table, uint64_t payer, uint64_t id, legacy_span< const uint128_t > data)
void db_idx256_update (int32_t iterator, uint64_t payer, legacy_span< const uint128_t > data)
void db_idx256_remove (int32_t iterator)
int32_t db_idx256_find_secondary (uint64_t code, uint64_t scope, uint64_t table, legacy_span< const uint128_t > data, legacy_ptr< uint64_t > primary)
int32_t db_idx256_find_primary (uint64_t code, uint64_t scope, uint64_t table, legacy_span< uint128_t > data, uint64_t primary)
int32_t db_idx256_lowerbound (uint64_t code, uint64_t scope, uint64_t table, legacy_span< uint128_t, 16 > data, legacy_ptr< uint64_t, 8 > primary)
int32_t db_idx256_upperbound (uint64_t code, uint64_t scope, uint64_t table, legacy_span< uint128_t, 16 > data, legacy_ptr< uint64_t, 8 > primary)
int32_t db_idx256_end (uint64_t code, uint64_t scope, uint64_t table)
int32_t db_idx256_next (int32_t iterator, legacy_ptr< uint64_t > primary)
int32_t db_idx256_previous (int32_t iterator, legacy_ptr< uint64_t > primary)
int32_t db_idx_double_store (uint64_t scope, uint64_t table, uint64_t payer, uint64_t id, legacy_ptr< const float64_t > secondary)
void db_idx_double_update (int32_t iterator, uint64_t payer, legacy_ptr< const float64_t > secondary)
void db_idx_double_remove (int32_t iterator)
int32_t db_idx_double_find_secondary (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< const float64_t > secondary, legacy_ptr< uint64_t > primary)
int32_t db_idx_double_find_primary (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< float64_t > secondary, uint64_t primary)
int32_t db_idx_double_lowerbound (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< float64_t, 8 > secondary, legacy_ptr< uint64_t, 8 > primary)
int32_t db_idx_double_upperbound (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< float64_t, 8 > secondary, legacy_ptr< uint64_t, 8 > primary)
int32_t db_idx_double_end (uint64_t code, uint64_t scope, uint64_t table)
int32_t db_idx_double_next (int32_t iterator, legacy_ptr< uint64_t > primary)
int32_t db_idx_double_previous (int32_t iterator, legacy_ptr< uint64_t > primary)
int32_t db_idx_long_double_store (uint64_t scope, uint64_t table, uint64_t payer, uint64_t id, legacy_ptr< const float128_t > secondary)
void db_idx_long_double_update (int32_t iterator, uint64_t payer, legacy_ptr< const float128_t > secondary)
void db_idx_long_double_remove (int32_t iterator)
int32_t db_idx_long_double_find_secondary (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< const float128_t > secondary, legacy_ptr< uint64_t > primary)
int32_t db_idx_long_double_find_primary (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< float128_t > secondary, uint64_t primary)
int32_t db_idx_long_double_lowerbound (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< float128_t, 8 > secondary, legacy_ptr< uint64_t, 8 > primary)
int32_t db_idx_long_double_upperbound (uint64_t code, uint64_t scope, uint64_t table, legacy_ptr< float128_t, 8 > secondary, legacy_ptr< uint64_t, 8 > primary)
int32_t db_idx_long_double_end (uint64_t code, uint64_t scope, uint64_t table)
int32_t db_idx_long_double_next (int32_t iterator, legacy_ptr< uint64_t > primary)
int32_t db_idx_long_double_previous (int32_t iterator, legacy_ptr< uint64_t > primary)
int64_t kv_erase (uint64_t contract, span< const char > key)
int64_t kv_set (uint64_t contract, span< const char > key, span< const char > value, account_name payer)
bool kv_get (uint64_t contract, span< const char > key, uint32_t * value_size)
uint32_t kv_get_data (uint32_t offset, span< char > data)
uint32_t kv_it_create (uint64_t contract, span< const char > prefix)
void kv_it_destroy (uint32_t itr)
int32_t kv_it_status (uint32_t itr)
int32_t kv_it_compare (uint32_t itr_a, uint32_t itr_b)
int32_t kv_it_key_compare (uint32_t itr, span< const char > key)
int32_t kv_it_move_to_end (uint32_t itr)
int32_t kv_it_next (uint32_t itr, uint32_t * found_key_size, uint32_t * found_value_size)
int32_t kv_it_prev (uint32_t itr, uint32_t * found_key_size, uint32_t * found_value_size)
int32_t kv_it_lower_bound (uint32_t itr, span< const char > key, uint32_t * found_key_size, uint32_t * found_value_size)
int32_t kv_it_key (uint32_t itr, uint32_t offset, span< char > dest, uint32_t * actual_size)
int32_t kv_it_value (uint32_t itr, uint32_t offset, span< char > dest, uint32_t * actual_size)
void * memcpy (memcpy_params) const
void * memmove (memcpy_params) const
int32_t memcmp (memcmp_params) const
void * memset (memset_params) const
void send_inline (legacy_span< const char > data)
void send_context_free_inline (legacy_span< const char > data)
void send_deferred (legacy_ptr< const uint128_t > sender_id, account_name payer, legacy_span< const char > data, uint32_t replace_existing)
bool cancel_deferred (legacy_ptr< const uint128_t > val)
int32_t read_transaction (legacy_span< char > data) const
int32_t transaction_size () const
int32_t expiration () const
int32_t tapos_block_num () const
int32_t tapos_block_prefix () const
int32_t get_action (uint32_t type, uint32_t index, legacy_span< char > buffer) const
void __ashlti3 (legacy_ptr< int128_t >, uint64_t, uint64_t, uint32_t) const
void __ashrti3 (legacy_ptr< int128_t >, uint64_t, uint64_t, uint32_t) const
void __lshlti3 (legacy_ptr< int128_t >, uint64_t, uint64_t, uint32_t) const
void __lshrti3 (legacy_ptr< int128_t >, uint64_t, uint64_t, uint32_t) const
void __divti3 (legacy_ptr< int128_t >, uint64_t, uint64_t, uint64_t, uint64_t) const
void __udivti3 (legacy_ptr< uint128_t >, uint64_t, uint64_t, uint64_t, uint64_t) const
void __multi3 (legacy_ptr< int128_t >, uint64_t, uint64_t, uint64_t, uint64_t) const
void __modti3 (legacy_ptr< int128_t >, uint64_t, uint64_t, uint64_t, uint64_t) const
void __umodti3 (legacy_ptr< uint128_t >, uint64_t, uint64_t, uint64_t, uint64_t) const
void __addtf3 (legacy_ptr< float128_t >, uint64_t, uint64_t, uint64_t, uint64_t) const
void __subtf3 (legacy_ptr< float128_t >, uint64_t, uint64_t, uint64_t, uint64_t) const
void __multf3 (legacy_ptr< float128_t >, uint64_t, uint64_t, uint64_t, uint64_t) const
void __divtf3 (legacy_ptr< float128_t >, uint64_t, uint64_t, uint64_t, uint64_t) const
void __negtf2 (legacy_ptr< float128_t >, uint64_t, uint64_t) const
void __extendsftf2 (legacy_ptr< float128_t >, float) const
void __extenddftf2 (legacy_ptr< float128_t >, double) const
double __trunctfdf2 (uint64_t, uint64_t) const
float __trunctfsf2 (uint64_t, uint64_t) const
int32_t __fixtfsi (uint64_t, uint64_t) const
int64_t __fixtfdi (uint64_t, uint64_t) const
void __fixtfti (legacy_ptr< int128_t >, uint64_t, uint64_t) const
uint32_t __fixunstfsi (uint64_t, uint64_t) const
uint64_t __fixunstfdi (uint64_t, uint64_t) const
void __fixunstfti (legacy_ptr< uint128_t >, uint64_t, uint64_t) const
void __fixsfti (legacy_ptr< int128_t >, float) const
void __fixdfti (legacy_ptr< int128_t >, double) const
void __fixunssfti (legacy_ptr< uint128_t >, float) const
void __fixunsdfti (legacy_ptr< uint128_t >, double) const
double __floatsidf (int32_t) const
void __floatsitf (legacy_ptr< float128_t >, int32_t) const
void __floatditf (legacy_ptr< float128_t >, uint64_t) const
void __floatunsitf (legacy_ptr< float128_t >, uint32_t) const
void __floatunditf (legacy_ptr< float128_t >, uint64_t) const
double __floattidf (uint64_t, uint64_t) const
double __floatuntidf (uint64_t, uint64_t) const
int32_t __cmptf2 (uint64_t, uint64_t, uint64_t, uint64_t) const
int32_t __eqtf2 (uint64_t, uint64_t, uint64_t, uint64_t) const
int32_t __netf2 (uint64_t, uint64_t, uint64_t, uint64_t) const
int32_t __getf2 (uint64_t, uint64_t, uint64_t, uint64_t) const
int32_t __gttf2 (uint64_t, uint64_t, uint64_t, uint64_t) const
int32_t __letf2 (uint64_t, uint64_t, uint64_t, uint64_t) const
int32_t __lttf2 (uint64_t, uint64_t, uint64_t, uint64_t) const
int32_t __unordtf2 (uint64_t, uint64_t, uint64_t, uint64_t) const

Public Functions Documentation

function interface

eosio::chain::webassembly::interface::interface(
    apply_context & ctx
)

function get_context (1/2)

apply_context& eosio::chain::webassembly::interface::get_context()

function get_context (2/2)

const apply_context& eosio::chain::webassembly::interface::get_context() const

function get_context_free_data

int32_t eosio::chain::webassembly::interface::get_context_free_data(
    uint32_t index,
    legacy_span< char > buffer
) const

Retrieve the signed_transaction.context_free_data[index].

Parameters:

  • index - the index of the context_free_data entry to retrieve.
  • buffer - output buffer of the context_free_data entry.

Return value:

  • -1 if the index is not valid.
  • size of the cfd if the buffer is empty, otherwise return the amount of data copied onto the buffer.

function is_feature_active

int32_t eosio::chain::webassembly::interface::is_feature_active(
    int64_t feature_name
) const

Check if a feature is found on the activation set.

Parameters:

  • feature_name - 256-bit digest representing the feature to query.

Returns:

false (deprecated)

Deprecated

function activate_feature

void eosio::chain::webassembly::interface::activate_feature(
    int64_t feature_name
) const

Activate a a consensus protocol upgrade.

Parameters:

  • feature_name - 256-bit digest representing the feature to activate.

Deprecated

function preactivate_feature

void eosio::chain::webassembly::interface::preactivate_feature(
    legacy_ptr< const digest_type > feature_digest
)

Allows a privileged smart contract, e.g. the system contract, to pre-activate a consensus protocol upgrade feature.

Parameters:

  • feature_digest - 256-bit digest representing the feature to pre-activate.

function set_resource_limits

void eosio::chain::webassembly::interface::set_resource_limits(
    account_name account,
    int64_t ram_bytes,
    int64_t net_weight,
    int64_t cpu_weight
)

Set the resource limits of an account.

Parameters:

  • account - name of the account whose resource limit to be set.
  • ram_bytes - ram limit in absolute bytes.
  • net_weight - fractionally proportionate net limit of available resources based on (weight / total_weight_of_all_accounts).
  • cpu_weight - fractionally proportionate cpu limit of available resources based on (weight / total_weight_of_all_accounts).

function get_resource_limits

void eosio::chain::webassembly::interface::get_resource_limits(
    account_name account,
    legacy_ptr< int64_t, 8 > ram_bytes,
    legacy_ptr< int64_t, 8 > net_weight,
    legacy_ptr< int64_t, 8 > cpu_weight
) const

Get the resource limits of an account

Parameters:

  • account - name of the account whose resource limit to get.
  • ram_bytes - output to hold retrieved ram limit in absolute bytes.
  • net_weight - output to hold net weight.
  • cpu_weight - output to hold cpu weight.

function get_wasm_parameters_packed

uint32_t eosio::chain::webassembly::interface::get_wasm_parameters_packed(
    span< char > packed_parameters,
    uint32_t max_version
) const

Get the current wasm limits configuration. The structure of the parameters is as follows:

  • max_mutable_global_bytes The maximum total size (in bytes) used for mutable globals. i32 and f32 consume 4 bytes and i64 and f64 consume 8 bytes. Const globals are not included in this count.
  • max_table_elements The maximum number of elements of a table.
  • max_section_elements The maximum number of elements in each section.
  • max_linear_memory_init The size (in bytes) of the range of memory that may be initialized. Data segments may use the range [0, max_linear_memory_init).
  • max_func_local_bytes The maximum total size (in bytes) used by parameters and local variables in a function.
  • max_nested_structures The maximum nesting depth of structured control instructions. The function itself is included in this count.
  • max_symbol_bytes The maximum size (in bytes) of names used for import and export.
  • max_module_bytes The maximum total size (in bytes) of a wasm module.
  • max_code_bytes The maximum size (in bytes) of each function body.
  • max_pages The maximum number of 64 KiB pages of linear memory that a contract can use. Enforced when an action is executed. The initial size of linear memory is also checked at setcode.
  • max_call_depth The maximum number of functions that may be on the stack. Enforced when an action is executed.

Parameters:

  • packed_parameters the ouput for the parameters.
  • max_version has no effect, but should be 0.

Returns:

the size of the packed parameters if packed_parameters is empty, otherwise it returns the amount of data written in packed_parameters.

function set_wasm_parameters_packed

void eosio::chain::webassembly::interface::set_wasm_parameters_packed(
    span< const char > packed_parameters
)

Set the configuration for wasm limits. See get_wasm_parameters_packed documentation for more details on the structure of the packed_parameters.

Parameters:

  • packed_parameters - a span containing the packed configuration to set.

function set_resource_limit

void eosio::chain::webassembly::interface::set_resource_limit(
    account_name account,
    name resource,
    int64_t limit
)

Update a single resource limit associated with an account.

Parameters:

  • account - the account whose limits are being modified.
  • resource - the resource to update, which should be either ram, cpu, or net.
  • limit - the new limit. A value of -1 means unlimited.

Precondition:

limit >= -1

function get_resource_limit

int64_t eosio::chain::webassembly::interface::get_resource_limit(
    account_name account,
    name resource
) const

Get a single resource limit associated with an account.

Parameters:

  • account - the account whose limits are being modified
  • resource - the name of the resource limit which should be either ram, cpu, or net.

Returns:

the limit on the resource requested.

function set_proposed_producers

int64_t eosio::chain::webassembly::interface::set_proposed_producers(
    legacy_span< const char > packed_producer_schedule
)

Proposes a schedule change using the legacy producer key format.

Parameters:

  • packed_producer_schedule - vector of producer keys

Returns:

-1 if proposing a new producer schedule was unsuccessful, otherwise returns the version of the new proposed schedule.

function set_proposed_producers_ex

int64_t eosio::chain::webassembly::interface::set_proposed_producers_ex(
    uint64_t packed_producer_format,
    legacy_span< const char > packed_producer_schedule
)

Proposes a schedule change with extended features. Valid formats: 0 : serialized array of producer_keys. Using this format is exactly equivalent to set_proposed_producers. 1 : serialized array of producer_authority's.

Parameters:

  • packed_producer_format - format of the producer data blob.
  • packed_producer_schedule - packed data of representing the producer schedule in the format indicated.

Returns:

-1 if proposing a new producer schedule was unsuccessful, otherwise returns the version of the new proposed schedule.

function get_blockchain_parameters_packed

uint32_t eosio::chain::webassembly::interface::get_blockchain_parameters_packed(
    legacy_span< char > packed_blockchain_parameters
) const

Retrieve the blockchain config parameters.

Parameters:

  • packed_blockchain_parameters - output buffer of the blockchain parameters.

return the number of bytes copied to the buffer, or number of bytes required if the buffer is empty.

function set_blockchain_parameters_packed

void eosio::chain::webassembly::interface::set_blockchain_parameters_packed(
    legacy_span< const char > packed_blockchain_parameters
)

Set the blockchain parameters.

Parameters:

  • packed_blockchain_parameters - a span containing the packed blockchain config parameters.

function get_parameters_packed

uint32_t eosio::chain::webassembly::interface::get_parameters_packed(
    span< const char > packed_parameter_ids,
    span< char > packed_parameters
) const

Retrieve the blockchain config parameters.

Retrieve the blockchain config parameters. The input buffer is a packed data stream which represents an encoded sequence of parameter_id pairs with the following format: |varuint32:sequence_length | varuint32:parameter_id | ... The output buffer is a packed data stream which represents an encoded sequence of parameter_id:paramter_value pairs with the following format: |varuint32:sequence_length | varuint32:parameter_id | :parameter_value | ... The encoding of parameter_values should be specific to the parameter being set The output buffer format should be valid input for set_parameters_packed. For each known parameter_id in the input sequence there should be an associated entry in the output sequence with the current encoded parameter_value.

Parameters:

  • packed_parameter_ids - the input buffer with the format as described above.
  • packed_parameters - the output buffer with the format as described above.

function set_parameters_packed

void eosio::chain::webassembly::interface::set_parameters_packed(
    span< const char > packed_parameters
)

Set the blockchain parameters in a flexible manner.

Set the blockchain parameters. It allows a system contract the ability to set parameters in a flexible manner. The input buffer is a packed data stream which represents an encoded sequence of parameter_id:paramter_value pairs with the following format: |varuint32:sequence_length | varuint32:parameter_id | :parameter_value | ... The encoding of parameter_values should be specific to the parameter being set. Having duplicate parameter_ids encoded in the sequence should result in aborting the transaction context. The presence of a parameter_id which is unknown OR which is known but tied to an unactivated consensus protocol should result in aborting the transaction context. There are no requirement for the ordering of items in the sequence.

Parameters:

  • packed_parameters - buffer to hold the packed data with the format described above.

function get_kv_parameters_packed

uint32_t eosio::chain::webassembly::interface::get_kv_parameters_packed(
    span< char > packed_kv_parameters,
    uint32_t max_version
) const

Gets the maximum key size, maximum value size, and maximum iterators of a kv database and returns the size of the data. The kv parameters are encoded as 16 bytes, representing four 32-bit little-endian values.

+-------+---------------+---------------+---------------+---------------+
| byte  | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |10 |11 |12 |13 |14 |15 |
+-------+---------------+---------------+---------------+---------------+
| field |   version     |   key limit   |  value limit  | max iterators |
+-------+---------------+---------------+---------------+---------------+
| type  |      0        |   32-bits LE  |  32-bits LE   |  32-bits LE   |
+-------+---------------+---------------+---------------+---------------+

Parameters:

  • packed_kv_parameters - the buffer containing the packed kv parameters.
  • max_version - has no effect, but should be 0.

Returns:

Returns the size required in the buffer (if the buffer is too small, nothing is written).

function set_kv_parameters_packed

void eosio::chain::webassembly::interface::set_kv_parameters_packed(
    span< const char > packed_kv_parameters
)

Sets the maximum key size, and maximum value size, and maximum iterators of a kv database. Each database has independent limits. The key and value limits only apply to new items. They do not apply to items written before they were applied. If the database is invalid, if version is non-zero, or if buffer_size is less than 16, aborts the transaction.

Parameters:

  • packed_kv_parameters - the buffer containing the packed kv parameters to be set.

function is_privileged

bool eosio::chain::webassembly::interface::is_privileged(
    account_name account
) const

Check if an account is privileged.

Parameters:

  • account - name of the account to be checked.

Return value:

  • true if the account is privileged
  • false otherwise

function set_privileged

void eosio::chain::webassembly::interface::set_privileged(
    account_name account,
    bool is_priv
)

Set the privileged status of an account.

Parameters:

  • account - name of the account that we want to give the privileged status.
  • is_priv - privileged status (true or false).

function _eosio_f32_add

float eosio::chain::webassembly::interface::_eosio_f32_add(
    float ,
    float 
) const

function _eosio_f32_sub

float eosio::chain::webassembly::interface::_eosio_f32_sub(
    float ,
    float 
) const

function _eosio_f32_div

float eosio::chain::webassembly::interface::_eosio_f32_div(
    float ,
    float 
) const

function _eosio_f32_mul

float eosio::chain::webassembly::interface::_eosio_f32_mul(
    float ,
    float 
) const

function _eosio_f32_min

float eosio::chain::webassembly::interface::_eosio_f32_min(
    float ,
    float 
) const

function _eosio_f32_max

float eosio::chain::webassembly::interface::_eosio_f32_max(
    float ,
    float 
) const

function _eosio_f32_copysign

float eosio::chain::webassembly::interface::_eosio_f32_copysign(
    float ,
    float 
) const

function _eosio_f32_abs

float eosio::chain::webassembly::interface::_eosio_f32_abs(
    float 
) const

function _eosio_f32_neg

float eosio::chain::webassembly::interface::_eosio_f32_neg(
    float 
) const

function _eosio_f32_sqrt

float eosio::chain::webassembly::interface::_eosio_f32_sqrt(
    float 
) const

function _eosio_f32_ceil

float eosio::chain::webassembly::interface::_eosio_f32_ceil(
    float 
) const

function _eosio_f32_floor

float eosio::chain::webassembly::interface::_eosio_f32_floor(
    float 
) const

function _eosio_f32_trunc

float eosio::chain::webassembly::interface::_eosio_f32_trunc(
    float 
) const

function _eosio_f32_nearest

float eosio::chain::webassembly::interface::_eosio_f32_nearest(
    float 
) const

function _eosio_f32_eq

bool eosio::chain::webassembly::interface::_eosio_f32_eq(
    float ,
    float 
) const

function _eosio_f32_ne

bool eosio::chain::webassembly::interface::_eosio_f32_ne(
    float ,
    float 
) const

function _eosio_f32_lt

bool eosio::chain::webassembly::interface::_eosio_f32_lt(
    float ,
    float 
) const

function _eosio_f32_le

bool eosio::chain::webassembly::interface::_eosio_f32_le(
    float ,
    float 
) const

function _eosio_f32_gt

bool eosio::chain::webassembly::interface::_eosio_f32_gt(
    float ,
    float 
) const

function _eosio_f32_ge

bool eosio::chain::webassembly::interface::_eosio_f32_ge(
    float ,
    float 
) const

function _eosio_f64_add

double eosio::chain::webassembly::interface::_eosio_f64_add(
    double ,
    double 
) const

function _eosio_f64_sub

double eosio::chain::webassembly::interface::_eosio_f64_sub(
    double ,
    double 
) const

function _eosio_f64_div

double eosio::chain::webassembly::interface::_eosio_f64_div(
    double ,
    double 
) const

function _eosio_f64_mul

double eosio::chain::webassembly::interface::_eosio_f64_mul(
    double ,
    double 
) const

function _eosio_f64_min

double eosio::chain::webassembly::interface::_eosio_f64_min(
    double ,
    double 
) const

function _eosio_f64_max

double eosio::chain::webassembly::interface::_eosio_f64_max(
    double ,
    double 
) const

function _eosio_f64_copysign

double eosio::chain::webassembly::interface::_eosio_f64_copysign(
    double ,
    double 
) const

function _eosio_f64_abs

double eosio::chain::webassembly::interface::_eosio_f64_abs(
    double 
) const

function _eosio_f64_neg

double eosio::chain::webassembly::interface::_eosio_f64_neg(
    double 
) const

function _eosio_f64_sqrt

double eosio::chain::webassembly::interface::_eosio_f64_sqrt(
    double 
) const

function _eosio_f64_ceil

double eosio::chain::webassembly::interface::_eosio_f64_ceil(
    double 
) const

function _eosio_f64_floor

double eosio::chain::webassembly::interface::_eosio_f64_floor(
    double 
) const

function _eosio_f64_trunc

double eosio::chain::webassembly::interface::_eosio_f64_trunc(
    double 
) const

function _eosio_f64_nearest

double eosio::chain::webassembly::interface::_eosio_f64_nearest(
    double 
) const

function _eosio_f64_eq

bool eosio::chain::webassembly::interface::_eosio_f64_eq(
    double ,
    double 
) const

function _eosio_f64_ne

bool eosio::chain::webassembly::interface::_eosio_f64_ne(
    double ,
    double 
) const

function _eosio_f64_lt

bool eosio::chain::webassembly::interface::_eosio_f64_lt(
    double ,
    double 
) const

function _eosio_f64_le

bool eosio::chain::webassembly::interface::_eosio_f64_le(
    double ,
    double 
) const

function _eosio_f64_gt

bool eosio::chain::webassembly::interface::_eosio_f64_gt(
    double ,
    double 
) const

function _eosio_f64_ge

bool eosio::chain::webassembly::interface::_eosio_f64_ge(
    double ,
    double 
) const

function _eosio_f32_promote

double eosio::chain::webassembly::interface::_eosio_f32_promote(
    float 
) const

function _eosio_f64_demote

float eosio::chain::webassembly::interface::_eosio_f64_demote(
    double 
) const

function _eosio_f32_trunc_i32s

int32_t eosio::chain::webassembly::interface::_eosio_f32_trunc_i32s(
    float 
) const

function _eosio_f64_trunc_i32s

int32_t eosio::chain::webassembly::interface::_eosio_f64_trunc_i32s(
    double 
) const

function _eosio_f32_trunc_i32u

uint32_t eosio::chain::webassembly::interface::_eosio_f32_trunc_i32u(
    float 
) const

function _eosio_f64_trunc_i32u

uint32_t eosio::chain::webassembly::interface::_eosio_f64_trunc_i32u(
    double 
) const

function _eosio_f32_trunc_i64s

int64_t eosio::chain::webassembly::interface::_eosio_f32_trunc_i64s(
    float 
) const

function _eosio_f64_trunc_i64s

int64_t eosio::chain::webassembly::interface::_eosio_f64_trunc_i64s(
    double 
) const

function _eosio_f32_trunc_i64u

uint64_t eosio::chain::webassembly::interface::_eosio_f32_trunc_i64u(
    float 
) const

function _eosio_f64_trunc_i64u

uint64_t eosio::chain::webassembly::interface::_eosio_f64_trunc_i64u(
    double 
) const

function _eosio_i32_to_f32

float eosio::chain::webassembly::interface::_eosio_i32_to_f32(
    int32_t 
) const

function _eosio_i64_to_f32

float eosio::chain::webassembly::interface::_eosio_i64_to_f32(
    int64_t 
) const

function _eosio_ui32_to_f32

float eosio::chain::webassembly::interface::_eosio_ui32_to_f32(
    uint32_t 
) const

function _eosio_ui64_to_f32

float eosio::chain::webassembly::interface::_eosio_ui64_to_f32(
    uint64_t 
) const

function _eosio_i32_to_f64

double eosio::chain::webassembly::interface::_eosio_i32_to_f64(
    int32_t 
) const

function _eosio_i64_to_f64

double eosio::chain::webassembly::interface::_eosio_i64_to_f64(
    int64_t 
) const

function _eosio_ui32_to_f64

double eosio::chain::webassembly::interface::_eosio_ui32_to_f64(
    uint32_t 
) const

function _eosio_ui64_to_f64

double eosio::chain::webassembly::interface::_eosio_ui64_to_f64(
    uint64_t 
) const

function get_active_producers

int32_t eosio::chain::webassembly::interface::get_active_producers(
    legacy_span< account_name > producers
) const

Get the list of active producer names.

Parameters:

  • producers - output buffer containing the names of the current active producer names.

Returns:

number of bytes required (if the buffer is empty), or the number of bytes written to the buffer.

function assert_recover_key

void eosio::chain::webassembly::interface::assert_recover_key(
    legacy_ptr< const fc::sha256 > digest,
    legacy_span< const char > sig,
    legacy_span< const char > pub
) const

Tests a given public key with the recovered public key from digest and signature.

Parameters:

  • digest - digest of the message that was signed.
  • sig - signature.
  • pub - public key.

function recover_key

int32_t eosio::chain::webassembly::interface::recover_key(
    legacy_ptr< const fc::sha256 > digest,
    legacy_span< const char > sig,
    legacy_span< char > pub
) const

Calculates the public key used for a given signature on a given digest.

Parameters:

  • digest - digest of the message that was signed.
  • sig - signature.
  • pub - output buffer for the public key result.

Returns:

size of data written on the buffer.

function assert_sha256

void eosio::chain::webassembly::interface::assert_sha256(
    legacy_span< const char > data,
    legacy_ptr< const fc::sha256 > hash_val
) const

Tests if the sha256 hash generated from data matches the provided digest.

Parameters:

  • data - a span containing the data you want to hash.
  • hash_val - digest to compare to.

function assert_sha1

void eosio::chain::webassembly::interface::assert_sha1(
    legacy_span< const char > data,
    legacy_ptr< const fc::sha1 > hash_val
) const

Tests if the sha1 hash generated from data matches the provided digest.

Parameters:

  • data - a span containing the data you want to hash.
  • hash_val - digest to compare to.

function assert_sha512

void eosio::chain::webassembly::interface::assert_sha512(
    legacy_span< const char > data,
    legacy_ptr< const fc::sha512 > hash_val
) const

Tests if the sha512 hash generated from data matches the provided digest.

Parameters:

  • data - a span containing the data you want to hash.
  • hash_val - digest to compare to.

function assert_ripemd160

void eosio::chain::webassembly::interface::assert_ripemd160(
    legacy_span< const char > data,
    legacy_ptr< const fc::ripemd160 > hash_val
) const

Tests if the ripemd160 hash generated from data matches the provided digest.

Parameters:

  • data - a span containing the data you want to hash.
  • hash_val - digest to compare to.

function sha256

void eosio::chain::webassembly::interface::sha256(
    legacy_span< const char > data,
    legacy_ptr< fc::sha256 > hash_val
) const

Hashes data using SHA256.

Parameters:

  • data - a span containing the data.
  • hash_val - the resulting digest.

function sha1

void eosio::chain::webassembly::interface::sha1(
    legacy_span< const char > data,
    legacy_ptr< fc::sha1 > hash_val
) const

Hashes data using SHA1.

Parameters:

  • data - a span containing the data.
  • hash_val - the resulting digest.

function sha512

void eosio::chain::webassembly::interface::sha512(
    legacy_span< const char > data,
    legacy_ptr< fc::sha512 > hash_val
) const

Hashes data using SHA512.

Parameters:

  • data - a span containing the data.
  • hash_val - the hash

function ripemd160

void eosio::chain::webassembly::interface::ripemd160(
    legacy_span< const char > data,
    legacy_ptr< fc::ripemd160 > hash_val
) const

Hashes data using RIPEMD160.

Parameters:

  • data - a span containing the data.
  • hash_val - computed digest.

function check_transaction_authorization

bool eosio::chain::webassembly::interface::check_transaction_authorization(
    legacy_span< const char > trx_data,
    legacy_span< const char > pubkeys_data,
    legacy_span< const char > perms_data
) const

Checks if a transaction is authorized by a provided set of keys and permissions.

Parameters:

  • trx_data - serialized transaction.
  • pubkeys_data - serialized vector of provided public keys.
  • perms_data - serialized vector of provided permissions (empty permission name acts as wildcard).

Return value:

  • true if transaction is authorized.
  • false otherwise.

function check_permission_authorization

bool eosio::chain::webassembly::interface::check_permission_authorization(
    account_name account,
    permission_name permission,
    legacy_span< const char > pubkeys_data,
    legacy_span< const char > perms_data,
    uint64_t delay_us
) const

Checks if a permission is authorized by a provided delay and a provided set of keys and permissions.

Parameters:

  • account - the account owner of the permission.
  • permission - the name of the permission to check for authorization.
  • pubkeys_data - serialized vector of provided public keys.
  • perms_data - serialized vector of provided permissions (empty permission name acts as wildcard).
  • delay_us - the provided delay in microseconds (cannot exceed INT64_MAX)

Return value:

  • true if permission is authorized.
  • false otherwise.

function get_permission_last_used

int64_t eosio::chain::webassembly::interface::get_permission_last_used(
    account_name account,
    permission_name permission
) const

Returns the last used time of a permission.

Parameters:

  • account - the account owner of the permission.
  • permission - the name of the permission.

Returns:

the last used time (in microseconds since Unix epoch) of the permission.

function get_account_creation_time

int64_t eosio::chain::webassembly::interface::get_account_creation_time(
    account_name account
) const

Returns the creation time of an account.

Parameters:

  • account - the account name.

Returns:

the creation time (in microseconds since Unix epoch) of the account.

function require_auth

void eosio::chain::webassembly::interface::require_auth(
    account_name account
) const

Verifies that an account exists in the set of provided auths on an action. Fails if not found.

Parameters:

  • account - the name of the account to be verified.

function require_auth2

void eosio::chain::webassembly::interface::require_auth2(
    account_name account,
    permission_name permission
) const

Verifies that an account with a specific permission exists in the set of provided auths on an action,

Parameters:

  • account - the name of the account to be verified.
  • permission - the name of the permission to be verified.

function has_auth

bool eosio::chain::webassembly::interface::has_auth(
    account_name account
) const

Test whether an account exists in the set of provided auths on an action.

Parameters:

  • account - name of the account to be tested.

Return value:

  • true if the action has an auth with the account name.
  • false otherwise.

function require_recipient

void eosio::chain::webassembly::interface::require_recipient(
    account_name recipient
)

Add the specified account to set of accounts to be notified.

Parameters:

  • recipient - account to be notified.

function is_account

bool eosio::chain::webassembly::interface::is_account(
    account_name account
) const

Verifies that n is an existing account.

Parameters:

  • account - name of the account to check.

Returns:

true if the account exists.

Returns:

false otherwise.

function current_time

uint64_t eosio::chain::webassembly::interface::current_time() const

Returns the time in microseconds from 1970 of the current block.

Returns:

time in microseconds from 1970 of the current block.

function publication_time

uint64_t eosio::chain::webassembly::interface::publication_time() const

Returns the transaction's publication time.

Returns:

time in microseconds from 1970 of the publication_time.

function is_feature_activated

bool eosio::chain::webassembly::interface::is_feature_activated(
    legacy_ptr< const digest_type > feature_digest
) const

Check if specified protocol feature has been activated.

Parameters:

  • feature_digest - digest of the protocol feature.

Return value:

  • true if the specified protocol feature has been activated.
  • false otherwise.

function get_sender

name eosio::chain::webassembly::interface::get_sender() const

Return the name of the account that sent the current inline action.

Returns:

name of account that sent the current inline action (empty name if not called from inline action).

function abort

void eosio::chain::webassembly::interface::abort() const

Aborts processing of this action and unwinds all pending changes.

function eosio_assert

void eosio::chain::webassembly::interface::eosio_assert(
    bool condition,
    null_terminated_ptr msg
) const

Aborts processing of this action if the test condition is false.

Parameters:

  • condition - test condition.
  • msg - string explaining the reason for failure.

function eosio_assert_message

void eosio::chain::webassembly::interface::eosio_assert_message(
    bool condition,
    legacy_span< const char > msg
) const

Aborts processing of this action if the test condition is false.

Parameters:

  • condition - test condition.
  • msg - string explaining the reason for failure.

function eosio_assert_code

void eosio::chain::webassembly::interface::eosio_assert_code(
    bool condition,
    uint64_t error_code
) const

Aborts processing of this action if the test condition is false. It can be used to provide an error code rather than a message string on assertion checks. If the assertion fails, the provided error code will be made available through the exception message.

Parameters:

  • condition - test condition.
  • error_code - the error code associated.

function eosio_exit

void eosio::chain::webassembly::interface::eosio_exit(
    int32_t code
) const

This method will abort execution of wasm without failing the contract.

Parameters:

  • code - the exit code

function read_action_data

int32_t eosio::chain::webassembly::interface::read_action_data(
    legacy_span< char > memory
) const

Copy up to length bytes of the current action data to the specified location.

Parameters:

  • memory - a pointer where up to length bytes of the current action data will be copied.

Returns:

the number of bytes copied to msg, or number of bytes that can be copied if an empty span is passed.

function action_data_size

int32_t eosio::chain::webassembly::interface::action_data_size() const

Get the length of the current action's data field. This method is useful for dynamically sized actions.

Returns:

the length of the current action's data field

function current_receiver

name eosio::chain::webassembly::interface::current_receiver() const

Get the current receiver of the action.

Returns:

the name of the receiver

function set_action_return_value

void eosio::chain::webassembly::interface::set_action_return_value(
    span< const char > packed_blob
)

Sets a value (packed blob char array) to be included in the action receipt.

Parameters:

  • packed_blob - the packed blob

function prints

void eosio::chain::webassembly::interface::prints(
    null_terminated_ptr str
)

Print a string.

Parameters:

  • str - the string to print

function prints_l

void eosio::chain::webassembly::interface::prints_l(
    legacy_span< const char > str
)

Prints string up to given length.

Parameters:

  • str - the string to print.

function printi

void eosio::chain::webassembly::interface::printi(
    int64_t val
)

Prints value as a 64 bit signed integer.

Parameters:

  • val - 64 bit signed integer to be printed.

function printui

void eosio::chain::webassembly::interface::printui(
    uint64_t val
)

Prints value as a 64 bit unsigned integer.

Parameters:

  • val - 64 bit unsigned integer to be printed.

function printi128

void eosio::chain::webassembly::interface::printi128(
    legacy_ptr< const __int128 > val
)

Prints value as a 128 bit signed integer.

Parameters:

  • val - 128 bit signed integer to be printed.

function printui128

void eosio::chain::webassembly::interface::printui128(
    legacy_ptr< const unsigned __int128 > val
)

Prints value as a 128 bit unsigned integer.

Parameters:

  • val - 128 bit unsigned integer to be printed.

function printsf

void eosio::chain::webassembly::interface::printsf(
    float32_t val
)

Prints value as single-precision floating point number.

Parameters:

  • val - single-precision floating point number to be printed.

function printdf

void eosio::chain::webassembly::interface::printdf(
    float64_t val
)

Prints value as double-precision floating point number.

Parameters:

  • val - double-precision floating point number to be printed

function printqf

void eosio::chain::webassembly::interface::printqf(
    legacy_ptr< const float128_t > val
)

Prints value as quadruple-precision floating point number.

Parameters:

  • val - a pointer to the quadruple-precision floating point number to be printed

function printn

void eosio::chain::webassembly::interface::printn(
    name value
)

Prints a 64 bit names as base32 encoded string.

Parameters:

  • value - 64 bit name to be printed

function printhex

void eosio::chain::webassembly::interface::printhex(
    legacy_span< const char > data
)

Prints a 64 bit names as base32 encoded string

Parameters:

  • data - Hex name to be printed.

function db_store_i64

int32_t eosio::chain::webassembly::interface::db_store_i64(
    uint64_t scope,
    uint64_t table,
    uint64_t payer,
    uint64_t id,
    legacy_span< const char > buffer
)

Store a record in a primary 64-bit integer index table.

Parameters:

  • scope - the scope where the table resides (implied to be within the code of the current receiver).
  • table - the name of the table within the current scope context.
  • payer - the account that pays for the storage.
  • id - id of the entry.
  • buffer - record to store.

Returns:

iterator to the newly created table row.

Post

a new entry is created in the table.

function db_update_i64

void eosio::chain::webassembly::interface::db_update_i64(
    int32_t itr,
    uint64_t payer,
    legacy_span< const char > buffer
)

Update a record in a primary 64-bit integer index table.

Parameters:

  • itr - iterator to the table row containing the record to update.
  • payer - the account that pays for the storage costs.
  • buffer - new updated record.

Remark:

This function does not allow changing the primary key of a table row. The serialized data that is stored in the table row of a primary table may include a primary key and that primary key value could be changed by the contract calling the db_update_i64 intrinsic; but that does not change the actual primary key of the table row.

Precondition:

itr points to an existing table row in the table.

Post

the record contained in the table row pointed to by itr is replaced with the new updated record.

function db_remove_i64

void eosio::chain::webassembly::interface::db_remove_i64(
    int32_t itr
)

Remove a record inside a primary 64-bit integer index table.

Parameters:

  • itr - the iterator to the table row to remove.

Precondition:

itr points to an existing table row in the tab.

function db_get_i64

int32_t eosio::chain::webassembly::interface::db_get_i64(
    int32_t itr,
    legacy_span< char > buffer
)

Get a record in a primary 64-bit integer index table.

Parameters:

  • itr - the iterator to the table row containing the record to retrieve.
  • buffer - the buffer which will be filled with the retrieved record.

Returns:

size of the data copied into the buffer if buffer is not empty, or size of the retrieved record if the buffer is empty.

Precondition:

itr points to an existing table row in the table.

Post

buffer will be filled with the retrieved record (truncated to the first len bytes if necessary).

function db_next_i64

int32_t eosio::chain::webassembly::interface::db_next_i64(
    int32_t itr,
    legacy_ptr< uint64_t > primary
)

Find the table row following the referenced table row in a primary 64-bit integer index table.

Parameters:

  • itr - the iterator to the referenced table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the next table row.

Returns:

iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table).

Post

'*primary' will be replaced with the primary key of the table row following the referenced table row if it exists, otherwise primary will be left untouched.

function db_previous_i64

int32_t eosio::chain::webassembly::interface::db_previous_i64(
    int32_t itr,
    legacy_ptr< uint64_t > primary
)

Find the table row preceding the referenced table row in a primary 64-bit integer index table.

Parameters:

  • itr - the iterator to the referenced table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the next table row.

Returns:

iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table).

Post

'*primary' will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise primary will be left untouched.

function db_find_i64

int32_t eosio::chain::webassembly::interface::db_find_i64(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    uint64_t id
)

Find a table row in a primary 64-bit integer index table by primary key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • id - the primary key of the record to look up.

Returns:

iterator to the table row with a primary key equal to id or the end iterator of the table if the table row could not be found.

function db_lowerbound_i64

int32_t eosio::chain::webassembly::interface::db_lowerbound_i64(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    uint64_t id
)

Find the table row in a primary 64-bit integer index table that matches the lowerbound condition for a given primary key. Lowerbound record is the first nearest record which primary key is <= the given key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • id - the primary key used as a pivot to determine the lowerbound record.

Returns:

iterator to the lowerbound record or the end iterator of the table if the table row could not be found.

function db_upperbound_i64

int32_t eosio::chain::webassembly::interface::db_upperbound_i64(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    uint64_t id
)

Find the table row in a primary 64-bit integer index table that matches the upperbound condition for a given primary key. The table row that matches the upperbound condition is the first table row in the table with the lowest primary key that is > the given key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • id - the primary key used as a pivot to determine the upperbound record.

Returns:

iterator to the upperbound record or the end iterator of the table if the table row could not be found.

function db_end_i64

int32_t eosio::chain::webassembly::interface::db_end_i64(
    uint64_t code,
    uint64_t scope,
    uint64_t table
)

Get an iterator representing just-past-the-end of the last table row of a primary 64-bit integer index table.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.

Returns:

end iterator of the table.

function db_idx64_store

int32_t eosio::chain::webassembly::interface::db_idx64_store(
    uint64_t scope,
    uint64_t table,
    uint64_t payer,
    uint64_t id,
    legacy_ptr< const uint64_t > secondary
)

Store an association of a 64-bit integer secondary key to a primary key in a secondary 64-bit integer index table.

Parameters:

  • scope - the scope where the table resides (implied to be within the code of the current receiver).
  • table - the table name.
  • payer - the account that is paying for this storage.
  • id - the primary key to which to associate the secondary key.
  • secondary - the pointer to the key of the secondary index to store.

Returns:

iterator to the newly created secondary index.

Post

new secondary key association between primary key id and secondary key *secondary is created in the secondary 64-bit integer index table.

function db_idx64_update

void eosio::chain::webassembly::interface::db_idx64_update(
    int32_t iterator,
    uint64_t payer,
    legacy_ptr< const uint64_t > secondary
)

Update an association for a 64-bit integer secondary key to a primary key in a secondary 64-bit integer index table.

Parameters:

  • iterator - the iterator to the table row containing the secondary key association to update.
  • payer - the account that pays for the storage costs.
  • secondary - pointer to the new secondary key that will replace the existing one of the association.

Precondition:

iterator points to an existing table row in the table.

Post

the secondary key of the table row pointed to by iterator is replaced by *secondary.

function db_idx64_remove

void eosio::chain::webassembly::interface::db_idx64_remove(
    int32_t iterator
)

Remove a table row from a secondary 64-bit integer index table.

Parameters:

  • iterator - iterator to the table row to remove.

Precondition:

iterator points to an existing table row in the table.

Post

the table row pointed to by iterator is removed and the associated storage costs are refunded to the payer.

function db_idx64_find_secondary

int32_t eosio::chain::webassembly::interface::db_idx64_find_secondary(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< const uint64_t > secondary,
    legacy_ptr< uint64_t > primary
)

Find a table row in a secondary 64-bit integer index table by secondary key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - the pointer to the secondary index key.
  • primary - pointer to a 'uint64_t' variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the first table row with a secondary key equal to *secondary or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx64_find_primary

int32_t eosio::chain::webassembly::interface::db_idx64_find_primary(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< uint64_t > secondary,
    uint64_t primary
)

Find a table row in a secondary 64-bit integer index table by primary key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - pointer to a 'uint64_t' variable which will have its value set to the secondary key of the found table row.
  • primary - the primary key of the table row to look up.

Returns:

iterator to the table row with a primary key equal to primary or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, *secondary will be replaced with the secondary key of the found table row.

function db_idx64_lowerbound

int32_t eosio::chain::webassembly::interface::db_idx64_lowerbound(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< uint64_t, 8 > secondary,
    legacy_ptr< uint64_t, 8 > primary
)

Find the table row in a secondary 64-bit integer index table that matches the lowerbound condition for a given secondary key. Lowerbound secondary index is the first secondary index which key is <= the given secondary index key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - pointer to secondary key first used to determine the lowerbound and which is then replaced with the secondary key of the found table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the found table row or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, *secondary will be replaced with the secondary key of the found table row.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx64_upperbound

int32_t eosio::chain::webassembly::interface::db_idx64_upperbound(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< uint64_t, 8 > secondary,
    legacy_ptr< uint64_t, 8 > primary
)

Find the table row in a secondary 64-bit integer index table that matches the upperbound condition for a given secondary key. The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - pointer to secondary key first used to determine the upperbound and which is then replaced with the secondary key of the found table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the found table row or the end iterator of the table if the table row could not be found.

function db_idx64_end

int32_t eosio::chain::webassembly::interface::db_idx64_end(
    uint64_t code,
    uint64_t scope,
    uint64_t table
)

Get an end iterator representing just-past-the-end of the last table row of a secondary 64-bit integer index table.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.

Returns:

end iterator of the table.

function db_idx64_next

int32_t eosio::chain::webassembly::interface::db_idx64_next(
    int32_t iterator,
    legacy_ptr< uint64_t > primary
)

Find the table row following the referenced table row in a secondary 64-bit integer index table.

Parameters:

  • iterator - the iterator to the referenced table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the next table row.

Returns:

iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table).

Precondition:

iterator points to an existing table row in the table.

Post

*primary will be replaced with the primary key of the table row following the referenced table row if it exists, otherwise *primary will be left untouched.

function db_idx64_previous

int32_t eosio::chain::webassembly::interface::db_idx64_previous(
    int32_t iterator,
    legacy_ptr< uint64_t > primary
)

Find the table row preceding the referenced table row in a secondary 64-bit integer index table.

Parameters:

  • iterator - the iterator to the referenced table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the previous table row.

Returns:

iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table).

Precondition:

iterator points to an existing table row in the table or it is the end iterator of the table.

Post

*primary will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise *primary will be left untouched.

function db_idx128_store

int32_t eosio::chain::webassembly::interface::db_idx128_store(
    uint64_t scope,
    uint64_t table,
    uint64_t payer,
    uint64_t id,
    legacy_ptr< const uint128_t > secondary
)

Store an association of a 128-bit integer secondary key to a primary key in a secondary 128-bit integer index table.

Parameters:

  • scope - the scope where the table resides (implied to be within the code of the current receiver).
  • table - the table name.
  • payer - the account that is paying for this storage.
  • id - the primary key to which to associate the secondary key.
  • secondary - the pointer to the key of the secondary index to store.

Returns:

iterator to the newly created secondary index.

Post

new secondary key association between primary key id and secondary key *secondary is created in the secondary 128-bit integer index table.

function db_idx128_update

void eosio::chain::webassembly::interface::db_idx128_update(
    int32_t iterator,
    uint64_t payer,
    legacy_ptr< const uint128_t > secondary
)

Update an association for a 128-bit integer secondary key to a primary key in a secondary 128-bit integer index table.

Parameters:

  • iterator - the iterator to the table row containing the secondary key association to update.
  • payer - the account that pays for the storage costs.
  • secondary - pointer to the new secondary key that will replace the existing one of the association.

Precondition:

iterator points to an existing table row in the table.

Post

the secondary key of the table row pointed to by iterator is replaced by *secondary.

function db_idx128_remove

void eosio::chain::webassembly::interface::db_idx128_remove(
    int32_t iterator
)

Remove a table row from a secondary 128-bit integer index table.

Parameters:

  • iterator - iterator to the table row to remove.

Precondition:

iterator points to an existing table row in the table.

Post

the table row pointed to by iterator is removed and the associated storage costs are refunded to the payer.

function db_idx128_find_secondary

int32_t eosio::chain::webassembly::interface::db_idx128_find_secondary(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< const uint128_t > secondary,
    legacy_ptr< uint64_t > primary
)

Find a table row in a secondary 128-bit integer index table by secondary key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - the pointer to the secondary index key.
  • primary - pointer to a 'uint64_t' variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the first table row with a secondary key equal to *secondary or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx128_find_primary

int32_t eosio::chain::webassembly::interface::db_idx128_find_primary(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< uint128_t > secondary,
    uint64_t primary
)

Find a table row in a secondary 128-bit integer index table by primary key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - pointer to a 'uint128_t' variable which will have its value set to the secondary key of the found table row.
  • primary - the primary key of the table row to look up.

Returns:

iterator to the table row with a primary key equal to primary or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, *secondary will be replaced with the secondary key of the found table row.

function db_idx128_lowerbound

int32_t eosio::chain::webassembly::interface::db_idx128_lowerbound(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< uint128_t, 16 > secondary,
    legacy_ptr< uint64_t, 8 > primary
)

Find the table row in a secondary 128-bit integer index table that matches the lowerbound condition for a given secondary key. Lowerbound secondary index is the first secondary index which key is <= the given secondary index key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - pointer to secondary key first used to determine the lowerbound and which is then replaced with the secondary key of the found table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the found table row or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, *secondary will be replaced with the secondary key of the found table row.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx128_upperbound

int32_t eosio::chain::webassembly::interface::db_idx128_upperbound(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< uint128_t, 16 > secondary,
    legacy_ptr< uint64_t, 8 > primary
)

Find the table row in a secondary 128-bit integer index table that matches the upperbound condition for a given secondary key. The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - pointer to secondary key first used to determine the upperbound and which is then replaced with the secondary key of the found table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the found table row or the end iterator of the table if the table row could not be found.

function db_idx128_end

int32_t eosio::chain::webassembly::interface::db_idx128_end(
    uint64_t code,
    uint64_t scope,
    uint64_t table
)

Get an end iterator representing just-past-the-end of the last table row of a secondary 128-bit integer index table.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.

Returns:

end iterator of the table.

function db_idx128_next

int32_t eosio::chain::webassembly::interface::db_idx128_next(
    int32_t iterator,
    legacy_ptr< uint64_t > primary
)

Find the table row following the referenced table row in a secondary 128-bit integer index table.

Parameters:

  • iterator - the iterator to the referenced table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the next table row.

Returns:

iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table).

Precondition:

iterator points to an existing table row in the table.

Post

*primary will be replaced with the primary key of the table row following the referenced table row if it exists, otherwise *primary will be left untouched.

function db_idx128_previous

int32_t eosio::chain::webassembly::interface::db_idx128_previous(
    int32_t iterator,
    legacy_ptr< uint64_t > primary
)

Find the table row preceding the referenced table row in a secondary 128-bit integer index table.

Parameters:

  • iterator - the iterator to the referenced table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the previous table row.

Returns:

iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table).

Precondition:

iterator points to an existing table row in the table or it is the end iterator of the table.

Post

*primary will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise *primary will be left untouched.

function db_idx256_store

int32_t eosio::chain::webassembly::interface::db_idx256_store(
    uint64_t scope,
    uint64_t table,
    uint64_t payer,
    uint64_t id,
    legacy_span< const uint128_t > data
)

Store an association of a 256-bit integer secondary key to a primary key in a secondary 256-bit integer index table. 256-

Parameters:

  • scope - the scope where the table resides (implied to be within the code of the current receiver).
  • table - the table name.
  • payer - the account that is paying for this storage.
  • id - the primary key to which to associate the secondary key.
  • data - pointer to the secondary key data stored as an array of 2 uint128_t integers.

Returns:

iterator to the newly created secondary index.

Post

new secondary key association between primary key id and secondary key *data is created in the secondary 256-bit integer index table.

function db_idx256_update

void eosio::chain::webassembly::interface::db_idx256_update(
    int32_t iterator,
    uint64_t payer,
    legacy_span< const uint128_t > data
)

Update an association for a 256-bit integer secondary key to a primary key in a secondary 256-bit integer index table. 256-

Parameters:

  • iterator - the iterator to the table row containing the secondary key association to update.
  • payer - the account that pays for the storage costs.
  • data - pointer to the new secondary key data (which is stored as an array of 2 uint128_t integers) that will replace the existing one of the association.

Precondition:

iterator points to an existing table row in the table.

Post

the secondary key of the table row pointed to by iterator is replaced by the specified secondary key.

function db_idx256_remove

void eosio::chain::webassembly::interface::db_idx256_remove(
    int32_t iterator
)

Remove a table row from a secondary 256-bit integer index table. 256-

Parameters:

  • iterator - iterator to the table row to remove.

Precondition:

iterator points to an existing table row in the table.

Post

the table row pointed to by iterator is removed and the associated storage costs are refunded to the payer.

function db_idx256_find_secondary

int32_t eosio::chain::webassembly::interface::db_idx256_find_secondary(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_span< const uint128_t > data,
    legacy_ptr< uint64_t > primary
)

Find a table row in a secondary 256-bit integer index table by secondary key. 256-

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • data - pointer to the secondary key data (which is stored as an array of 2 uint128_t integers) used to lookup the table row.
  • primary - pointer to a 'uint64_t' variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the first table row with a secondary key equal to the specified secondary key or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx256_find_primary

int32_t eosio::chain::webassembly::interface::db_idx256_find_primary(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_span< uint128_t > data,
    uint64_t primary
)

Find a table row in a secondary 256-bit integer index table by primary key. 256-

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • data - pointer to the array of 2 uint128_t integers which will act as the buffer to hold the retrieved secondary key of the found table row.
  • primary - the primary key of the table row to look up.

Returns:

iterator to the table row with a primary key equal to data or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, data will be replaced with the secondary key of the found table row.

function db_idx256_lowerbound

int32_t eosio::chain::webassembly::interface::db_idx256_lowerbound(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_span< uint128_t, 16 > data,
    legacy_ptr< uint64_t, 8 > primary
)

Find the table row in a secondary 256-bit integer index table that matches the lowerbound condition for a given secondary key. Lowerbound secondary index is the first secondary index which key is <= the given secondary index key. 256-

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • data - pointer to the secondary key data (which is stored as an array of 2 uint128_t integers) first used to determine the lowerbound and which is then replaced with the secondary key of the found table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the found table row or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, data will be replaced with the secondary key of the found table row.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx256_upperbound

int32_t eosio::chain::webassembly::interface::db_idx256_upperbound(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_span< uint128_t, 16 > data,
    legacy_ptr< uint64_t, 8 > primary
)

Find the table row in a secondary 256-bit integer index table that matches the upperbound condition for a given secondary key. The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key. 256-

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • data - pointer to the secondary key data (which is stored as an array of 2 uint128_t integers) first used to determine the upperbound and which is then replaced with the secondary key of the found table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the found table row or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, the buffer pointed to by data will be filled with the secondary key of the found table row.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx256_end

int32_t eosio::chain::webassembly::interface::db_idx256_end(
    uint64_t code,
    uint64_t scope,
    uint64_t table
)

Get an end iterator representing just-past-the-end of the last table row of a secondary 256-bit integer index table. 256-

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.

Returns:

end iterator of the table.

function db_idx256_next

int32_t eosio::chain::webassembly::interface::db_idx256_next(
    int32_t iterator,
    legacy_ptr< uint64_t > primary
)

Find the table row following the referenced table row in a secondary 256-bit integer index table. 256-

Parameters:

  • iterator - the iterator to the referenced table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the next table row.

Returns:

iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table).

Precondition:

iterator points to an existing table row in the table.

Post

*primary will be replaced with the primary key of the table row following the referenced table row if it exists, otherwise *primary will be left untouched.

function db_idx256_previous

int32_t eosio::chain::webassembly::interface::db_idx256_previous(
    int32_t iterator,
    legacy_ptr< uint64_t > primary
)

Find the table row preceding the referenced table row in a secondary 256-bit integer index table. 256-

Parameters:

  • iterator - the iterator to the referenced table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the previous table row.

Returns:

iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table).

Precondition:

iterator points to an existing table row in the table or it is the end iterator of the table.

Post

*primary will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise *primary will be left untouched.

function db_idx_double_store

int32_t eosio::chain::webassembly::interface::db_idx_double_store(
    uint64_t scope,
    uint64_t table,
    uint64_t payer,
    uint64_t id,
    legacy_ptr< const float64_t > secondary
)

Store an association of a double-precision floating-point secondary key to a primary key in a secondary double-precision floating-point index table.

Parameters:

  • scope - the scope where the table resides (implied to be within the code of the current receiver).
  • table - the table name.
  • payer - the account that is paying for this storage.
  • id - the primary key to which to associate the secondary key.
  • secondary - pointer to the secondary key.

Returns:

iterator to the newly created secondary index.

Post

new secondary key association between primary key id and secondary key *secondary is created in the secondary double-precision floating-point index table.

function db_idx_double_update

void eosio::chain::webassembly::interface::db_idx_double_update(
    int32_t iterator,
    uint64_t payer,
    legacy_ptr< const float64_t > secondary
)

Update an association for a double-precision floating-point secondary key to a primary key in a secondary double-precision floating-point index table.

Parameters:

  • iterator - the iterator to the table row containing the secondary key association to update.
  • payer - the account that pays for the storage costs.
  • secondary - pointer to the new secondary key that will replace the existing one of the association.

Precondition:

iterator points to an existing table row in the table.

Post

the secondary key of the table row pointed to by iterator is replaced by the specified secondary key.

function db_idx_double_remove

void eosio::chain::webassembly::interface::db_idx_double_remove(
    int32_t iterator
)

Remove a table row from a secondary double-precision floating-point index table.

Parameters:

  • iterator - iterator to the table row to remove.

Precondition:

iterator points to an existing table row in the table.

Post

the table row pointed to by iterator is removed and the associated storage costs are refunded to the payer.

function db_idx_double_find_secondary

int32_t eosio::chain::webassembly::interface::db_idx_double_find_secondary(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< const float64_t > secondary,
    legacy_ptr< uint64_t > primary
)

Find a table row in a secondary double-precision floating-point index table by secondary key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - Pointer to secondary key used to lookup the table row.
  • primary - pointer to a 'uint64_t' variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the first table row with a secondary key equal to the specified secondary key or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx_double_find_primary

int32_t eosio::chain::webassembly::interface::db_idx_double_find_primary(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< float64_t > secondary,
    uint64_t primary
)

Find a table row in a secondary double-precision floating-point index table by primary key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - pointer to a double variable which will have its value set to the secondary key of the found table row.
  • primary - the primary key of the table row to look up.

Returns:

iterator to the table row with a primary key equal to secondary or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, secondary will be replaced with the secondary key of the found table row.

function db_idx_double_lowerbound

int32_t eosio::chain::webassembly::interface::db_idx_double_lowerbound(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< float64_t, 8 > secondary,
    legacy_ptr< uint64_t, 8 > primary
)

Find the table row in a secondary double-precision floating-point index table that matches the lowerbound condition for a given secondary key. Lowerbound secondary index is the first secondary index which key is <= the given secondary index key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - Pointer to secondary key first used to determine the lowerbound and which is then replaced with the secondary key of the found table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the found table row or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, *secondary will be replaced with the secondary key of the found table row.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx_double_upperbound

int32_t eosio::chain::webassembly::interface::db_idx_double_upperbound(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< float64_t, 8 > secondary,
    legacy_ptr< uint64_t, 8 > primary
)

Find the table row in a secondary double-precision floating-point index table that matches the upperbound condition for a given secondary key. The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - pointer to secondary key first used to determine the upperbound and which is then replaced with the secondary key of the found table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the found table row or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, the buffer pointed to by *secondary will be filled with the secondary key of the found table row.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx_double_end

int32_t eosio::chain::webassembly::interface::db_idx_double_end(
    uint64_t code,
    uint64_t scope,
    uint64_t table
)

Get an end iterator representing just-past-the-end of the last table row of a secondary double-precision floating-point index table.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.

Returns:

end iterator of the table.

function db_idx_double_next

int32_t eosio::chain::webassembly::interface::db_idx_double_next(
    int32_t iterator,
    legacy_ptr< uint64_t > primary
)

Find the table row following the referenced table row in a secondary double-precision floating-point index table.

Parameters:

  • iterator - the iterator to the referenced table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the next table row.

Returns:

iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table).

Precondition:

iterator points to an existing table row in the table.

Post

*primary will be replaced with the primary key of the table row following the referenced table row if it exists, otherwise *primary will be left untouched.

function db_idx_double_previous

int32_t eosio::chain::webassembly::interface::db_idx_double_previous(
    int32_t iterator,
    legacy_ptr< uint64_t > primary
)

Find the table row preceding the referenced table row in a secondary double-precision floating-point index table.

Parameters:

  • iterator - the iterator to the referenced table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the previous table row.

Returns:

iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table).

Precondition:

iterator points to an existing table row in the table or it is the end iterator of the table.

Post

*primary will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise *primary will be left untouched.

function db_idx_long_double_store

int32_t eosio::chain::webassembly::interface::db_idx_long_double_store(
    uint64_t scope,
    uint64_t table,
    uint64_t payer,
    uint64_t id,
    legacy_ptr< const float128_t > secondary
)

Store an association of a quadruple-precision floating-point secondary key to a primary key in a secondary quadruple-precision floating-point index table.

Parameters:

  • scope - the scope where the table resides (implied to be within the code of the current receiver).
  • table - the table name.
  • payer - the account that is paying for this storage.
  • id - the primary key to which to associate the secondary key.
  • secondary - pointer to the secondary key.

Returns:

iterator to the newly created secondary index.

Post

new secondary key association between primary key id and secondary key *secondary is created in the quadruple-precision floating-point index table.

function db_idx_long_double_update

void eosio::chain::webassembly::interface::db_idx_long_double_update(
    int32_t iterator,
    uint64_t payer,
    legacy_ptr< const float128_t > secondary
)

Update an association for a quadruple-precision floating-point secondary key to a primary key in a secondary quadruple-precision floating-point index table.

Parameters:

  • iterator - the iterator to the table row containing the secondary key association to update.
  • payer - the account that pays for the storage costs.
  • secondary - pointer to the new secondary key that will replace the existing one of the association.

Precondition:

iterator points to an existing table row in the table.

Post

the secondary key of the table row pointed to by iterator is replaced by the specified secondary key.

function db_idx_long_double_remove

void eosio::chain::webassembly::interface::db_idx_long_double_remove(
    int32_t iterator
)

Remove a table row from a secondary quadruple-precision floating-point index table.

Parameters:

  • iterator - iterator to the table row to remove.

Precondition:

iterator points to an existing table row in the table.

Post

the table row pointed to by iterator is removed and the associated storage costs are refunded to the payer.

function db_idx_long_double_find_secondary

int32_t eosio::chain::webassembly::interface::db_idx_long_double_find_secondary(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< const float128_t > secondary,
    legacy_ptr< uint64_t > primary
)

Find a table row in a secondary quadruple-precision floating-point index table by secondary key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - Pointer to secondary key used to lookup the table row.
  • primary - pointer to a 'uint64_t' variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the first table row with a secondary key equal to the specified secondary key or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx_long_double_find_primary

int32_t eosio::chain::webassembly::interface::db_idx_long_double_find_primary(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< float128_t > secondary,
    uint64_t primary
)

Find a table row in a secondary double-precision floating-point index table by primary key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - pointer to a long double variable which will have its value set to the secondary key of the found table row.
  • primary - the primary key of the table row to look up.

Returns:

iterator to the table row with a primary key equal to secondary or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, secondary will be replaced with the secondary key of the found table row.

function db_idx_long_double_lowerbound

int32_t eosio::chain::webassembly::interface::db_idx_long_double_lowerbound(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< float128_t, 8 > secondary,
    legacy_ptr< uint64_t, 8 > primary
)

Find the table row in a secondary quadruple-precision floating-point index table that matches the lowerbound condition for a given secondary key. Lowerbound secondary index is the first secondary index which key is <= the given secondary index key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - Pointer to secondary key first used to determine the lowerbound and which is then replaced with the secondary key of the found table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the found table row or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, *secondary will be replaced with the secondary key of the found table row.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx_long_double_upperbound

int32_t eosio::chain::webassembly::interface::db_idx_long_double_upperbound(
    uint64_t code,
    uint64_t scope,
    uint64_t table,
    legacy_ptr< float128_t, 8 > secondary,
    legacy_ptr< uint64_t, 8 > primary
)

Find the table row in a secondary quadruple-precision floating-point index table that matches the upperbound condition for a given secondary key. The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.
  • secondary - pointer to secondary key first used to determine the upperbound and which is then replaced with the secondary key of the found table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the found table row.

Returns:

iterator to the found table row or the end iterator of the table if the table row could not be found.

Post

If and only if the table row is found, the buffer pointed to by *secondary will be filled with the secondary key of the found table row.

Post

If and only if the table row is found, *primary will be replaced with the primary key of the found table row.

function db_idx_long_double_end

int32_t eosio::chain::webassembly::interface::db_idx_long_double_end(
    uint64_t code,
    uint64_t scope,
    uint64_t table
)

Get an end iterator representing just-past-the-end of the last table row of a secondary quadruple-precision floating-point index table.

Parameters:

  • code - the name of the owner of the table.
  • scope - the scope where the table resides.
  • table - the table name.

Returns:

end iterator of the table.

function db_idx_long_double_next

int32_t eosio::chain::webassembly::interface::db_idx_long_double_next(
    int32_t iterator,
    legacy_ptr< uint64_t > primary
)

Find the table row following the referenced table row in a secondary quadruple-precision floating-point index table.

Parameters:

  • iterator - the iterator to the referenced table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the next table row.

Returns:

iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table).

Precondition:

iterator points to an existing table row in the table.

Post

*primary will be replaced with the primary key of the table row following the referenced table row if it exists, otherwise *primary will be left untouched.

function db_idx_long_double_previous

int32_t eosio::chain::webassembly::interface::db_idx_long_double_previous(
    int32_t iterator,
    legacy_ptr< uint64_t > primary
)

Find the table row preceding the referenced table row in a secondary quadruple-precision floating-point index table.

Parameters:

  • iterator - the iterator to the referenced table row.
  • primary - pointer to a uint64_t variable which will have its value set to the primary key of the previous table row.

Returns:

iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table).

Precondition:

iterator points to an existing table row in the table or it is the end iterator of the table.

Post

*primary will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise *primary will be left untouched.

function kv_erase

int64_t eosio::chain::webassembly::interface::kv_erase(
    uint64_t contract,
    span< const char > key
)

Erase a key-value pair.

Parameters:

  • contract - name of the contract associated with the kv pair.
  • key - the key associated with the kv pair to be erased.

Returns:

change in resource usage.

function kv_set

int64_t eosio::chain::webassembly::interface::kv_set(
    uint64_t contract,
    span< const char > key,
    span< const char > value,
    account_name payer
)

Set a key-value pair. If the key doesn't exist, then a new kv pair will be created.

Parameters:

  • contract - name of the contract associated with the kv pair.
  • key - the key in the kv pair.
  • value - the value in the kv pair.
  • payer - name of the account paying for the resource.

Returns:

change in resource usage.

function kv_get

bool eosio::chain::webassembly::interface::kv_get(
    uint64_t contract,
    span< const char > key,
    uint32_t * value_size
)

Check the existence of a key. If the key doesn't exist, it returns false, clears the temporary data buffer and sets *value_size to 0. If the key does exist, it returns true, stores the value into the temporary data buffer and sets *value_size to the value size. Use kv_get_data to retrieve the value.

Parameters:

  • contract - name of the contract associated with the kv pair.
  • key - the key to query.
  • value_size - resulting value size (0 if the key doesn't exist).

Returns:

false if the provided key doesn't exist, true otherwise.

function kv_get_data

uint32_t eosio::chain::webassembly::interface::kv_get_data(
    uint32_t offset,
    span< char > data
)

Fetches data from temporary buffer starting at offset. Copies up to the data's size span passed as parameter.

Parameters:

  • offset - position from where to start reading the value from the temporary buffer.
  • data - span where the result value will be stored.

Returns:

number of bytes written in data.

function kv_it_create

uint32_t eosio::chain::webassembly::interface::kv_it_create(
    uint64_t contract,
    span< const char > prefix
)

Create a kv iterator. The returned handle:

  • Starts at 1.
  • Counts up by 1 at each call, assuming no destroyed iterators are available.
  • If destroyed iterators are available, the most-recently-destroyed one is reinitialized and returned. The prefix limits the range of keys that the iterator covers. If the prefix is empty, the iterator covers the entire range of keys belonging to a contract within the database ID.

Parameters:

  • contract - the contract associated with the kv iterator.
  • prefix - prefix to build the iterator.

Returns:

handle of the created iterator

function kv_it_destroy

void eosio::chain::webassembly::interface::kv_it_destroy(
    uint32_t itr
)

Destroy a kv iterator.

Parameters:

  • itr - the kv iterator to destroy.

function kv_it_status

int32_t eosio::chain::webassembly::interface::kv_it_status(
    uint32_t itr
)

Get the status of a kv iterator.

Parameters:

  • itr - the kv iterator we want to know the status.

Return value:

  • iterator_ok iterator is positioned at a kv pair.
  • iterator_erased the kv pair that the iterator used to be positioned at, was erased.
  • iterator_end iterator is out-of-bounds.

function kv_it_compare

int32_t eosio::chain::webassembly::interface::kv_it_compare(
    uint32_t itr_a,
    uint32_t itr_b
)

Compare the key of two kv iterators.

Parameters:

  • itr_a - first iterator.
  • itr_b - second iterator.

Return value:

  • -1 if itr_a's key is less than itr_b's key
  • 0 if itr_a's key is the same as itr_b's key
  • 1 if itr_a's key is greater than itr_b's key

function kv_it_key_compare

int32_t eosio::chain::webassembly::interface::kv_it_key_compare(
    uint32_t itr,
    span< const char > key
)

Compare the key of an iterator to a provided key.

Parameters:

  • itr - the iterator to compare.
  • key - the key to compare.

Return value:

  • -1 if itr's key is less than key.
  • 0 if itr's key is the same as key.
  • 1 itr's key is greater than key.

function kv_it_move_to_end

int32_t eosio::chain::webassembly::interface::kv_it_move_to_end(
    uint32_t itr
)

Move a kv iterator to an out-of-bounds position.

Parameters:

  • itr - the kv iterator we want to move.

Returns:

the status of the iterator (iterator_end).

function kv_it_next

int32_t eosio::chain::webassembly::interface::kv_it_next(
    uint32_t itr,
    uint32_t * found_key_size,
    uint32_t * found_value_size
)

Move a kv iterator to the next position.

Parameters:

  • itr - the iterator we want to move.
  • found_key_size - size of the result key in the new position.
  • found_value_size - size of the result value in the new position.

Returns:

the status of the iterator.

function kv_it_prev

int32_t eosio::chain::webassembly::interface::kv_it_prev(
    uint32_t itr,
    uint32_t * found_key_size,
    uint32_t * found_value_size
)

Move a kv iterator to the previous position.

Parameters:

  • itr - the iterator we want to move
  • found_key_size - size of the result key in the new position.
  • found_value_size - size of the result value in the new position.

Returns:

the status of the iterator.

function kv_it_lower_bound

int32_t eosio::chain::webassembly::interface::kv_it_lower_bound(
    uint32_t itr,
    span< const char > key,
    uint32_t * found_key_size,
    uint32_t * found_value_size
)

Find the least non-deleted key which is >= the provided key.

Parameters:

  • itr - the kv iterator.
  • key - the key we want to query
  • found_key_size - size of the result found key
  • found_value_size - size of the result found value

Returns:

the status of the iterator.

Post

if a key is found, the new status is iterator_ok. If not found, the new status is iterator_end. kv_it_lower_bound never returns iterator_erased.

Post

the size of the key and the size of the value at the iterator's new position, or zero if the iterator is at end, will be written to found_key_size and found_value_size.

function kv_it_key

int32_t eosio::chain::webassembly::interface::kv_it_key(
    uint32_t itr,
    uint32_t offset,
    span< char > dest,
    uint32_t * actual_size
)

Fetch the key from a kv iterator.

Parameters:

  • itr - the kv iterator.
  • offset - position from where to start reading.
  • dest - where the data will reside.
  • actual_size - size of the key

Returns:

the status of the iterator passed as a parameter.

function kv_it_value

int32_t eosio::chain::webassembly::interface::kv_it_value(
    uint32_t itr,
    uint32_t offset,
    span< char > dest,
    uint32_t * actual_size
)

Fetch the value from a kv iterator.

Parameters:

  • itr - the iterator of the object we want to get the value.
  • offset - position from where to start reading.
  • dest - where the value will reside.
  • actual_size - size of the value.

Returns:

the status of the iterator passed as a parameter.

function memcpy

void* eosio::chain::webassembly::interface::memcpy(
    memcpy_params 
) const

function memmove

void* eosio::chain::webassembly::interface::memmove(
    memcpy_params 
) const

function memcmp

int32_t eosio::chain::webassembly::interface::memcmp(
    memcmp_params 
) const

function memset

void* eosio::chain::webassembly::interface::memset(
    memset_params 
) const

function send_inline

void eosio::chain::webassembly::interface::send_inline(
    legacy_span< const char > data
)

Send an inline action in the context of the parent transaction of this operation.

Parameters:

  • data - the inline action to be sent.

function send_context_free_inline

void eosio::chain::webassembly::interface::send_context_free_inline(
    legacy_span< const char > data
)

Send a context free inline action in the context of the parent transaction of this operation.

Parameters:

  • data - the packed free inline action to be sent.

function send_deferred

void eosio::chain::webassembly::interface::send_deferred(
    legacy_ptr< const uint128_t > sender_id,
    account_name payer,
    legacy_span< const char > data,
    uint32_t replace_existing
)

Send a deferred transaction.

Parameters:

  • sender_id - account name of the sender of this deferred transaction.
  • payer - account name responsible for paying the RAM for this deferred transaction.
  • data - the packed transaction to be deferred.
  • replace_existing - if true, it will replace an existing transaction.

function cancel_deferred

bool eosio::chain::webassembly::interface::cancel_deferred(
    legacy_ptr< const uint128_t > val
)

Cancels a deferred transaction.

Parameters:

  • val - The id of the sender.

Return value:

  • false if transaction was not found.
  • true if transaction was canceled.

function read_transaction

int32_t eosio::chain::webassembly::interface::read_transaction(
    legacy_span< char > data
) const

Access a copy of the currently executing transaction.

Parameters:

  • data - the currently executing transaction (packed).

Return value:

  • false if transaction was not found.
  • true if transaction was canceled.

function transaction_size

int32_t eosio::chain::webassembly::interface::transaction_size() const

Gets the size of the currently executing transaction.

Returns:

size of the currently executing transaction.

function expiration

int32_t eosio::chain::webassembly::interface::expiration() const

Gets the expiration of the currently executing transaction.

Returns:

expiration of the currently executing transaction in seconds since Unix epoch.

function tapos_block_num

int32_t eosio::chain::webassembly::interface::tapos_block_num() const

Gets the block number used for TAPOS on the currently executing transaction.

Returns:

block number used for TAPOS on the currently executing transaction.

function tapos_block_prefix

int32_t eosio::chain::webassembly::interface::tapos_block_prefix() const

Gets the block prefix used for TAPOS on the currently executing transaction.

Returns:

block prefix used for TAPOS on the currently executing transaction.

function get_action

int32_t eosio::chain::webassembly::interface::get_action(
    uint32_t type,
    uint32_t index,
    legacy_span< char > buffer
) const

Retrieve the indicated action from the active transaction.

Parameters:

  • type - 0 for context free action, 1 for action.
  • index - the index of the requested action.
  • buffer - the action we want (packed).

Returns:

the number of bytes written on the buffer or -1 if there was an error.

function __ashlti3

void eosio::chain::webassembly::interface::__ashlti3(
    legacy_ptr< int128_t > ,
    uint64_t ,
    uint64_t ,
    uint32_t 
) const

function __ashrti3

void eosio::chain::webassembly::interface::__ashrti3(
    legacy_ptr< int128_t > ,
    uint64_t ,
    uint64_t ,
    uint32_t 
) const

function __lshlti3

void eosio::chain::webassembly::interface::__lshlti3(
    legacy_ptr< int128_t > ,
    uint64_t ,
    uint64_t ,
    uint32_t 
) const

function __lshrti3

void eosio::chain::webassembly::interface::__lshrti3(
    legacy_ptr< int128_t > ,
    uint64_t ,
    uint64_t ,
    uint32_t 
) const

function __divti3

void eosio::chain::webassembly::interface::__divti3(
    legacy_ptr< int128_t > ,
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __udivti3

void eosio::chain::webassembly::interface::__udivti3(
    legacy_ptr< uint128_t > ,
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __multi3

void eosio::chain::webassembly::interface::__multi3(
    legacy_ptr< int128_t > ,
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __modti3

void eosio::chain::webassembly::interface::__modti3(
    legacy_ptr< int128_t > ,
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __umodti3

void eosio::chain::webassembly::interface::__umodti3(
    legacy_ptr< uint128_t > ,
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __addtf3

void eosio::chain::webassembly::interface::__addtf3(
    legacy_ptr< float128_t > ,
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __subtf3

void eosio::chain::webassembly::interface::__subtf3(
    legacy_ptr< float128_t > ,
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __multf3

void eosio::chain::webassembly::interface::__multf3(
    legacy_ptr< float128_t > ,
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __divtf3

void eosio::chain::webassembly::interface::__divtf3(
    legacy_ptr< float128_t > ,
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __negtf2

void eosio::chain::webassembly::interface::__negtf2(
    legacy_ptr< float128_t > ,
    uint64_t ,
    uint64_t 
) const

function __extendsftf2

void eosio::chain::webassembly::interface::__extendsftf2(
    legacy_ptr< float128_t > ,
    float 
) const

function __extenddftf2

void eosio::chain::webassembly::interface::__extenddftf2(
    legacy_ptr< float128_t > ,
    double 
) const

function __trunctfdf2

double eosio::chain::webassembly::interface::__trunctfdf2(
    uint64_t ,
    uint64_t 
) const

function __trunctfsf2

float eosio::chain::webassembly::interface::__trunctfsf2(
    uint64_t ,
    uint64_t 
) const

function __fixtfsi

int32_t eosio::chain::webassembly::interface::__fixtfsi(
    uint64_t ,
    uint64_t 
) const

function __fixtfdi

int64_t eosio::chain::webassembly::interface::__fixtfdi(
    uint64_t ,
    uint64_t 
) const

function __fixtfti

void eosio::chain::webassembly::interface::__fixtfti(
    legacy_ptr< int128_t > ,
    uint64_t ,
    uint64_t 
) const

function __fixunstfsi

uint32_t eosio::chain::webassembly::interface::__fixunstfsi(
    uint64_t ,
    uint64_t 
) const

function __fixunstfdi

uint64_t eosio::chain::webassembly::interface::__fixunstfdi(
    uint64_t ,
    uint64_t 
) const

function __fixunstfti

void eosio::chain::webassembly::interface::__fixunstfti(
    legacy_ptr< uint128_t > ,
    uint64_t ,
    uint64_t 
) const

function __fixsfti

void eosio::chain::webassembly::interface::__fixsfti(
    legacy_ptr< int128_t > ,
    float 
) const

function __fixdfti

void eosio::chain::webassembly::interface::__fixdfti(
    legacy_ptr< int128_t > ,
    double 
) const

function __fixunssfti

void eosio::chain::webassembly::interface::__fixunssfti(
    legacy_ptr< uint128_t > ,
    float 
) const

function __fixunsdfti

void eosio::chain::webassembly::interface::__fixunsdfti(
    legacy_ptr< uint128_t > ,
    double 
) const

function __floatsidf

double eosio::chain::webassembly::interface::__floatsidf(
    int32_t 
) const

function __floatsitf

void eosio::chain::webassembly::interface::__floatsitf(
    legacy_ptr< float128_t > ,
    int32_t 
) const

function __floatditf

void eosio::chain::webassembly::interface::__floatditf(
    legacy_ptr< float128_t > ,
    uint64_t 
) const

function __floatunsitf

void eosio::chain::webassembly::interface::__floatunsitf(
    legacy_ptr< float128_t > ,
    uint32_t 
) const

function __floatunditf

void eosio::chain::webassembly::interface::__floatunditf(
    legacy_ptr< float128_t > ,
    uint64_t 
) const

function __floattidf

double eosio::chain::webassembly::interface::__floattidf(
    uint64_t ,
    uint64_t 
) const

function __floatuntidf

double eosio::chain::webassembly::interface::__floatuntidf(
    uint64_t ,
    uint64_t 
) const

function __cmptf2

int32_t eosio::chain::webassembly::interface::__cmptf2(
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __eqtf2

int32_t eosio::chain::webassembly::interface::__eqtf2(
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __netf2

int32_t eosio::chain::webassembly::interface::__netf2(
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __getf2

int32_t eosio::chain::webassembly::interface::__getf2(
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __gttf2

int32_t eosio::chain::webassembly::interface::__gttf2(
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __letf2

int32_t eosio::chain::webassembly::interface::__letf2(
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __lttf2

int32_t eosio::chain::webassembly::interface::__lttf2(
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

function __unordtf2

int32_t eosio::chain::webassembly::interface::__unordtf2(
    uint64_t ,
    uint64_t ,
    uint64_t ,
    uint64_t 
) const

The documentation for this class was generated from the following file: libraries/chain/include/eosio/chain/webassembly/interface.hpp