ERC721AFacet
Was this helpful?
Was this helpful?
_Implementation of the Non-Fungible Token Standard, including the Metadata extension. Optimized for lower gas during batch mints.
Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) starting from _startTokenId()
.
Assumptions:
An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
The maximum token ID cannot exceed 2**256 - 1 (max value of uint256)._
_Returns the total number of tokens in existence. Burned tokens will reduce the count. To get the total number of tokens minted, please see {totalMinted}.
Returns the number of tokens in owner
's account.
Returns the token collection name.
Returns the token collection symbol.
_Returns the owner of the tokenId
token.
Requirements:
tokenId
must exist._
_Gives permission to to
to transfer tokenId
token to another account. See {ERC721A-_approve}.
Requirements:
The caller must own the token or be an approved operator._
_Returns the account approved for tokenId
token.
Requirements:
tokenId
must exist._
_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 caller.
Emits an {ApprovalForAll} event._
_Returns if the operator
is allowed to manage all of the assets of owner
.
See {setApprovalForAll}._
_Transfers tokenId
from from
to to
.
Requirements:
from
cannot be the zero address.
to
cannot be the zero address.
tokenId
token must be owned by from
.
If the caller is not from
, it must be approved to move this token by either {approve} or {setApprovalForAll}.
Emits a {Transfer} event._
Equivalent to safeTransferFrom(from, to, tokenId, '')
.
_Safely transfers tokenId
token from from
to to
.
Requirements:
from
cannot be the zero address.
to
cannot be the zero address.
tokenId
token must exist and be owned by from
.
If the caller is not from
, it must be approved to move this token by either {approve} or {setApprovalForAll}.
If to
refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
Emits a {Transfer} event._
_Hook that is called after a set of serially-ordered token IDs have been transferred. This includes minting. And also called after one token has been burned.
startTokenId
- the first token ID to be transferred. quantity
- the amount to be transferred.
Calling conditions:
When from
and to
are both non-zero, from
's tokenId
has been transferred to to
.
When from
is zero, tokenId
has been minted for to
.
When to
is zero, tokenId
has been burned by from
.
from
and to
are never both zero._
_Hook that is called before a set of serially-ordered token IDs are about to be transferred. This includes minting. And also called before burning one token.
startTokenId
- the first token ID to be transferred. quantity
- the amount to be transferred.
Calling conditions:
When from
and to
are both non-zero, from
's tokenId
will be transferred to to
.
When from
is zero, tokenId
will be minted for to
.
When to
is zero, tokenId
will be burned by from
.
from
and to
are never both zero._