본문으로 건너뛰기

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

#include <action.hpp>

Public Functions

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

Public Attributes

Name
constexpr eosio::nameaction_name
eosio::namecode_name
std::vector< eosio::permission_level >permissions

Detailed Description

template <eosio::name::raw Name,
auto Action>
struct eosio::action_wrapper;

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

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 Functions Documentation

function action_wrapper

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

function action_wrapper

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

function action_wrapper

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

function action_wrapper

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

function action_wrapper

template <typename Code >
inline constexpr action_wrapper(
Code && code
)

function to_action

template <typename... Args>
inline action to_action(
Args &&... args
) const

function send

template <typename... Args>
inline void send(
Args &&... args
) const

function send_context_free

template <typename... Args>
inline void send_context_free(
Args &&... args
) const

function get_mem_ptr

static inline constexpr auto get_mem_ptr()

Public Attributes Documentation

variable action_name

static constexpr eosio::name action_name = eosio::name(Name);

variable code_name

eosio::name code_name;

variable permissions

std::vector< eosio::permission_level > permissions;

Updated on 2022-12-05 at 15:38:07 +0000