From ac4198fcf4b45ecf5e23b522d0d6bdd38aedf2f2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 18:51:09 +0100 Subject: [PATCH] Release v5.2.0 (rc) (#5277) Co-authored-by: github-actions[bot] Co-authored-by: Hadrien Croubois --- .changeset/pre.json | 15 +++++++- CHANGELOG.md | 34 +++++++++++++++++++ .../account/utils/draft-ERC4337Utils.sol | 1 + .../account/utils/draft-ERC7579Utils.sol | 1 + contracts/finance/VestingWallet.sol | 2 +- contracts/governance/Governor.sol | 2 +- .../GovernorCountingOverridable.sol | 1 + .../extensions/GovernorPreventLateQuorum.sol | 2 +- contracts/governance/utils/Votes.sol | 2 +- contracts/governance/utils/VotesExtended.sol | 1 + contracts/interfaces/draft-IERC4337.sol | 1 + contracts/interfaces/draft-IERC7579.sol | 1 + contracts/package.json | 2 +- contracts/proxy/Clones.sol | 2 +- contracts/proxy/ERC1967/ERC1967Proxy.sol | 2 +- contracts/proxy/ERC1967/ERC1967Utils.sol | 2 +- contracts/proxy/beacon/BeaconProxy.sol | 2 +- contracts/proxy/transparent/ProxyAdmin.sol | 2 +- .../TransparentUpgradeableProxy.sol | 2 +- contracts/proxy/utils/UUPSUpgradeable.sol | 2 +- contracts/token/ERC20/ERC20.sol | 2 +- contracts/token/ERC20/extensions/ERC1363.sol | 2 +- contracts/token/ERC20/utils/SafeERC20.sol | 2 +- contracts/utils/Bytes.sol | 1 + contracts/utils/CAIP10.sol | 1 + contracts/utils/CAIP2.sol | 1 + contracts/utils/NoncesKeyed.sol | 1 + contracts/utils/Packing.sol | 2 +- contracts/utils/Strings.sol | 2 +- docs/antora.yml | 4 +-- package.json | 2 +- 31 files changed, 78 insertions(+), 21 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 73958f7af..0f324a01e 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -4,5 +4,18 @@ "initialVersions": { "openzeppelin-solidity": "5.1.0" }, - "changesets": [] + "changesets": [ + "eighty-hounds-promise", + "four-chairs-help", + "great-lions-hear", + "healthy-books-shout", + "hot-shrimps-wait", + "lovely-dodos-lay", + "pink-wasps-hammer", + "proud-planes-arrive", + "seven-donkeys-tap", + "small-seahorses-bathe", + "tricky-bats-pretend", + "weak-roses-bathe" + ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index cc52db338..79afc5ebf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,40 @@ # Changelog +## 5.2.0-rc.0 (2024-12-04) + +### 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 + +- `Bytes`: Add a library of common operation 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) ### Breaking changes diff --git a/contracts/account/utils/draft-ERC4337Utils.sol b/contracts/account/utils/draft-ERC4337Utils.sol index a5eec71b4..8ee917b8d 100644 --- a/contracts/account/utils/draft-ERC4337Utils.sol +++ b/contracts/account/utils/draft-ERC4337Utils.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0-rc.0) (account/utils/draft-ERC4337Utils.sol) pragma solidity ^0.8.20; diff --git a/contracts/account/utils/draft-ERC7579Utils.sol b/contracts/account/utils/draft-ERC7579Utils.sol index dab18f26b..c28b514d5 100644 --- a/contracts/account/utils/draft-ERC7579Utils.sol +++ b/contracts/account/utils/draft-ERC7579Utils.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0-rc.0) (account/utils/draft-ERC7579Utils.sol) pragma solidity ^0.8.20; diff --git a/contracts/finance/VestingWallet.sol b/contracts/finance/VestingWallet.sol index b03c49684..e55368bad 100644 --- a/contracts/finance/VestingWallet.sol +++ b/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-rc.0) (finance/VestingWallet.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol"; diff --git a/contracts/governance/Governor.sol b/contracts/governance/Governor.sol index 390411556..47c8ea1cd 100644 --- a/contracts/governance/Governor.sol +++ b/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-rc.0) (governance/Governor.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorCountingOverridable.sol b/contracts/governance/extensions/GovernorCountingOverridable.sol index db375a93f..be814fb09 100644 --- a/contracts/governance/extensions/GovernorCountingOverridable.sol +++ b/contracts/governance/extensions/GovernorCountingOverridable.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0-rc.0) (governance/extensions/GovernorCountingOverridable.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorPreventLateQuorum.sol b/contracts/governance/extensions/GovernorPreventLateQuorum.sol index eb93add80..8f0f8d316 100644 --- a/contracts/governance/extensions/GovernorPreventLateQuorum.sol +++ b/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-rc.0) (governance/extensions/GovernorPreventLateQuorum.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/utils/Votes.sol b/contracts/governance/utils/Votes.sol index 976579719..9a44e2ae0 100644 --- a/contracts/governance/utils/Votes.sol +++ b/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-rc.0) (governance/utils/Votes.sol) pragma solidity ^0.8.20; import {IERC5805} from "../../interfaces/IERC5805.sol"; diff --git a/contracts/governance/utils/VotesExtended.sol b/contracts/governance/utils/VotesExtended.sol index 70b0d92fb..75d98071d 100644 --- a/contracts/governance/utils/VotesExtended.sol +++ b/contracts/governance/utils/VotesExtended.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0-rc.0) (governance/utils/VotesExtended.sol) pragma solidity ^0.8.20; import {Checkpoints} from "../../utils/structs/Checkpoints.sol"; diff --git a/contracts/interfaces/draft-IERC4337.sol b/contracts/interfaces/draft-IERC4337.sol index 67ab146c0..4cd0ff9b5 100644 --- a/contracts/interfaces/draft-IERC4337.sol +++ b/contracts/interfaces/draft-IERC4337.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0-rc.0) (interfaces/draft-IERC4337.sol) pragma solidity ^0.8.20; diff --git a/contracts/interfaces/draft-IERC7579.sol b/contracts/interfaces/draft-IERC7579.sol index f97e33dc0..8f9ba08dd 100644 --- a/contracts/interfaces/draft-IERC7579.sol +++ b/contracts/interfaces/draft-IERC7579.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0-rc.0) (interfaces/draft-IERC7579.sol) pragma solidity ^0.8.20; import {PackedUserOperation} from "./draft-IERC4337.sol"; diff --git a/contracts/package.json b/contracts/package.json index e0ed163d0..0ad5f3b92 100644 --- a/contracts/package.json +++ b/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-rc.0", "files": [ "**/*.sol", "/build/contracts/*.json", diff --git a/contracts/proxy/Clones.sol b/contracts/proxy/Clones.sol index 5bd45a086..6b7276bbd 100644 --- a/contracts/proxy/Clones.sol +++ b/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-rc.0) (proxy/Clones.sol) pragma solidity ^0.8.20; diff --git a/contracts/proxy/ERC1967/ERC1967Proxy.sol b/contracts/proxy/ERC1967/ERC1967Proxy.sol index cad9eb5ab..541aaa82e 100644 --- a/contracts/proxy/ERC1967/ERC1967Proxy.sol +++ b/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-rc.0) (proxy/ERC1967/ERC1967Proxy.sol) pragma solidity ^0.8.22; diff --git a/contracts/proxy/ERC1967/ERC1967Utils.sol b/contracts/proxy/ERC1967/ERC1967Utils.sol index 287bb6bee..222a48c6e 100644 --- a/contracts/proxy/ERC1967/ERC1967Utils.sol +++ b/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-rc.0) (proxy/ERC1967/ERC1967Utils.sol) pragma solidity ^0.8.22; diff --git a/contracts/proxy/beacon/BeaconProxy.sol b/contracts/proxy/beacon/BeaconProxy.sol index e38b9d891..a0c3bed51 100644 --- a/contracts/proxy/beacon/BeaconProxy.sol +++ b/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-rc.0) (proxy/beacon/BeaconProxy.sol) pragma solidity ^0.8.22; diff --git a/contracts/proxy/transparent/ProxyAdmin.sol b/contracts/proxy/transparent/ProxyAdmin.sol index 2a60edfe9..9074a1b47 100644 --- a/contracts/proxy/transparent/ProxyAdmin.sol +++ b/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-rc.0) (proxy/transparent/ProxyAdmin.sol) pragma solidity ^0.8.22; diff --git a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol index 7342d9f8f..6284d1de6 100644 --- a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +++ b/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-rc.0) (proxy/transparent/TransparentUpgradeableProxy.sol) pragma solidity ^0.8.22; diff --git a/contracts/proxy/utils/UUPSUpgradeable.sol b/contracts/proxy/utils/UUPSUpgradeable.sol index 745c56fa5..cff12c5cb 100644 --- a/contracts/proxy/utils/UUPSUpgradeable.sol +++ b/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-rc.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.22; diff --git a/contracts/token/ERC20/ERC20.sol b/contracts/token/ERC20/ERC20.sol index 6a9865e6a..2d7f862b9 100644 --- a/contracts/token/ERC20/ERC20.sol +++ b/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-rc.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC1363.sol b/contracts/token/ERC20/extensions/ERC1363.sol index 952582a84..7920020ed 100644 --- a/contracts/token/ERC20/extensions/ERC1363.sol +++ b/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-rc.0) (token/ERC20/extensions/ERC1363.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/utils/SafeERC20.sol b/contracts/token/ERC20/utils/SafeERC20.sol index a77907b4c..372fbedb9 100644 --- a/contracts/token/ERC20/utils/SafeERC20.sol +++ b/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-rc.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/Bytes.sol b/contracts/utils/Bytes.sol index cf0cb8fcd..45531cdd0 100644 --- a/contracts/utils/Bytes.sol +++ b/contracts/utils/Bytes.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0-rc.0) (utils/Bytes.sol) pragma solidity ^0.8.24; diff --git a/contracts/utils/CAIP10.sol b/contracts/utils/CAIP10.sol index f04246017..1fbb3aa1e 100644 --- a/contracts/utils/CAIP10.sol +++ b/contracts/utils/CAIP10.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0-rc.0) (utils/CAIP10.sol) pragma solidity ^0.8.24; diff --git a/contracts/utils/CAIP2.sol b/contracts/utils/CAIP2.sol index a7a69e6a8..c86062267 100644 --- a/contracts/utils/CAIP2.sol +++ b/contracts/utils/CAIP2.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0-rc.0) (utils/CAIP2.sol) pragma solidity ^0.8.24; diff --git a/contracts/utils/NoncesKeyed.sol b/contracts/utils/NoncesKeyed.sol index 31cd0704e..b692d3ea2 100644 --- a/contracts/utils/NoncesKeyed.sol +++ b/contracts/utils/NoncesKeyed.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0-rc.0) (utils/NoncesKeyed.sol) pragma solidity ^0.8.20; import {Nonces} from "./Nonces.sol"; diff --git a/contracts/utils/Packing.sol b/contracts/utils/Packing.sol index f38e64a3b..e680133a7 100644 --- a/contracts/utils/Packing.sol +++ b/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-rc.0) (utils/Packing.sol) // This file was procedurally generated from scripts/generate/templates/Packing.js. pragma solidity ^0.8.20; diff --git a/contracts/utils/Strings.sol b/contracts/utils/Strings.sol index f9465eaf0..24f18a927 100644 --- a/contracts/utils/Strings.sol +++ b/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-rc.0) (utils/Strings.sol) pragma solidity ^0.8.20; diff --git a/docs/antora.yml b/docs/antora.yml index 4bc06b36a..46c7444e0 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -1,7 +1,7 @@ name: contracts title: Contracts -version: 5.x -prerelease: false +version: 5.x-rc +prerelease: true nav: - modules/ROOT/nav.adoc - modules/api/nav.adoc diff --git a/package.json b/package.json index 19c54c92a..4d8f11ddd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "openzeppelin-solidity", "description": "Secure Smart Contract library for Solidity", - "version": "5.1.0", + "version": "5.2.0-rc.0", "private": true, "files": [ "/contracts/**/*.sol",