|
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.
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:
- If authorized_by is present and not "", then the contract does a require_auth2(account, authorized_by).
- If the account has opted into limitauthchg, then authorized_by must be present and not "".
- If the account has opted into limitauthchg, and allow_perms is not empty, then authorized_by must be in the array.
- 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 |
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.