IDropERC1155
Thirdweb's 'Drop' contracts are distribution mechanisms for tokens. The DropERC721
contract is a distribution mechanism for ERC721 tokens. A minter wallet (i.e. holder of MINTER_ROLE
) can (lazy)mint 'n' tokens at once by providing a single base URI for all tokens being lazy minted. The URI for each of the 'n' tokens lazy minted is the provided base URI + {tokenId}
of the respective token. (e.g. "ipsf://Qmece.../1"). A minter can choose to lazy mint 'delayed-reveal' tokens. More on 'delayed-reveal' tokens in this article. A contract admin (i.e. holder of DEFAULT_ADMIN_ROLE
) can create claim conditions with non-overlapping time windows, and accounts can claim the tokens according to restrictions defined in the claim condition that is active at the time of the transaction.
Methods
balanceOf
Returns the amount of tokens of token type id
owned by account
. Requirements: - account
cannot be the zero address.
Parameters
account
address
undefined
id
uint256
undefined
Returns
_0
uint256
undefined
balanceOfBatch
xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. Requirements: - accounts
and ids
must have the same length.
Parameters
accounts
address[]
undefined
ids
uint256[]
undefined
Returns
_0
uint256[]
undefined
claim
Parameters
receiver
address
undefined
tokenId
uint256
undefined
quantity
uint256
undefined
currency
address
undefined
pricePerToken
uint256
undefined
allowlistProof
IDropERC1155.AllowlistProof
undefined
data
bytes
undefined
isApprovedForAll
Returns true if operator
is approved to transfer account
's tokens. See {setApprovalForAll}.
Parameters
account
address
undefined
operator
address
undefined
Returns
_0
bool
undefined
lazyMint
Lets an account with MINTER_ROLE
lazy mint 'n' NFTs. The URIs for each token is the provided _baseURIForTokens
+ {tokenId}
.
Parameters
amount
uint256
The amount of NFTs to lazy mint.
baseURIForTokens
string
The URI for the NFTs to lazy mint.
safeBatchTransferFrom
xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. Emits a {TransferBatch} event. Requirements: - ids
and amounts
must have the same length. - If to
refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value.
Parameters
from
address
undefined
to
address
undefined
ids
uint256[]
undefined
amounts
uint256[]
undefined
data
bytes
undefined
safeTransferFrom
Transfers amount
tokens of token type id
from from
to to
. Emits a {TransferSingle} event. Requirements: - to
cannot be the zero address. - If the caller is not from
, it must have been approved to spend from
's tokens via {setApprovalForAll}. - from
must have a balance of tokens of type id
of at least amount
. - If to
refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the acceptance magic value.
Parameters
from
address
undefined
to
address
undefined
id
uint256
undefined
amount
uint256
undefined
data
bytes
undefined
setApprovalForAll
Grants or revokes permission to operator
to transfer the caller's tokens, according to approved
, Emits an {ApprovalForAll} event. Requirements: - operator
cannot be the caller.
Parameters
operator
address
undefined
approved
bool
undefined
setClaimConditions
Parameters
tokenId
uint256
undefined
phases
IDropClaimCondition.ClaimCondition[]
undefined
resetClaimEligibility
bool
undefined
supportsInterface
Returns true if this contract implements the interface defined by interfaceId
. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.
Parameters
interfaceId
bytes4
undefined
Returns
_0
bool
undefined
Events
ApprovalForAll
Parameters
account indexed
address
undefined
operator indexed
address
undefined
approved
bool
undefined
ClaimConditionsUpdated
Emitted when new claim conditions are set for a token.
Parameters
tokenId indexed
uint256
undefined
claimConditions
IDropClaimCondition.ClaimCondition[]
undefined
MaxTotalSupplyUpdated
Emitted when the global max supply of a token is updated.
Parameters
tokenId
uint256
undefined
maxTotalSupply
uint256
undefined
SaleRecipientForTokenUpdated
Emitted when the sale recipient for a particular tokenId is updated.
Parameters
tokenId indexed
uint256
undefined
saleRecipient
address
undefined
TokensClaimed
Emitted when tokens are claimed.
Parameters
claimConditionIndex indexed
uint256
undefined
tokenId indexed
uint256
undefined
claimer indexed
address
undefined
receiver
address
undefined
quantityClaimed
uint256
undefined
TokensLazyMinted
Emitted when tokens are lazy minted.
Parameters
startTokenId
uint256
undefined
endTokenId
uint256
undefined
baseURI
string
undefined
TransferBatch
Parameters
operator indexed
address
undefined
from indexed
address
undefined
to indexed
address
undefined
ids
uint256[]
undefined
values
uint256[]
undefined
TransferSingle
Parameters
operator indexed
address
undefined
from indexed
address
undefined
to indexed
address
undefined
id
uint256
undefined
value
uint256
undefined
URI
Parameters
value
string
undefined
id indexed
uint256
undefined
Last updated