struct eosio::action_wrapper

Class List > eosio :: action_wrapper

Used to wrap an a particular action to simplify the process of other contracts sending inline actions to "wrapped" action. Example: More...

Public Static Attributes

Type Name
static constexpr eosio::name action_name

Public Attributes

Type Name
eosio::name code_name
std::vector< eosio::permission_level > permissions

Public Functions

Type Name
constexpr action_wrapper (Code && code, std::vector< eosio::permission_level > && perms)
constexpr action_wrapper (Code && code, const std::vector< eosio::permission_level > & perms)
constexpr action_wrapper (Code && code, eosio::permission_level && perm)
constexpr action_wrapper (Code && code, const eosio::permission_level & perm)
constexpr action_wrapper (Code && code)
action to_action (Args &&... args) const
void send (Args &&... args) const
void send_context_free (Args &&... args) const

Public Static Functions

Type Name
static constexpr auto get_mem_ptr ()

Detailed Description

Wrapper for an action object.

// defined by contract writer of the actions
using transfer_act = action_wrapper<"transfer"_n, &token::transfer>;
// usage by different contract writer
transfer_act{"eosio.token"_n, {st.issuer, "active"_n}}.send(st.issuer, to, quantity, memo);
// or
transfer_act trans_action{ "eosio.token"_n, {st.issuer, "active"_n}};
trans_action.send(st.issuer, to, quantity, memo);

Public Static Attributes Documentation

variable action_name

constexpr eosio::name eosio::action_wrapper< Name, Action >::action_name;

Public Attributes Documentation

variable code_name

eosio::name eosio::action_wrapper< Name, Action >::code_name;

variable permissions

std::vector<eosio::permission_level> eosio::action_wrapper< Name, Action >::permissions;

Public Functions Documentation

function action_wrapper (1/5)

template<typename Code>
constexpr eosio::action_wrapper< Name, Action >::action_wrapper(
    Code && code,
    std::vector< eosio::permission_level > && perms
)

function action_wrapper (2/5)

template<typename Code>
constexpr eosio::action_wrapper< Name, Action >::action_wrapper(
    Code && code,
    const std::vector< eosio::permission_level > & perms
)

function action_wrapper (3/5)

template<typename Code>
constexpr eosio::action_wrapper< Name, Action >::action_wrapper(
    Code && code,
    eosio::permission_level && perm
)

function action_wrapper (4/5)

template<typename Code>
constexpr eosio::action_wrapper< Name, Action >::action_wrapper(
    Code && code,
    const eosio::permission_level & perm
)

function action_wrapper (5/5)

template<typename Code>
constexpr eosio::action_wrapper< Name, Action >::action_wrapper(
    Code && code
)

function to_action

template<typename... Args>
action eosio::action_wrapper< Name, Action >::to_action(
    Args &&... args
) const

function send

template<typename... Args>
void eosio::action_wrapper< Name, Action >::send(
    Args &&... args
) const

function send_context_free

template<typename... Args>
void eosio::action_wrapper< Name, Action >::send_context_free(
    Args &&... args
) const

Public Static Functions Documentation

function get_mem_ptr

static static constexpr auto eosio::action_wrapper< Name, Action >::get_mem_ptr()

The documentation for this class was generated from the following file: libraries/eosiolib/contracts/eosio/action.hpp