before_apply_transfer

@extendable function before_apply_transfer(sender_blockchain_rid: byte_array, sender_account_id: byte_array, recipient_id: byte_array, asset: asset, amount: big_integer, hop_index: integer, is_final: boolean)(source)

Extendable function that allows the developer to add more functionality to the apply_transfer function, before the transfer is applied.

This allows, for example,to check that any condition is met before the transfer is applied on this chain.

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

Throws when any extension of this function throws.

Parameters

sender_blockchain_rid

the chain the transfer originated from

sender_account_id

the account that has transferred the tokens

recipient_id

the ID of the recipient account on the end chain

asset

the asset that was transferred

amount

the amount that was transferred

hop_index

the IDs of the chains this transfer is going through

is_final

whether the transfer has this chain as destination