burn
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.
Parameters
the account to remove tokens from
the asset to burn
the amount of tokens to burn