FUNCTION
before_crosschain_balance_change
@extendable function before_crosschain_balance_change(sender: account, recipient: account, asset: asset, amount: big_integer, will_change_sender: boolean, will_change_recipient: boolean)Extendable function that allows the developer to add more functionality to the
update_balances_if_needed function, before the balance change is applied.
This allows, for example, to check that any condition is met before the balance change is applied. Or to modify the balance or amount before it is changed.
If this function throws, the balance change will not be applied.
Throws when any extension of this function throws.
Parameters
- sender — the account that has transferred the tokens
- recipient — the account that will receive the tokens
- asset — the asset that was transferred
- amount — the amount that was transferred
- will_change_sender — whether the sender's balance will change
- will_change_recipient — whether the recipient's balance will change
© 2024 Chromia