Skip to content

Commit 9ede332

Browse files
Transpile 39f5a0284
1 parent 8002410 commit 9ede332

38 files changed

+113
-31
lines changed

.changeset/pre.json

+29-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,33 @@
44
"initialVersions": {
55
"openzeppelin-solidity": "5.2.0"
66
},
7-
"changesets": []
7+
"changesets": [
8+
"blue-nails-give",
9+
"brave-islands-sparkle",
10+
"brown-seals-sing",
11+
"brown-turkeys-marry",
12+
"cyan-taxis-travel",
13+
"dirty-bananas-shake",
14+
"fair-pumpkins-compete",
15+
"famous-timers-compare",
16+
"fast-coats-try",
17+
"fuzzy-crews-poke",
18+
"good-cameras-rush",
19+
"good-cameras-serve",
20+
"good-zebras-ring",
21+
"gorgeous-apes-jam",
22+
"green-drinks-report",
23+
"long-walls-draw",
24+
"nice-cherries-reply",
25+
"ninety-rings-suffer",
26+
"pretty-lobsters-tan",
27+
"proud-cooks-do",
28+
"quiet-shrimps-kiss",
29+
"seven-insects-taste",
30+
"sixty-tips-wink",
31+
"ten-fishes-fold",
32+
"ten-hats-begin",
33+
"ten-peas-mix",
34+
"thin-eels-cross"
35+
]
836
}

CHANGELOG.md

+46
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
## 5.3.0-rc.0 (2025-03-19)
4+
35
### Breaking Changes
46

57
- Replace `GovernorCountingOverridable.VoteReceipt` struct parameter member names `hasOverriden` and `overridenWeight` for `hasOverridden` and `overriddenWeight` respectively.
@@ -8,6 +10,50 @@
810

911
- Replace `GovernorAlreadyOverridenVote` with `GovernorAlreadyOverriddenVote`.
1012

13+
### Changes by category
14+
15+
#### Account
16+
17+
- `ERC7579Utils`: Add ABI decoding checks on calldata bounds within `decodeBatch`. ([#5371](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5371))
18+
19+
#### Governance
20+
21+
- `IGovernor`: Add the `getProposalId` function to the governor interface. ([#5290](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5290))
22+
- `GovernorProposalGuardian`: Add a governance extension that defines a proposal guardian who can cancel proposals at any stage in their lifecycle. ([#5303](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5303))
23+
- `GovernorSequentialProposalId`: Adds a `Governor` extension that sequentially numbers proposal ids instead of using the hash. ([#5290](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5290))
24+
- `GovernorSuperQuorum`: Add a governance extension to support a super quorum. Proposals that meet the super quorum (and have a majority of for votes) advance to the `Succeeded` state before the proposal deadline. ([#5526](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5526))
25+
- `GovernorVotesSuperQuorumFraction`: Add a variant of the `GovernorSuperQuorum` extensions where the super quorum is expressed as a fraction of the total supply. ([#5526](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5526))
26+
- `TimelockController`: Receive function is now virtual. ([#5509](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5509))
27+
28+
#### Structures
29+
30+
- `EnumerableSet`: Add `clear` function to EnumerableSets which deletes all values in the set. ([#5486](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5486))
31+
- `EnumerableMap`: Add `clear` function to EnumerableMaps which deletes all entries in the map. ([#5486](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5486))
32+
- `MerkleTree`: Add an update function that replaces a previously inserted leaf with a new value, updating the tree root along the way. ([#5526](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5526))
33+
34+
#### Tokens
35+
36+
- `ERC4626`: Use the `asset` getter in `totalAssets`, `_deposit` and `_withdraw`. ([#5322](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5322))
37+
- `IERC6909`: Add the interface for ERC-6909. ([#5343](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5343))
38+
- `ERC6909`: Add a standard implementation of ERC6909. ([#5394](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5394))
39+
- `ERC6909TokenSupply`: Add an extension of ERC6909 which tracks total supply for each token id. ([#5394](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5394))
40+
- `ERC6909Metadata`: Add an extension of ERC6909 which adds metadata functionality. ([#5394](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5394))
41+
- `ERC6909ContentURI`: Add an extension of ERC6909 which adds content URI functionality. ([#5394](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5394))
42+
- `SafeERC20`: Add `trySafeTransfer` and `trySafeTransferFrom` that do not revert and return false if the transfer is not successful. ([#5483](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5483))
43+
44+
#### Other
45+
46+
- `Address`: bubble up revert data on `sendValue` failed call. ([#5379](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5379))
47+
- `Calldata`: Library with `emptyBytes` and `emptyString` functions to generate empty `bytes` and `string` calldata types. ([#5422](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5422))
48+
- `ERC2771Forwarder`: Expose the `_isTrustedByTarget` internal function to check whether a target trusts the forwarder. ([#5416](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5416))
49+
- `Hashes`: Expose `efficientKeccak256` for hashing non-commutative pairs of bytes32 without allocating extra memory. ([#5442](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5442))
50+
- `Initializable`: Add `_initializableStorageSlot` function that returns a pointer to the storage struct. The function allows customizing with a custom storage slot with an `override`. ([#5526](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5526))
51+
- `Math`: Add `add512`, `mul512` and `mulShr`. ([#5526](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5526))
52+
- `Math`: Add saturating arithmetic operations `saturatingAdd`, `saturatingSub` and `saturatingMul`. ([#5526](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5526))
53+
- `MessageHashUtils`: Add `toDataWithIntendedValidatorHash(address, bytes32)`. ([#5526](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5526))
54+
- `Pausable`: Stop explicitly setting `paused` to `false` during construction. ([#5448](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5448))
55+
- `Strings`: Add `espaceJSON` that escapes special characters in JSON strings. ([#5526](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5526))
56+
1157
## 5.2.0 (2025-01-08)
1258

1359
### Breaking Changes

contracts/access/AccessControlUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (access/AccessControl.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/finance/VestingWalletUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.2.0) (finance/VestingWallet.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (finance/VestingWallet.sol)
33
pragma solidity ^0.8.20;
44

55
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contracts/governance/GovernorUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.2.0) (governance/Governor.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/Governor.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/governance/TimelockControllerUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.0.0) (governance/TimelockController.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/TimelockController.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/governance/extensions/GovernorCountingFractionalUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (governance/extensions/GovernorCountingFractional.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/extensions/GovernorCountingFractional.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/governance/extensions/GovernorCountingOverridableUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.2.0) (governance/extensions/GovernorCountingOverridable.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/extensions/GovernorCountingOverridable.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/governance/extensions/GovernorProposalGuardianUpgradeable.sol

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// SPDX-License-Identifier: MIT
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/extensions/GovernorProposalGuardian.sol)
23
pragma solidity ^0.8.20;
34

45
import {GovernorUpgradeable} from "../GovernorUpgradeable.sol";

contracts/governance/extensions/GovernorSequentialProposalIdUpgradeable.sol

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// SPDX-License-Identifier: MIT
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/extensions/GovernorSequentialProposalId.sol)
23

34
pragma solidity ^0.8.20;
45

contracts/governance/extensions/GovernorStorageUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (governance/extensions/GovernorStorage.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/extensions/GovernorStorage.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/governance/extensions/GovernorSuperQuorumUpgradeable.sol

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// SPDX-License-Identifier: MIT
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/extensions/GovernorSuperQuorum.sol)
23
pragma solidity ^0.8.20;
34

45
import {GovernorUpgradeable} from "../GovernorUpgradeable.sol";

contracts/governance/extensions/GovernorTimelockAccessUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (governance/extensions/GovernorTimelockAccess.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/extensions/GovernorTimelockAccess.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/governance/extensions/GovernorTimelockCompoundUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (governance/extensions/GovernorTimelockCompound.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/extensions/GovernorTimelockCompound.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (governance/extensions/GovernorTimelockControl.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/extensions/GovernorTimelockControl.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.0.0) (governance/extensions/GovernorVotesQuorumFraction.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/extensions/GovernorVotesQuorumFraction.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/governance/extensions/GovernorVotesSuperQuorumFractionUpgradeable.sol

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// SPDX-License-Identifier: MIT
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (governance/extensions/GovernorVotesSuperQuorumFraction.sol)
23
pragma solidity ^0.8.20;
34

45
import {GovernorUpgradeable} from "../GovernorUpgradeable.sol";

contracts/metatx/ERC2771ForwarderUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (metatx/ERC2771Forwarder.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (metatx/ERC2771Forwarder.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@openzeppelin/contracts-upgradeable",
33
"description": "Secure Smart Contract library for Solidity",
4-
"version": "5.2.0",
4+
"version": "5.3.0-rc.0",
55
"files": [
66
"**/*.sol",
77
"/build/contracts/*.json",
@@ -30,6 +30,6 @@
3030
},
3131
"homepage": "https://openzeppelin.com/contracts/",
3232
"peerDependencies": {
33-
"@openzeppelin/contracts": "5.2.0"
33+
"@openzeppelin/contracts": "5.3.0-rc.0"
3434
}
3535
}

contracts/proxy/utils/Initializable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (proxy/utils/Initializable.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/proxy/utils/UUPSUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.2.0) (proxy/utils/UUPSUpgradeable.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (proxy/utils/UUPSUpgradeable.sol)
33

44
pragma solidity ^0.8.22;
55

contracts/token/ERC20/ERC20Upgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/ERC20.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (token/ERC20/ERC20.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/token/ERC20/extensions/ERC4626Upgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/ERC4626.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (token/ERC20/extensions/ERC4626.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/token/ERC20/extensions/draft-ERC20TemporaryApprovalUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/draft-ERC20TemporaryApproval.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (token/ERC20/extensions/draft-ERC20TemporaryApproval.sol)
33

44
pragma solidity ^0.8.24;
55

contracts/token/ERC6909/draft-ERC6909Upgradeable.sol

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// SPDX-License-Identifier: MIT
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (token/ERC6909/draft-ERC6909.sol)
23

34
pragma solidity ^0.8.20;
45

contracts/token/ERC6909/extensions/draft-ERC6909ContentURIUpgradeable.sol

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// SPDX-License-Identifier: MIT
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (token/ERC6909/extensions/draft-ERC6909ContentURI.sol)
23

34
pragma solidity ^0.8.20;
45

contracts/token/ERC6909/extensions/draft-ERC6909MetadataUpgradeable.sol

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// SPDX-License-Identifier: MIT
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (token/ERC6909/extensions/draft-ERC6909Metadata.sol)
23

34
pragma solidity ^0.8.20;
45

contracts/token/ERC6909/extensions/draft-ERC6909TokenSupplyUpgradeable.sol

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// SPDX-License-Identifier: MIT
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (token/ERC6909/extensions/draft-ERC6909TokenSupply.sol)
23

34
pragma solidity ^0.8.20;
45

contracts/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/extensions/ERC721Consecutive.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (token/ERC721/extensions/ERC721Consecutive.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/extensions/ERC721URIStorage.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (token/ERC721/extensions/ERC721URIStorage.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/token/common/ERC2981Upgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (token/common/ERC2981.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (token/common/ERC2981.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/utils/MulticallUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Multicall.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (utils/Multicall.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/utils/PausableUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (utils/Pausable.sol)
33

44
pragma solidity ^0.8.20;
55

contracts/utils/ReentrancyGuardTransientUpgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuardTransient.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (utils/ReentrancyGuardTransient.sol)
33

44
pragma solidity ^0.8.24;
55

contracts/utils/cryptography/EIP712Upgradeable.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/EIP712.sol)
2+
// OpenZeppelin Contracts (last updated v5.3.0-rc.0) (utils/cryptography/EIP712.sol)
33

44
pragma solidity ^0.8.20;
55

docs/antora.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: contracts
22
title: Contracts
3-
version: 5.x
4-
prerelease: false
3+
version: 5.x-rc
4+
prerelease: true
55
nav:
66
- modules/ROOT/nav.adoc
77
- modules/api/nav.adoc

lib/openzeppelin-contracts

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "openzeppelin-solidity",
33
"description": "Secure Smart Contract library for Solidity",
4-
"version": "5.2.0",
4+
"version": "5.3.0-rc.0",
55
"private": true,
66
"files": [
77
"/contracts/**/*.sol",

0 commit comments

Comments
 (0)