Skip to content

Bump @openzeppelin/contracts from 2.5.0 to 3.1.0#16

Closed
dependabot-preview[bot] wants to merge 1 commit intomasterfrom
dependabot/npm_and_yarn/openzeppelin/contracts-3.1.0
Closed

Bump @openzeppelin/contracts from 2.5.0 to 3.1.0#16
dependabot-preview[bot] wants to merge 1 commit intomasterfrom
dependabot/npm_and_yarn/openzeppelin/contracts-3.1.0

Conversation

@dependabot-preview
Copy link
Contributor

@dependabot-preview dependabot-preview bot commented Jun 24, 2020

Bumps @openzeppelin/contracts from 2.5.0 to 3.1.0.

Release notes

Sourced from @openzeppelin/contracts's releases.

OpenZeppelin Contracts 3.0.1

This is a small bugfix release, addressing an issue that allowed for some internal functions in ERC777 to be called with the zero address as one of their arguments.

This was reported in OpenZeppelin/openzeppelin-contracts#2208, fixed in OpenZeppelin/openzeppelin-contracts#2212 for the v2.5 branch, and ported to the v3.0 branch in OpenZeppelin/openzeppelin-contracts#2213.

OpenZeppelin Contracts 3.0

We're thrilled to finally announce the release of OpenZeppelin Contracts v3.0

Among other things, this release features the migration to Solidity v0.6, as well as a revamped access control system, streamlined token contracts, and new libraries for enumerable mappings.

To install this latest release, run:

npm install --save-dev @openzeppelin/contracts

What's New

  • All contracts were migrated to Solidity v0.6.
  • AccessControl was designed with help from the community and has replaced Roles contracts (such as MinterRole and PauserRole), which were removed.
  • Crowdsales were removed: we'll continue to provide support for security issues on the v2.5 release, but will not bring them over to v3.0.
  • We've added hooks, a new feature of the library that will make extending it easier than ever.
  • ERC20 and ERC721 were simplified and streamlined, including all optional parts of the standard by default, and simplifying some of our own custom extensions.
  • Support for better mapping types that let you efficiently iterate over all keys using EnumerableSet and EnumerableMap
  • Many, many breaking changes with small improvements. We've also moved some contracts around (e.g. Ownable is now found under the access directory) and deleted some that were not being used. Head to our changelog to see the full list.

Compiling v0.6 Contracts

You can use the OpenZeppelin CLI to compile any Solidity v0.6 contract: just update the pragma statement on your source code and you'll be good to go!

pragma solidity ^0.6.0;

Note that you will need to use the v2.7 release of the CLI or newer to have Solidity v0.6 support. For detailed information about using the CLI compiler, head to its documenation.

Revamped Access Control

One of our most widely-used contracts is Ownable, providing a simple authorization scheme. However, this fell short in complex systems with multiple permissions.

The v3.0 release introduces AccessControl, a one-stop-shop for all authorization needs. It lets you easily define multiple roles with different permissions, as well as which accounts are allowed to grant and revoke each role. It also boosts transparency by enabling enumeration of all privileged accounts in a system.

AccessControl was designed with a security-first mindset, receiving input from a wide array of users and incorporating best practices in the field. Head to our Access Control guide for more information!

Preset Contracts

OpenZeppelin Contracts shine when you need the building blocks to get to the right feature set, but that's not all they can do! We've added a new family of Preset contracts starting with ERC20 and ERC721 tokens that you can quickly deploy as-is without having to write any Solidity code. Check out their documentation!

Migrating From OpenZeppelin Contracts v2.5

Changelog

Sourced from @openzeppelin/contracts's changelog.

3.1.0 (2020-06-23)

New features

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

Improvements

  • ReentrancyGuard: reduced overhead of using the nonReentrant modifier. (#2171)
  • AccessControl: added a RoleAdminChanged event to _setAdminRole. (#2214)
  • Made all public functions in the token preset contracts virtual. (#2257)

Deprecations

  • SafeERC20: deprecated safeApprove. (#2268)

3.0.2 (2020-06-08)

Improvements

  • Added SPX license identifier to all contracts. (#2235)

3.0.1 (2020-04-27)

Bugfixes

  • ERC777: fixed the _approve internal function not validating some of their arguments for non-zero addresses. (#2213)

3.0.0 (2020-04-20)

New features

  • AccessControl: new contract for managing permissions in a system, replacement for Ownable and Roles. (#2112)
  • SafeCast: new functions to convert to and from signed and unsigned values: toUint256 and toInt256. (#2123)
  • EnumerableMap: a new data structure for key-value pairs (like mapping) that can be iterated over. (#2160)

Breaking changes

  • ERC721: burn(owner, tokenId) was removed, use burn(tokenId) instead. (#2125)
  • ERC721: _checkOnERC721Received was removed. (#2125)
  • ERC721: _transferFrom and _safeTransferFrom were renamed to _transfer and _safeTransfer. (#2162)
  • Ownable: removed _transferOwnership. (#2162)
  • PullPayment, Escrow: withdrawWithGas was removed. The old withdraw function now forwards all gas. (#2125)
  • Roles was removed, use AccessControl as a replacement. (#2112)
  • ECDSA: when receiving an invalid signature, recover now reverts instead of returning the zero address. (#2114)
  • Create2: added an amount argument to deploy for contracts with payable constructors. (#2117)
  • Pausable: moved to the utils directory. (#2122)
  • Strings: moved to the utils directory. (#2122)
  • Counters: moved to the utils directory. (#2122)
  • SignedSafeMath: moved to the math directory. (#2122)
  • ERC20Snapshot: moved to the token/ERC20 directory. snapshot was changed into an internal function. (#2122)
  • Ownable: moved to the access directory. (#2120)
  • Ownable: removed isOwner. (#2120)
  • Secondary: removed from the library, use Ownable instead. (#2120)
  • Escrow, ConditionalEscrow, RefundEscrow: these now use Ownable instead of Secondary, their external API changed accordingly. (#2120)
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Jun 24, 2020
@dependabot-preview dependabot-preview bot force-pushed the dependabot/npm_and_yarn/openzeppelin/contracts-3.1.0 branch from a27b07b to 854558f Compare July 24, 2020 02:11
@dependabot-preview
Copy link
Contributor Author

Superseded by #42.

@dependabot-preview dependabot-preview bot deleted the dependabot/npm_and_yarn/openzeppelin/contracts-3.1.0 branch September 11, 2020 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants