Practical overview
When it fits
Use it when building or adapting an OpenZeppelin 5.x NFT contract and a documented extension matches a rule the contract needs. Check the version requirements before integrating it into an existing codebase.
Who it is for
- Solidity developers building ERC721 or ERC1155 NFT contracts on OpenZeppelin 5.x.
- Teams creating reusable NFT contract templates that import only selected extension modules.
Documented uses
- Add a maximum token supply and track the next token ID during minting.
- Set a public-sale start time and restrict a contract function until that time.
- Convert a USD-denominated amount into ETH using a Chainlink price feed.
- Enforce per-wallet token holding limits or make an NFT non-transferable.
- Choose sequential, start-offset, or semi-random token ID assignment.
Requirements & limits
The repository is public and identifies the package as MIT-licensed. Installation is documented through pnpm; no price or account requirement is stated.
- The package targets OpenZeppelin 5.x and Solidity ^0.8.20 and requires
@openzeppelin/contracts ^5.2.0. - Version 0.1.0 is not backward compatible with OpenZeppelin 4.x; it uses custom errors and the
_updatehook. RandomlyAssignedusesblock.prevrandaoand is described as semi-random, not cryptographically secure.- For multi-token minting in one transaction, supply availability should be checked with
ensureAvailabilityFor(amount). WithSaleStartis built onOwnable; the owner can set the start time, but cannot change it after the sale has begun.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Add a limited-supply extension to an ERC721 contract
Set a token supply cap and use the extension's tracker and availability modifier in a mint function.
Before you start
- A Solidity ERC721 contract built for OpenZeppelin 5.x and Solidity ^0.8.20.
@openzeppelin/contracts ^5.2.0as a peer dependency.- The
@1001-digital/erc721-extensionspackage.
Steps
Install the package with
pnpm install @1001-digital/erc721-extensions.Import the required extension into the Solidity contract.
Inherit
WithLimitedSupplyand initialize it with the desired maximum supply.In the mint function, apply
ensureAvailability(), obtain an ID withnextToken(), and mint the token.
Expected outcome
The contract example tracks token IDs and checks availability before a single-token mint, subject to the configured cap.
Guide limitations
nextToken()does not itself check whether tokens remain; use the availability modifier.- For multiple tokens minted in one transaction, the README recommends
ensureAvailabilityFor(amount). - The package's v0.1.0 is not backward compatible with OpenZeppelin 4.x.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 9 October 2026
- Original website title
- 1001-digital/erc721-extensions · Official homepage title · retained in its source language

