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 byinterfaceId
. 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 inowner
’s account.
ownerOf
*Returns the owner of thetokenId
token.
Requirements:
tokenId
must exist.*
safeTransferFrom
*Safely transferstokenId
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 tosafeTransferFrom(from, to, tokenId, '')
.
transferFrom
*TransferstokenId
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 toto
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 removeoperator
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 fortokenId
token.
Requirements:
tokenId
must exist.*
isApprovedForAll
Returns if theoperator
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) fortokenId
token.
Events
Transfer
Emitted whentokenId
token is transferred from from
to to
.
Approval
Emitted whenowner
enables approved
to manage the tokenId
token.
ApprovalForAll
Emitted whenowner
enables or disables
(approved
) operator
to manage all of its assets.
ConsecutiveTransfer
Emitted when tokens infromTokenId
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 byfrom
.
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
Thequantity
minted with ERC2309 exceeds the safety limit.
OwnershipNotInitializedForExtraData
TheextraData
cannot be set on an unintialized ownership slot.
TokenIdsNotStrictlyAscending
ThetokenIds
must be strictly ascending.
SequentialUpToTooSmall
_sequentialUpTo()
must be greater than _startTokenId()
.
SequentialMintExceedsLimit
ThetokenId
of a sequential mint exceeds _sequentialUpTo()
.
SpotMintTokenIdTooSmall
Spot minting requires atokenId
greater than _sequentialUpTo()
.