Crossmint allows you to whitelist both wallet and email addresses. Once the team has approved your request, you will need to provide the following information:
collectionIdfor the collection.
The list of wallet and email addresses to be included in the accesslist.
If you whitelist users’ email addresses, Crossmint will create wallets associated with those email addresses and provide them to you for inclusion in the accesslist. Users will then be able to authenticate during the purchase and execute the transaction.
You can set up accesslists using Merkle Trees or inserting the list of whitelisted addresses directly on the smart contract:
A. Merkle Tree Accesslists
While using Merkle Trees is more gas-efficient, it involves a slightly more complex setup. Here is an example accesslist mint function:
B. Mapping-Based Accesslists
The most straightforward method of whitelisting involves maintaining a mapping of the whitelisted addresses within your smart contract. This approach is faster but consumes more gas and savvy developers may be able to determine the addresses of the accesslist.