Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
openzeppelin-solidity
Advanced tools
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.5.0;
import "@openzeppelin/contracts/token/ERC721/ERC721Full.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721Mintable.sol";
contract MyNFT is ERC721Full, ERC721Mintable {
constructor() ERC721Full("MyNFT", "MNFT") 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 guides in the sidebar 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.
2.5.0 (2020-02-04)
SafeCast.toUintXX
: new library for integer downcasting, which allows for safe operation on smaller types (e.g. uint32
) when combined with SafeMath
. (#1926)ERC721Metadata
: added baseURI
, which can be used for dramatic gas savings when all token URIs share a prefix (e.g. http://api.myapp.com/tokens/<id>
). (#1970)EnumerableSet
: new library for storing enumerable sets of values. Only AddressSet
is supported in this release. (#2061)Create2
: simple library to make usage of the CREATE2
opcode easier. (#1744)ERC777
: _burn
is now internal, providing more flexibility and making it easier to create tokens that deflate. (#1908)ReentrancyGuard
: greatly improved gas efficiency by using the net gas metering mechanism introduced in the Istanbul hardfork. (#1992, #1996)ERC777
: improve extensibility by making _send
and related functions internal
. (#2027)ERC721
: improved revert reason when transferring tokens to a non-recipient contract. (#2018)ERC165Checker
now requires a minimum Solidity compiler version of 0.5.10. (#1829)FAQs
Secure Smart Contract library for Solidity
We found that openzeppelin-solidity demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.