IERC721A
Interface of ERC721A.
Functions
totalSupply
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}
.
supportsInterface
Returns true if this contract implements the interface defined by
interfaceId
. See the corresponding
EIP section
to learn more about how these ids are created.
This function call must use less than 30000 gas.
balanceOf
Returns the number of tokens in owner
’s account.
ownerOf
*Returns the owner of the tokenId
token.
Requirements:
tokenId
must exist.*
safeTransferFrom
*Safely transfers tokenId
token from from
to to
,
checking first that contract recipients are aware of the ERC721 protocol
to prevent tokens from being forever locked.
Requirements:
from
cannot be the zero address.to
cannot be the zero address.tokenId
token must exist and be owned byfrom
.- If the caller is not
from
, it must be have been allowed 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 event.*
safeTransferFrom
Equivalent to safeTransferFrom(from, to, tokenId, '')
.
transferFrom
*Transfers tokenId
from from
to to
.
WARNING: Usage of this method is discouraged, use safeTransferFrom
whenever possible.
Requirements:
from
cannot be the zero address.to
cannot be the zero address.tokenId
token must be owned byfrom
.- If the caller is not
from
, it must be approved to move this token by either or . Emits a event.*
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.*
setApprovalForAll
*Approve or remove operator
as an operator for the caller.
Operators can call transferFrom or
for any token owned by the caller.
Requirements:
- The
operator
cannot be the caller. Emits an event.*
getApproved
*Returns the account approved for tokenId
token.
Requirements:
tokenId
must exist.*
isApprovedForAll
Returns if the operator
is allowed to manage all of the assets of owner
.
See setApprovalForAll.
name
Returns the token collection name.
symbol
Returns the token collection symbol.
tokenURI
Returns the Uniform Resource Identifier (URI) for tokenId
token.
Events
Transfer
Emitted when tokenId
token is transferred from from
to to
.
Approval
Emitted when owner
enables approved
to manage the tokenId
token.
ApprovalForAll
Emitted when owner
enables or disables
(approved
) operator
to manage all of its assets.
ConsecutiveTransfer
Emitted when tokens in fromTokenId
to toTokenId
(inclusive) is transferred from from
to to
, as defined in the
ERC2309 standard.
See {\_mintERC2309}
for more details.
Errors
ApprovalCallerNotOwnerNorApproved
The caller must own the token or be an approved operator.
ApprovalQueryForNonexistentToken
The token does not exist.
BalanceQueryForZeroAddress
Cannot query the balance for the zero address.
MintToZeroAddress
Cannot mint to the zero address.
MintZeroQuantity
The quantity of tokens minted must be more than zero.
OwnerQueryForNonexistentToken
The token does not exist.
TransferCallerNotOwnerNorApproved
The caller must own the token or be an approved operator.
TransferFromIncorrectOwner
The token must be owned by from
.
TransferToNonERC721ReceiverImplementer
Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.
TransferToZeroAddress
Cannot transfer to the zero address.
URIQueryForNonexistentToken
The token does not exist.
MintERC2309QuantityExceedsLimit
The quantity
minted with ERC2309 exceeds the safety limit.
OwnershipNotInitializedForExtraData
The extraData
cannot be set on an unintialized ownership slot.
TokenIdsNotStrictlyAscending
The tokenIds
must be strictly ascending.
SequentialUpToTooSmall
_sequentialUpTo()
must be greater than _startTokenId()
.
SequentialMintExceedsLimit
The tokenId
of a sequential mint exceeds _sequentialUpTo()
.
SpotMintTokenIdTooSmall
Spot minting requires a tokenId
greater than _sequentialUpTo()
.
TokenAlreadyExists
Cannot mint over a token that already exists.
NotCompatibleWithSpotMints
The feature is not compatible with spot mints.