📈 GH Trending Explorer 🎲 Surprise me

← all repos

OpenZeppelin / openzeppelin-contracts

git clone https://github.com/OpenZeppelin/openzeppelin-contracts.git v5.7.0 · 2mo ago 🔥 on GitHub Trending today

OpenZeppelin Contracts is a library for secure smart contract development.

+1
stars, 24h · #525
+18
stars, 7 days · #1,542
+73
stars, 30 days · #3,052
27k
★ total · +0% this week
12k
forks · 344 open issues

Star history starts 2026-10-20; the chart appears after the second daily snapshot.

LanguageSolidity
LicenseMIT
Created2016-08-01 (10y ago)
Last pushtoday
Watchers640
OwnerOrganization

Seen on GitHub Trending

  • 2026-10-20 — #2 daily in solidity · +1 ★
  • 2026-10-20 — #1 monthly in solidity · +73 ★
  • 2026-10-20 — #1 weekly in solidity · +18 ★

GitHub topics

Links

README excerpt
# 
**A library for secure smart contract development.** Build on a solid foundation of community-vetted code.
 * Implementations of standards like ERC20 and ERC721.
 * Flexible role-based permissioning scheme.
 * Reusable Solidity components to build custom contracts and complex decentralized systems.
:mage: **Not sure how to get started?** Check out Contracts Wizard — an interactive smart contract generator.
> [!IMPORTANT]
> OpenZeppelin Contracts uses semantic versioning to communicate backwards compatibility of its API and storage layout. For upgradeable contracts, the storage layout of different major versions should be assumed incompatible, for example, it is unsafe to upgrade from 4.9.3 to 5.0.0. Learn more at Backwards Compatibility.
## Overview
### Release tags
We use NPM tags to clearly distinguish between audited and non-audited versions of our package:
| Tag | Purpose | Description |
| :--------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **latest** | ✅ Audited releases | Stable, audited versions of the package. This is the **default** version installed when users run `npm install @openzeppelin/contracts`. |
| **dev** | 🧪 Final but not audited | Versions that are finalized and feature-complete but have **not yet been audited**. This version is fully tested, can be used in production and is covered by the bug bounty. |
| **next** | 🚧 Release candidates | Pre-release versions that are **not final**. Used for testing and validation before the version becomes a final `dev` or `latest` release. |
### Installation
#### Hardhat (npm)
 [code] 
→ Installs the latest audited release (`latest`).
 [code] 
→ Installs the latest unaudited release (`dev`).
#### Foundry (git)
> [!WARNING]
> When installing via git, it is a common error to use the `master` branch. This is a development branch that should be avoided in favor of tagged releases. The release process involves security measures that the `master` branch does not guarantee.
> [!WARNING]
> Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch.
 [code] 
Add `@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/` in `remappings.txt`.
### Usage
Once installed, you can use the contracts in the library by importing them:
 [code] 
_If you're new to smart contract development, head to Developing Smart Contracts to learn about creating a new project and compiling your contracts._
To keep your system secure, you should **always** use the installed code as-is, and neither copy-paste it from online sources nor modify it yourself. The library is designed so that only the contracts and functions you use are deployed, so you don't need to worry about it needlessly increasing gas costs.
## Learn More
The guides in the documentation site will teach about different concepts, and h