Class Erc20ClaimableWithConditions

Configure and claim ERC20 tokens

Remarks

Manage claim phases and claim ERC20 tokens that have been lazily minted.

Example

const contract = await sdk.getContract("{{contract_address}}");
await contract.token.drop.claim.to("0x...", quantity);

Hierarchy

  • Erc20ClaimableWithConditions

Implements

  • DetectableFeature

Constructors

Properties

conditions: DropClaimConditions<BaseDropERC20>

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.token.drop.claim.conditions.set(claimConditions);
contractWrapper: ContractWrapper<BaseDropERC20>
erc20: Erc20<BaseERC20 | BaseSignatureMintERC20>
featureName: "ERC20ClaimConditionsV2" = FEATURE_TOKEN_CLAIM_CONDITIONS_V2.name
storage: ThirdwebStorage<IpfsUploadBatchOptions>
to: {
    prepare: ((...args) => Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>);
    (...args): Promise<TResult>;
} = ...

Type declaration

    • (...args): Promise<TResult>
    • Claim a certain amount of tokens to a specific Wallet

      Parameters

      • Rest ...args: [destinationAddress: string, amount: string | number, options?: ClaimOptions]

      Returns Promise<TResult>

      • The transaction receipt

      Remarks

      Let the specified wallet claim Tokens.

      Example

      const address = "{{wallet_address}}"; // address of the wallet you want to claim the NFTs
      const quantity = 42.69; // how many tokens you want to claim

      const tx = await contract.token.drop.claim.to(address, quantity);
      const receipt = tx.receipt; // the transaction receipt
  • prepare: ((...args) => Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>)
      • (...args): Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>
      • Parameters

        • Rest ...args: [destinationAddress: string, amount: string | number, options?: ClaimOptions]

        Returns Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>

Generated using TypeDoc