{"repo":"1001-digital/erc721-extensions","free":true,"listed":false,"github":"https://github.com/1001-digital/erc721-extensions","clone":"git clone https://github.com/1001-digital/erc721-extensions.git","description":"A set of composable extension contracts for the OpenZeppelin ERC721 base contracts.","language":"TypeScript","stars":163,"topics":["erc721","solidity","smart-contracts","ethereum","nfts"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"ERC721 Contract Extensions A set of composable extensions for the OpenZeppelin ERC721 and ERC1155 base contracts. v0.1.0 Breaking Change : This version targets OpenZeppelin 5.x and Solidity ^0.8.20. It is not backward compatible with OZ 4.x consumers. All require strings have been replaced with custom errors, Counters has been removed, and mint / transfer overrides have been replaced with the OZ 5.x update hook. Installation Then import the extensions you want: Peer dependency This package requires @openzeppelin/contracts ^5.2.0 as a peer dependency. Available Extensions WithLimitedSupply.sol A simple token tracker that limits the token supply. To keep track of the token supply and to get the next available tokenID, call nextToken() when creating new tokens. The internal nextToken() method does not automatically check whether tokens are available but WithLimitedSupply provides the ensureAvailability modifier that you can attach to your minting function. If you implement minting multiple tokens within the same transaction, you should check availability with the ensureAvailabilityFor(amount) modifier. There are two contracts that build on this: LinearlyAssigned , which adds the option of starting the token tracker from a specific number, and RandomlyAssigned , which enables semi random token ID assignments. LinearlyAssigned.sol Instantiate it with the max supply as well as the starting index: RandomlyAssigned.sol (Semi-)randomly\\ assign token IDs from a fixed collection size on","default_branch":null,"files":null,"tree":[],"storefront":"/r/1001-digital","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/1001-digital/erc721-extensions/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}