Skip to content

Commit 955ef32

Browse files
authored
Merge branch 'master' into fix/erc1155/use-batch-hook-for-batches-of-1
2 parents 21f85a0 + 353f564 commit 955ef32

File tree

85 files changed

+1638
-306
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1638
-306
lines changed

.changeset/shaky-phones-mix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': minor
3+
---
4+
5+
`TrieProof`: Add library for verifying Ethereum Merkle-Patricia trie inclusion proofs.

.changeset/tender-pans-yawn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': minor
3+
---
4+
5+
`Bytes`: Add the `toNibbles` function that expands the nibbles (4 bits chunk) of a `bytes` buffer. Used for manipulating Patricia Merkle Trees keys and paths.

CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
### Breaking changes
44

55
- `ERC1155`: Performing batch transfers with exactly one id/value in the batch no-longer calls `IERC1155Receiver.onERC1155Received`. `IERC1155Receiver.onERC1155BatchReceived` is called instead (with arrays of length one). ([#6170](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/6170))
6-
- `ERC1967Proxy` and `TransparentUpgradeableProxy`: Mandate initialization during construction. Deployment now reverts with `ERC1967ProxyUninitialized` if an initialize call is not provided. Developers that rely on the previous behavior and want to disable this check can do so by overriding the internal `_unsafeAllowUninitialized` function to return true.
7-
- `ERC721` and `ERC1155`: Prevent setting an operator for `address(0)`. In the case of `ERC721` this type of operator allowance could lead to obfuscated mint permission.
8-
- `RLP`: The `encode(bytes32)` function now encodes `bytes32` as a fixed size item and not as a scalar in `encode(uint256)`. Users must replace calls to `encode(bytes32)` with `encode(uint256(bytes32))` to preserve the same behavior.
6+
- `ERC1967Proxy` and `TransparentUpgradeableProxy`: Mandate initialization during construction. Deployment now reverts with `ERC1967ProxyUninitialized` if an initialize call is not provided. Developers that rely on the previous behavior and want to disable this check can do so by overriding the internal `_unsafeAllowUninitialized` function to return true. ([#5906](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5906))
7+
- `ERC721` and `ERC1155`: Prevent setting an operator for `address(0)`. In the case of `ERC721` this type of operator allowance could lead to obfuscated mint permission. ([#6171](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/6171))
8+
- `RLP`: The `encode(bytes32)` function now encodes `bytes32` as a fixed size item and not as a scalar in `encode(uint256)`. Users must replace calls to `encode(bytes32)` with `encode(uint256(bytes32))` to preserve the same behavior. ([#6167](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/6167))
99

1010
## 5.5.0 (2025-10-31)
1111

@@ -26,7 +26,7 @@
2626

2727
### Deprecation
2828

29-
- `Initializable` and `UUPSUpgradeable` are no longer transpiled. An alias is present in the `@openzeppelin/contracts-upgradeable` package that redirect to the corresponding file in `@openzeppelin/contracts`. These alias will be removed in the next major release. Developers are advised to update their imports to get these files directly from the `@openzeppelin/contracts` package. [#5941](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5941)
29+
- `Initializable` and `UUPSUpgradeable` are no longer transpiled. Aliases are present in the `@openzeppelin/contracts-upgradeable` package that redirect to the corresponding files in `@openzeppelin/contracts`. These aliases will be removed in the next major release. Developers are advised to update their imports to get these files directly from the `@openzeppelin/contracts` package. [#5941](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5941)
3030
- `ECDSA` signature malleability protection is partly deprecated. See documentation for more details. [#5814](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5814)
3131

3232
### Changes by category
@@ -94,7 +94,7 @@
9494

9595
### Pragma changes
9696

97-
- Reduced pragma requirement of interface files
97+
- Reduced pragma requirement of interface files.
9898

9999
### Changes by category
100100

GUIDELINES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ In addition to the official Solidity Style Guide we have a number of other conve
125125
```
126126

127127
* Contracts not intended to be used standalone should be marked abstract
128-
so they are required to be inherited to other contracts.
128+
so they are required to be inherited by other contracts.
129129

130130
```solidity
131131
abstract contract AccessControl is ..., {

contracts/access/AccessControl.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 {
6565
_;
6666
}
6767

68-
/// @inheritdoc IERC165
68+
/// @inheritdoc ERC165
6969
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
7070
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
7171
}

contracts/access/extensions/AccessControlDefaultAdminRules.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu
315315
/**
316316
* @dev Setter of the tuple for pending admin and its schedule.
317317
*
318-
* May emit a DefaultAdminTransferCanceled event.
318+
* May emit a {DefaultAdminTransferCanceled} event.
319319
*/
320320
function _setPendingDefaultAdmin(address newAdmin, uint48 newSchedule) private {
321321
(, uint48 oldSchedule) = pendingDefaultAdmin();
@@ -333,7 +333,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu
333333
/**
334334
* @dev Setter of the tuple for pending delay and its schedule.
335335
*
336-
* May emit a DefaultAdminDelayChangeCanceled event.
336+
* May emit a {DefaultAdminDelayChangeCanceled} event.
337337
*/
338338
function _setPendingDelay(uint48 newDelay, uint48 newSchedule) private {
339339
uint48 oldSchedule = _pendingDelaySchedule;

contracts/access/extensions/IAccessControlDefaultAdminRules.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ interface IAccessControlDefaultAdminRules is IAccessControl {
103103
*
104104
* - Only can be called by the current {defaultAdmin}.
105105
*
106-
* Emits a DefaultAdminRoleChangeStarted event.
106+
* Emits a {DefaultAdminTransferScheduled} event.
107107
*/
108108
function beginDefaultAdminTransfer(address newAdmin) external;
109109

@@ -116,7 +116,7 @@ interface IAccessControlDefaultAdminRules is IAccessControl {
116116
*
117117
* - Only can be called by the current {defaultAdmin}.
118118
*
119-
* May emit a DefaultAdminTransferCanceled event.
119+
* May emit a {DefaultAdminTransferCanceled} event.
120120
*/
121121
function cancelDefaultAdminTransfer() external;
122122

@@ -160,7 +160,7 @@ interface IAccessControlDefaultAdminRules is IAccessControl {
160160
*
161161
* - Only can be called by the current {defaultAdmin}.
162162
*
163-
* Emits a DefaultAdminDelayChangeScheduled event and may emit a DefaultAdminDelayChangeCanceled event.
163+
* Emits a {DefaultAdminDelayChangeScheduled} event and may emit a {DefaultAdminDelayChangeCanceled} event.
164164
*/
165165
function changeDefaultAdminDelay(uint48 newDelay) external;
166166

@@ -171,7 +171,7 @@ interface IAccessControlDefaultAdminRules is IAccessControl {
171171
*
172172
* - Only can be called by the current {defaultAdmin}.
173173
*
174-
* May emit a DefaultAdminDelayChangeCanceled event.
174+
* May emit a {DefaultAdminDelayChangeCanceled} event.
175175
*/
176176
function rollbackDefaultAdminDelay() external;
177177

contracts/access/manager/IAccessManager.sol

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ interface IAccessManager {
3636
*
3737
* NOTE: The meaning of the `since` argument depends on the `newMember` argument.
3838
* If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,
39-
* otherwise it indicates the execution delay for this account and roleId is updated.
39+
* otherwise it indicates the timestamp when the execution delay update takes effect for this account and roleId.
4040
*/
4141
event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);
4242

@@ -196,6 +196,7 @@ interface IAccessManager {
196196
* Requirements:
197197
*
198198
* - the caller must be a global admin
199+
* - `roleId` must not be the `ADMIN_ROLE` or `PUBLIC_ROLE`
199200
*
200201
* Emits a {RoleLabel} event.
201202
*/
@@ -254,6 +255,7 @@ interface IAccessManager {
254255
* Requirements:
255256
*
256257
* - the caller must be a global admin
258+
* - `roleId` must not be the `ADMIN_ROLE` or `PUBLIC_ROLE`
257259
*
258260
* Emits a {RoleAdminChanged} event
259261
*/
@@ -265,6 +267,7 @@ interface IAccessManager {
265267
* Requirements:
266268
*
267269
* - the caller must be a global admin
270+
* - `roleId` must not be the `ADMIN_ROLE` or `PUBLIC_ROLE`
268271
*
269272
* Emits a {RoleGuardianChanged} event
270273
*/
@@ -276,6 +279,7 @@ interface IAccessManager {
276279
* Requirements:
277280
*
278281
* - the caller must be a global admin
282+
* - `roleId` must not be the `PUBLIC_ROLE`
279283
*
280284
* Emits a {RoleGrantDelayChanged} event.
281285
*/

contracts/account/extensions/draft-AccountERC7579.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ abstract contract AccountERC7579 is Account, IERC1271, IERC7579Execution, IERC75
401401
* actual copy. However, this would require `_installModule` to get a calldata bytes object instead of a memory
402402
* bytes object. This would prevent calling `_installModule` from a contract constructor and would force the use
403403
* of external initializers. That may change in the future, as most accounts will probably be deployed as
404-
* clones/proxy/ERC-7702 delegates and therefore rely on initializers anyway.
404+
* clones/proxy/EIP-7702 delegates and therefore rely on initializers anyway.
405405
*/
406406
function _decodeFallbackData(
407407
bytes memory data

contracts/account/utils/EIP7702Utils.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pragma solidity ^0.8.20;
66
/**
77
* @dev Library with common EIP-7702 utility functions.
88
*
9-
* See https://eips.ethereum.org/EIPS/eip-7702[ERC-7702].
9+
* See https://eips.ethereum.org/EIPS/eip-7702[EIP-7702].
1010
*/
1111
library EIP7702Utils {
1212
bytes3 internal constant EIP7702_PREFIX = 0xef0100;

0 commit comments

Comments
 (0)