Limit NFT minting by month


So I want to mint only 100 NFTs per month, and I want to deploy just one contract how would I go about it? I though of having an ownerOnly manual flag, that can be set:

if (secondMonth)
maximumSupply = 200

if (thirdMonth)
maximumSupply = 300

And so on? Any flaws?,

Are these 100 NFTs evenly spaced in minting time or not? Is there an absolute maximum supply? Who is able to mint the NFTs?

100 per month, if the 100 are minted in a single day is fine.
Yes there is a maximum supply, after a year the max supply should be reached (1200).
Anybody should be able to call the mint function, plus a fee.

If the timeline is not strictly required, then a timelock can be implemented, i.e., there is a strict relationship between tokenIds and timestamps or time elapsed since deployment. Then when mint function is called, check if this condition is met or not.

Ok. It is almost the same check-wise, the main difference is that is automatic and not manual?

uint public constant november = 11 days;
uint public constant december= 41 days;

if (block.timestamp >= november)
maximumSupply = 200
if (block.timestamp >= december)
maximumSupply = 300

yes, in the world of blockchain, the spirit is to code the rules in smart contracts instead of executing rules by people. A lot more transparent and thus trustworthy

1 Like