ODCdataobjectsomnichain

IOmnichainFungibleFractionsIncreaseBalanceCallback

Interface for callbacks handlers with the functions performed after fungible token transfer

This interface should be implemented by contracts that are registered as transfer handlers and want to receive callbacks after fungible token transfers calls are performed on the OmnichainFungibleTokenDO contract

afterOmnichainFungibleFractionsIncreaseBalanceOnTargetChain

function afterOmnichainFungibleFractionsIncreaseBalanceOnTargetChain(OmnichainAddress from, address to, uint256 id, uint256 value) external returns (bool)

Function called after a token transfer on target chain

Verifies success of transfer (if to is a contract, additional calls verifying it can accept tokens can be made)

Parameters

NameTypeDescription
fromOmnichainAddressThe address from which the token was transferred
toaddressThe address to which the token was transferred
iduint256Id of the token
valueuint256The amount of the token transferred

Return Values

NameTypeDescription
[0]boolIf transfer verification successfull

afterOmnichainFungibleFractionsIncreaseBalanceOnTargetChain

function afterOmnichainFungibleFractionsIncreaseBalanceOnTargetChain(OmnichainAddress from, address to, uint256[] ids, uint256[] values) external returns (bool)

Function called after a batch token transfer on target chain

Verifies success of transfer (if to is a contract, additional calls verifying it can accept tokens can be made)

Parameters

NameTypeDescription
fromOmnichainAddressThe address from which the token was transferred
toaddressThe address to which the token was transferred
idsuint256[]Ids of the tokens
valuesuint256[]The amounts of the tokens transferred

Return Values

NameTypeDescription
[0]boolIf transfer verification successfull

afterOmnichainFungibleFractionsFailedRefund

function afterOmnichainFungibleFractionsFailedRefund(OmnichainAddress from, OmnichainAddress to, address expectedRefundAddress, uint256[] ids, uint256[] values) external

Function called if normal token refund procedure failed and balance of this contract (the one which is called) is increased

Parameters

NameTypeDescription
fromOmnichainAddressThe address from which the token was originally transferred
toOmnichainAddressThe address to which the token was originally transferred
expectedRefundAddressaddressAddress expected, but failed to accept refund
idsuint256[]Ids of the tokens
valuesuint256[]The amounts of the tokens transferred

On this page