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
78

2.5.0

Diff

Changelog

Source

2.5.0 (2020-02-04)

New features

  • SafeCast.toUintXX: new library for integer downcasting, which allows for safe operation on smaller types (e.g. uint32) when combined with SafeMath. (#1926)
  • ERC721Metadata: added baseURI, which can be used for dramatic gas savings when all token URIs share a prefix (e.g. http://api.myapp.com/tokens/<id>). (#1970)
  • EnumerableSet: new library for storing enumerable sets of values. Only AddressSet is supported in this release. (#2061)
  • Create2: simple library to make usage of the CREATE2 opcode easier. (#1744)

Improvements

  • ERC777: _burn is now internal, providing more flexibility and making it easier to create tokens that deflate. (#1908)
  • ReentrancyGuard: greatly improved gas efficiency by using the net gas metering mechanism introduced in the Istanbul hardfork. (#1992, #1996)
  • ERC777: improve extensibility by making _send and related functions internal. (#2027)
  • ERC721: improved revert reason when transferring tokens to a non-recipient contract. (#2018)

Breaking changes

  • ERC165Checker now requires a minimum Solidity compiler version of 0.5.10. (#1829)
nventuro
published 2.5.0-rc.0 •

frangio
published 2.4.0 •

Changelog

Source

2.4.0 (2019-10-29)

New features

  • Address.toPayable: added a helper to convert between address types without having to resort to low-level casting. (#1773)
  • Facilities to make metatransaction-enabled contracts through the Gas Station Network. (#1844)
  • Address.sendValue: added a replacement to Solidity's transfer, removing the fixed gas stipend. (#1962)
  • Added replacement for functions that don't forward all gas (which have been deprecated): (#1976)
    • PullPayment.withdrawPaymentsWithGas(address payable payee)
    • Escrow.withdrawWithGas(address payable payee)
  • SafeMath: added support for custom error messages to sub, div and mod functions. (#1828)

Improvements

  • Address.isContract: switched from extcodesize to extcodehash for less gas usage. (#1802)
  • ERC20 and ERC777 updated to throw custom errors on subtraction overflows. (#1828)

Deprecations

  • Deprecated functions that don't forward all gas: (#1976)
    • PullPayment.withdrawPayments(address payable payee)
    • Escrow.withdraw(address payable payee)

Breaking changes

  • Address now requires a minimum Solidity compiler version of 0.5.5. (#1802)
  • SignatureBouncer has been removed from drafts, both to avoid confusions with the GSN and GSNRecipientSignature (previously called GSNBouncerSignature) and because the API was not very clear. (#1879)
frangio
published 2.4.0-beta.2 •

frangio
published 2.4.0-beta.1 •

frangio
published 2.4.0-beta.0 •

frangio
published 2.3.0 •

Changelog

Source

2.3.0 (2019-05-27)

New features

  • ERC1820: added support for interacting with the ERC1820 registry contract (IERC1820Registry), as well as base contracts that can be registered as implementers there. (#1677)
  • ERC777: support for the ERC777 token, which has multiple improvements over ERC20 (but is backwards compatible with it) such as built-in burning, a more straightforward permission system, and optional sender and receiver hooks on transfer (mandatory for contracts!). (#1684)
  • All contracts now have revert reason strings, which give insight into error conditions, and help debug failing transactions. (#1704)

Improvements

  • Reverted the Solidity version bump done in v2.2.0, setting the minimum compiler version to v0.5.0, to prevent unexpected build breakage. Users are encouraged however to stay on top of new compiler releases, which usually include bugfixes. (#1729)

Bugfixes

  • PostDeliveryCrowdsale: some validations where skipped when paired with other crowdsale flavors, such as AllowanceCrowdsale, or MintableCrowdsale and ERC20Capped, which could cause buyers to not be able to claim their purchased tokens. (#1721)
  • ERC20._transfer: the from argument was allowed to be the zero address, so it was possible to internally trigger a transfer of 0 tokens from the zero address. This address is not a valid destinatary of transfers, nor can it give or receive allowance, so this behavior was inconsistent. It now reverts. (#1752)
1
78
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