OpenViSTAI · Agents · Blockchain · Crypto
Menu
Smart Contracts

Openzeppelin Contracts

An open-source Solidity library for developing secure, reusable smart contracts for Ethereum and EVM projects. It is distributed as the @openzeppelin/contracts NPM package.

Independent OpenViST project profile, based on linked sources.

Openzeppelin Contracts — OpenViST project profile in Smart Contracts.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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
Before you choose

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.

Source-based practical guide

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

  1. Run the command below to install the latest audited release.

    Documented command
    npm install @openzeppelin/contracts
  2. Create a Solidity contract that imports ERC721 from @openzeppelin/contracts/token/ERC721/ERC721.sol.

  3. Inherit from ERC721 and initialize it in the constructor, as shown with the name MyCollectible and symbol MCO.

  4. 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 dev npm tag is unaudited, while latest is the audited default.
  • For upgradeable contracts, storage layouts across different major versions should be assumed incompatible.
Source-based practical guide

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

  1. Run forge install OpenZeppelin/openzeppelin-contracts.

  2. Add @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ to remappings.txt.

  3. Use tagged releases instead of the master branch when selecting a release, because master is 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 update commands use the master branch.
  • The steps do not document compiling, testing, or deploying a contract.
Evidence and transparency

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