Erc721Claimable.to() method
Claim unique NFTs to a specific Wallet
Example
const address = "{{wallet_address}}"; // address of the wallet you want to claim the NFTs
const quantity = 1; // how many unique NFTs you want to claim
const tx = await contract.nft.drop.claim.to(address, quantity);
const receipt = tx[0].receipt; // the transaction receipt
const claimedTokenId = tx[0].id; // the id of the first NFT claimed
const claimedNFT = await tx[0].data(); // (optional) get the first claimed NFT metadata
Signature:
to(destinationAddress: string, quantity: BigNumberish, checkERC20Allowance?: boolean, claimData?: ClaimVerification): Promise<TransactionResultWithId<NFTMetadataOwner>[]>;
Parameters
Parameter | Type | Description |
---|---|---|
destinationAddress | string | Address you want to send the token to |
quantity | BigNumberish | Quantity of the tokens you want to claim |
checkERC20Allowance | boolean | (Optional) Optional, check if the wallet has enough ERC20 allowance to claim the tokens, and if not, approve the transfer |
claimData | ClaimVerification | (Optional) Optional claim verification data (e.g. price, allowlist proof, etc...) |
Returns:
Promise<TransactionResultWithId<NFTMetadataOwner>[]>
- an array of results containing the id of the token claimed, the transaction receipt and a promise to optionally fetch the nft metadata
Remarks
Let the specified wallet claim NFTs.