OpenZeppelin Contracts 3.3

It's time for a new release of OpenZeppelin Contracts!

Timelock

It's common for projects on Ethereum to retain some admin privileges over contracts. Although this tips the project towards centralization, it's possible to compensate for it somewhat by allowing users of the project to exit the system if there is an admin decision they disagree with. This time to exit can be enforced on chain through the use of a timelock, and this release includes a new contract for exactly this purpose: TimelockController.

This is a contract that is deployed standalone and is meant to be assigned the admin privileges to a contract (such as ownership or an access control role). Admin operations can then be scheduled on the timelock contract, and can only be executed on the controlled contract after a period of time.

OpenZeppelin Defender, our new operations platform for Ethereum, will soon allow users to easily set up a timelock for their admin operations! Learn more.

The contract is extensively documented, and makes use of access control roles in an interesting way. Check it out!

Thanks to @Amxx for his work on this contract!

Solidity 0.7

This release can be used with both Solidity 0.6 and 0.7. However, developers who compile with 0.7 will see warnings originating in the constructors of the library. This is caused by a new warning in Solidity 0.7, that we can't get rid of without causing a breaking change for people who continue using version 0.6 of the compiler.

In order to compile without warnings, you can install the solc-0.7 tag on npm: @openzeppelin/contracts@solc-0.7.

More utilities

Address.functionStaticCall

This function joins the existing Address.functionCall, to allow developers to call static functions on other contracts using arbitrary msg.data while maintaining all of Solidity's function call checks.


Installation

If you just want to get started, you can install this release from npm with the following command:

npm install @openzeppelin/contracts

We have a few separate variants for other specific use cases.

  • If you want to use Solidity 0.7, you may prefer to install @openzeppelin/contracts@solc-0.7
  • If you're building upgradeable contracts, you should install @openzeppelin/contracts-upgradeable.
  • For the combination of upgradeable contracts and Solidity 0.7, use @openzeppelin/contracts-upgradeable@solc-0.7.

To learn more about the upgradeable variant of OpenZeppelin Contracts read our recent announcement: First release of OpenZeppelin Contracts Upgradeable.

5 Likes