Skip to content

OpenZeppelin 2.0 RC 1

Pre-release
Pre-release
Compare
Choose a tag to compare
@frangio frangio released this 07 Sep 18:00
· 2328 commits to master since this release

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)