From 45636a2b42caccbd9960b2a8fd41589dd34a96be Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:38:31 +0000 Subject: [PATCH] Transpile 4feb895f9 --- .changeset/pre.json | 46 ++++++++++- CHANGELOG.md | 80 ++++++++++++++++++- contracts/access/Ownable2StepUpgradeable.sol | 2 +- .../AccessControlEnumerableUpgradeable.sol | 2 +- .../manager/AccessManagedUpgradeable.sol | 2 +- .../manager/AccessManagerUpgradeable.sol | 2 +- .../finance/VestingWalletCliffUpgradeable.sol | 1 + .../finance/VestingWalletUpgradeable.sol | 2 +- contracts/governance/GovernorUpgradeable.sol | 2 +- .../GovernorCountingFractionalUpgradeable.sol | 1 + .../GovernorCountingSimpleUpgradeable.sol | 2 +- .../extensions/GovernorStorageUpgradeable.sol | 2 +- .../GovernorTimelockAccessUpgradeable.sol | 2 +- .../GovernorTimelockCompoundUpgradeable.sol | 2 +- .../GovernorTimelockControlUpgradeable.sol | 2 +- .../extensions/GovernorVotesUpgradeable.sol | 2 +- .../governance/utils/VotesUpgradeable.sol | 2 +- .../metatx/ERC2771ContextUpgradeable.sol | 2 +- .../metatx/ERC2771ForwarderUpgradeable.sol | 2 +- contracts/package.json | 4 +- contracts/proxy/utils/UUPSUpgradeable.sol | 2 +- .../token/ERC1155/ERC1155Upgradeable.sol | 2 +- .../extensions/ERC1155PausableUpgradeable.sol | 2 +- .../extensions/ERC1155SupplyUpgradeable.sol | 2 +- .../ERC1155URIStorageUpgradeable.sol | 2 +- .../utils/ERC1155HolderUpgradeable.sol | 2 +- contracts/token/ERC20/ERC20Upgradeable.sol | 2 +- .../ERC20/extensions/ERC1363Upgradeable.sol | 1 + .../extensions/ERC20FlashMintUpgradeable.sol | 2 +- .../extensions/ERC20PausableUpgradeable.sol | 2 +- .../extensions/ERC20PermitUpgradeable.sol | 2 +- .../extensions/ERC20VotesUpgradeable.sol | 2 +- .../extensions/ERC20WrapperUpgradeable.sol | 2 +- .../ERC20/extensions/ERC4626Upgradeable.sol | 2 +- ...raft-ERC20TemporaryApprovalUpgradeable.sol | 1 + contracts/token/ERC721/ERC721Upgradeable.sol | 2 +- .../extensions/ERC721BurnableUpgradeable.sol | 2 +- .../ERC721ConsecutiveUpgradeable.sol | 2 +- .../ERC721EnumerableUpgradeable.sol | 2 +- .../extensions/ERC721PausableUpgradeable.sol | 2 +- .../extensions/ERC721RoyaltyUpgradeable.sol | 2 +- .../ERC721URIStorageUpgradeable.sol | 2 +- .../extensions/ERC721VotesUpgradeable.sol | 2 +- .../extensions/ERC721WrapperUpgradeable.sol | 2 +- contracts/token/common/ERC2981Upgradeable.sol | 2 +- .../ReentrancyGuardTransientUpgradeable.sol | 1 + .../utils/ReentrancyGuardUpgradeable.sol | 2 +- .../utils/cryptography/EIP712Upgradeable.sol | 2 +- .../utils/introspection/ERC165Upgradeable.sol | 2 +- docs/antora.yml | 4 +- lib/openzeppelin-contracts | 2 +- package.json | 2 +- 52 files changed, 176 insertions(+), 49 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index d73ad7253..99ec191a7 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -4,5 +4,49 @@ "initialVersions": { "openzeppelin-solidity": "5.0.2" }, - "changesets": [] + "changesets": [ + "chilled-walls-develop", + "chilly-humans-warn", + "cold-cheetahs-check", + "cool-mangos-compare", + "curvy-crabs-repeat", + "dirty-cobras-smile", + "eight-eyes-burn", + "eleven-planets-relax", + "flat-turtles-repeat", + "fluffy-buses-jump", + "fluffy-steaks-exist", + "forty-dodos-visit", + "friendly-nails-push", + "gentle-bulldogs-turn", + "gorgeous-badgers-vanish", + "great-pianos-work", + "heavy-baboons-give", + "kind-planets-cough", + "light-news-listen", + "lucky-crews-eat", + "nervous-eyes-teach", + "nervous-pans-grow", + "nice-paws-pull", + "odd-files-protect", + "odd-lobsters-wash", + "poor-chefs-cheat", + "serious-carrots-provide", + "shiny-poets-whisper", + "silver-swans-promise", + "smart-bugs-switch", + "spotty-falcons-explain", + "spotty-queens-own", + "strong-singers-talk", + "thick-pumpkins-report", + "thin-walls-drop", + "tricky-bats-pretend", + "twenty-feet-grin", + "violet-moons-tell", + "warm-sheep-cover", + "wise-bobcats-speak", + "witty-chicken-smile", + "yellow-deers-walk", + "yellow-moles-hammer" + ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index f327a1cb4..690096ba5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,14 @@ # Changelog + +## 5.1.0-rc.0 (2024-10-03) + ### Breaking changes - `ERC1967Utils`: Removed duplicate declaration of the `Upgraded`, `AdminChanged` and `BeaconUpgraded` events. These events are still available through the `IERC1967` interface located under the `contracts/interfaces/` directory. Minimum pragma version is now 0.8.21. - `Governor`, `GovernorCountingSimple`: The `_countVotes` virtual function now returns an `uint256` with the total votes casted. This change allows for more flexibility for partial and fractional voting. Upgrading users may get a compilation error that can be fixed by adding a return statement to the `_countVotes` function. -### Custom error 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: @@ -18,6 +21,81 @@ This version comes with changes to the custom error identifiers. Contracts previ - `SafeERC20`: Replace generic `Error(string)` with `SafeERC20FailedOperation` if the returned data can't be decoded as `bool`. - `SafeERC20`: Replace generic `SafeERC20FailedOperation` with the revert message from the contract call if it fails. +### Changes by category + +#### General + +- `AccessManager`, `VestingWallet`, `TimelockController` and `ERC2771Forwarder`: Added a public `initializer` function in their corresponding upgradeable variants. ([#5008](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5008)) + +#### Access + +- `AccessControlEnumerable`: Add a `getRoleMembers` method to return all accounts that have `role`. ([#4546](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4546)) +- `AccessManager`: Allow the `onlyAuthorized` modifier to restrict functions added to the manager. ([#5014](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5014)) + +#### Finance + +- `VestingWalletCliff`: Add an extension of the `VestingWallet` contract with an added cliff. ([#4870](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4870)) + +#### Governance + +- `GovernorCountingFractional`: Add a governor counting module that allows distributing voting power amongst 3 options (For, Against, Abstain). ([#5045](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5045)) +- `Votes`: Set `_moveDelegateVotes` visibility to internal instead of private. ([#5007](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5007)) + +#### Proxy + +- `Clones`: Add version of `clone` and `cloneDeterministic` that support sending value at creation. ([#4936](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4936)) +- `TransparentUpgradeableProxy`: Make internal `_proxyAdmin()` getter have `view` visibility. ([#4688](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4688)) +- `ProxyAdmin`: Fixed documentation for `UPGRADE_INTERFACE_VERSION` getter. ([#5031](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5031)) + +#### Tokens + +- `ERC1363`: Add implementation of the token payable standard allowing execution of contract code after transfers and approvals. ([#4631](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4631)) +- `ERC20TemporaryApproval`: Add an ERC-20 extension that implements temporary approval using transient storage, based on ERC7674 (draft). ([#5071](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5071)) +- `SafeERC20`: Add "relaxed" function for interacting with ERC-1363 functions in a way that is compatible with EOAs. ([#4631](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4631)) +- `ERC721Utils` and `ERC1155Utils`: Add reusable libraries with functions to perform acceptance checks on `IERC721Receiver` and `IERC1155Receiver` implementers. ([#4845](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4845)) +- `ERC1363Utils`: Add helper similar to the existing ERC721Utils and ERC1155Utils. ([#5133](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5133)) + +#### Utils + +- `Arrays`: add a `sort` functions for `address[]`, `bytes32[]` and `uint256[]` memory arrays. ([#4846](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4846)) +- `Arrays`: add new functions `lowerBound`, `upperBound`, `lowerBoundMemory` and `upperBoundMemory` for lookups in sorted arrays with potential duplicates. ([#4842](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4842)) +- `Arrays`: deprecate `findUpperBound` in favor of the new `lowerBound`. ([#4842](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4842)) +- `Base64`: Add `encodeURL` following section 5 of RFC4648 for URL encoding ([#4822](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4822)) +- `Comparator`: A library of comparator functions, useful for customizing the behavior of the Heap structure. ([#5084](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5084)) +- `Create2`: Bubbles up returndata from a deployed contract that reverted during construction. ([#5052](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5052)) +- `Create2`, `Clones`: Mask `computeAddress` and `cloneDeterministic` outputs to produce a clean value for an `address` type (i.e. only use 20 bytes) ([#4941](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4941)) +- `Errors`: New library of common custom errors. ([#4936](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4936)) +- `Hashes`: A library with commonly used hash functions. ([#3617](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3617)) +- `Packing`: Added a new utility for packing, extracting and replacing bytesXX values. ([#4992](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4992)) +- `Panic`: Add a library for reverting with panic codes. ([#3298](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3298)) +- `ReentrancyGuardTransient`: Added a variant of `ReentrancyGuard` that uses transient storage. ([#4988](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4988)) +- `Strings`: Added a utility function for converting an address to checksummed string. ([#5067](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5067)) +- `SlotDerivation`: Add a library of methods for derivating common storage slots. ([#4975](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4975)) +- `StorageSlot`: Add primitives for operating on the transient storage space using a typed-slot representation. ([#4980](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4980)) + +##### Cryptography + +- `SignatureChecker`: refactor `isValidSignatureNow` to avoid validating ECDSA signatures if there is code deployed at the signer's address. ([#4951](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4951)) +- `MerkleProof`: Add variations of `verify`, `processProof`, `multiProofVerify` and `processMultiProof` (and equivalent calldata version) with support for custom hashing functions. ([#4887](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4887)) +- `P256`: Library for verification and public key recovery of P256 (aka secp256r1) signatures. ([#4881](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4881)) +- `RSA`: Library to verify signatures according to RFC 8017 Signature Verification Operation ([#4952](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4952)) + +#### Math + +- `Math`: add an `invMod` function to get the modular multiplicative inverse of a number in Z/nZ. ([#4839](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4839)) +- `Math`: Add `modExp` function that exposes the `EIP-198` precompile. Includes `uint256` and `bytes memory` versions. ([#3298](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3298)) +- `Math`: Custom errors replaced with native panic codes. ([#3298](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3298)) +- `Math`, `SignedMath`: Add a branchless `ternary` function that computes`cond ? a : b` in constant gas cost. ([#4976](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4976)) +- `SafeCast`: Add `toUint(bool)` for operating on `bool` values as `uint256`. ([#4878](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4878)) + +#### Structures + +- `CircularBuffer`: Add a data structure that stores the last `N` values pushed to it. ([#4913](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4913)) +- `DoubleEndedQueue`: Custom errors replaced with native panic codes. ([#4872](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4872)) +- `EnumerableMap`: add `UintToBytes32Map`, `AddressToAddressMap`, `AddressToBytes32Map` and `Bytes32ToAddressMap`. ([#4843](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4843)) +- `Heap`: A data structure that implements a heap-based priority queue. ([#5084](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5084)) +- `MerkleTree`: A data structure that allows inserting elements into a merkle tree and updating its root hash. ([#3617](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3617)) + ## 5.0.2 (2024-02-29) - `Base64`: Fix issue where dirty memory located just after the input buffer is affecting the result. ([#4926](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4926)) diff --git a/contracts/access/Ownable2StepUpgradeable.sol b/contracts/access/Ownable2StepUpgradeable.sol index ebc4ab95c..329138992 100644 --- a/contracts/access/Ownable2StepUpgradeable.sol +++ b/contracts/access/Ownable2StepUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (access/Ownable2Step.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/extensions/AccessControlEnumerableUpgradeable.sol b/contracts/access/extensions/AccessControlEnumerableUpgradeable.sol index b7c6586c3..4e9e95239 100644 --- a/contracts/access/extensions/AccessControlEnumerableUpgradeable.sol +++ b/contracts/access/extensions/AccessControlEnumerableUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/AccessControlEnumerable.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (access/extensions/AccessControlEnumerable.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/manager/AccessManagedUpgradeable.sol b/contracts/access/manager/AccessManagedUpgradeable.sol index 4ce144c8b..998a8a299 100644 --- a/contracts/access/manager/AccessManagedUpgradeable.sol +++ b/contracts/access/manager/AccessManagedUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/AccessManaged.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (access/manager/AccessManaged.sol) pragma solidity ^0.8.20; diff --git a/contracts/access/manager/AccessManagerUpgradeable.sol b/contracts/access/manager/AccessManagerUpgradeable.sol index c5e5ad476..f349c7a8a 100644 --- a/contracts/access/manager/AccessManagerUpgradeable.sol +++ b/contracts/access/manager/AccessManagerUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (access/manager/AccessManager.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (access/manager/AccessManager.sol) pragma solidity ^0.8.20; diff --git a/contracts/finance/VestingWalletCliffUpgradeable.sol b/contracts/finance/VestingWalletCliffUpgradeable.sol index 342bc3215..f89f3225b 100644 --- a/contracts/finance/VestingWalletCliffUpgradeable.sol +++ b/contracts/finance/VestingWalletCliffUpgradeable.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (finance/VestingWalletCliff.sol) pragma solidity ^0.8.20; diff --git a/contracts/finance/VestingWalletUpgradeable.sol b/contracts/finance/VestingWalletUpgradeable.sol index 99d335b9e..818d6c8ae 100644 --- a/contracts/finance/VestingWalletUpgradeable.sol +++ b/contracts/finance/VestingWalletUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (finance/VestingWallet.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (finance/VestingWallet.sol) pragma solidity ^0.8.20; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/contracts/governance/GovernorUpgradeable.sol b/contracts/governance/GovernorUpgradeable.sol index 663e8ead8..001d95f9b 100644 --- a/contracts/governance/GovernorUpgradeable.sol +++ b/contracts/governance/GovernorUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (governance/Governor.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (governance/Governor.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorCountingFractionalUpgradeable.sol b/contracts/governance/extensions/GovernorCountingFractionalUpgradeable.sol index 073cf3939..f3b1e3b89 100644 --- a/contracts/governance/extensions/GovernorCountingFractionalUpgradeable.sol +++ b/contracts/governance/extensions/GovernorCountingFractionalUpgradeable.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (governance/extensions/GovernorCountingFractional.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol b/contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol index ef24c6cfc..bba21b763 100644 --- a/contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol +++ b/contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorCountingSimple.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (governance/extensions/GovernorCountingSimple.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorStorageUpgradeable.sol b/contracts/governance/extensions/GovernorStorageUpgradeable.sol index c25eb8fb4..7ab7978ba 100644 --- a/contracts/governance/extensions/GovernorStorageUpgradeable.sol +++ b/contracts/governance/extensions/GovernorStorageUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorStorage.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (governance/extensions/GovernorStorage.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorTimelockAccessUpgradeable.sol b/contracts/governance/extensions/GovernorTimelockAccessUpgradeable.sol index 9540469c6..9fcb28c14 100644 --- a/contracts/governance/extensions/GovernorTimelockAccessUpgradeable.sol +++ b/contracts/governance/extensions/GovernorTimelockAccessUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorTimelockAccess.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (governance/extensions/GovernorTimelockAccess.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorTimelockCompoundUpgradeable.sol b/contracts/governance/extensions/GovernorTimelockCompoundUpgradeable.sol index 1270b0729..e24b282ef 100644 --- a/contracts/governance/extensions/GovernorTimelockCompoundUpgradeable.sol +++ b/contracts/governance/extensions/GovernorTimelockCompoundUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorTimelockCompound.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (governance/extensions/GovernorTimelockCompound.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol b/contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol index bb0c5df72..81e155670 100644 --- a/contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol +++ b/contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorTimelockControl.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (governance/extensions/GovernorTimelockControl.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/extensions/GovernorVotesUpgradeable.sol b/contracts/governance/extensions/GovernorVotesUpgradeable.sol index 7aadd345f..1b4e217c5 100644 --- a/contracts/governance/extensions/GovernorVotesUpgradeable.sol +++ b/contracts/governance/extensions/GovernorVotesUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorVotes.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (governance/extensions/GovernorVotes.sol) pragma solidity ^0.8.20; diff --git a/contracts/governance/utils/VotesUpgradeable.sol b/contracts/governance/utils/VotesUpgradeable.sol index 1c3ae76fb..6f6f0b99c 100644 --- a/contracts/governance/utils/VotesUpgradeable.sol +++ b/contracts/governance/utils/VotesUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (governance/utils/Votes.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (governance/utils/Votes.sol) pragma solidity ^0.8.20; import {IERC5805} from "@openzeppelin/contracts/interfaces/IERC5805.sol"; diff --git a/contracts/metatx/ERC2771ContextUpgradeable.sol b/contracts/metatx/ERC2771ContextUpgradeable.sol index 159a5c90e..aa4f43b29 100644 --- a/contracts/metatx/ERC2771ContextUpgradeable.sol +++ b/contracts/metatx/ERC2771ContextUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.1) (metatx/ERC2771Context.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (metatx/ERC2771Context.sol) pragma solidity ^0.8.20; diff --git a/contracts/metatx/ERC2771ForwarderUpgradeable.sol b/contracts/metatx/ERC2771ForwarderUpgradeable.sol index ce01941c8..69d625a11 100644 --- a/contracts/metatx/ERC2771ForwarderUpgradeable.sol +++ b/contracts/metatx/ERC2771ForwarderUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (metatx/ERC2771Forwarder.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (metatx/ERC2771Forwarder.sol) pragma solidity ^0.8.20; diff --git a/contracts/package.json b/contracts/package.json index 433c9521d..52532c44a 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,7 +1,7 @@ { "name": "@openzeppelin/contracts-upgradeable", "description": "Secure Smart Contract library for Solidity", - "version": "5.0.2", + "version": "5.1.0-rc.0", "files": [ "**/*.sol", "/build/contracts/*.json", @@ -30,6 +30,6 @@ }, "homepage": "https://openzeppelin.com/contracts/", "peerDependencies": { - "@openzeppelin/contracts": "5.0.2" + "@openzeppelin/contracts": "5.1.0-rc.0" } } diff --git a/contracts/proxy/utils/UUPSUpgradeable.sol b/contracts/proxy/utils/UUPSUpgradeable.sol index e09836527..f5bb932a2 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.0.0) (proxy/utils/UUPSUpgradeable.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/ERC1155Upgradeable.sol b/contracts/token/ERC1155/ERC1155Upgradeable.sol index fea45d35c..586317e34 100644 --- a/contracts/token/ERC1155/ERC1155Upgradeable.sol +++ b/contracts/token/ERC1155/ERC1155Upgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol b/contracts/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol index 4ff4c2689..8facacfb7 100644 --- a/contracts/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol +++ b/contracts/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155Pausable.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC1155/extensions/ERC1155Pausable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol b/contracts/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol index b77440981..91ad47493 100644 --- a/contracts/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol +++ b/contracts/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155Supply.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol b/contracts/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol index 36367c0c4..e76cd4312 100644 --- a/contracts/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol +++ b/contracts/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC1155/utils/ERC1155HolderUpgradeable.sol b/contracts/token/ERC1155/utils/ERC1155HolderUpgradeable.sol index b54155a61..a72dcf42d 100644 --- a/contracts/token/ERC1155/utils/ERC1155HolderUpgradeable.sol +++ b/contracts/token/ERC1155/utils/ERC1155HolderUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/utils/ERC1155Holder.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC1155/utils/ERC1155Holder.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/ERC20Upgradeable.sol b/contracts/token/ERC20/ERC20Upgradeable.sol index 932ba0649..619d760d7 100644 --- a/contracts/token/ERC20/ERC20Upgradeable.sol +++ b/contracts/token/ERC20/ERC20Upgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC1363Upgradeable.sol b/contracts/token/ERC20/extensions/ERC1363Upgradeable.sol index 349c6760a..7ad259342 100644 --- a/contracts/token/ERC20/extensions/ERC1363Upgradeable.sol +++ b/contracts/token/ERC20/extensions/ERC1363Upgradeable.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC20/extensions/ERC1363.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol b/contracts/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol index 3603283bd..7903e6cda 100644 --- a/contracts/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol +++ b/contracts/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20FlashMint.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC20/extensions/ERC20FlashMint.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC20PausableUpgradeable.sol b/contracts/token/ERC20/extensions/ERC20PausableUpgradeable.sol index b9651f896..ddb8cc191 100644 --- a/contracts/token/ERC20/extensions/ERC20PausableUpgradeable.sol +++ b/contracts/token/ERC20/extensions/ERC20PausableUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Pausable.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC20/extensions/ERC20Pausable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC20PermitUpgradeable.sol b/contracts/token/ERC20/extensions/ERC20PermitUpgradeable.sol index 324a50801..82cf10e0c 100644 --- a/contracts/token/ERC20/extensions/ERC20PermitUpgradeable.sol +++ b/contracts/token/ERC20/extensions/ERC20PermitUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC20/extensions/ERC20Permit.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol b/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol index 9b0e9ec60..cbe4665a6 100644 --- a/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol +++ b/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Votes.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC20/extensions/ERC20Votes.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC20WrapperUpgradeable.sol b/contracts/token/ERC20/extensions/ERC20WrapperUpgradeable.sol index ec1a9fb97..e17735bec 100644 --- a/contracts/token/ERC20/extensions/ERC20WrapperUpgradeable.sol +++ b/contracts/token/ERC20/extensions/ERC20WrapperUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Wrapper.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC20/extensions/ERC20Wrapper.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/ERC4626Upgradeable.sol b/contracts/token/ERC20/extensions/ERC4626Upgradeable.sol index 9f29a885c..88390193d 100644 --- a/contracts/token/ERC20/extensions/ERC4626Upgradeable.sol +++ b/contracts/token/ERC20/extensions/ERC4626Upgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC4626.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC20/extensions/ERC4626.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC20/extensions/draft-ERC20TemporaryApprovalUpgradeable.sol b/contracts/token/ERC20/extensions/draft-ERC20TemporaryApprovalUpgradeable.sol index b8c6aa91e..c45a2fb52 100644 --- a/contracts/token/ERC20/extensions/draft-ERC20TemporaryApprovalUpgradeable.sol +++ b/contracts/token/ERC20/extensions/draft-ERC20TemporaryApprovalUpgradeable.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC20/extensions/draft-ERC20TemporaryApproval.sol) pragma solidity ^0.8.24; diff --git a/contracts/token/ERC721/ERC721Upgradeable.sol b/contracts/token/ERC721/ERC721Upgradeable.sol index 10a0d7d5f..0bc73206f 100644 --- a/contracts/token/ERC721/ERC721Upgradeable.sol +++ b/contracts/token/ERC721/ERC721Upgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721BurnableUpgradeable.sol b/contracts/token/ERC721/extensions/ERC721BurnableUpgradeable.sol index 81c4dd8b5..9498de37f 100644 --- a/contracts/token/ERC721/extensions/ERC721BurnableUpgradeable.sol +++ b/contracts/token/ERC721/extensions/ERC721BurnableUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Burnable.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol b/contracts/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol index a3a626aa7..2ae6fbb8e 100644 --- a/contracts/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol +++ b/contracts/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Consecutive.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC721/extensions/ERC721Consecutive.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol b/contracts/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol index 7753e193c..09de126be 100644 --- a/contracts/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol +++ b/contracts/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Enumerable.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721PausableUpgradeable.sol b/contracts/token/ERC721/extensions/ERC721PausableUpgradeable.sol index cfe2dc7cd..223fb282d 100644 --- a/contracts/token/ERC721/extensions/ERC721PausableUpgradeable.sol +++ b/contracts/token/ERC721/extensions/ERC721PausableUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Pausable.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC721/extensions/ERC721Pausable.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol b/contracts/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol index fb0b258cd..28d7da0f2 100644 --- a/contracts/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol +++ b/contracts/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Royalty.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC721/extensions/ERC721Royalty.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol b/contracts/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol index 054a9b1da..6f232d09b 100644 --- a/contracts/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol +++ b/contracts/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721URIStorage.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721VotesUpgradeable.sol b/contracts/token/ERC721/extensions/ERC721VotesUpgradeable.sol index 1ec1a6de0..cb2c457da 100644 --- a/contracts/token/ERC721/extensions/ERC721VotesUpgradeable.sol +++ b/contracts/token/ERC721/extensions/ERC721VotesUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Votes.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC721/extensions/ERC721Votes.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/ERC721/extensions/ERC721WrapperUpgradeable.sol b/contracts/token/ERC721/extensions/ERC721WrapperUpgradeable.sol index 8684c3230..442d93eb1 100644 --- a/contracts/token/ERC721/extensions/ERC721WrapperUpgradeable.sol +++ b/contracts/token/ERC721/extensions/ERC721WrapperUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Wrapper.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/ERC721/extensions/ERC721Wrapper.sol) pragma solidity ^0.8.20; diff --git a/contracts/token/common/ERC2981Upgradeable.sol b/contracts/token/common/ERC2981Upgradeable.sol index 586a63bce..acbf874eb 100644 --- a/contracts/token/common/ERC2981Upgradeable.sol +++ b/contracts/token/common/ERC2981Upgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (token/common/ERC2981.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (token/common/ERC2981.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/ReentrancyGuardTransientUpgradeable.sol b/contracts/utils/ReentrancyGuardTransientUpgradeable.sol index 1e0474137..0dffec065 100644 --- a/contracts/utils/ReentrancyGuardTransientUpgradeable.sol +++ b/contracts/utils/ReentrancyGuardTransientUpgradeable.sol @@ -1,4 +1,5 @@ // SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (utils/ReentrancyGuardTransient.sol) pragma solidity ^0.8.24; diff --git a/contracts/utils/ReentrancyGuardUpgradeable.sol b/contracts/utils/ReentrancyGuardUpgradeable.sol index 4344b735a..9b24a232e 100644 --- a/contracts/utils/ReentrancyGuardUpgradeable.sol +++ b/contracts/utils/ReentrancyGuardUpgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; diff --git a/contracts/utils/cryptography/EIP712Upgradeable.sol b/contracts/utils/cryptography/EIP712Upgradeable.sol index e565374e2..4ee8314da 100644 --- a/contracts/utils/cryptography/EIP712Upgradeable.sol +++ b/contracts/utils/cryptography/EIP712Upgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.20; diff --git a/contracts/utils/introspection/ERC165Upgradeable.sol b/contracts/utils/introspection/ERC165Upgradeable.sol index 4b03234aa..f57075ff1 100644 --- a/contracts/utils/introspection/ERC165Upgradeable.sol +++ b/contracts/utils/introspection/ERC165Upgradeable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) +// OpenZeppelin Contracts (last updated v5.1.0-rc.0) (utils/introspection/ERC165.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/lib/openzeppelin-contracts b/lib/openzeppelin-contracts index fd2915806..4feb895f9 160000 --- a/lib/openzeppelin-contracts +++ b/lib/openzeppelin-contracts @@ -1 +1 @@ -Subproject commit fd29158067b646012860899473d7372e1dd3631d +Subproject commit 4feb895f9fd7c2b28f2c624d72cc35b4bd7b9220 diff --git a/package.json b/package.json index cafbce863..f7eb3d626 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "openzeppelin-solidity", "description": "Secure Smart Contract library for Solidity", - "version": "5.0.2", + "version": "5.1.0-rc.0", "private": true, "files": [ "/contracts/**/*.sol",