Namespace Unsafe
Functions
Deletes tokens from an account's balance, decreasing the total supply by the amount being burned. It's marked as Unsafe, as it doesn't check who is authorizing the burning, meaning any user could burn tokens from any account if this was exposed.
The functionality of burn
can be expanded by using before_burn
and after_burn
Throws if the required assets cannot be burned. Common cases include:
the amount to burn is not in the accepted range (0; 2^256) (exclusive)
some conditions added in development through burn extensions (
before_burn
orafter_burn
) aren't metthe account balance is lower than
amount
Throws "UNAUTHORIZED BURNING"
if the asset's issuing blockchain is not this blockchain
Throws "INSUFFICIENT BALANCE"
if the account does not have enough of the asset to burn
Can only be called from an operation.
Creates new tokens, increasing the total supply by the amount being minted, and gives them to an account. It's marked as Unsafe, as it doesn't check who is authorizing the minting, meaning any user could mint tokens to any account if this was exposed.
The functionality of mint
can be expanded by using before_mint
and after_mint
Throws "UNAUTHORIZED MINTING"
if the asset's issuing blockchain is not this blockchain
Throws "INVALID AMOUNT"
if the asset's total supply, increased by the amount being minted, is higher than 2^256.
Throws if the required assets cannot be minted. Common cases include:
the amount to mint is not in the accepted range (0; 2^256) (exclusive)
some conditions added in development through mint extensions (
before_mint
orafter_mint
) aren't met
Can only be called from an operation.
Allows recalling a transfer that was sent to a non-existing account and was not used to create the account.
Throws "RECALL INACTIVE"
if is_create_on_internal_transfer_enabled
returns false.
Throws when any extension of recall_on_internal_transfer
throws.
Registers a new asset on this chain. It's marked as Unsafe, as it allows creating entities and its usage must be restricted to ensure disk usage doesn't grow indefinitely. The starting supply will be 0.
Throws if the input parameters are invalid. Common cases include:
blockchain_rid
is not 32 bytes longstrings are longer than 1024 characters
type is empty
uniqueness resolver is longer than 1024 bytes
decimals is not in the accepted range 0, 78 (inclusive)
icon_url
is not a valid URL
Can only be called from an operation.
Transfers tokens to an existing account. Marked as Unsafe because it does not check whether the account authorized the transfer.
Throws if the required assets cannot be transferred. Common cases include:
the amount to transfer is not in the accepted range (0, 2^256) (exclusive)
some conditions added in development through transfer extensions (
before_transfer
orafter_transfer
) aren't metthe sender account's balance is lower than
amount
Throws "SELF TRANSFER"
if from
equals to
Can only be called from operations.
Transfers tokens to a certain recipient. If the recipient exists, a normal transfer will take place. Otherwise, if account creation on transfer is enabled, the account creation procedure will be started. Marked as Unsafe because it does not check whether the account authorized the transfer.
Throws if the required assets cannot be transferred. Common cases include:
the amount to transfer is not in the accepted range (0, 2^256) (exclusive)
some conditions added in development through transfer extensions (
before_transfer
orafter_transfer
) aren't metthe sender account's balance is lower than
amount
Throws "INVALID RECIPIENT"
if the recipient does not exist and is_create_on_internal_transfer_enabled
returns false.
Can only be called from operations.