Is it possible to Mint a whitelist and a public sale at the same time? I need to do it for a project but I'm stuck. The project has 3,000 free nft for the whitelist, but at the same time it will be the 7,000 Nft for public sale. How can I do it so that the totalsupply of the public sale minted does not affect the whitelist and they can mint the 3000 without a time limit? Thank you very much in advance!
uint16 private constant MAX_SUPPLY = 10000; //Max Supply
uint16 private constant MAX_WHITELIST = 3000; //Whitelist PASS
uint16 private constant MAX_PUBLIC = 7000; //PUBLIC PASS
uint8 private maxMintPerWhitelist = 3;
function whitelistMint(uint8 _quantity, bytes32[] calldata merkleproof) external payable callerIsUser{
require(sellingStep == Step.PublicSale, "Sale is not activated");
require(isValid(merkleproof, keccak256(abi.encodePacked(msg.sender))),"Not in whitelist List");
require(amountNFTsperWalletWhitelistSale[msg.sender] + _quantity <= maxMintPerWhitelist, "You can only get 3 NFT on the Whitelist Sale");
require(totalSupply() + _quantity <= MAX_WHITELIST, "Max whitelist supply exceeded");
require(msg.value >= wlSalePrice * _quantity, "Not enought funds");
amountNFTsperWalletWhitelistSale[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
}
function publicSaleMint(uint256 _quantity) external payable callerIsUser {
require(sellingStep == Step.PublicSale, "Public sale is not activated");
require(totalSupply() + _quantity <= MAX_WHITELIST + MAX_PUBLIC, "Max supply exceeded");
require(msg.value >= publicSalePrice * _quantity, "Not enought funds");
_safeMint(msg.sender, _quantity);
}
How can modify my Smart Contract to make the Whitelistmint independent of the totalsupply of the publicmint? At this moment when totalsupply will be 3.000 people on whitelist couldn't mint anymore. Help please! Thanks you!