github OpenZeppelin/openzeppelin-contracts v2.1.1
OpenZeppelin 2.1

latest releases: v5.0.2, v4.9.6, v4.9.5...
5 years ago

2.1 is finally out! 🎉

The most significant change is that OpenZeppelin now works with Solidity 0.5.0. This new release of the compiler introduced many breaking changes, and our old contracts were no longer compatible with it. After much discussion, we've decided to drop the Solidity compiler version out of our stability guarantees: in an attempt to both use the best possible tools and push the industry forward, our releases will target a recent compiler version, which may change between minor releases.

This means that installing this new OpenZeppelin version will require you to upgrade your compiler to the 0.5.x line, which can be easily done with the recently released truffle v5.0.0. The 2.0 release will be the last OpenZeppelin release with support for Solidity ^0.4.24, which we will still support in the form of bugfixes, if any are found.

In general, if you're not sure whether you'll want to upgrade your compiler version, feel free to pin an OpenZeppelin version during installation: 📌

npm install openzeppelin-solidity@2.1 --save-exact

If you want to know more about our rationale behind this decision, and why we discarded other possible approaches, read here.

Highlights

  • Added WhitelistCrowdsale, a crowdsale where only whitelisted accounts (WhitelistedRole) can purchase tokens. Adding or removing accounts from the whitelist is done by whitelister admins (WhitelistAdminRole). Similar to the pre-2.0 WhitelistedCrowdsale. (#1525, #1589)
  • ERC20's transferFrom and _burnFrom now emit Approval events, to represent the token's state comprehensively through events. (#1524)
  • SignedSafeMath now supports signed integers (int256). (#1559, #1588)
  • ERC20 and ERC721 are now more gas efficient due to removed redundant SSTOREs and requires. (#1409 and #1549)

The first 2.1 release will be 2.1.1, due to a minor mishap that caused a conflict in the npm registry 🤦‍♂️

🆕 See the details in our brand new CHANGELOG!

Don't miss a new openzeppelin-contracts release

NewReleases is sending notifications on new releases.