Release Candidate for Contracts 3.4

OpenZeppelin Contracts 3.4 is around the corner! :tada:

Here are the changelog entries.

Security Fixes

  • ERC777: fix potential reentrancy issues for custom extensions to ERC777. (#2483)

If you’re using our implementation of ERC777 from version 3.3.0 or earlier, and you define a custom _beforeTokenTransfer function that writes to a storage variable, you may be vulnerable to a reentrancy attack. If you’re affected and would like assistance please write to Read more in the pull request.

Other Changes

  • BeaconProxy: added new kind of proxy that allows simultaneous atomic upgrades. (#2411)
  • EIP712: added helpers to verify EIP712 typed data signatures on chain. (#2418)
  • ERC20Permit: added an implementation of the ERC20 permit extension for gasless token approvals. (#2237)
  • Presets: added token presets with preminted fixed supply ERC20PresetFixedSupply and ERC777PresetFixedSupply. (#2399)
  • Address: added functionDelegateCall, similar to the existing functionCall. (#2333)
  • Clones: added a library for deploying EIP 1167 minimal proxies. (#2449)
  • Context: moved from contracts/GSN to contracts/utils. (#2453)
  • PaymentSplitter: replace usage of .transfer() with Address.sendValue for improved compatibility with smart wallets. (#2455)
  • UpgradeableProxy: bubble revert reasons from initialization calls. (#2454)
  • SafeMath: fix a memory allocation issue by adding new SafeMath.tryOp(uint,uint)→(bool,uint) functions. SafeMath.op(uint,uint,string)→uint are now deprecated. (#2462)
  • EnumerableMap: fix a memory allocation issue by adding new EnumerableMap.tryGet(uint)→(bool,address) functions. EnumerableMap.get(uint)→string is now deprecated. (#2462)
  • ERC165Checker: added batch getSupportedInterfaces. (#2469)
  • RefundEscrow: beneficiaryWithdraw will forward all available gas to the beneficiary. (#2480)
  • Many view and pure functions have been made virtual to customize them via overrides. In many cases this will not imply that other functions in the contract will automatically adapt to the overridden definitions. People who wish to override should consult the source code to understand the impact and if they need to override any additional functions to achieve the desired behavior.

The upgradeable and solc-0.7 variants will be released together with the final release at the end of the release candidate period in about a week.


@frangio Nice work! Is the BeaconProxy something you would still use createClone with?

1 Like

Hi @larron,

Welcome to the community :wave:

I wasn’t sure what you meant by createClone, do you mean creating a BeaconProxy from Solidity?

@larron Do you mean as in the new Clones library for minimal proxies? If so, you can technically create clones of a beacon proxy but I don’t see a clear reason why you would do it.

1 Like

Yup, that’s what I meant. I was just curious if there would have been any savings or good reason to do so!

Thanks for your swift response.

1 Like

Hi guys, any news regarding this release?

1 Like

Hi @santisiri,

OpenZeppelin Contracts 3.4 has been released
:warning: Fix for potential reentrancy issues in custom ERC777 extensions
:building_construction: Virtual view functions
:arrow_heading_up: ERC20 permit in drafts
:loudspeaker: Beacon proxy
:factory: Minimal Proxy (Clones) library.

Install: npm install @openzeppelin/contracts