ODCdataManagersERC721extensions

ERC721Approvals

Abstract contract that provides approval storage of the ERC721 Data Manager

approve

function approve(address to, uint256 tokenId) public virtual

_Gives permission to to to transfer tokenId token to another account. The approval is cleared when the token is transferred.

Only a single account can be approved at a time, so approving the zero address clears previous approvals.

Requirements:

  • The caller must own the token or be an approved operator.
  • tokenId must exist.

Emits an {Approval} event._

getApproved

function getApproved(uint256 tokenId) public view virtual returns (address)

_Returns the account approved for tokenId token.

Requirements:

  • tokenId must exist._

setApprovalForAll

function setApprovalForAll(address operator, bool approved) public virtual

_Approve or remove operator as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.

Requirements:

  • The operator cannot be the address zero.

Emits an {ApprovalForAll} event._

isApprovedForAll

function isApprovedForAll(address owner, address operator) public view virtual returns (bool)

_Returns if the operator is allowed to manage all of the assets of owner.

See {setApprovalForAll}_

_getApproved

function _getApproved(uint256 tokenId) internal view virtual returns (address)

Returns the approved address for tokenId. Returns 0 if tokenId is not minted

_approve

function _approve(address to, uint256 tokenId, address auth) internal

_Approve to to operate on tokenId

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 all tokens held by this owner.

Emits an {Approval} event.

Overrides to this logic should be done to the variant with an additional bool emitEvent argument._

_approve

function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual

Variant of _approve with an optional flag to enable or disable the {Approval} event. The event is not emitted in the context of transfers.

_setApprovalForAll

function _setApprovalForAll(address owner, address operator, bool approved) internal virtual

_Approve operator to operate on all of owner tokens

Requirements:

  • operator can't be the address zero.

Emits an {ApprovalForAll} event._

_requireOwned

function _requireOwned(uint256 tokenId) internal view returns (address)

_Reverts if the tokenId doesn't have a current owner (it hasn't been minted, or it has been burned). Returns the owner.

Overrides to ownership logic should be done to {ownerOf}.

_ownerOf

function _ownerOf(uint256 tokenId) internal view virtual returns (address)

On this page