
Product
Introducing Webhook Events for Pull Request Scans
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
A library for secure smart contract development. Build on a solid foundation of community-vetted code.
$ npm install @openzeppelin/contracts
OpenZeppelin Contracts features a stable API, which means your contracts won't break unexpectedly when upgrading to a newer minor version.
Once installed, you can use the contracts in the library by importing them:
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract MyCollectible is ERC721 {
constructor() ERC721("MyCollectible", "MCO") public {
}
}
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 docs 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, some of the referenced tools have changed as the tooling in the ecosystem continues to rapidly evolve.
This project is maintained by OpenZeppelin, and developed following our high standards for code quality and security. OpenZeppelin is meant to provide tested and community-audited code, but please use common sense when doing anything that deals with real money! We take no responsibility for your implementation decisions and any security problems you might experience.
The core development principles and strategies that OpenZeppelin is based on include: security in depth, simple and modular code, clarity-driven naming conventions, comprehensive unit testing, pre-and-post-condition sanity checks, code consistency, and regular audits.
The latest audit was done on October 2018 on version 2.0.0.
Please report any security issues you find to security@openzeppelin.org.
OpenZeppelin exists thanks to its contributors. There are many ways you can participate and help build high quality software. Check out the contribution guide!
OpenZeppelin is released under the MIT License.
3.4.0 (2021-02-02)
BeaconProxy: added new kind of proxy that allows simultaneous atomic upgrades. (#2411)EIP712: added helpers to verify EIP712 typed data signatures on chain. (#2418)ERC20Permit: added an implementation of the ERC20 permit extension for gasless token approvals. (#2237)ERC20PresetFixedSupply and ERC777PresetFixedSupply. (#2399)Address: added functionDelegateCall, similar to the existing functionCall. (#2333)Clones: added a library for deploying EIP 1167 minimal proxies. (#2449)Context: moved from contracts/GSN to contracts/utils. (#2453)PaymentSplitter: replace usage of .transfer() with Address.sendValue for improved compatibility with smart wallets. (#2455)UpgradeableProxy: bubble revert reasons from initialization calls. (#2454)SafeMath: fix a memory allocation issue by adding new SafeMath.tryOp(uint,uint)→(bool,uint) functions. SafeMath.op(uint,uint,string)→uint are now deprecated. (#2462)EnumerableMap: fix a memory allocation issue by adding new EnumerableMap.tryGet(uint)→(bool,address) functions. EnumerableMap.get(uint)→string is now deprecated. (#2462)ERC165Checker: added batch getSupportedInterfaces. (#2469)RefundEscrow: beneficiaryWithdraw will forward all available gas to the beneficiary. (#2480)ERC777: fix potential reentrancy issues for custom extensions to ERC777. (#2483)If you're using our implementation of ERC777 from version 3.3.0 or earlier, and you define a custom _beforeTokenTransfer function that writes to a storage variable, you may be vulnerable to a reentrancy attack. If you're affected and would like assistance please write to security@openzeppelin.com. Read more in the pull request.
FAQs
Secure Smart Contract library for Solidity
The npm package oz-fork receives a total of 0 weekly downloads. As such, oz-fork popularity was classified as not popular.
We found that oz-fork demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.

Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.

Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.