ERC721Transfers
Abstract contract that provides ERC721 transfer functions of the ERC721 Data Manager
Based on OpenZeppelin ERC721 implementation
safeTransferFrom
Transfers tokenId token from from to to
The caller must have allowance for from's tokens or be from
Parameters
| Name | Type | Description |
|---|---|---|
| from | address | Source address |
| to | address | Destination address |
| tokenId | uint256 | Token ID |
safeTransferFrom
Transfers tokenId token from from to to
The caller must have allowance for from's tokens or be from
Parameters
| Name | Type | Description |
|---|---|---|
| from | address | Source address |
| to | address | Destination address |
| tokenId | uint256 | Token ID |
| data | bytes | Additional data with no specified format |
transferFrom
Transfers tokenId token from from to to
The caller must have allowance for from's tokens or be from
NOTE: This function is not safe, use {safeTransferFrom} when possible
Parameters
| Name | Type | Description |
|---|---|---|
| from | address | Source address |
| to | address | Destination address |
| tokenId | uint256 | Token ID |
_isAuthorized
_Returns whether spender is allowed to manage owner's tokens, or tokenId in
particular (ignoring whether it is owned by owner).
WARNING: This function assumes that owner is the actual owner of tokenId and does not verify this
assumption._
_checkAuthorized
_Checks if spender can operate on tokenId, assuming the provided owner is the actual owner.
Reverts if:
spenderdoes not have approval fromownerfortokenId.spenderdoes not have approval to manage all ofowner's assets.
WARNING: This function assumes that owner is the actual owner of tokenId and does not verify this
assumption._
_update
_Transfers tokenId from its current owner to to, or alternatively mints (or burns) if the current owner
(or to) is the zero address. Returns the owner of the tokenId before the update.
The auth argument is optional. If the value passed is non 0, then this function will check that
auth is either the owner of the token, or approved to operate on the token (by the owner).
Emits a {Transfer} event.
NOTE: If overriding this function in a way that tracks balances, see also {increaseBalance}.
_writeTransfer
_checkOnERC721Received
Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract.
Parameters
| Name | Type | Description |
|---|---|---|
| from | address | address representing the previous owner of the given token ID |
| to | address | target address that will receive the tokens |
| tokenId | uint256 | uint256 ID of the token to be transferred |
| data | bytes | bytes optional data to send along with the call |

