struct eosio::action
Class List > eosio :: action
Packed representation of an action. More...
Public Attributes
Type | Name |
---|---|
name | account Name of the account the action is intended for. |
name | name Name of the action. |
std::vector< permission_level > | authorization List of permissions that authorize this action. |
std::vector< char > | data Payload data. |
Public Functions
Type | Name |
---|---|
action () = default Construct a new action object. |
|
action (const permission_level & auth, struct name a, struct name n, T && value) Construct a new action object with the given permission, action receiver, action name, action struct. |
|
action (std::vector< permission_level > auths, struct name a, struct name n, T && value) Construct a new action object with the given list of permissions, action receiver, action name, action struct. |
|
void | send () const Send the action as inline action. |
void | send_context_free () const Send the action as inline context free action. |
T | data_as () Retrieve the unpacked data as T. |
Friends
Type | Name |
---|---|
friend DataStream & | operator<< |
friend DataStream & | operator>> |
Detailed Description
This is the packed representation of an action along with meta-data about the authorization levels.
Public Attributes Documentation
variable account
name eosio::action::account;
Name of the account the action is intended for.
Name of the account the action is intended for
variable name
name eosio::action::name;
Name of the action.
Name of the action
variable authorization
std::vector<permission_level> eosio::action::authorization;
List of permissions that authorize this action.
List of permissions that authorize this action
variable data
std::vector<char> eosio::action::data;
Payload data.
Payload data
Public Functions Documentation
function action (1/3)
eosio::action::action() = default
Construct a new action object.
Default Constructor
function action (2/3)
template<typename T>
eosio::action::action(
const permission_level & auth,
struct name a,
struct name n,
T && value
)
Construct a new action object with the given permission, action receiver, action name, action struct.
Construct a new action object with the given action struct
Template parameters:
- T - Type of action struct, must be serializable by
pack(...)
Parameters:
- auth - The permissions that authorizes this action
- a - The name of the account this action is intended for (action receiver)
- n - The name of the action
- value - The action struct that will be serialized via pack into data
function action (3/3)
template<typename T>
eosio::action::action(
std::vector< permission_level > auths,
struct name a,
struct name n,
T && value
)
Construct a new action object with the given list of permissions, action receiver, action name, action struct.
Construct a new action object with the given action struct
Template parameters:
- T - Type of action struct, must be serializable by
pack(...)
Parameters:
- auths - The list of permissions that authorize this action
- a - The name of the account this action is intended for (action receiver)
- n - The name of the action
- value - The action struct that will be serialized via pack into data
function send
void eosio::action::send() const
Send the action as inline action.
Send the action as inline action
function send_context_free
void eosio::action::send_context_free() const
Send the action as inline context free action.
Send the action as inline context free action
Precondition:
This action should not contain any authorizations
function data_as
template<typename T>
T eosio::action::data_as()
Retrieve the unpacked data as T.
Retrieve the unpacked data as T
Template parameters:
- T expected type of data
Returns:
the action data
Friends Documentation
friend operator<<
template<typename DataStream>
DataStream& operator<<(
DataStream & ds,
const action & t
)
friend operator>>
template<typename DataStream>
DataStream& operator>>(
DataStream & ds,
action & t
)
The documentation for this class was generated from the following file: libraries/eosiolib/action.hpp