Practical overview
When it fits
Use it when an Ethereum or EVM project needs modular Solidity building blocks for tokens, permissions, upgradeability, or contract security.
Who it is for
- Solidity developers
- Ethereum and EVM development teams
- Teams building decentralized applications
Documented uses
- Build token contracts with reusable implementations
- Add access-control modules to decentralized applications
- Develop upgradeable smart-contract systems
- Reuse security-focused Solidity components
Requirements & limits
The source repository is public, open source, active, and licensed under MIT. No account or pricing details are documented here.
- Solidity is the primary language
- The library targets Ethereum and EVM ecosystems
- It is distributed through the @openzeppelin/contracts NPM package
- The repository is public and not archived
- The MIT license permits use under its license terms
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install OpenZeppelin Contracts with npm and import ERC721
Install the latest audited package release and reference its ERC721 implementation in a Solidity contract.
Before you start
- An npm-based Hardhat project.
- Solidity support for pragma ^0.8.20.
Steps
Run the command below to install the latest audited release.
npm install @openzeppelin/contractsCreate a Solidity contract that imports
ERC721from@openzeppelin/contracts/token/ERC721/ERC721.sol.Inherit from
ERC721and initialize it in the constructor, as shown with the nameMyCollectibleand symbolMCO.Use the installed library code as-is rather than copying or modifying it.
Expected outcome
The project has the audited OpenZeppelin Contracts package installed and a Solidity contract referencing its ERC721 implementation.
Guide limitations
- The documented steps stop at package installation and contract definition; compilation, testing, and deployment are not documented here.
- The
devnpm tag is unaudited, whilelatestis the audited default. - For upgradeable contracts, storage layouts across different major versions should be assumed incompatible.
Install OpenZeppelin Contracts with Foundry and configure remappings
Install OpenZeppelin Contracts from Git and add the documented Solidity import remapping.
Before you start
- A Foundry project.
Steps
Run
forge install OpenZeppelin/openzeppelin-contracts.Add
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/toremappings.txt.Use tagged releases instead of the
masterbranch when selecting a release, becausemasteris a development branch.
Expected outcome
The Foundry project contains the library and a remapping for imports under `@openzeppelin/contracts/`.
Guide limitations
- The documentation warns that later
forge updatecommands use themasterbranch. - The steps do not document compiling, testing, or deploying a contract.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 30 September 2026
- Original website title
- OpenZeppelin/openzeppelin-contracts · Official homepage title · retained in its source language

