ERC721Approvals
Abstract contract that provides approval storage of the ERC721 Data Manager
approve
_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
_Returns the account approved for tokenId
token.
Requirements:
tokenId
must exist._
setApprovalForAll
_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
_Returns if the operator
is allowed to manage all of the assets of owner
.
See {setApprovalForAll}_
_getApproved
Returns the approved address for tokenId
. Returns 0 if tokenId
is not minted
_approve
_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
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
_Approve operator
to operate on all of owner
tokens
Requirements:
- operator can't be the address zero.
Emits an {ApprovalForAll} event._
_requireOwned
_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}.