Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::wrap Class Reference

#include <sysio.wrap.hpp>

Inheritance diagram for sysio::wrap:
Collaboration diagram for sysio::wrap:

Public Types

using exec_action = sysio::action_wrapper<"exec"_n, &wrap::exec>
 

Public Member Functions

void exec (ignore< name > executer, ignore< transaction > trx)
 

Detailed Description

The sysio.wrap system contract allows block producers to bypass authorization checks or run privileged actions with 15/21 producer approval and thus simplifies block producers superuser actions. It also makes these actions easier to audit.

It does not give block producers any additional powers or privileges that do not already exist within the EOSIO based blockchains. As it is implemented, in an EOSIO based blockchain, 15/21 block producers can change an account's permissions or modify an account's contract code if they decided it is beneficial for the blockchain and community. However, the current method is opaque and leaves undesirable side effects on specific system accounts, and thus the sysio.wrapcontract solves this matter by providing an easier method of executing important governance actions.

The only action implemented by the sysio.wrap system contract is the exec action. This action allows for execution of a transaction, which is passed to the exec method in the form of a packed transaction in json format via the 'trx' parameter and the executer account that executes the transaction. The same executer account will also be used to pay the RAM and CPU fees needed to execute the transaction.

Definition at line 15 of file sysio.wrap.hpp.

Member Typedef Documentation

◆ exec_action

using sysio::wrap::exec_action = sysio::action_wrapper<"exec"_n, &wrap::exec>

Definition at line 36 of file sysio.wrap.hpp.

Member Function Documentation

◆ exec()

void sysio::wrap::exec ( ignore< name > executer,
ignore< transaction > trx )

Execute action.

Execute a transaction while bypassing regular authorization checks.

Preconditions:

  • Requires authorization of sysio.wrap which needs to be a privileged account.

Postconditions:

  • Deferred transaction RAM usage is billed to 'executer' *
Parameters
executer- account executing the transaction,
trx- the transaction to be executed.

Definition at line 5 of file sysio.wrap.cpp.

5 {
6 require_auth( get_self() );
7
8 name executer;
9 _ds >> executer;
10
11 require_auth( executer );
12
13 send_deferred( (uint128_t(executer.value) << 64) | (uint64_t)current_time_point().time_since_epoch().count(), executer, _ds.pos(), _ds.remaining() );
14}
std::string name
int * count
__uint128_t uint128_t
Definition config.hpp:8
unsigned __int64 uint64_t
Definition stdint.h:136

The documentation for this class was generated from the following files: