Class Erc721ClaimableWithConditions

Configure and claim ERC721 NFTs

Remarks

Manage claim phases and claim ERC721 NFTs that have been lazily minted.

Example

const contract = await sdk.getContract("{{contract_address}}");
await contract.erc721.claim(quantity);
await contract.erc721.claimConditions.getActive();

Hierarchy

  • Erc721ClaimableWithConditions

Implements

  • DetectableFeature

Constructors

Properties

conditions: DropClaimConditions<BaseClaimConditionERC721>

Configure claim conditions

Remarks

Define who can claim NFTs in the collection, when and how many.

Example

const presaleStartTime = new Date();
const publicSaleStartTime = new Date(Date.now() + 60 * 60 * 24 * 1000);
const claimConditions = [
{
startTime: presaleStartTime, // start the presale now
maxClaimableSupply: 2, // limit how many mints for this presale
price: 0.01, // presale price
snapshot: ['0x...', '0x...'], // limit minting to only certain addresses
},
{
startTime: publicSaleStartTime, // 24h after presale, start public sale
price: 0.08, // public sale price
}
]);
await contract.erc721.claimConditions.set(claimConditions);
contractWrapper: ContractWrapper<BaseClaimConditionERC721>
erc721: Erc721<BaseERC721>
featureName: "ERC721ClaimConditionsV2" = FEATURE_NFT_CLAIM_CONDITIONS_V2.name
storage: ThirdwebStorage<IpfsUploadBatchOptions>
to: {
    prepare: ((...args) => Promise<Transaction<TransactionResultWithId<NFT>[]>>);
    (...args): Promise<TResult>;
} = ...

Type declaration

    • (...args): Promise<TResult>
    • Claim unique NFTs to a specific Wallet

      Parameters

      • Rest ...args: [destinationAddress: string, quantity: BigNumberish, options?: ClaimOptions]

      Returns Promise<TResult>

      • 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.

      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.erc721.claimTo(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
  • prepare: ((...args) => Promise<Transaction<TransactionResultWithId<NFT>[]>>)

Generated using TypeDoc