before_init_transfer

@extendable function before_init_transfer(sender: account, recipient_id: byte_array, asset: asset, amount: big_integer, hops: list<byte_array>, deadline: integer)(source)

Extendable function that allows the developer to add more functionality to the init_transfer function, before the transfer is initialised.

This allows, for example, to check that any condition is met before the transfer is initialised.

If this function throws, the transfer will not be initialized.

Throws when any extension of this function throws.

Parameters

sender

the account that is transferring the tokens

recipient_id

the ID of the recipient account on the end chain

asset

the asset to be transferred

amount

the amount to be transferred

hops

the IDs of the chains this transfer will go through

deadline

a timestamp after which the transfer can only be recalled