transfer

function transfer(from: account, to: account, asset: asset, amount: big_integer)(source)

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 or after_transfer) aren't met

  • the sender account's balance is lower than amount

Throws "SELF TRANSFER" if from equals to

Can only be called from operations.

Parameters

from

the account that started the transfer

to

the account that should receive the transfer

asset

the asset that should be sent

amount

the amount to transfer