ODCinterfacesdataobject-interfacesomnichain
IOmnichainNonFungibleTokenOperations
Provides the operations of the NonFungibleTokenDO to interact with non fungible tokens and their associated data across multiple chains
omnichainTransfer
Operation used to transfer a token 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 token from (on current chain) |
to | OmnichainAddress | address to send token to |
tokenId | uint256 | The id of the token |
refundAddress | address payable | Where to send refund |
omnichainIncreaseBalance
Operation used to increase the balance of a target account
Parameters
Name | Type | Description |
---|---|---|
rid | bytes32 | Request ID (GUID) |
from | OmnichainAddress | Omnichain Address token transferred from (used to emit correct event) |
to | OmnichainAddress | Omnichain Address to send token to |
tokenId | uint256 | Id of the token NOTE: 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 |
omnichainIncreaseBalanceCallback
Operation executed after the token was transferred to another chain
This function SHOULD be called only by the other-chain DataObject to confirm that the token was transferred
Parameters
Name | Type | Description |
---|---|---|
rid | bytes32 | Request ID (GUID) |
registerOmnichainIncreaseBalanceHandler
Operation to register an omnichain increase balance handler
Parameters
Name | Type | Description |
---|---|---|
handler | address | Address of the handler to register NOTE: The handler MUST implement the IOmnichainNonFungibleTokenIncreaseBalanceCallback interface |
unregisterOmnichainIncreaseBalanceHandler
Operation to unregister an omnichain increase balance handler
Parameters
Name | Type | Description |
---|---|---|
handler | address | Address of the handler to unregister |