Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@openzeppelin/contracts

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openzeppelin/contracts - npm Package Versions

1
9

4.0.0

Diff

Changelog

Source

4.0.0 (2021-03-23)

  • Now targeting the 0.8.x line of Solidity compilers. For 0.6.x (resp 0.7.x) support, use version 3.4.0 (resp 3.4.0-solc-0.7) of OpenZeppelin.
  • Context: making _msgData return bytes calldata instead of bytes memory (#2492)
  • ERC20: removed the _setDecimals function and the storage slot associated to decimals. (#2502)
  • Strings: addition of a toHexString function. (#2504)
  • EnumerableMap: change implementation to optimize for key → value lookups instead of enumeration. (#2518)
  • GSN: deprecate GSNv1 support in favor of upcoming support for GSNv2. (#2521)
  • ERC165: remove uses of storage in the base ERC165 implementation. ERC165 based contracts now use storage-less virtual functions. Old behavior remains available in the ERC165Storage extension. (#2505)
  • Initializable: make initializer check stricter during construction. (#2531)
  • ERC721: remove enumerability of tokens from the base implementation. This feature is now provided separately through the ERC721Enumerable extension. (#2511)
  • AccessControl: removed enumerability by default for a more lightweight contract. It is now opt-in through AccessControlEnumerable. (#2512)
  • Meta Transactions: add ERC2771Context and a MinimalForwarder for meta-transactions. (#2508)
  • Overall reorganization of the contract folder to improve clarity and discoverability. (#2503)
  • ERC20Capped: optimize gas usage by enforcing the check directly in _mint. (#2524)
  • Rename UpgradeableProxy to ERC1967Proxy. (#2547)
  • ERC777: optimize the gas costs of the constructor. (#2551)
  • ERC721URIStorage: add a new extension that implements the _setTokenURI behavior as it was available in 3.4.0. (#2555)
  • AccessControl: added ERC165 interface detection. (#2562)
  • ERC1155: make uri public so overloading function can call it using super. (#2576)

Bug fixes for beta releases

  • AccessControlEnumerable: Fixed renounceRole not updating enumerable set of addresses for a role. (#2572)

How to upgrade from 3.x

Since this version has moved a few contracts to different directories, users upgrading from a previous version will need to adjust their import statements. To make this easier, the package includes a script that will migrate import statements automatically. After upgrading to the latest version of the package, run:

npx openzeppelin-contracts-migrate-imports

Make sure you're using git or another version control system to be able to recover from any potential error in our script.

amxx
published 4.0.0-rc.0 •

frangio
published 3.4.1-solc-0.7-2 •

frangio
published 3.4.1-solc-0.7 •

frangio
published 3.4.1 •

Changelog

Source

3.4.1 (2021-03-03)

  • ERC721: made _approve an internal function (was private).
frangio
published 4.0.0-beta.1 •

frangio
published 4.0.0-beta.0 •

frangio
published 3.4.0-solc-0.7 •

frangio
published 3.4.0 •

Changelog

Source

3.4.0 (2021-02-02)

  • 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.

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 security@openzeppelin.com. Read more in the pull request.

frangio
published 3.4.0-rc.0 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc