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

#include <eosio.bios.hpp>

Граф наследования:eosiobios::bios:

Классы

struct  abi_hash
 Таблица хешей ABI хранит хеши ABI для аккаунтов. Подробнее...
 

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

typedef eosio::multi_index< "abihash"_n, abi_hashabi_hash_table
 
using newaccount_action = action_wrapper<"newaccount"_n, &bios::newaccount >
 
using updateauth_action = action_wrapper<"updateauth"_n, &bios::updateauth >
 
using deleteauth_action = action_wrapper<"deleteauth"_n, &bios::deleteauth >
 
using linkauth_action = action_wrapper<"linkauth"_n, &bios::linkauth >
 
using unlinkauth_action = action_wrapper<"unlinkauth"_n, &bios::unlinkauth >
 
using canceldelay_action = action_wrapper<"canceldelay"_n, &bios::canceldelay >
 
using setcode_action = action_wrapper<"setcode"_n, &bios::setcode >
 
using setabi_action = action_wrapper<"setabi"_n, &bios::setabi >
 
using setpriv_action = action_wrapper<"setpriv"_n, &bios::setpriv >
 
using setalimits_action = action_wrapper<"setalimits"_n, &bios::setalimits >
 
using setprods_action = action_wrapper<"setprods"_n, &bios::setprods >
 
using setparams_action = action_wrapper<"setparams"_n, &bios::setparams >
 
using reqauth_action = action_wrapper<"reqauth"_n, &bios::reqauth >
 
using activate_action = action_wrapper<"activate"_n, &bios::activate >
 
using reqactivated_action = action_wrapper<"reqactivated"_n, &bios::reqactivated >
 

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

void newaccount (name creator, name name, ignore< authority > owner, ignore< authority > active)
 
void updateauth (ignore< name > account, ignore< name > permission, ignore< name > parent, ignore< authority > auth)
 
void deleteauth (ignore< name > account, ignore< name > permission)
 
void linkauth (ignore< name > account, ignore< name > code, ignore< name > type, ignore< name > requirement)
 
void unlinkauth (ignore< name > account, ignore< name > code, ignore< name > type)
 
void canceldelay (ignore< permission_level > canceling_auth, ignore< checksum256 > trx_id)
 
void setcode (name account, uint8_t vmtype, uint8_t vmversion, const std::vector< char > &code)
 
void setabi (name account, const std::vector< char > &abi)
 Устанавливает ABI для аккаунта. Сохраняет хеш ABI в таблице для указанного аккаунта. Подробнее...
 
void onerror (ignore< uint128_t > sender_id, ignore< std::vector< char > > sent_trx)
 
void setpriv (name account, uint8_t is_priv)
 Устанавливает привилегированный статус для аккаунта. Включает или выключает привилегированный статус для указанного аккаунта. Подробнее...
 
void setalimits (name account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight)
 Устанавливает лимиты ресурсов для аккаунта. Устанавливает лимиты RAM, сети и CPU для указанного аккаунта. Подробнее...
 
void setprods (const std::vector< eosio::producer_authority > &schedule)
 Устанавливает новый список активных продюсеров. Устанавливает новый список активных продюсеров, предлагая изменение расписания. Подробнее...
 
void setparams (const eosio::blockchain_parameters &params)
 Устанавливает параметры блокчейна. Устанавливает параметры блокчейна для настройки различных степеней кастомизации. Подробнее...
 
void reqauth (name from)
 Проверяет авторизацию аккаунта. Проверяет, имеет ли аккаунт from авторизацию для доступа к текущему действию. Подробнее...
 
void activate (const eosio::checksum256 &feature_digest)
 Активирует протокольную функцию. Активирует протокольную функцию по хешу. Подробнее...
 
void reqactivated (const eosio::checksum256 &feature_digest)
 Проверяет активацию протокольной функции. Утверждает, что протокольная функция была активирована. Подробнее...
 

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

The eosio.bios is the first sample of system contract provided by block.one through the EOSIO platform. It is a minimalist system contract because it only supplies the actions that are absolutely critical to bootstrap a chain and nothing more. This allows for a chain agnostic approach to bootstrapping a chain.

Just like in the eosio.system sample contract implementation, there are a few actions which are not implemented at the contract level (newaccount, updateauth, deleteauth, linkauth, unlinkauth, canceldelay, onerror, setabi, setcode), they are just declared in the contract so they will show in the contract's ABI and users will be able to push those actions to the chain via the account holding the eosio.system contract, but the implementation is at the EOSIO core level. They are referred to as EOSIO native actions.

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

◆ abi_hash_table

typedef eosio::multi_index< "abihash"_n, abi_hash > eosiobios::bios::abi_hash_table

◆ activate_action

using eosiobios::bios::activate_action = action_wrapper<"activate"_n, &bios::activate>

◆ canceldelay_action

using eosiobios::bios::canceldelay_action = action_wrapper<"canceldelay"_n, &bios::canceldelay>

◆ deleteauth_action

using eosiobios::bios::deleteauth_action = action_wrapper<"deleteauth"_n, &bios::deleteauth>

◆ linkauth_action

using eosiobios::bios::linkauth_action = action_wrapper<"linkauth"_n, &bios::linkauth>

◆ newaccount_action

using eosiobios::bios::newaccount_action = action_wrapper<"newaccount"_n, &bios::newaccount>

◆ reqactivated_action

using eosiobios::bios::reqactivated_action = action_wrapper<"reqactivated"_n, &bios::reqactivated>

◆ reqauth_action

using eosiobios::bios::reqauth_action = action_wrapper<"reqauth"_n, &bios::reqauth>

◆ setabi_action

using eosiobios::bios::setabi_action = action_wrapper<"setabi"_n, &bios::setabi>

◆ setalimits_action

using eosiobios::bios::setalimits_action = action_wrapper<"setalimits"_n, &bios::setalimits>

◆ setcode_action

using eosiobios::bios::setcode_action = action_wrapper<"setcode"_n, &bios::setcode>

◆ setparams_action

using eosiobios::bios::setparams_action = action_wrapper<"setparams"_n, &bios::setparams>

◆ setpriv_action

using eosiobios::bios::setpriv_action = action_wrapper<"setpriv"_n, &bios::setpriv>

◆ setprods_action

using eosiobios::bios::setprods_action = action_wrapper<"setprods"_n, &bios::setprods>

◆ unlinkauth_action

using eosiobios::bios::unlinkauth_action = action_wrapper<"unlinkauth"_n, &bios::unlinkauth>

◆ updateauth_action

using eosiobios::bios::updateauth_action = action_wrapper<"updateauth"_n, &bios::updateauth>

Методы

◆ activate()

void eosiobios::bios::activate ( const eosio::checksum256 &  feature_digest)

Активирует протокольную функцию. Активирует протокольную функцию по хешу.

Activate action, activates a protocol feature

Аргументы
feature_digest- hash of the protocol feature to activate.
feature_digestХеш протокольной функции для активации
Заметки
Авторизация требуется от аккаунта: eosio.bios

◆ canceldelay()

void eosiobios::bios::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 eosiobios::bios::deleteauth ( ignore< name >  account,
ignore< name >  permission 
)
inline

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

Аргументы
account- the account for which the permission authorization is deleted,
permission- the permission name been deleted.

◆ linkauth()

void eosiobios::bios::linkauth ( ignore< name >  account,
ignore< name >  code,
ignore< name >  type,
ignore< name >  requirement 
)
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 authoraization 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.

Аргументы
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.

◆ newaccount()

void eosiobios::bios::newaccount ( name  creator,
name  name,
ignore< authority owner,
ignore< authority active 
)
inline

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

  1. accounts cannot contain '.' symbols which forces all acccounts to be 12 characters long without '.' until a future account auction process is implemented which prevents name squatting.
  2. new accounts must stake a minimal number of tokens (as set in system parameters) therefore, this method will execute an inline buyram from receiver for newacnt in an amount equal to the current new account creation fee.

◆ onerror()

void eosiobios::bios::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.

◆ reqactivated()

void eosiobios::bios::reqactivated ( const eosio::checksum256 &  feature_digest)

Проверяет активацию протокольной функции. Утверждает, что протокольная функция была активирована.

Require activated action, asserts that a protocol feature has been activated

Аргументы
feature_digest- hash of the protocol feature to check for activation.
feature_digestХеш протокольной функции для проверки активации

◆ reqauth()

void eosiobios::bios::reqauth ( name  from)

Проверяет авторизацию аккаунта. Проверяет, имеет ли аккаунт from авторизацию для доступа к текущему действию.

Require authorization action, checks if the account name from passed in as param has authorization to access current action, that is, if it is listed in the action’s allowed permissions vector.

Аргументы
from- the account name to authorize
fromИмя аккаунта для авторизации
Заметки
Авторизация требуется от аккаунта: from

Проверяет авторизацию аккаунта. Проверяет, имеет ли аккаунт from авторизацию для доступа к текущему действию.

Аргументы
fromИмя аккаунта для авторизации
Заметки
Авторизация требуется от аккаунта: from

◆ setabi()

void eosiobios::bios::setabi ( name  account,
const std::vector< char > &  abi 
)

Устанавливает ABI для аккаунта. Сохраняет хеш ABI в таблице для указанного аккаунта.

Set abi action sets the abi for contract identified by account name. Creates an entry in the abi_hash_table index, with account name as key, if it is not already present and sets its value with the abi hash. Otherwise it is updating the current abi hash value for the existing account key.

Аргументы
account- the name of the account to set the abi for
abi- the abi hash represented as a vector of characters
accountАккаунт, для которого устанавливается ABI
abiABI в виде вектора символов
Заметки
Авторизация требуется от аккаунта: eosio.bios

◆ setalimits()

void eosiobios::bios::setalimits ( name  account,
int64_t  ram_bytes,
int64_t  net_weight,
int64_t  cpu_weight 
)

Устанавливает лимиты ресурсов для аккаунта. Устанавливает лимиты RAM, сети и CPU для указанного аккаунта.

Sets the resource limits of an account

Аргументы
account- name of the account whose resource limit to be set
ram_bytes- ram limit in absolute bytes
net_weight- fractionally proportionate net limit of available resources based on (weight / total_weight_of_all_accounts)
cpu_weight- fractionally proportionate cpu limit of available resources based on (weight / total_weight_of_all_accounts)
accountИмя аккаунта, для которого устанавливается лимит ресурсов
ram_bytesЛимит RAM в абсолютных байтах
net_weightДробно пропорциональный лимит сети доступных ресурсов
cpu_weightДробно пропорциональный лимит CPU доступных ресурсов
Заметки
Авторизация требуется от аккаунта: eosio.bios

◆ setcode()

void eosiobios::bios::setcode ( name  account,
uint8_t  vmtype,
uint8_t  vmversion,
const std::vector< char > &  code 
)
inline

Set code action sets the contract code for an account.

Аргументы
account- the account for which to set the contract code.
vmtype- reserved, set it to zero.
vmversion- reserved, set it to zero.
code- the code content to be set, in the form of a blob binary..

◆ setparams()

void eosiobios::bios::setparams ( const eosio::blockchain_parameters &  params)

Устанавливает параметры блокчейна. Устанавливает параметры блокчейна для настройки различных степеней кастомизации.

Set params action, sets the blockchain parameters. By tuning these parameters, various degrees of customization can be achieved.

Аргументы
params- New blockchain parameters to set
paramsНовые параметры блокчейна для установки
Заметки
Авторизация требуется от аккаунта: eosio.bios

◆ setpriv()

void eosiobios::bios::setpriv ( name  account,
uint8_t  is_priv 
)

Устанавливает привилегированный статус для аккаунта. Включает или выключает привилегированный статус для указанного аккаунта.

Set privilege action allows to set privilege status for an account (turn it on/off).

Аргументы
account- the account to set the privileged status for.
is_priv- 0 for false, > 0 for true.
accountАккаунт, для которого устанавливается привилегированный статус
is_priv0 для false, > 0 для true
Заметки
Авторизация требуется от аккаунта: eosio.bios

◆ setprods()

void eosiobios::bios::setprods ( const std::vector< eosio::producer_authority > &  schedule)

Устанавливает новый список активных продюсеров. Устанавливает новый список активных продюсеров, предлагая изменение расписания.

Set producers action, sets a new list of active producers, by proposing a schedule change, once the block that contains the proposal becomes irreversible, the schedule is promoted to "pending" automatically. Once the block that promotes the schedule is irreversible, the schedule will become "active".

Аргументы
schedule- New list of active producers to set
scheduleНовый список активных продюсеров для установки
Заметки
Авторизация требуется от аккаунта: eosio.bios

◆ unlinkauth()

void eosiobios::bios::unlinkauth ( ignore< name >  account,
ignore< name >  code,
ignore< name >  type 
)
inline

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

Аргументы
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.

◆ updateauth()

void eosiobios::bios::updateauth ( ignore< name >  account,
ignore< name >  permission,
ignore< name >  parent,
ignore< authority auth 
)
inline

Update authorization action updates pemission for an account.

Аргументы
account- the account for which the permission is updated,
pemission- the permission name which is updated,
parem- the parent of the permission which is updated,
aut- the json describing the permission authorization.

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