COOPENOMICS  v1
Кооперативная Экономика
Класс eosiosystem::native

#include <native.hpp>

Граф наследования:eosiosystem::native:
eosiosystem::system_contract

Открытые типы

using newaccount_action = eosio::action_wrapper<"newaccount"_n, &native::newaccount >
 
using updateauth_action = eosio::action_wrapper<"updateauth"_n, &native::updateauth >
 
using deleteauth_action = eosio::action_wrapper<"deleteauth"_n, &native::deleteauth >
 
using linkauth_action = eosio::action_wrapper<"linkauth"_n, &native::linkauth >
 
using unlinkauth_action = eosio::action_wrapper<"unlinkauth"_n, &native::unlinkauth >
 
using canceldelay_action = eosio::action_wrapper<"canceldelay"_n, &native::canceldelay >
 
using setabi_action = eosio::action_wrapper<"setabi"_n, &native::setabi >
 

Открытые члены

void newaccount (const name &creator, const name &name, ignore< authority > owner, ignore< authority > active)
 
void updateauth (name account, name permission, name parent, authority auth, binary_extension< name > authorized_by)
 
void deleteauth (name account, name permission, binary_extension< name > authorized_by)
 
void linkauth (name account, name code, name type, name requirement, binary_extension< name > authorized_by)
 
void unlinkauth (name account, name code, name type, binary_extension< name > authorized_by)
 
void canceldelay (ignore< permission_level > canceling_auth, ignore< checksum256 > trx_id)
 
void onerror (ignore< uint128_t > sender_id, ignore< std::vector< char > > sent_trx)
 
void setabi (const name &account, const std::vector< char > &abi, const binary_extension< std::string > &memo)
 

Подробное описание

The EOSIO core native contract that governs authorization and contracts' abi.

Определения типов

◆ canceldelay_action

using eosiosystem::native::canceldelay_action = eosio::action_wrapper<"canceldelay"_n, &native::canceldelay>

◆ deleteauth_action

using eosiosystem::native::deleteauth_action = eosio::action_wrapper<"deleteauth"_n, &native::deleteauth>

◆ linkauth_action

using eosiosystem::native::linkauth_action = eosio::action_wrapper<"linkauth"_n, &native::linkauth>

◆ newaccount_action

using eosiosystem::native::newaccount_action = eosio::action_wrapper<"newaccount"_n, &native::newaccount>

◆ setabi_action

using eosiosystem::native::setabi_action = eosio::action_wrapper<"setabi"_n, &native::setabi>

◆ unlinkauth_action

using eosiosystem::native::unlinkauth_action = eosio::action_wrapper<"unlinkauth"_n, &native::unlinkauth>

◆ updateauth_action

using eosiosystem::native::updateauth_action = eosio::action_wrapper<"updateauth"_n, &native::updateauth>

Методы

◆ canceldelay()

void eosiosystem::native::canceldelay ( ignore< permission_level canceling_auth,
ignore< checksum256 >  trx_id 
)
inline

Cancel delay action cancels a deferred transaction.

Аргументы
canceling_auth- the permission that authorizes this action,
trx_id- the deferred transaction id to be cancelled.

◆ deleteauth()

void eosiosystem::native::deleteauth ( name  account,
name  permission,
binary_extension< name >  authorized_by 
)
inline

Delete authorization action deletes the authorization for an account's permission.

This contract enforces additional rules:

  1. If authorized_by is present and not "", then the contract does a require_auth2(account, authorized_by).
  2. If the account has opted into limitauthchg, then authorized_by must be present and not "".
  3. If the account has opted into limitauthchg, and allow_perms is not empty, then authorized_by must be in the array.
  4. If the account has opted into limitauthchg, and disallow_perms is not empty, then authorized_by must not be in the array.
Аргументы
account- the account for which the permission authorization is deleted,
permission- the permission name been deleted.
authorized_by- the permission which is authorizing this change

◆ linkauth()

void eosiosystem::native::linkauth ( name  account,
name  code,
name  type,
name  requirement,
binary_extension< name >  authorized_by 
)
inline

Link authorization action assigns a specific action from a contract to a permission you have created. Five system actions can not be linked updateauth, deleteauth, linkauth, unlinkauth, and canceldelay. This is useful because when doing authorization checks, the EOSIO based blockchain starts with the action needed to be authorized (and the contract belonging to), and looks up which permission is needed to pass authorization validation. If a link is set, that permission is used for authorization validation otherwise then active is the default, with the exception of eosio.any. eosio.any is an implicit permission which exists on every account; you can link actions to eosio.any and that will make it so linked actions are accessible to any permissions defined for the account.

This contract enforces additional rules:

  1. If authorized_by is present and not "", then the contract does a require_auth2(account, authorized_by).
  2. If the account has opted into limitauthchg, then authorized_by must be present and not "".
  3. If the account has opted into limitauthchg, and allow_perms is not empty, then authorized_by must be in the array.
  4. If the account has opted into limitauthchg, and disallow_perms is not empty, then authorized_by must not be in the array.
Аргументы
account- the permission's owner to be linked and the payer of the RAM needed to store this link,
code- the owner of the action to be linked,
type- the action to be linked,
requirement- the permission to be linked.
authorized_by- the permission which is authorizing this change

◆ newaccount()

void eosiosystem::native::newaccount ( const name &  creator,
const name &  new_account_name,
ignore< authority owner,
ignore< authority active 
)

These actions map one-on-one with the ones defined in core layer of EOSIO, that's where their implementation actually is done. They are present here only so they can show up in the abi file and thus user can send them to this contract, but they have no specific implementation at this contract level, they will execute the implementation at the core layer and nothing else. New account action is called after a new account is created. This code enforces resource-limits rules for new accounts as well as new account naming conventions.

Called after a new account is created. This code enforces resource-limits rules for new accounts as well as new account naming conventions.

Account names containing '.' symbols must have a suffix equal to the name of the creator. This allows users who buy a premium name (shorter than 12 characters with no dots) to be the only ones who can create accounts with the creator's name as a suffix.

◆ onerror()

void eosiosystem::native::onerror ( ignore< uint128_t >  sender_id,
ignore< std::vector< char > >  sent_trx 
)

On error action, notification of this action is delivered to the sender of a deferred transaction when an objective error occurs while executing the deferred transaction. This action is not meant to be called directly.

Аргументы
sender_id- the id for the deferred transaction chosen by the sender,
sent_trx- the deferred transaction that failed.

◆ setabi()

void eosiosystem::native::setabi ( const name &  account,
const std::vector< char > &  abi,
const binary_extension< std::string > &  memo 
)

Set abi action sets the contract abi for an account.

Аргументы
account- the account for which to set the contract abi.
abi- the abi content to be set, in the form of a blob binary.
memo- may be omitted

◆ unlinkauth()

void eosiosystem::native::unlinkauth ( name  account,
name  code,
name  type,
binary_extension< name >  authorized_by 
)
inline

Unlink authorization action it's doing the reverse of linkauth action, by unlinking the given action.

This contract enforces additional rules:

  1. If authorized_by is present and not "", then the contract does a require_auth2(account, authorized_by).
  2. If the account has opted into limitauthchg, then authorized_by must be present and not "".
  3. If the account has opted into limitauthchg, and allow_perms is not empty, then authorized_by must be in the array.
  4. If the account has opted into limitauthchg, and disallow_perms is not empty, then authorized_by must not be in the array.
Аргументы
account- the owner of the permission to be unlinked and the receiver of the freed RAM,
code- the owner of the action to be unlinked,
type- the action to be unlinked.
authorized_by- the permission which is authorizing this change

◆ updateauth()

void eosiosystem::native::updateauth ( name  account,
name  permission,
name  parent,
authority  auth,
binary_extension< name >  authorized_by 
)
inline

Update authorization action updates permission for an account.

This contract enforces additional rules:

  1. If authorized_by is present and not "", then the contract does a require_auth2(account, authorized_by).
  2. If the account has opted into limitauthchg, then authorized_by must be present and not "".
  3. If the account has opted into limitauthchg, and allow_perms is not empty, then authorized_by must be in the array.
  4. If the account has opted into limitauthchg, and disallow_perms is not empty, then authorized_by must not be in the array.
Аргументы
account- the account for which the permission is updated
permission- the permission name which is updated
parent- the parent of the permission which is updated
auth- the json describing the permission authorization
authorized_by- the permission which is authorizing this change

Объявления и описания членов классов находятся в файлах: