thehubbleproject / hubble-contracts

Hubble optimistic rollup
https://thehubbleproject.github.io/docs/
MIT License
133 stars 28 forks source link

Bump @openzeppelin/contracts from 3.4.2 to 4.4.1 #675

Closed dependabot[bot] closed 2 years ago

dependabot[bot] commented 2 years ago

Bumps @openzeppelin/contracts from 3.4.2 to 4.4.1.

Release notes

Sourced from @​openzeppelin/contracts's releases.

v4.4.1

:warning: This is a patch for a low severity vulnerability. For more information visit the security advisory.

  • Initializable: change the existing initializer modifier and add a new onlyInitializing modifier to prevent reentrancy risk. (#3006)

Breaking change

It is no longer possible to call an initializer-protected function from within another initializer function 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 new onlyInitializing modifier in the following way:

 contract A {
-    function initialize() public   initializer { ... }
+    function initialize() internal onlyInitializing { ... }
 }
 contract B is A {
     function initialize() public initializer {
         A.initialize();
     }
 }

v4.4.0

Check out the first OpenZeppelin Community Call where the team discussed everything that is included in this release.

And if you missed it, we recently announced an official bug bounty program for OpenZeppelin Contracts. Check it out!

  • Ownable: add an internal _transferOwnership(address). (#2568)
  • AccessControl: add internal _grantRole(bytes32,address) and _revokeRole(bytes32,address). (#2568)
  • AccessControl: mark _setupRole(bytes32,address) as deprecated in favor of _grantRole(bytes32,address). (#2568)
  • AccessControlEnumerable: hook into _grantRole(bytes32,address) and _revokeRole(bytes32,address). (#2946)
  • EIP712: cache address(this) to immutable storage to avoid potential issues if a vanilla contract is used in a delegatecall context. (#2852)
  • Add internal _setApprovalForAll to ERC721 and ERC1155. (#2834)
  • Governor: shift vote start and end by one block to better match Compound's GovernorBravo and prevent voting at the Governor level if the voting snapshot is not ready. (#2892)
  • GovernorCompatibilityBravo: consider quorum an inclusive rather than exclusive minimum to match Compound's GovernorBravo. (#2974)
  • GovernorSettings: a new governor module that manages voting settings updatable through governance actions. (#2904)
  • PaymentSplitter: now supports ERC20 assets in addition to Ether. (#2858)
  • ECDSA: add a variant of toEthSignedMessageHash for arbitrary length message hashing. (#2865)
  • MerkleProof: add a processProof function that returns the rebuilt root hash given a leaf and a proof. (#2841)
  • VestingWallet: new contract that handles the vesting of Ether and ERC20 tokens following a customizable vesting schedule. (#2748)
  • Governor: enable receiving Ether when a Timelock contract is not used. (#2748)
  • GovernorTimelockCompound: fix ability to use Ether stored in the Timelock contract. (#2748)

v4.3.3

:warning: This is a security patch. For more information visit the security advisory.

  • ERC1155Supply: Handle totalSupply changes by hooking into _beforeTokenTransfer to ensure consistency of balances and supply during IERC1155Receiver.onERC1155Received calls.

v4.3.2

:warning: This is a security patch. For more information visit the security advisory.

... (truncated)

Changelog

Sourced from @​openzeppelin/contracts's changelog.

4.4.1 (2021-12-14)

  • Initializable: change the existing initializer modifier and add a new onlyInitializing modifier to prevent reentrancy risk. (#3006)

Breaking change

It is no longer possible to call an initializer-protected function from within another initializer function 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 new onlyInitializing modifier in the following way:

 contract A {
-    function initialize() public   initializer { ... }
+    function initialize() internal onlyInitializing { ... }
 }
 contract B is A {
     function initialize() public initializer {
         A.initialize();
     }
 }

4.4.0 (2021-11-25)

  • Ownable: add an internal _transferOwnership(address). (#2568)
  • AccessControl: add internal _grantRole(bytes32,address) and _revokeRole(bytes32,address). (#2568)
  • AccessControl: mark _setupRole(bytes32,address) as deprecated in favor of _grantRole(bytes32,address). (#2568)
  • AccessControlEnumerable: hook into _grantRole(bytes32,address) and _revokeRole(bytes32,address). (#2946)
  • EIP712: cache address(this) to immutable storage to avoid potential issues if a vanilla contract is used in a delegatecall context. (#2852)
  • Add internal _setApprovalForAll to ERC721 and ERC1155. (#2834)
  • Governor: shift vote start and end by one block to better match Compound's GovernorBravo and prevent voting at the Governor level if the voting snapshot is not ready. (#2892)
  • GovernorCompatibilityBravo: consider quorum an inclusive rather than exclusive minimum to match Compound's GovernorBravo. (#2974)
  • GovernorSettings: a new governor module that manages voting settings updatable through governance actions. (#2904)
  • PaymentSplitter: now supports ERC20 assets in addition to Ether. (#2858)
  • ECDSA: add a variant of toEthSignedMessageHash for arbitrary length message hashing. (#2865)
  • MerkleProof: add a processProof function that returns the rebuilt root hash given a leaf and a proof. (#2841)
  • VestingWallet: new contract that handles the vesting of Ether and ERC20 tokens following a customizable vesting schedule. (#2748)
  • Governor: enable receiving Ether when a Timelock contract is not used. (#2748)
  • GovernorTimelockCompound: fix ability to use Ether stored in the Timelock contract. (#2748)

4.3.3

  • ERC1155Supply: Handle totalSupply changes by hooking into _beforeTokenTransfer to ensure consistency of balances and supply during IERC1155Receiver.onERC1155Received calls.

4.3.2 (2021-09-14)

  • UUPSUpgradeable: Add modifiers to prevent upgradeTo and upgradeToAndCall being executed on any contract that is not the active ERC1967 proxy. This prevents these functions being called on implementation contracts or minimal ERC1167 clones, in particular.

4.3.1 (2021-08-26)

  • TimelockController: Add additional isOperationReady check.

... (truncated)

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) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/thehubbleproject/hubble-contracts/network/alerts).
jacque006 commented 2 years ago

DepositManager.sol and Vault.sol are the only two contracts in this repo that use initializer. They are both guarded by onlyOwner and do not make any nested calls so we should be safe to skip this patch. We also cannot upgrade to @openzeppelin/contracts@4 unless we upgrade hubble's solidity version.

Going to get a second set of :eyes: to confirm.

ChihChengLiang commented 2 years ago

I agree. Looks fine to skip this patch

dependabot[bot] commented 2 years ago

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.