_startTokenId()
.
The _sequentialUpTo()
function can be overriden to enable spot mints
(i.e. non-consecutive mints) for tokenId
s greater than _sequentialUpTo()
.
Assumptions:
_startTokenId()
, to enable spot (non-sequential) mints.
Note: The value returned must never change after any tokens have been minted.
owner
’s account.
owner
.
owner
.
owner
. (e.g. number of whitelist mint slots used).
owner
. (e.g. number of whitelist mint slots used).
If there are multiple variables, please pack them into a uint64.
interfaceId
. See the corresponding
EIP section
to learn more about how these ids are created.
This function call must use less than 30000 gas.
tokenId
token.
baseURI
and the tokenId
. Empty
by default, it can be overridden in child contracts.
tokenId
token.
Requirements:
tokenId
must exist.*TokenOwnership
struct at index
.
index
is initialized.
An uninitialized slot does not necessarily mean that the slot has no owner.
index
for efficiency purposes.
tokenId
.
TokenOwnership
struct from packed
.
nextInitialized
flag set if quantity
equals 1.
to
to transfer tokenId
token to another account. See ERC721A-_approve.
Requirements:
tokenId
token.
Requirements:
tokenId
must exist.*operator
as an operator for the caller.
Operators can call transferFrom or
for any token owned by the caller.
Requirements:
operator
cannot be the caller.
Emits an event.*operator
is allowed to manage all of the assets of owner
.
See setApprovalForAll.
tokenId
exists.
Tokens can be managed by their owner or approved accounts via approve or .
Tokens start existing when they are minted. See {\_mint}
.
packed
represents a token that exists.
msgSender
is equal to approvedAddress
or owner
.
tokenId
casted to a uint256.
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
.from
, it must be approved to move this token
by either approve or .
Emits a event.*safeTransferFrom(from, to, tokenId, '')
.
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
.from
, it must be approved to move this token
by either approve or {setApprovalForAll}
.to
refers to a smart contract, it must implement
{IERC721Receiver-onERC721Received}
, which is called upon a safe transfer.
Emits a event.*_batchTransferFrom(from, to, tokenIds)
.
tokenIds
in batch from from
to to
.
Requirements:
from
cannot be the zero address.to
cannot be the zero address.tokenIds
tokens must be owned by from
.tokenIds
must be strictly ascending.by
is not from
, it must be approved to move these tokens
by either approve or .
by
is the address that to check token approval for.
If token approval check is not needed, pass in address(0)
for by
.
Emits a event for each transfer.*tokenIds
in batch from from
to to
.
Requirements:
from
cannot be the zero address.to
cannot be the zero address.tokenIds
tokens must be owned by from
.by
is not from
, it must be approved to move these tokens
by either approve or {setApprovalForAll}
.to
refers to a smart contract, it must implement
{IERC721Receiver-onERC721Received}
, which is called for each transferred token.
by
is the address that to check token approval for.
If token approval check is not needed, pass in address(0)
for by
.
Emits a event for each transfer.*startTokenId
- the first token ID to be transferred.
quantity
- the amount to be transferred.
Calling conditions:
from
and to
are both non-zero, from
’s tokenId
will be
transferred to to
.from
is zero, tokenId
will be minted for to
.to
is zero, tokenId
will be burned by from
.from
and to
are never both zero.*startTokenId
- the first token ID to be transferred.
quantity
- the amount to be transferred.
Calling conditions:
from
and to
are both non-zero, from
’s tokenId
has been
transferred to to
.from
is zero, tokenId
has been minted for to
.to
is zero, tokenId
has been burned by from
.from
and to
are never both zero.*from
- Previous owner of the given token ID.
to
- Target address that will receive the token.
tokenId
- Token ID to be transferred.
_data
- Optional data to send along with the call.
Returns whether the call correctly returned the expected magic value.
quantity
tokens and transfers them to to
.
Requirements:
to
cannot be the zero address.quantity
must be greater than 0.
Emits a event for each mint.*quantity
tokens and transfers them to to
.
This function is intended for efficient minting only during contract creation.
It emits only one as defined in
ERC2309,
instead of a sequence of event(s).
Calling this function outside of contract creation WILL make your contract
non-compliant with the ERC721 standard.
For full ERC721 compliance, substituting ERC721 event(s) with the ERC2309
event is only permissible during contract creation.
Requirements:
to
cannot be the zero address.quantity
must be greater than 0.
Emits a event.*quantity
tokens and transfers them to to
.
Requirements:
to
refers to a smart contract, it must implement
IERC721Receiver-onERC721Received, which is called for each safe transfer.quantity
must be greater than 0.
See {\_mint}
.
Emits a event for each mint.*_safeMint(to, quantity, '')
.
tokenId
.
Note: A spot-minted tokenId
that has been burned can be re-minted again.
Requirements:
to
cannot be the zero address.tokenId
must be greater than _sequentialUpTo()
.tokenId
must not exist.
Emits a event for each mint.*tokenId
.
Note: A spot-minted tokenId
that has been burned can be re-minted again.
Requirements:
to
refers to a smart contract, it must implement IERC721Receiver-onERC721Received.tokenId
must be greater than _sequentialUpTo()
.tokenId
must not exist.
See {\_mintSpot}
.
Emits a {Transfer}
event.*_safeMintSpot(to, tokenId, '')
.
_approve(to, tokenId, false)
.
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:
tokenId
must exist.
Emits an event.*_burn(tokenId, false)
.
tokenId
.
The approval is cleared when the token is burned.
Requirements:
tokenId
must exist.
Emits a event.*tokenIds
.
Approvals are not cleared when tokenIds are burned.
Requirements:
tokenIds
must exist.tokenIds
must be strictly ascending.by
must be approved to burn these tokens by either approve or .
by
is the address that to check token approval for.
If token approval check is not needed, pass in address(0)
for by
.
Emits a event for each token burned.*index
.
extraData
field.
Intended to be overridden by the cosumer contract.
previousExtraData
- the value of extraData
before transfer.
Calling conditions:
from
and to
are both non-zero, from
’s tokenId
will be
transferred to to
.from
is zero, tokenId
will be minted for to
.to
is zero, tokenId
will be burned by from
.from
and to
are never both zero.*a
’s data.
p
in memory.
msg.sender
).
If you are writing GSN compatible contracts, you need to override this function.