unlock_asset

function unlock_asset(type: text, account: account, asset: asset, amount: big_integer)(source)

Retrieves an asset from the lock account back to the specified account. Note that this function does not perform any authorization before moving the assets; users should thus not be given direct access to this function.

Can only be called from an operation.

Throws if the required assets cannot be moved. 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 or after_transfer) aren't met

  • the lock account's balance is lower than amount, which means there's less locked tokens than what is being unlocked

Parameters

type

the type of lock account to which the asset were locked

account

account that locked the assets

asset

the asset to unlock

amount

how much of the specified asset to unlock

See also

ACCOUNT_TYPE_LOCK

for more information on lock accounts