IOmnichainFungibleFractionsOperations
Provides the operations of the OmnichainFungibleFractionsDO to interact with fungible fractions tokens and their associated data across multiple chains
localMintBurnSupplyAll
Operation used to get count of all minted and not burned tokens on current chain of all ids
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | Difference between tokens minted and burned on current chain of all ids |
localMintBurnSupply
Operation used to get count of all minted and not burned tokens on current chain of a specific id
Parameters
| Name | Type | Description |
|---|---|---|
| id | uint256 | Id of the token |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | Difference between tokens minted and burned on current chain of the id |
omnichainTransfer
Operation used to transfer tokens to another chain
native Coin payment for sending omnichain tx should be sent with the call
Parameters
| Name | Type | Description |
|---|---|---|
| from | address | address where to take tokens from (on current chain) |
| to | OmnichainAddress | address to send tokens to |
| id | uint256 | The id of the token |
| value | uint256 | The amount of tokens to transfer |
| refundAddress | address payable | Where to send refund, this address SHOULD be able to accept both native currency AND tokens which are being transferred on this call |
omnichainBatchTransfer
Operation used to transfer a batch of tokens to another chain
native Coin payment for sending omnichain tx should be sent with the call
Parameters
| Name | Type | Description |
|---|---|---|
| from | address | address where to take tokens from (on current chain) |
| to | OmnichainAddress | address to send tokens to |
| ids | uint256[] | The ids of the tokens |
| values | uint256[] | The amounts of tokens to transfer |
| refundAddress | address payable | Where to send refund, this address SHOULD be able to accept both native currency AND tokens which are being transferred on this call |
omnichainIncreaseBalance
Internal operation used to increase the balance of a target account
This function SHOULD be called only by the other-chain DataObject to transfer tokens to someone on this chain which MUST decrease the balance of the user in the origin chain and increase the balance of the target account in the current chain
Parameters
| Name | Type | Description |
|---|---|---|
| rid | bytes32 | Request ID (GUID) |
| target | address | Address to send tokens to |
| id | uint256 | The id of the token |
| value | uint256 | Amount of tokens to send |
omnichainBatchIncreaseBalance
Internal operation used to increase the balance of a target account with a batch of tokens
This function SHOULD be called only by the other-chain DataObject to transfer tokens to someone on this chain which MUST decrease the balance of the user in the origin chain and increase the balance of the target account in the current chain
Parameters
| Name | Type | Description |
|---|---|---|
| rid | bytes32 | Request ID (GUID) |
| target | address | Address to send tokens to |
| ids | uint256[] | The id of the token |
| values | uint256[] | Amount of tokens to send |
omnichainIncreaseBalanceCallback
Internal operation executed after the tokens were transferred to another chain
This function SHOULD be called only by the other-chain DataObject to confirm that the tokens were transferred NOTE: This function is capable of refund the tokens back to the sender if the transfer failed
Parameters
| Name | Type | Description |
|---|---|---|
| rid | bytes32 | Request ID (GUID) |
registerOmnichainIncreaseBalanceHandler
Operation used to register a handler to be called after a token transfer on the target chain
Parameters
| Name | Type | Description |
|---|---|---|
| handler | address | Address of the handler to register |
unregisterOmnichainIncreaseBalanceHandler
Operation used to unregister a handler to be called after a token transfer on the target chain
Parameters
| Name | Type | Description |
|---|---|---|
| handler | address | Address of the handler to unregister |

