This project is a fork of 1001.digital's RandomlyAssigned ERC721 design, with a key change to improve compatibility with the OpenZeppelin ERC721 standard.
- OpenZeppelin-Compatible
totalSupply()
In this fork, thetotalSupply()function now follows the OpenZeppelin ERC721Enumerable definition:totalSupply()returns the number of tokens minted so far (the circulating supply), not the maximum supply. - Maximum Supply via
_maxSupply
The maximum number of tokens that can ever be minted is stored in the private variable_maxSupply.
If you want to expose this value, use a public getter:function maxSupply() public view returns (uint256) { return _maxSupply; }
- Why this change?
The original 1001.digital implementation usedtotalSupply()to mean "maximum supply," which is not compatible with OpenZeppelin's ERC721Enumerable and can cause confusion or integration issues with tools and libraries that expect the OpenZeppelin definition.
- Use
totalSupply()to get the number of tokens minted so far. - Use
maxSupply()(or_maxSupplyinternally) to get the maximum number of tokens that can ever be minted.
- Forked from 1001.digital/erc721-extensions
- OpenZeppelin ERC721Enumerable standard for supply tracking
MIT