Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e9e5bfb

Browse files
authoredJan 26, 2023
Merge branch 'master' into feature/governor/public-cancel
2 parents 2cfce46 + 69c8d10 commit e9e5bfb

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed
 

‎.changeset/five-ducks-develop.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': patch
3+
---
4+
5+
`UUPSUpgradeable.sol`: Change visibility to the functions `upgradeTo ` and `upgradeToAndCall ` from `external` to `public`.

‎contracts/mocks/proxy/UUPSLegacy.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ contract UUPSUpgradeableLegacyMock is UUPSUpgradeableMock {
4444
}
4545

4646
// hooking into the old mechanism
47-
function upgradeTo(address newImplementation) external override {
47+
function upgradeTo(address newImplementation) public override {
4848
_upgradeToAndCallSecureLegacyV1(newImplementation, bytes(""), false);
4949
}
5050

51-
function upgradeToAndCall(address newImplementation, bytes memory data) external payable override {
51+
function upgradeToAndCall(address newImplementation, bytes memory data) public payable override {
5252
_upgradeToAndCallSecureLegacyV1(newImplementation, data, false);
5353
}
5454
}

‎contracts/mocks/proxy/UUPSUpgradeableMock.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ contract UUPSUpgradeableMock is NonUpgradeableMock, UUPSUpgradeable {
2323
}
2424

2525
contract UUPSUpgradeableUnsafeMock is UUPSUpgradeableMock {
26-
function upgradeTo(address newImplementation) external override {
26+
function upgradeTo(address newImplementation) public override {
2727
ERC1967Upgrade._upgradeToAndCall(newImplementation, bytes(""), false);
2828
}
2929

30-
function upgradeToAndCall(address newImplementation, bytes memory data) external payable override {
30+
function upgradeToAndCall(address newImplementation, bytes memory data) public payable override {
3131
ERC1967Upgrade._upgradeToAndCall(newImplementation, data, false);
3232
}
3333
}

‎contracts/proxy/utils/UUPSUpgradeable.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ abstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade {
6565
*
6666
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
6767
*/
68-
function upgradeTo(address newImplementation) external virtual onlyProxy {
68+
function upgradeTo(address newImplementation) public virtual onlyProxy {
6969
_authorizeUpgrade(newImplementation);
7070
_upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
7171
}
@@ -80,7 +80,7 @@ abstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade {
8080
*
8181
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
8282
*/
83-
function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {
83+
function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
8484
_authorizeUpgrade(newImplementation);
8585
_upgradeToAndCallUUPS(newImplementation, data, true);
8686
}

0 commit comments

Comments
 (0)
Please sign in to comment.