[Snyk] Upgrade @openzeppelin/contracts from 4.4.1 to 4.6.0#4
Open
[Snyk] Upgrade @openzeppelin/contracts from 4.4.1 to 4.6.0#4
Conversation
Snyk has created this PR to upgrade @openzeppelin/contracts from 4.4.1 to 4.6.0. See this package in npm: https://www.npmjs.com/package/@openzeppelin/contracts See this project in Snyk: https://app.snyk.io/org/torjc01/project/223351c9-ff0e-4eab-91af-4da39403a035?utm_source=github&utm_medium=referral&page=upgrade-pr
✅ Deploy Preview for elated-aryabhata-d0c610 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade @openzeppelin/contracts from 4.4.1 to 4.6.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version fixes:
SNYK-JS-OPENZEPPELINCONTRACTS-2336323
Why? Has a fix available, CVSS 5.3
(*) Note that the real score may have changed since the PR was raised.
Release notes
Package name: @openzeppelin/contracts
-
4.6.0 - 2022-04-26
-
4.6.0-rc.0 - 2022-03-31

-
4.5.0 - 2022-02-09
- Preset contracts are now deprecated in favor of Contracts Wizard. (#2986)
- Some more 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.
-
4.5.0-rc.0 - 2022-01-13
-
4.4.2 - 2022-01-11
⚠️ This is a patch for a medium severity issue. For more information visit the security advisory.
-
4.4.1 - 2021-12-14
⚠️ This is a patch for a low severity vulnerability. For more information visit the security advisory.
from @openzeppelin/contracts GitHub release notescrosschain: Add a new set of contracts for cross-chain applications.CrossChainEnabledis a base contract with instantiations for several chains and bridges, andAccessControlCrossChainis an extension of access control that allows cross-chain operation. (#3183)AccessControl: add a virtual_checkRole(bytes32)function that can be overridden to alter theonlyRolemodifier behavior. (#3137)EnumerableMap: add newAddressToUintMapmap type. (#3150)EnumerableMap: add newBytes32ToBytes32Mapmap type. (#3192)ERC20FlashMint: support infinite allowance when paying back a flash loan. (#3226)ERC20Wrapper: thedecimals()function now tries to fetch the value from the underlying token instance. If that calls revert, then the default value is used. (#3259)draft-ERC20Permit: replaceimmutablewithconstantfor_PERMIT_TYPEHASHsince thekeccak256of string literals is treated specially and the hash is evaluated at compile time. (#3196)ERC1155: Add a_afterTokenTransferhook for improved extensibility. (#3166)ERC1155URIStorage: add a new extension that implements a_setURIbehavior similar to ERC721's_setTokenURI. (#3210)DoubleEndedQueue: a new data structure that supports efficient push and pop to both front and back, useful for FIFO and LIFO queues. (#3153)Governor: improved security ofonlyGovernancemodifier when using an external executor contract (e.g. a timelock) that can operate without necessarily going through the governance protocol. (#3147)Governor: Add a way to parameterize votes. This can be used to implement voting systems such as fractionalized voting, ERC721 based voting, or any number of other systems. Theparamsargument added to_countVotemethod, and included in the newly added_getVotesmethod, can be used by counting and voting modules respectively for such purposes. (#3043)Governor: rewording of revert reason for consistency. (#3275)Governor: fix an inconsistency in data locations that could lead to invalid bytecode being produced. (#3295)Governor: ImplementIERC721ReceiverandIERC1155Receiverto improve token custody by governors. (#3230)TimelockController: ImplementIERC721ReceiverandIERC1155Receiverto improve token custody by timelocks. (#3230)TimelockController: Add a separate canceller role for the ability to cancel. (#3165)Initializable: add a reinitializer modifier that enables the initialization of new modules, added to already initialized contracts through upgradeability. (#3232)Initializable: add an Initialized event that tracks initialized version numbers. (#3294)ERC2981: makeroyaltiInfopublic to allow super call in overrides. (#3305)Upgradeability notice
TimelockController: (Action needed) The upgrade from <4.6 to >=4.6 introduces a newCANCELLER_ROLEthat requires set up to be assignable. After the upgrade, only addresses with this role will have the ability to cancel. Proposers will no longer be able to cancel. Assigning cancellers can be done by an admin (including the timelock itself) once the role admin is set up. To do this, we recommend upgrading to theTimelockControllerWith46MigrationUpgradeablecontract and then calling themigrateTo46function.Breaking changes
Governor: Adds internal virtual_getVotesmethod that must be implemented; this is a breaking change for existing concrete extensions toGovernor. To fix this on an existing voting module extension, renamegetVotesto_getVotesand add abytes memoryargument. (#3043)Governor: Addsparamsparameter to internal virtual_countVotemethod; this is a breaking change for existing concrete extensions toGovernor. To fix this on an existing counting module extension, add abytes memoryargument to_countVote. (#3043)Governor: Does not emitVoteCastevent when params data is non-empty; instead emitsVoteCastWithParamsevent. To fix this on an integration that consumes theVoteCastevent, also fetch/monitorVoteCastWithParamsevents. (#3043)Votes: The internal virtual function_getVotingUnitswas madeview(which was accidentally missing). Any overrides should now be updated so they areviewas well.This prerelease is now available for open review! Let us know your feedback and if you find any security issues.
We have a bug bounty with rewards of up to USD $25,000 and a special POAP for submitting a valid issue.
See the announcement for some more details.
ERC2981: add implementation of the royalty standard, and the respective extensions forERC721andERC1155. (#3012)GovernorTimelockControl: improve thestate()function to have it reflect cases where a proposal has been canceled directly on the timelock. (#2977)Governor: add a relay function to help recover assets sent to a governor that is not its own executor (e.g. when using a timelock). (#2926)GovernorPreventLateQuorum: add new module to ensure a minimum voting duration is available after the quorum is reached. (#2973)ERC721: improved revert reason when transferring from wrong owner. (#2975)Votes: Added a base contract for vote tracking with delegation. (#2944)ERC721Votes: Added an extension of ERC721 enabled with vote tracking and delegation. (#2944)ERC2771Context: use immutable storage to store the forwarder address, no longer an issue since Solidity >=0.8.8 allows reading immutable variables in the constructor. (#2917)Base64: add a library to parse bytes into base64 strings usingencode(bytes memory)function, and provide examples to show how to use to build URL-safetokenURIs. (#2884)ERC20: reduce allowance before triggering transfer. (#3056)ERC20: do not update allowance ontransferFromwhen allowance istype(uint256).max. (#3085)ERC20: add a_spendAllowanceinternal function. (#3170)ERC20Burnable: do not update allowance onburnFromwhen allowance istype(uint256).max. (#3170)ERC777: do not update allowance ontransferFromwhen allowance istype(uint256).max. (#3085)ERC777: add a_spendAllowanceinternal function. (#3170)SignedMath: a new signed version of the Math library withmax,min, andaverage. (#2686)SignedMath: add aabs(int256)method that returns the unsigned absolute value of a signed value. (#2984)ERC1967Upgrade: Refactor the secure upgrade to useERC1822instead of the previous rollback mechanism. This reduces code complexity and attack surface with similar security guarantees. (#3021)UUPSUpgradeable: AddERC1822compliance to support the updated secure upgrade mechanism. (#3021)Breaking changes
ERC1967Upgrade: The function_upgradeToAndCallSecurewas renamed to_upgradeToAndCallUUPS, along with the change in security mechanism described above.Address: The Solidity pragma is increased from^0.8.0to^0.8.1. This is required by theaccount.code.lengthsyntax that replaces inline assembly. This may require users to bump their compiler version from0.8.0to0.8.1or later. Note that other parts of the code already include stricter requirements.This prerelease is now available for review! Let us know your feedback and if you find any security issues.
We have a bug bounty with rewards of up to USD $25,000 and a special POAP for submitting a valid issue.
See the announcement for some more details.
GovernorCompatibilityBravo: Fix error in the encoding of calldata for proposals submitted through the compatibility interface with explicit signatures. (#3100)Initializable: change the existinginitializermodifier and add a newonlyInitializingmodifier to prevent reentrancy risk. (#3006)Breaking change
It is no longer possible to call an
initializer-protected function from within anotherinitializerfunction outside the context of a constructor. Projects using OpenZeppelin upgradeable proxies should continue to work as is, since in the common case the initializer is invoked in the constructor directly. If this is not the case for you, the suggested change is to use the newonlyInitializingmodifier in the following way:contract A { - function initialize() public initializer { ... } + function initialize() internal onlyInitializing { ... } } contract B is A { function initialize() public initializer { A.initialize(); } }Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs