Преглед на файлове

Merge release-v5.2 branch (#5424)

Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Sam Bugs <101145325+0xsambugs@users.noreply.github.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
Co-authored-by: wizard <112275929+famouswizard@users.noreply.github.com>
Co-authored-by: leopardracer <136604165+leopardracer@users.noreply.github.com>
Co-authored-by: cairo <cairoeth@protonmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Francisco Giordano <fg@frang.io>
Co-authored-by: Simka <0xsimka@gmail.com>
Co-authored-by: Voronor <129545215+voronor@users.noreply.github.com>
github-actions[bot] преди 9 месеца
родител
ревизия
7b74442c5e
променени са 42 файла, в които са добавени 71 реда и са изтрити 79 реда
  1. 0 5
      .changeset/eighty-hounds-promise.md
  2. 0 5
      .changeset/four-chairs-help.md
  3. 0 5
      .changeset/great-lions-hear.md
  4. 0 5
      .changeset/healthy-books-shout.md
  5. 0 5
      .changeset/hot-shrimps-wait.md
  6. 0 5
      .changeset/lovely-dodos-lay.md
  7. 0 5
      .changeset/pink-wasps-hammer.md
  8. 0 5
      .changeset/proud-planes-arrive.md
  9. 0 5
      .changeset/seven-donkeys-tap.md
  10. 0 5
      .changeset/small-seahorses-bathe.md
  11. 0 5
      .changeset/tricky-bats-pretend.md
  12. 0 5
      .changeset/weak-roses-bathe.md
  13. 42 0
      CHANGELOG.md
  14. 1 0
      contracts/account/utils/draft-ERC4337Utils.sol
  15. 1 0
      contracts/account/utils/draft-ERC7579Utils.sol
  16. 1 1
      contracts/finance/VestingWallet.sol
  17. 1 1
      contracts/governance/Governor.sol
  18. 1 0
      contracts/governance/extensions/GovernorCountingOverridable.sol
  19. 1 1
      contracts/governance/extensions/GovernorPreventLateQuorum.sol
  20. 1 1
      contracts/governance/utils/Votes.sol
  21. 1 0
      contracts/governance/utils/VotesExtended.sol
  22. 1 0
      contracts/interfaces/draft-IERC4337.sol
  23. 1 0
      contracts/interfaces/draft-IERC7579.sol
  24. 1 1
      contracts/package.json
  25. 1 1
      contracts/proxy/Clones.sol
  26. 1 1
      contracts/proxy/ERC1967/ERC1967Proxy.sol
  27. 1 1
      contracts/proxy/ERC1967/ERC1967Utils.sol
  28. 1 1
      contracts/proxy/beacon/BeaconProxy.sol
  29. 1 1
      contracts/proxy/transparent/ProxyAdmin.sol
  30. 1 1
      contracts/proxy/transparent/TransparentUpgradeableProxy.sol
  31. 1 1
      contracts/proxy/utils/UUPSUpgradeable.sol
  32. 1 1
      contracts/token/ERC20/ERC20.sol
  33. 1 1
      contracts/token/ERC20/extensions/ERC1363.sol
  34. 1 1
      contracts/token/ERC20/utils/SafeERC20.sol
  35. 1 1
      contracts/utils/Address.sol
  36. 1 0
      contracts/utils/Bytes.sol
  37. 1 0
      contracts/utils/CAIP10.sol
  38. 1 0
      contracts/utils/CAIP2.sol
  39. 1 0
      contracts/utils/NoncesKeyed.sol
  40. 1 1
      contracts/utils/Packing.sol
  41. 1 1
      contracts/utils/Strings.sol
  42. 1 1
      package.json

+ 0 - 5
.changeset/eighty-hounds-promise.md

@@ -1,5 +0,0 @@
----
-'openzeppelin-solidity': minor
----
-
-`Strings`: Add `parseUint`, `parseInt`, `parseHexUint` and `parseAddress` to parse strings into numbers and addresses. Also provide variants of these functions that parse substrings, and `tryXxx` variants that do not revert on invalid input.

+ 0 - 5
.changeset/four-chairs-help.md

@@ -1,5 +0,0 @@
----
-"openzeppelin-solidity": minor
----
-
-`Clones`: Add `cloneWithImmutableArgs` and `cloneDeterministicWithImmutableArgs` variants that create clones with per-instance immutable arguments. The immutable arguments can be retrieved using `fetchCloneArgs`. The corresponding `predictDeterministicWithImmutableArgs` function is also included.

+ 0 - 5
.changeset/great-lions-hear.md

@@ -1,5 +0,0 @@
----
-'openzeppelin-solidity': patch
----
-
-`VotesExtended`: Create an extension of `Votes` which checkpoints balances and delegates.

+ 0 - 5
.changeset/healthy-books-shout.md

@@ -1,5 +0,0 @@
----
-'openzeppelin-solidity': minor
----
-
-`CAIP2` and `CAIP10`: Add libraries for formatting and parsing CAIP-2 and CAIP-10 identifiers.

+ 0 - 5
.changeset/hot-shrimps-wait.md

@@ -1,5 +0,0 @@
----
-'openzeppelin-solidity': minor
----
-
-`Packing`: Add variants for packing `bytes10` and `bytes22`

+ 0 - 5
.changeset/lovely-dodos-lay.md

@@ -1,5 +0,0 @@
----
-'openzeppelin-solidity': minor
----
-
-`NoncesKeyed`: Add a variant of `Nonces` that implements the ERC-4337 entrypoint nonce system.

+ 0 - 5
.changeset/pink-wasps-hammer.md

@@ -1,5 +0,0 @@
----
-'openzeppelin-solidity': patch
----
-
-`GovernorCountingOverridable`: Add a governor counting module that enables token holders to override the vote of their delegate.

+ 0 - 5
.changeset/proud-planes-arrive.md

@@ -1,5 +0,0 @@
----
-'openzeppelin-solidity': minor
----
-
-`Bytes`: Add a library of common operations that operate on `bytes` objects.

+ 0 - 5
.changeset/seven-donkeys-tap.md

@@ -1,5 +0,0 @@
----
-'openzeppelin-solidity': patch
----
-
-Update some pragma directives to ensure that all file requirements match that of the files they import.

+ 0 - 5
.changeset/small-seahorses-bathe.md

@@ -1,5 +0,0 @@
----
-'openzeppelin-solidity': minor
----
-
-`ERC7579Utils`: Add a reusable library to interact with ERC-7579 modular accounts

+ 0 - 5
.changeset/tricky-bats-pretend.md

@@ -1,5 +0,0 @@
----
-'openzeppelin-solidity': minor
----
-
-`ERC1363Utils`: Add helper similar to the existing `ERC721Utils` and `ERC1155Utils`

+ 0 - 5
.changeset/weak-roses-bathe.md

@@ -1,5 +0,0 @@
----
-'openzeppelin-solidity': minor
----
-
-`ERC4337Utils`: Add a reusable library to manipulate user operations and interact with ERC-4337 contracts

+ 42 - 0
CHANGELOG.md

@@ -1,5 +1,47 @@
 # Changelog
 
+## 5.2.0 (2025-01-08)
+
+### Breaking Changes
+
+#### Custom error changes
+
+This version comes with changes to the custom error identifiers. Contracts previously depending on the following errors should be replaced accordingly:
+
+- Replace `Errors.FailedCall` with a bubbled-up revert reason in `Address.sendValue`.
+
+### Changes by category
+
+#### General
+
+- Update some pragma directives to ensure that all file requirements match that of the files they import. ([#5273](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5273))
+
+#### Account
+
+- `ERC4337Utils`: Add a reusable library to manipulate user operations and interact with ERC-4337 contracts ([#5274](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5274))
+- `ERC7579Utils`: Add a reusable library to interact with ERC-7579 modular accounts ([#5274](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5274))
+
+#### Governance
+
+- `GovernorCountingOverridable`: Add a governor counting module that enables token holders to override the vote of their delegate. ([#5192](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5192))
+- `VotesExtended`: Create an extension of `Votes` which checkpoints balances and delegates. ([#5192](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5192))
+
+### Proxy
+
+- `Clones`: Add `cloneWithImmutableArgs` and `cloneDeterministicWithImmutableArgs` variants that create clones with per-instance immutable arguments. The immutable arguments can be retrieved using `fetchCloneArgs`. The corresponding `predictDeterministicWithImmutableArgs` function is also included. ([#5109](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5109))
+
+### Tokens
+
+- `ERC1363Utils`: Add helper similar to the existing `ERC721Utils` and `ERC1155Utils` ([#5133](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5133))
+
+### Utils
+
+- `Address`: bubble up revert data on `sendValue` failed call ([#5418](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5418))
+- `Bytes`: Add a library of common operations that operate on `bytes` objects. ([#5252](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5252))
+- `CAIP2` and `CAIP10`: Add libraries for formatting and parsing CAIP-2 and CAIP-10 identifiers. ([#5252](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5252))
+- `NoncesKeyed`: Add a variant of `Nonces` that implements the ERC-4337 entrypoint nonce system. ([#5272](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5272))
+- `Packing`: Add variants for packing `bytes10` and `bytes22` ([#5274](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5274))
+- `Strings`: Add `parseUint`, `parseInt`, `parseHexUint` and `parseAddress` to parse strings into numbers and addresses. Also provide variants of these functions that parse substrings, and `tryXxx` variants that do not revert on invalid input. ([#5166](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5166))
 
 ## 5.1.0 (2024-10-17)
 

+ 1 - 0
contracts/account/utils/draft-ERC4337Utils.sol

@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: MIT
+// OpenZeppelin Contracts (last updated v5.2.0) (account/utils/draft-ERC4337Utils.sol)
 
 pragma solidity ^0.8.20;
 

+ 1 - 0
contracts/account/utils/draft-ERC7579Utils.sol

@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: MIT
+// OpenZeppelin Contracts (last updated v5.2.0) (account/utils/draft-ERC7579Utils.sol)
 
 pragma solidity ^0.8.20;
 

+ 1 - 1
contracts/finance/VestingWallet.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (finance/VestingWallet.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (finance/VestingWallet.sol)
 pragma solidity ^0.8.20;
 
 import {IERC20} from "../token/ERC20/IERC20.sol";

+ 1 - 1
contracts/governance/Governor.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (governance/Governor.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (governance/Governor.sol)
 
 pragma solidity ^0.8.20;
 

+ 1 - 0
contracts/governance/extensions/GovernorCountingOverridable.sol

@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: MIT
+// OpenZeppelin Contracts (last updated v5.2.0) (governance/extensions/GovernorCountingOverridable.sol)
 
 pragma solidity ^0.8.20;
 

+ 1 - 1
contracts/governance/extensions/GovernorPreventLateQuorum.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorPreventLateQuorum.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (governance/extensions/GovernorPreventLateQuorum.sol)
 
 pragma solidity ^0.8.20;
 

+ 1 - 1
contracts/governance/utils/Votes.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (governance/utils/Votes.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (governance/utils/Votes.sol)
 pragma solidity ^0.8.20;
 
 import {IERC5805} from "../../interfaces/IERC5805.sol";

+ 1 - 0
contracts/governance/utils/VotesExtended.sol

@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: MIT
+// OpenZeppelin Contracts (last updated v5.2.0) (governance/utils/VotesExtended.sol)
 pragma solidity ^0.8.20;
 
 import {Checkpoints} from "../../utils/structs/Checkpoints.sol";

+ 1 - 0
contracts/interfaces/draft-IERC4337.sol

@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: MIT
+// OpenZeppelin Contracts (last updated v5.2.0) (interfaces/draft-IERC4337.sol)
 
 pragma solidity ^0.8.20;
 

+ 1 - 0
contracts/interfaces/draft-IERC7579.sol

@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: MIT
+// OpenZeppelin Contracts (last updated v5.2.0) (interfaces/draft-IERC7579.sol)
 pragma solidity ^0.8.20;
 
 import {PackedUserOperation} from "./draft-IERC4337.sol";

+ 1 - 1
contracts/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@openzeppelin/contracts",
   "description": "Secure Smart Contract library for Solidity",
-  "version": "5.1.0",
+  "version": "5.2.0",
   "files": [
     "**/*.sol",
     "/build/contracts/*.json",

+ 1 - 1
contracts/proxy/Clones.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (proxy/Clones.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (proxy/Clones.sol)
 
 pragma solidity ^0.8.20;
 

+ 1 - 1
contracts/proxy/ERC1967/ERC1967Proxy.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (proxy/ERC1967/ERC1967Proxy.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Proxy.sol)
 
 pragma solidity ^0.8.22;
 

+ 1 - 1
contracts/proxy/ERC1967/ERC1967Utils.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (proxy/ERC1967/ERC1967Utils.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Utils.sol)
 
 pragma solidity ^0.8.22;
 

+ 1 - 1
contracts/proxy/beacon/BeaconProxy.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (proxy/beacon/BeaconProxy.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (proxy/beacon/BeaconProxy.sol)
 
 pragma solidity ^0.8.22;
 

+ 1 - 1
contracts/proxy/transparent/ProxyAdmin.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (proxy/transparent/ProxyAdmin.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/ProxyAdmin.sol)
 
 pragma solidity ^0.8.22;
 

+ 1 - 1
contracts/proxy/transparent/TransparentUpgradeableProxy.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (proxy/transparent/TransparentUpgradeableProxy.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/TransparentUpgradeableProxy.sol)
 
 pragma solidity ^0.8.22;
 

+ 1 - 1
contracts/proxy/utils/UUPSUpgradeable.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (proxy/utils/UUPSUpgradeable.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (proxy/utils/UUPSUpgradeable.sol)
 
 pragma solidity ^0.8.22;
 

+ 1 - 1
contracts/token/ERC20/ERC20.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/ERC20.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/ERC20.sol)
 
 pragma solidity ^0.8.20;
 

+ 1 - 1
contracts/token/ERC20/extensions/ERC1363.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/ERC1363.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/extensions/ERC1363.sol)
 
 pragma solidity ^0.8.20;
 

+ 1 - 1
contracts/token/ERC20/utils/SafeERC20.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/utils/SafeERC20.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol)
 
 pragma solidity ^0.8.20;
 

+ 1 - 1
contracts/utils/Address.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)
 
 pragma solidity ^0.8.20;
 

+ 1 - 0
contracts/utils/Bytes.sol

@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: MIT
+// OpenZeppelin Contracts (last updated v5.2.0) (utils/Bytes.sol)
 
 pragma solidity ^0.8.24;
 

+ 1 - 0
contracts/utils/CAIP10.sol

@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: MIT
+// OpenZeppelin Contracts (last updated v5.2.0) (utils/CAIP10.sol)
 
 pragma solidity ^0.8.24;
 

+ 1 - 0
contracts/utils/CAIP2.sol

@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: MIT
+// OpenZeppelin Contracts (last updated v5.2.0) (utils/CAIP2.sol)
 
 pragma solidity ^0.8.24;
 

+ 1 - 0
contracts/utils/NoncesKeyed.sol

@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: MIT
+// OpenZeppelin Contracts (last updated v5.2.0) (utils/NoncesKeyed.sol)
 pragma solidity ^0.8.20;
 
 import {Nonces} from "./Nonces.sol";

+ 1 - 1
contracts/utils/Packing.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (utils/Packing.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (utils/Packing.sol)
 // This file was procedurally generated from scripts/generate/templates/Packing.js.
 
 pragma solidity ^0.8.20;

+ 1 - 1
contracts/utils/Strings.sol

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts (last updated v5.1.0) (utils/Strings.sol)
+// OpenZeppelin Contracts (last updated v5.2.0) (utils/Strings.sol)
 
 pragma solidity ^0.8.20;
 

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "openzeppelin-solidity",
   "description": "Secure Smart Contract library for Solidity",
-  "version": "5.1.0",
+  "version": "5.2.0",
   "private": true,
   "files": [
     "/contracts/**/*.sol",