IOmnichainFungibleTokenOperations
Provides the operations of the FungibleTokenDO to interact with fungible tokens and their associated data across multiple chains
localTotalSupply
Operation used to get the total supply of the token on the current chain
Transfer tokens between chains will not change the local total supply
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The total supply of the token on the current chain |
localMintBurnSupply
Operation used to get count of all minted and not burned tokens on current chain
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | Difference between tokens minted and burned on current chain |
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 |
amount | uint256 | How much to send |
refundAddress | address payable | Where to send refund |
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 |
amount | 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
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 |