Overview
CreateKit supports sophisticated whitelist management using Merkle trees for gas-efficient verification. This allows you to create exclusive minting experiences for specific addresses while maintaining scalability and security.Whitelist Basics
How Whitelists Work
- Off-chain Generation: Create a Merkle tree from whitelisted addresses
- On-chain Storage: Store only the Merkle root in the smart contract
- Proof Verification: Users provide a Merkle proof when minting
- Gas Efficiency: Verification costs are constant regardless of whitelist size
Scalable
Support thousands of addresses with minimal gas costs
Secure
Cryptographically guaranteed address verification
Flexible
Easy to generate and update whitelist configurations
Transparent
Verifiable on-chain without revealing the full list
Setting Up Whitelists
Basic Whitelist Creation
Create Whitelist
Advanced Whitelist Configuration
Whitelist with Metadata
Collection Integration
Whitelist-Enabled Collection
Whitelist Collection Setup
Hybrid Access Models
Phased Access
Whitelist Verification
Generating Proofs
Generate Merkle Proofs
Batch Proof Generation
Batch Proof Generation
Minting with Whitelists
Basic Whitelist Minting
Whitelist Mint
Advanced Whitelist Minting
Advanced Whitelist Logic
Frontend Integration
React Hook for Whitelist Status
useWhitelistStatus Hook
Whitelist Status Component
WhitelistStatus Component
Multiple Whitelists
Tiered Whitelist System
Tiered Whitelists
Time-Based Tier Access
Phased Tier Access
Whitelist Utilities
Whitelist Analysis
Whitelist Analytics
Whitelist Validation
Whitelist Validation
Best Practices
Security
- Validate all addresses before creating whitelist
- Use checksummed addresses when possible
- Store Merkle proofs securely
- Verify proofs client-side before transactions
Gas Efficiency
- Consider whitelist size vs. gas costs
- Optimize Merkle tree construction
- Batch operations when possible
- Pre-generate proofs for better UX
Troubleshooting
Invalid Merkle proof error
Invalid Merkle proof error
- Verify the address is exactly as stored in the whitelist
- Check that the Merkle root matches between contract and client
- Ensure proof generation uses the same whitelist data
- Verify address case sensitivity
Proof generation fails
Proof generation fails
- Confirm the address exists in the whitelist
- Check for duplicate addresses in whitelist
- Validate address format (0x prefix, 42 characters)
- Ensure WhitelistManager is properly initialized
Whitelist not working as expected
Whitelist not working as expected
- Verify collection has isWhitelistEnabled set to true
- Check that whitelistMerkleRoot is set correctly
- Ensure minting phase allows whitelist access
- Test with known whitelisted addresses first