I’m working on an NFT smart contract that needs a whitelist feature. The goal is to give different addresses different maximum amounts they can mint. For example, some users might be allowed to mint 2 tokens while others can mint 5.
My first idea was to use a simple mapping like this:
mapping(address => uint256) public maxMintsPerWallet;
The problem is that we’re deploying on Ethereum mainnet and manually setting hundreds of wallet addresses would cost a fortune in gas fees.
I’m wondering if there’s a more gas-efficient approach to handle this. Maybe using cryptographic signatures or some other method that doesn’t require storing all the data on-chain upfront? Any suggestions on how to implement variable mint allowances without breaking the bank on deployment costs?