OmnichainERC721DataManager
Contract for managing an Omnichain ERC721 token using a Omnichain Fungible Token Data Object
_This contract is used to manage an Omnichain ERC721 token where a Data Object contract is used to store the token data on that chain.
OmnichainMintBurnNotSupported
Error thrown when the from or to address is the zero address in a transfer
UnauthorizedCaller
Error thrown when the caller is not the Non Fungible Token Data Object
NotRegisteredAsOmnichainIncreaseBalanceHandler
Error thrown when the contract is not registered as an Omnichain Increase Balance handler
_isRegisteredAsOmnichainIncreaseBalanceHandler
Variable to know if the contract is registered as an Omnichain Increase Balance handler
constructor
registerOmnichainIncreaseBalanceHandler
Function to register this contract as an omnichain increase balance handler NOTE: This function must be called after the contract is deployed
afterOmnichainNonFungibleTokenIncreaseBalanceOnTargetChain
Function called after a token transfer on target chain
Parameters
Name | Type | Description |
---|---|---|
from | OmnichainAddress | The address from which the token was transferred |
to | address | The address to which the token was transferred |
tokenId | uint256 | Id of the token |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | bool True if the callback was successful, false otherwise |
afterOmnichainNonFungibleTokenFailedRefund
Function called if normal token refund procedure failed and balance of this
contract (the one which is called) is increased
Parameters
Name | Type | Description |
---|---|---|
OmnichainAddress | ||
to | OmnichainAddress | The address to which the token was originally transferred |
address | ||
tokenId | uint256 | Id of the token |
recoverTokens
Allows contract owner to transfer tokens which was sent to this contract Can be used to recover failed refunds
If onERC721Received
will be added in an overriding contract, it should also override this function
and maybe afterOmnichainFungibleFractionsFailedRefund
to implement more sophisticated refund mechanics.
Parameters
Name | Type | Description |
---|---|---|
to | address | Destination address |
tokenId | uint256 | Token id to recover |
buildTokenId
Function to build the Omnichain Identifier
Parameters
Name | Type | Description |
---|---|---|
chainId | uint32 | Chain ID |
tokenId | uint224 | Token ID |
Return Values
Name | Type | Description |
---|---|---|
[0] | OmnichainIdentifier | Omnichain Identifier |