Skip to content
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

### Deprecation

- `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.
- `ECDSA` signature malleability protection is partly deprecated. See documentation for more details.

## 5.4.0 (2025-07-17)
Expand Down
2 changes: 2 additions & 0 deletions contracts/proxy/utils/UUPSUpgradeable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol";
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*
* @custom:stateless
*/
abstract contract UUPSUpgradeable is IERC1822Proxiable {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
Expand Down
113 changes: 37 additions & 76 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@nomicfoundation/hardhat-network-helpers": "^1.0.13",
"@openzeppelin/docs-utils": "^0.1.5",
"@openzeppelin/merkle-tree": "^1.0.7",
"@openzeppelin/upgrade-safe-transpiler": "^0.3.32",
"@openzeppelin/upgrade-safe-transpiler": "^0.4.1",
"@openzeppelin/upgrades-core": "^1.20.6",
"chai": "^4.2.0",
"eslint": "^9.0.0",
Expand Down
5 changes: 5 additions & 0 deletions scripts/upgradeable/alias/Initializable.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
5 changes: 5 additions & 0 deletions scripts/upgradeable/alias/UUPSUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;

import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
13 changes: 6 additions & 7 deletions scripts/upgradeable/transpile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fi
# -D: delete original and excluded files
# -b: use this build info file
# -i: use included Initializable
# -x: exclude proxy-related contracts with a few exceptions
# -x: exclude some proxy-related contracts
# -p: emit public initializer
# -n: use namespaces
# -N: exclude from namespaces transformation
Expand All @@ -32,12 +32,8 @@ npx @openzeppelin/upgrade-safe-transpiler -D \
-b "$build_info" \
-i contracts/proxy/utils/Initializable.sol \
-x 'contracts-exposed/**/*' \
-x 'contracts/proxy/**/*' \
-x '!contracts/proxy/Clones.sol' \
-x '!contracts/proxy/ERC1967/ERC1967Storage.sol' \
-x '!contracts/proxy/ERC1967/ERC1967Utils.sol' \
-x '!contracts/proxy/utils/UUPSUpgradeable.sol' \
-x '!contracts/proxy/beacon/IBeacon.sol' \
-x 'contracts/proxy/**/*Proxy*.sol' \
-x 'contracts/proxy/beacon/UpgradeableBeacon.sol' \
-p 'contracts/access/manager/AccessManager.sol' \
-p 'contracts/finance/VestingWallet.sol' \
-p 'contracts/governance/TimelockController.sol' \
Expand All @@ -46,5 +42,8 @@ npx @openzeppelin/upgrade-safe-transpiler -D \
-N 'contracts/mocks/**/*' \
-q '@openzeppelin/'

# create alias to Initializable and UUPSUpgradeable
cp $DIRNAME/alias/*.sol contracts/proxy/utils/.

# delete compilation artifacts of vanilla code
npm run clean
Loading