Jan 18, 2019

@nventuro nventuro released this Jan 4, 2019 · 20 commits to master since this release

Assets 2

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!

@nventuro nventuro released this Dec 27, 2018

Assets 2

Make sure to read the release notes for the first release candidate!

This second release candidate updates all contracts to support the 0.5.x line of the Solidity compiler.

Users that wish to continue using versions ^0.4.24 should not upgrade, and instead keep using version 2.0. To learn more about our rationale behind this decision, see here.

You can also see the full changelog for this release.

Pre-release

@nventuro nventuro released this Dec 18, 2018 · 35 commits to master since this release

Assets 2

In this minor release we're bringing back some features that were removed for the 2.0 release, adding new contracts requested by the community, and making some popular operations more gas efficient. 🏃 💨

To install the release candidate run npm install openzeppelin-solidity@next. We want to hear what you think!

If you want to compile using solc 0.5 please install the latest release candidate.
npm install openzeppelin-solidity@next

The actual 2.1 release will come out after a week of no changes to the release candidate.

Highlights

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

🆕 See the details in our brand new CHANGELOG!

@elopio elopio released this Oct 21, 2018 · 161 commits to master since this release

Assets 2

OpenZeppelin 2.0 is finally here!!!

The major feature in this release is that we are now commiting to a stable API. In the process of stabilizing we've also reviewed a lot of the existing API in order to ensure a more straightforward experience for users.

Featuring...

Stable API

So far OpenZeppelin's API has sometimes changed from release to release, in backwards-incompatible ways. This has enabled us to iterate on features and design ideas, but we're at a point now where we want to commit to having a stable API and delivering reliable updates.

You can expect the external and internal API of contracts to remain stable. We're only making an exception to this for the contracts in the drafts/ subdirectory; this is where ERCs in Draft status, as well as more experimental contracts will go, and might have breaking changes in minor versions. We'll be documenting exactly what stability guarantees we provide in the coming weeks.

Granular permissions

Features which require permissions have used the almighty Ownable so far. We are now moving towards a more granular system of roles, like the MinterRole. Just like Ownable, the creator of a contract is assigned all roles at first, but they can selectively give them out to other accounts.

Improved test suite

Although this is not visible to users, we have been improving the test suite, increasing coverage to 100%, and cleaning up all of our tests, which had diverged in style. This is part of a bigger effort towards making contributing easier and involving our amazing contributors more in the entire process of building OpenZeppelin.

A new audit

The awesome LevelK team audited our 2.0.0 Release Candidate and they found some severe issues and suggested many improvements. We fixed almost all the issues and notes they reported, leaving only a few minor details for 2.1.0. Check out the LevelK Audit - OpenZeppelin 2.0 project for all the details.

We want to thank @cwhinfrey, @pcowgill and @shanefontaine for their very detailed reviews, high quality standards, and human support during the closing phase of this release. This audit gave us a great confidence boost on the code that we are now publishing.

Tons of community love

Now hold your breath, because this release was only possible because of the contributions of many, many people from everywhere in the world, and we want to thank all of them:

@3sGgpQ8H, @Aniket-Engg, @barakman, @BrendanChou, @cardmaniac992, @dougiebuckets, @dwardu, @facuspagnuolo, @fulldecent, @glesaint, @Glisch, @jacobherrington, @jbogacz, @jdetychey, @JeanoLee, @k06a, @lamengao, @ldub, @leonardoalt, @Miraj98, @mswezey23, @pw94, @shishir99111, @sohkai, @sweatyc, @tinchoabbate, @tinchou, @urvalla, @viquezclaudio, @vyomshm, @yaronvel, @ZumZoom.

Also we would like to thank all the people who are constantly helping others in our Slack channel, the ones who have given us feedback about the release, and the ones helping us triage and discuss our GitHub issues. If you are reading this wanting to jump in and make your first free software contributions, but you are unsure of where and how, talk to us! We can help you getting started, and we could use the extra hands.

With <3 from the maintainers team of this release.
-- @shrugs, @nventuro, @frangio and @elopio

Changelog

The changelog is pretty big. We are introducing new concepts and new designs, together with many renames and restructures. If you have problems, comments or suggestions, please join our Slack channel.

v1.12.0...v2.0.0

  • Ownable contracts have moved to role based access. (#1291, #1302, #1303)
  • ERC contracts have all been renamed to follow the same convention. The interfaces are called IERC##, and their implementations are ERC##. Check out, for example, IERC20 and ERC20. (#1252, #1288)
  • All state variables are now private, which means that derived contracts cannot access them directly, but have to use getters. This is to increase encapsulation, to be able to reason better about the code. (#1197, #1265, #1267, #1269, #1270, #1268, #1281)
  • Events have been changed to be consistently in the past tense except for those which are defined by an ERC. (#1181)
  • Separated ERC721 into the different optional interfaces, and introduced ERC721Full which implements all. (#1304)
  • Added ERC165Query to query support for ERC165 interfaces. (#1086)
  • Added an experimental contract for migration between ERC20 tokens. (#1054)
  • Added SafeMath.mod. (#915)
  • Added Math.average. (#1170)
  • Added ERC721Pausable. (#1154)
  • Changed SafeMath to use require instead of assert. (#1187, #1120, interesting discussion!)
  • Removed restriction on who can release funds in PullPayments, PaymentSplitter, PostDeliveryCrowdsale, RefundableCrowdsale. (#1275)
  • Optimized ReentrancyMutex gas usage. (#1155)
  • Made ERC721.exists internal. (#1193)
  • Changed preconditions on PaymentSplitter constructor arguments. (#1131)
  • Fixed ERC721.getApproved to be in compliance with spec. (#1256)
  • Simplified interface of IndividuallyCappedCrowdsale. (#1296)
  • Renamed ERC20.decreaseApproval to decreaseAllowance, and changed its semantics slightly to be more secure. (#1293)
  • Renamed MerkleProof.verifyProof to MerkleProof.verify. (#1294)
  • Renamed ECRecovery to ECDSA, and AddressUtils to Address. (#1253)
  • Moved ECDSA and MerkleProof to a cryptography/ subdirectory. (#1253)
  • Moved ReentrancyGuard, and Address to a utils/ subdirectory. (#1253)
  • Renamed proposals/ subdirectory to drafts/. (#1271)
  • Moved TokenVesting, SignatureBouncer to drafts/. (#1271)
  • Removed ERC20Basic, now there's only ERC20. (#1125)
  • Removed Math.min64 and Math.max64, left only the uint256 variants. (#1156)
  • Removed Mint and Burn events from ERC20Mintable and ERC20Burnable. (#1305)
  • Removed underscores from event arguments. (#1258)
  • Removed a few contracts that we thought were not generally secure enough: LimitBalance, HasNoEther, HasNoTokens, HasNoContracts, NoOwner, Destructible, TokenDestructible, CanReclaimToken. (#1253, #1254, #1306)
  • Removed extensions of Owable: Claimable, DelayedClaimable, Heritable. (#1274)
  • Renamed AutoIncrementing to Counter and moved it to drafts\. ((1307, #1332)
  • Added events to roles on construction and when renouncing. (#1329)
  • Separated ERC721Mintable into two contracts, one with metadata (token URI) and one without. (#1365)
  • Added an ERC20 internal _transfer function. (#1370)
  • Added an Arrays library. (#1375)
  • Improved the OwnershipTransfer event and removed OwnershipRenounced. (#1397)
  • Removed the BreakInvariantBounty contract because of a front-running issue. (#1424)
  • Improved encapsulation on ERC165 making the _supportedInterfaces map private. (#1379)
  • Renamed RefundsEscrow event to RefundsClosed. (#1418)
  • Moved Escrow and RefundsEscrow to contracts/payment/escrow/. (#1430)
  • Made private the TokenVesting functions _releasableAmount and _vestedAmount. (#1427)
  • Made internal the constructors of contracts that should only be used inherited from others. (#1433, #1439)
  • Renamed ERC165 function supportsInterfaces to _supportsAllInterfaces. (#1435)
  • Added the address to Paused and Unpaused events. (#1410)
  • Renamed SplitPayment to PaymentSplitter, and added the events PayeeAdded, PaymentReleased and PaymentReceived. (#1417)
  • Renamed the TokenVesting events to TokensReleased and TokenVestingRevoked. (#1431)
  • Improved the SafeERC20 allowance handling. (#1407)
  • Made getCurrentRate from IncreasingPriceCrowdsale return 0 when the crowdsale is not open. (#1442)
  • Made tokenURI from ERC721Metadata external, to match the specification. (#1444)
  • Fixed a reentrancy issue on FinalizableCrowdsale. (#1447)
  • Fixed how allowance crowdsale checks remaining tokens. (#1449)
  • Added the nonReentrant safeguard for buyTokens in the Crowdsale contract. (#1438)
Pre-release

@elopio elopio released this Oct 21, 2018

Assets 2

Make sure to read the release notes for the first, second and third release candidates!

This fourth (and hopefully last) release candidate is the product of an audit performed by LevelK. This audit increased our confidence on the code that we are about to release as version 2.0.0, and allowed us to add many improvements and a few bug fixes that will make this the best OpenZeppelin release so far.

In particular, we decided to remove the BreakInvariantBounty contract because of a front-running issue (#1333) that will require a heavy redesign, we added the nonReentrant safeguard for buyTokens in the Crowdsale contract (#1438), we improved the SafeERC20 allowance handling(#1407), on TimedCrowdsales the closing time now must be strictly after the opening time (#1440), we fixed how AllowanceCrowdsale checks remaining tokens (#1449), we fixed a reentrancy issue on FinalizableCrowdsale (#1447), and improved the ERC721 implementation (#1450).

There were many more low issues and notes fixed. Check out the LevelK Audit - OpenZeppelin 2.0 project for all the details. There are a few minor issues still open that we are going to leave for the 2.1.0 release.

We want to thank LevelK and all our community contributors that have joined us on this long release candidate journey. The full list of people who have helped us will be in the final release notes, which is next!

v2.0.0-rc.3...v2.0.0-rc.4

Pre-release

@nventuro nventuro released this Oct 4, 2018

Assets 2

Make sure to read the release notes for the first and second release candidates!

This third release candidate adds events to roles on construction and when renouncing (#1329), improves tests to achieve 100% coverage (#1249, #1349, #1351, #1350, #1360, #1248, #1318), separates ERC721Mintable into two contracts, one with metadata (token URI) and one without (#1365), prevents BreakInvariantBounty from being reclaimed (#1374), adds an ERC20 internal _transfer function (#1370) and removes an unnecessary ERC20 _burn override (#1373) and inheritance in RefundEscrow (#1381).

v2.0.0-rc.2...v2.0.0-rc.3

Pre-release

@frangio frangio released this Sep 18, 2018 · 241 commits to master since this release

Assets 2

Make sure to read the release notes for the first release candidate!

This second release candidate only moves two more things to the unstable drafts directory: Counter (#1332) and BreakInvariantBounty (#1334), and fixes an error in a few import paths (#1319, #1321).

v2.0.0-rc.1...v2.0.0-rc.2

Pre-release

@frangio frangio released this Sep 7, 2018 · 248 commits to master since this release

Assets 2

We are very excited to announce the first release candidate of OpenZeppelin 2.0! 🎉

The major feature in this release is that we are now commiting to a stable API. In the process of stabilizing we've also reviewed a lot of the existing API in order to ensure a more straightforward experience for users.

To install the release candidate run npm install openzeppelin-solidity@next. We want to hear what you think!

Featuring...

Stable API

So far OpenZeppelin's API has sometimes changed from release to release, in backwards-incompatible ways. This has enabled us to iterate on features and design ideas, but we're at a point now where we want to commit to having a stable API and delivering reliable updates.

You can expect the external and internal API of contracts to remain stable. We're only making an exception to this for the contracts in the drafts/ subdirectory; this is where ERCs in Draft status, as well as more experimental contracts will go, and might have breaking changes in minor versions. We'll be documenting exactly what stability guarantees we provide in the coming weeks.

Granular permissions

Features which require permissions have used the almighty Ownable so far. We are now moving towards a more granular system of roles, like the MinterRole. Just like Ownable, the creator of a contract is assigned all roles at first, but they can selectively give them out to other accounts.

Improved test suite

Although this is not visible to users, we have been improving the test suite, increasing coverage, and cleaning up all of our tests, which had diverged in style. This is part of a bigger effort towards making contributing easier and involving our amazing contributors more in the entire process of building OpenZeppelin.

Changelog

v1.12.0...v2.0.0-rc.1

  • Ownable contracts have moved to role based access. (#1291, #1302, #1303)
  • ERC contracts have all been renamed to follow the same convention. The interfaces are called IERC##, and their implementations are ERC##. Check out, for example, IERC20 and ERC20. (#1252, #1288)
  • All state variables are now private, which means that derived contracts cannot access them directly, but have to use getters. This is to increase encapsulation, to be able to reason better about the code. (#1197, #1265, #1267, #1269, #1270, #1268, #1281)
  • Events have been changed to be consistently in the past tense except for those which are defined by an ERC. (#1181)
  • Separated ERC721 into the different optional interfaces, and introduced ERC721Full which implements all. (#1304)
  • Added ERC165Query to query support for ERC165 interfaces. (#1086)
  • Added an experimental contract for migration between ERC20 tokens. (#1054)
  • Added SafeMath.mod. (#915)
  • Added Math.average. (#1170)
  • Added ERC721Pausable. (#1154)
  • Changed SafeMath to use require instead of assert. (#1187, #1120, interesting discussion!)
  • Removed restriction on who can release funds in PullPayments, SplitPayment, PostDeliveryCrowdsale, RefundableCrowdsale. (#1275)
  • Optimized ReentrancyMutex gas usage. (#1155)
  • Made ERC721.exists internal. (#1193)
  • Changed preconditions on SplitPayment constructor arguments. (#1131)
  • Fixed ERC721.getApproved to be in compliance with spec. (#1256)
  • Simplified interface of IndividuallyCappedCrowdsale. (#1296)
  • Renamed ERC20.decreaseApproval to decreaseAllowance, and changed its semantics slightly to be more secure. (#1293)
  • Renamed MerkleProof.verifyProof to MerkleProof.verify. (#1294)
  • Renamed ECRecovery to ECDSA, and AddressUtils to Address. (#1253)
  • Moved ECDSA and MerkleProof to a cryptography/ subdirectory. (#1253)
  • Moved ReentrancyGuard, AutoIncrementing, and Address to a utils/ subdirectory. (#1253)
  • Renamed proposals/ subdirectory to drafts/. (#1271)
  • Moved TokenVesting, SignatureBouncer to drafts/. (#1271)
  • Removed ERC20Basic, now there's only ERC20. (#1125)
  • Removed Math.min64 and Math.max64, left only the uint256 variants. (#1156)
  • Removed Mint and Burn events from ERC20Mintable and ERC20Burnable. (#1305)
  • Removed underscores from event arguments. (#1258)
  • Removed a few contracts that we thought were not generally secure enough: LimitBalance, HasNoEther, HasNoTokens, HasNoContracts, NoOwner, Destructible, TokenDestructible, CanReclaimToken. (#1253, #1254, #1306)
  • Removed extensions of Owable: Claimable, DelayedClaimable, Heritable. (#1274)

@frangio frangio released this Aug 11, 2018 · 339 commits to master since this release

Assets 2

And thus concludes another release cycle of OpenZeppelin! 😄

Among other things, we have been busy enhancing the quality and consistency of the test suite. We think this will improve the experience for future contributors. Check it out! 📑 🙌

This is the last release before our planned 2.0 release, which will mark a commitment to a stable API. Keep an eye out for it! 👁

Changelog

v1.11.0...v1.12.0

Additions

  • We now have a code of conduct! (#1061)
  • A small library with a Counter datatype. (#1023)
  • A description in the README of the different categories of contracts we have and their organization. (#1089)

Improvements

  • Moved ERC165 interface IDs to interface contracts. (#1070)
  • Moved RBAC contract to the access directory. (#1114)
  • Fixed an inheritance order that was causing some contracts to fail linearization. (#1128)
  • Lots of test improvements, including the removal of Babel. (#1009, #1050, #1074, #1094, #1116, #1112, #1117)
  • Fix assertRevert test helper. (#1123)
  • Some gas optimizations. (#1043, #1063, #1030, #1017, #1057)
  • Removed unnecessary payable constructor from Destructible. (#1107)
  • Documentation tidbits. (#1035, #1082, #1084, #1083, #1060, #1101)
  • Made code style more consistent with prefix underscore in all arguments. (#1133)
  • Fixes for Solidity 0.5.0. (#1080, #1134)
  • Silenced a compilation warning in HasNoTokens. (#1122)