Skip to main content

IClaimableERC1155

thirdweb

Methods

claim

function claim(address _receiver, uint256 _tokenId, uint256 _quantity) external payable

Lets an address claim multiple lazy minted NFTs at once to a recipient. Contract creators should override this function to create custom logic for claiming, for e.g. price collection, allowlist, max quantity, etc.

The logic in the verifyClaim function determines whether the caller is authorized to mint NFTs.

Parameters

NameTypeDescription
_receiveraddressThe recipient of the tokens to mint.
_tokenIduint256The tokenId of the lazy minted NFT to mint.
_quantityuint256The number of tokens to mint.

verifyClaim

function verifyClaim(address _claimer, uint256 _tokenId, uint256 _quantity) external view

Override this function to add logic for claim verification, based on conditions such as allowlist, price, max quantity etc.

Checks a request to claim NFTs against a custom condition.

Parameters

NameTypeDescription
_claimeraddressCaller of the claim function.
_tokenIduint256The tokenId of the lazy minted NFT to mint.
_quantityuint256The number of NFTs being claimed.

Events

TokensClaimed

event TokensClaimed(address indexed claimer, address indexed receiver, uint256 indexed tokenId, uint256 quantityClaimed)

Emitted when tokens are claimed

Parameters

NameTypeDescription
claimer indexedaddressundefined
receiver indexedaddressundefined
tokenId indexeduint256undefined
quantityClaimeduint256undefined