HashLips / solidity_smart_contracts

A list of smart contracts coded in solidity
MIT License
599 stars 491 forks source link

Whitelist Issue #37

Open realDivineApe opened 2 years ago

realDivineApe commented 2 years ago

Question: How would I remove an address from the Whitelist? I can't seem to figure that part out.

Theoretically, once they are on the WL they are on it forever. If, like me, your collection is being dropped in multiple batches then a scenario could come about where you may no longer want someone to be able to access WL pricing for minting.. So, how to remove them?! Thanks frens.

maurovz commented 2 years ago

You can just call whitelistUsers again. It will replace previous array with the new array (just remove the unwanted addresses):

function whitelistUsers(address[] calldata _users) public onlyOwner {
    delete whitelistedAddresses;
    whitelistedAddresses = _users;
}