Gathering detailed insights and metrics for @openzeppelin/contracts-upgradeable
Gathering detailed insights and metrics for @openzeppelin/contracts-upgradeable
Gathering detailed insights and metrics for @openzeppelin/contracts-upgradeable
Gathering detailed insights and metrics for @openzeppelin/contracts-upgradeable
Upgradeable variant of OpenZeppelin Contracts, meant for use in upgradeable contracts.
npm install @openzeppelin/contracts-upgradeable
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
1,000 Stars
853 Commits
435 Forks
42 Watching
48 Branches
242 Contributors
Updated on 28 Nov 2024
JavaScript (53.24%)
Solidity (34.64%)
Python (7.48%)
Ruby (4.16%)
Shell (0.4%)
Makefile (0.08%)
Cumulative downloads
Total Downloads
Last day
-5.1%
32,632
Compared to previous day
Last week
10.4%
189,110
Compared to previous week
Last month
5.1%
807,381
Compared to previous month
Last year
40.9%
7,660,340
Compared to previous year
1
A library for secure smart contract development. Build on a solid foundation of community-vetted code.
:mage: Not sure how to get started? Check out Contracts Wizard — an interactive smart contract generator.
:building_construction: Want to scale your decentralized application? Check out OpenZeppelin Defender — a mission-critical developer security platform to code, audit, deploy, monitor, and operate with confidence.
[!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.
+> [!NOTE] +> You are looking at the upgradeable variant of OpenZeppelin Contracts. Be sure to review the documentation on Using OpenZeppelin Contracts with Upgrades. +
$ npm install @openzeppelin/contracts-upgradeable
[!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 themaster
branch does not guarantee.
[!WARNING] Foundry installs the latest version initially, but subsequent
forge update
commands will use themaster
branch.
$ forge install OpenZeppelin/openzeppelin-contracts-upgradeable
Add @openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
in remappings.txt.
Once installed, you can use the contracts in the library by importing them:
1pragma solidity ^0.8.20; 2 3import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; 4 5contract MyCollectible is ERC721Upgradeable { 6 function initialize() initializer public { 7 __ERC721_init("MyCollectible", "MCO"); 8 } 9}
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.
The guides in the documentation site will teach about different concepts, and how to use the related contracts that OpenZeppelin Contracts provides:
The full API is also thoroughly documented, and serves as a great reference when developing your smart contract application. You can also ask for help or follow Contracts's development in the community forum.
Finally, you may want to take a look at the guides on our blog, which cover several common use cases and good practices. The following articles provide great background reading, though please note that some of the referenced tools have changed, as the tooling in the ecosystem continues to rapidly evolve.
This project is maintained by OpenZeppelin with the goal of providing a secure and reliable library of smart contract components for the ecosystem. We address security through risk management in various areas such as engineering and open source best practices, scoping and API design, multi-layered review processes, and incident response preparedness.
The OpenZeppelin Contracts Security Center contains more details about the secure development process.
The security policy is detailed in SECURITY.md
as well, and specifies how you can report security vulnerabilities, which versions will receive security patches, and how to stay informed about them. We run a bug bounty program on Immunefi to reward the responsible disclosure of vulnerabilities.
The engineering guidelines we follow to promote project quality can be found in GUIDELINES.md
.
Past audits can be found in audits/
.
Smart contracts are a nascent technology and carry a high level of technical risk and uncertainty. Although OpenZeppelin is well known for its security audits, using OpenZeppelin Contracts is not a substitute for a security audit.
OpenZeppelin Contracts is made available under the MIT License, which disclaims all warranties in relation to the project and which limits the liability of those that contribute and maintain the project, including OpenZeppelin. As set out further in the Terms, you acknowledge that you are solely responsible for any use of OpenZeppelin Contracts and you assume all risks associated with any such use.
OpenZeppelin Contracts exists thanks to its contributors. There are many ways you can participate and help build high quality software. Check out the contribution guide!
OpenZeppelin Contracts is released under the MIT License.
Your use of this Project is governed by the terms found at www.openzeppelin.com/tos (the "Terms").
The latest stable version of the package.
Stable Version
4
9.8/10
Summary
UUPSUpgradeable vulnerability in @openzeppelin/contracts
Affected Versions
>= 4.1.0, < 4.3.2
Patched Versions
4.3.2
0/10
Summary
UUPSUpgradeable vulnerability in @openzeppelin/contracts-upgradeable
Affected Versions
>= 4.1.0, < 4.3.2
Patched Versions
4.3.2
10/10
Summary
TimelockController vulnerability in OpenZeppelin Contracts
Affected Versions
>= 3.3.0, < 3.4.2
Patched Versions
3.4.2
10/10
Summary
TimelockController vulnerability in OpenZeppelin Contracts
Affected Versions
>= 4.0.0, < 4.3.1
Patched Versions
4.3.1
5
8.8/10
Summary
GovernorCompatibilityBravo may trim proposal calldata
Affected Versions
>= 4.3.0, < 4.8.3
Patched Versions
4.8.3
7.9/10
Summary
OpenZeppelin Contracts vulnerable to ECDSA signature malleability
Affected Versions
>= 4.1.0, < 4.7.3
Patched Versions
4.7.3
7.5/10
Summary
OpenZeppelin Contracts's GovernorVotesQuorumFraction updates to quorum may affect past defeated proposals
Affected Versions
>= 4.3.0, < 4.7.2
Patched Versions
4.7.2
7.5/10
Summary
OpenZeppelin Contracts's SignatureChecker may revert on invalid EIP-1271 signers
Affected Versions
>= 4.1.0, < 4.7.1
Patched Versions
4.7.1
7.5/10
Summary
OpenZeppelin Contracts's ERC165Checker may revert instead of returning false
Affected Versions
>= 4.0.0, < 4.7.1
Patched Versions
4.7.1
10
5.9/10
Summary
OpenZeppelin Contracts and Contracts Upgradeable duplicated execution of subcalls in v4.9.4
Affected Versions
= 4.9.4
Patched Versions
4.9.5
5.3/10
Summary
OpenZeppelin Contracts's governor proposal creation may be blocked by frontrunning
Affected Versions
>= 4.3.0, < 4.9.1
Patched Versions
4.9.1
5.3/10
Summary
OpenZeppelin Contracts TransparentUpgradeableProxy clashing selector calls may not be delegated
Affected Versions
>= 3.2.0, < 4.8.3
Patched Versions
4.8.3
5.3/10
Summary
OpenZeppelin Contracts vulnerable to Improper Escaping of Output
Affected Versions
>= 4.0.0, < 4.9.3
Patched Versions
4.9.3
5.3/10
Summary
OpenZeppelin Contracts using MerkleProof multiproofs may allow proving arbitrary leaves for specific trees
Affected Versions
>= 4.7.0, < 4.9.2
Patched Versions
4.9.2
6.5/10
Summary
OpenZeppelin Contracts contains Incorrect Calculation
Affected Versions
>= 4.8.0, < 4.8.2
Patched Versions
4.8.2
5.3/10
Summary
OpenZeppelin Contracts's Cross chain utilities for Arbitrum L2 see EOA calls as cross chain calls
Affected Versions
>= 4.6.0, < 4.7.2
Patched Versions
4.7.2
5.3/10
Summary
OpenZeppelin Contracts ERC165Checker unbounded gas consumption
Affected Versions
>= 3.2.0, < 4.7.2
Patched Versions
4.7.2
0/10
Summary
GovernorCompatibilityBravo incorrect ABI encoding may lead to unexpected behavior
Affected Versions
>= 4.3.0, < 4.4.2
Patched Versions
4.4.2
5.6/10
Summary
OpenZeppelin Contracts initializer reentrancy may lead to double initialization
Affected Versions
>= 3.2.0, < 4.4.1
Patched Versions
4.4.1
4
0/10
Summary
OpenZeppelin Contracts base64 encoding may read from potentially dirty memory
Affected Versions
>= 4.5.0, < 4.9.6
Patched Versions
4.9.6
0/10
Summary
OpenZeppelin Contracts base64 encoding may read from potentially dirty memory
Affected Versions
>= 5.0.0-rc.0, < 5.0.2
Patched Versions
5.0.2
0/10
Summary
Inconsistent storage layout for ERC2771ContextUpgradeable
Affected Versions
>= 4.0.0, < 4.3.0
Patched Versions
4.3.0
0/10
Summary
ERC1155Supply vulnerability in OpenZeppelin Contracts
Affected Versions
>= 4.2.0, < 4.3.3
Patched Versions
4.3.3
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
no SAST tool detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
10 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More