before_transfer
@extendable function before_transfer(from: account, to: account, asset: asset, amount: big_integer)(source)
Extendable function that allows the developer to add more functionality to the transfer
function, before the transfer happens.
This allows, for example, to add fees on transfer or check that any given condition is present before the transfer can be completed.
If this function throws an exception, the assets will not be transferred.
Throws if any extension of this function throws.
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