OpenZeppelin Contracts v3.1 - first release candidate

We’re happy to announce the first release candidate of OpenZeppelin Contracts v3.1 :tada:

This will be the first release since v3.0, our last major release. It includes the long-awaited ERC1155 token and helpers for safe calls and downcasts, as well as a number of minor improvements.

To install this release candidate, run:

npm install --save-dev @openzeppelin/contracts@next


This is a new token standard developed by the gaming industry, focusing on gas efficiency. It’s key difference is that it is a multi-token contract: a single ERC1155 can be used to represent an arbitrary number of tokens, which is very useful in applications that require many tokens by removing the high gas costs associated with deploying them. Check out our new documentation page to learn more!.

More Replacements for call

The low-level call primitive can be hard to use correctly and is often considered unsafe. With the addition of sendValue in Contracts and try-catch in Solidity, there’s only a few scenarios in which call is still needed, the most troublesome one being forwarding calls.

The new functionCall helpers can forward call data to a recipient contract while imitating Solidity’s function call semantics, such as bubbling up revert reasons and rejecting calls to EOAs. We expect the addition of these functions to greatly reduce the need to rely on call.

Using SafeMath on Small Signed Integers

We’ve expanded the scope of the SafeCast library to also include signed integer downcasting, which allows for users that need small types (such as int8 or int32) to perform checked arithmetic on them by using SafeMath, and then downcast the result to the intended size.

What’s Next

Version 3.2 will likely include code for proxy contracts, the last big item on our Q2 2020 Roadmap. We’re also already working on EIP2612 for permit approvals in ERC20 and will include it in a release as soon as the EIP is finalized.

Fixed-point arithmetic was dropped after the Solidity team decided to implement native support for it (see this issue for some recent discussion).


Nice to hear about new features !

I was wondering, isn't this EIP still in DRAFT ? I thought one of the requirements was that an EIP must be FINALIZED to be included as part os OZ contracts - or is this a one-of-a-time exceptions because of the value that it can bring? Or on the other hand do you guys expect that it gets FINALIZED ?

Just curious - great work !

1 Like

We’re getting a head start on development but it will not be included in a release until it’s finalized.