cyber.token
provides token management functions, generates new tokens and stores information about created tokens and provides an ability to conduct mutual settlements between accounts as well.create
action is applied to create a token to supply it into the system. This action has the following form:issuer
— account name which creates the token to supply it into the system.maximum_supply
— a structure value containing the fields: issuer
account is authorized to supply and withdraw tokens from circulation in the system. The create
action can be executed by the token
smart contract only. In order to perform this action, the signature of the validators is required. Use of the bandwidth
resources (RAM) is charged to the issuer
account.issue
action is applied to put a token into circulation in the system.
This action has the following form:to
— recipient account to balance of which the tokens are transferred. quantity
— number of the supplied tokens. This is a structure value containing fields: memo
— memo text that clarifies a meaning (necessity) of the token emission in the system. The text volume should not exceed 384 symbols including blanks. create
action is performed, the token symbol and the account name issuer
are put into the table. When executing the issue
action, the token character is taken from the resulting quantity
value. The account issuer
can be determined via using this symbol and table data. The number of supplied tokens should not exceed maximum_supply
value specified in the create
action. Use of the bandwidth
resources (RAM) is charged to the issuer
account.create
action, the issuer
account authorization is required.retire
action is used to withdraw a certain number of tokens from the system. This action has the following form:quantity
— number of withdrawn tokens. memo
— a memo text clarifying a purpose of withdrawing tokens from circulation. bandwidth
resources (RAM) is charged to the issuer
account. The number of tokens withdrawn from circulation is also removed from issuer
account balance, so this account can not withdraw tokens more than he/she has them on own balance.issuer
account authorization is required.transfer
action is used to transfer tokens from one account to another. This action has the following form:from
— sender account from balance of which the tokens are withdrawn. to
— recipient account to balance of which the tokens are transferred. quantity
— number of tokens to be transferred. This value should be greater than zero. memo
— a memo text that clarifies a meaning of the token transfer. transfer
action . The difference is the «sending a notification» action is not performed on cyber.token
, but on smart contracts of sender and recipient of the notification (for example, if the vesting smart contract receives a notification, it automatically charges tokens on the vesting
balance).transfer
action, the from
account authorization is required.bandwidth
(RAM) resources is charged either to sending account or to receiving account, depending on who signed the transaction. If the open
action was previously performed, none of them should pay bandwidth
, since the record already created in database is used.Note: If sender account pays for used resources (RAM) for a recipient account, then there is the possibility of spending the entire share of memory allocated to the recipient account. To avoid such cases when performing the actiontransfer
, additional actions have been implemented incyber.token
. These areopen
andclose
. Functional purposes of these actions are the creation and deletion of an entry in the database before and after (not during) performingtransfer
respectively.
bulktransfer
is used to transfer tokens from one account's balance to the balances of several accounts (for example, for paying rewards for a post). This action has the following form:from
— sender account from balance of which the tokens are withdrawn. recipients
— array (list) of token recipients. Each array element is a structure containing fields: to
— recipient account to balance of which the tokens are transferred;quantity
— number of tokens to be transferred to account to
. This value should be greater than zero; memo
— a memo text that clarifies a meaning of the token transfer. The text volume should not exceed 384 symbols including blanks. bulktransfer
action:recipients
should not contain the account name from
. recipients
list to specify the same account name to
more than once. The action is performed with sending a notification to smart contracts of the sender and recipient of tokens in the same way as transfer
.bulktransfer
, it is required a signature of the account from
.payment
action like the transfer
action is used to transfer funds from one account to another. This action has the following form:from
— sender account from balance of which the tokens are withdrawn. to
— account name which is a recipient token. quantity
— number of tokens to be transferred to account name to
. This value should be greater than zero. memo
— a memo text that clarifies a meaning of the token transfer. The text volume should not exceed 384 symbols including blanks.transfer
, when performing payment
action, notifications are not sent and funds are transferred not to the recipient account balance , but to the payment-intermediary balance. To withdraw funds from the payment
balance, the recipient account to
should additionally perform the action claim
.payment
is a more secure option to transfer tokens. To perform payment
, it is required a signature of the account from
.bulktransfer
is used to transfer tokens from one account's balance to several accounts (for example, for paying rewards to curators and beneficiaries for a post). The bulkpayment
action has the following form:from
— sender account from balance of which the tokens are withdrawn. recipients
— array (list) of token recipients. Each array element is a structure containing fields: to
— account name which is a recipient token;quantity
— number of tokens to be transferred to account name to
. This value should be greater than zero; memo
— a memo text that clarifies a meaning of the token transfer. The text volume should not exceed 384 symbols including blanks. bulkpayment
action:recipients
should not contain the account name from
. bulktransfer
, when performing bulkpayment
action, notifications are not sent and funds are transferred not to the recipient accounts balances , but to the payment (intermediary) balance. To withdraw funds from the payment
balance, each of the recipient accounts should additionally perform the action claim
. bulkpayment
is a more secure option to transfer tokens. To perform bulkpayment
, it is required a signature of the account from
.claim
action is used to transfer funds from the payment
balance to an account balance. This action has the following form:owner
— account name to whose balance the funds are transferred. quantity
— requested number of tokens to be transfered. This number must not exceed the number of tokens that are on the payment
balance and which are owned by the owner
account. claim
action requires a signature of the owner
account.open
action is used to create a record in database. This entry must contain an account name which should pay for the memory used, as well as a symbol for which this entry is created. The open
action has the following form:owner
— account name to which the memory is allocated. symbol
— symbol for which the entry is being created. ram_payer
— account name that pays for the used memory. open
action requires a signature of the ram_payer
account.close
action is an opposite of open
and is used to free allocated memory in database. The close
action has the following form:owner
— account name to which the memory was allocated. symbol
— a symbol for which the entry is deleted. owner
:currency_stats
and account
, are used in the cyber.token
smart contract.currency_stats
table has the following form:supply
— number of a certain type tokens that have been supplied in the system. max_supply
— maximum possible number of this type tokens in circulation. issuer
— account name which has supplied this type tokens in the system. currency_stats
is a character value in the asset
. This value is used to determine the token. having information about a token it is easily to obtain its supply
value — the number of tokens released into circulation, as well as the account name issuer
.account
table has the following form: