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.
- React
- Javascript
- Python
- Go
- Unity
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 Documentationconst 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 Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation// address of the wallet you want to claim the NFTs
var quantity = "1"; // how many tokens you want to claim
var tx = await contract.ERC20.Claim(quantity);
var receipt = tx.receipt; // the transaction receipt
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
- React
- Javascript
- Python
- Go
- Unity
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 Documentationconst 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 Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentationawait contract.ERC20.claimConditions.GetActive();