Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

RandomlyAssignedEnumerable

Overview

This project is a fork of 1001.digital's RandomlyAssigned ERC721 design, with a key change to improve compatibility with the OpenZeppelin ERC721 standard.

Key Differences from the Original

  • OpenZeppelin-Compatible totalSupply()
    In this fork, the totalSupply() 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 used totalSupply() 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.

Usage

  • Use totalSupply() to get the number of tokens minted so far.
  • Use maxSupply() (or _maxSupply internally) to get the maximum number of tokens that can ever be minted.

Credits

License

MIT

About

Randomly Assigned extended With ERC721 Enumerable

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages