Skip to main content

ERC20 - Claim Conditions

You can utilize these features of the SDK on your contract if it implements Drop.

Claim Tokens

Mint tokens to a specified address.

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.erc20.claim(address, quantity);
const receipt = tx.receipt; // the transaction receipt

This snippet is for v3 of the SDK. Learn how to upgrade.

View in React SDK Documentation

Configure claim conditions

Define the criteria of how NFTs can be claimed from your drop.

Each claim phase can define:

  • When the claim phase will start
  • How many tokens to drop
  • How much to charge per NFT
  • What currency to use to sell the tokens
  • Which wallet addresses are allowed to mint (allowlist)
  • How many tokens can be claimed per wallet
  • Metadata for the claim condition
const presaleStartTime = new Date();
const publicSaleStartTime = new Date(Date.now() + 60 * 60 * 24 * 1000);
const claimConditions = [
{
startTime: presaleStartTime, // start the presale now
maxQuantity: 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.erc20.claimConditions.set(claimConditions);

This snippet is for v3 of the SDK. Learn how to upgrade.

View in React SDK Documentation