From 4bf12da9935c7ce5f45564323fc5ee030a6b990e Mon Sep 17 00:00:00 2001 From: ernestognw Date: Mon, 16 Oct 2023 14:35:23 -0600 Subject: [PATCH 1/5] Add `view` modifier to `proxyAdmin` in TransparentUpgradeableProxy --- contracts/proxy/transparent/TransparentUpgradeableProxy.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol index b2021c74bb0..fdbc841870c 100644 --- a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +++ b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol @@ -83,7 +83,7 @@ contract TransparentUpgradeableProxy is ERC1967Proxy { /** * @dev Returns the admin of this proxy. */ - function _proxyAdmin() internal virtual returns (address) { + function _proxyAdmin() internal virtual view returns (address) { return _admin; } From d7a74091990b62b4c63cf98d2d6606d36d7c4ceb Mon Sep 17 00:00:00 2001 From: ernestognw Date: Mon, 16 Oct 2023 14:38:38 -0600 Subject: [PATCH 2/5] Add changeset --- .changeset/eleven-planets-relax.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/eleven-planets-relax.md diff --git a/.changeset/eleven-planets-relax.md b/.changeset/eleven-planets-relax.md new file mode 100644 index 00000000000..9e5314d0b84 --- /dev/null +++ b/.changeset/eleven-planets-relax.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': patch +--- + +`TransparentUpgradeableProxy`: Make internal `_proxyAdmin()` getter to have `view` visibility. From b5c7e18a4aff492e44caffaab85c9f02774e8ad7 Mon Sep 17 00:00:00 2001 From: ernestognw Date: Mon, 16 Oct 2023 14:40:21 -0600 Subject: [PATCH 3/5] Format --- contracts/proxy/transparent/TransparentUpgradeableProxy.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol index fdbc841870c..48eabc93c41 100644 --- a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +++ b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol @@ -83,7 +83,7 @@ contract TransparentUpgradeableProxy is ERC1967Proxy { /** * @dev Returns the admin of this proxy. */ - function _proxyAdmin() internal virtual view returns (address) { + function _proxyAdmin() internal view virtual returns (address) { return _admin; } From c6ffb775f8abf964a95ca1dc02da13f7c54787a9 Mon Sep 17 00:00:00 2001 From: ernestognw Date: Mon, 16 Oct 2023 16:06:37 -0600 Subject: [PATCH 4/5] Fix typo --- contracts/proxy/transparent/TransparentUpgradeableProxy.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol index 2a6e905ee71..2e3fbc538e6 100644 --- a/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +++ b/contracts/proxy/transparent/TransparentUpgradeableProxy.sol @@ -50,7 +50,7 @@ interface ITransparentUpgradeableProxy is IERC1967 { * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an - * undesirable state where the admin slot is different from the actual admin. Relying in the value of the admin slot + * undesirable state where the admin slot is different from the actual admin. Relying on the value of the admin slot * is generally fine if the implementation is trusted. * * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the From 45fa1a50ef62e0be6142fa4897cdd1fe31d2c2e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Mon, 16 Oct 2023 16:14:19 -0600 Subject: [PATCH 5/5] Update .changeset/eleven-planets-relax.md Co-authored-by: Eric Lau --- .changeset/eleven-planets-relax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/eleven-planets-relax.md b/.changeset/eleven-planets-relax.md index 9e5314d0b84..a1f1bbf1c4e 100644 --- a/.changeset/eleven-planets-relax.md +++ b/.changeset/eleven-planets-relax.md @@ -2,4 +2,4 @@ 'openzeppelin-solidity': patch --- -`TransparentUpgradeableProxy`: Make internal `_proxyAdmin()` getter to have `view` visibility. +`TransparentUpgradeableProxy`: Make internal `_proxyAdmin()` getter have `view` visibility.