@openzeppelin/contracts
Advanced tools
Changelog
3.2.0 (2020-09-10)
Aside from upgrading them from Solidity 0.5 to 0.6, we've changed a few minor things from the proxy contracts as they were found in OpenZeppelin SDK.
UpgradeabilityProxy
was renamed to UpgradeableProxy
.AdminUpgradeabilityProxy
was renamed to TransparentUpgradeableProxy
.Proxy._willFallback
was renamed to Proxy._beforeFallback
.UpgradeabilityProxy._setImplementation
and AdminUpgradeabilityProxy._setAdmin
were made private.Address.isContract
: switched from extcodehash
to extcodesize
for less gas usage. (#2311)ERC20Snapshot
: switched to using _beforeTokenTransfer
hook instead of overriding ERC20 operations. (#2312)This small change in the way we implemented ERC20Snapshot
may affect users who are combining this contract with
other ERC20 flavors, since it no longer overrides _transfer
, _mint
, and _burn
. This can result in having to remove Solidity override(...)
specifiers in derived contracts for these functions, and to instead have to add it for _beforeTokenTransfer
. See Using Hooks in the documentation.
Changelog
3.1.0 (2020-06-23)
SafeCast
: added functions to downcast signed integers (e.g. toInt32
), improving usability of SignedSafeMath
. (#2243)functionCall
: new helpers that replicate Solidity's function call semantics, reducing the need to rely on call
. (#2264)ERC1155
: added support for a base implementation, non-standard extensions and a preset contract. (#2014, #2230)ReentrancyGuard
: reduced overhead of using the nonReentrant
modifier. (#2171)AccessControl
: added a RoleAdminChanged
event to _setAdminRole
. (#2214)public
functions in the token preset contracts virtual
. (#2257)SafeERC20
: deprecated safeApprove
. (#2268)