From d875c1b2c09f2e5c25bbbf5551889eb56e4c8e7d Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 6 Feb 2024 11:56:05 +0700 Subject: [PATCH 1/3] chore: update forge-std --- lib/forge-std | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/forge-std b/lib/forge-std index 87a2a0a..4513bc2 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 87a2a0afc5fafd6297538a45a52ac19e71a84562 +Subproject commit 4513bc2063f23c57bee6558799584b518d387a39 From a752baf45a9226a6e62d3b66bcc656466eb0eff6 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 20 Feb 2024 14:03:29 +0700 Subject: [PATCH 2/3] chore: update forge-std --- lib/forge-std | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/forge-std b/lib/forge-std index 4513bc2..1d0766b 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 4513bc2063f23c57bee6558799584b518d387a39 +Subproject commit 1d0766bc5d814f117c7b1e643828f7d85024fb51 From dab3025c6b8d59c4d0e2e30a744f5a6d27d2fcad Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 20 Feb 2024 14:06:46 +0700 Subject: [PATCH 3/3] fix(LibProxy): add view to functions in LibProxy --- script/libraries/LibProxy.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/libraries/LibProxy.sol b/script/libraries/LibProxy.sol index 77198c1..046e088 100644 --- a/script/libraries/LibProxy.sol +++ b/script/libraries/LibProxy.sol @@ -9,7 +9,7 @@ library LibProxy { bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; - function getProxyAdmin(address payable proxy, bool nullCheck) internal returns (address payable proxyAdmin) { + function getProxyAdmin(address payable proxy, bool nullCheck) internal view returns (address payable proxyAdmin) { proxyAdmin = payable(address(uint160(uint256(vm.load(address(proxy), ADMIN_SLOT))))); if (!nullCheck) return proxyAdmin; require( @@ -18,11 +18,11 @@ library LibProxy { ); } - function getProxyAdmin(address payable proxy) internal returns (address payable proxyAdmin) { + function getProxyAdmin(address payable proxy) internal view returns (address payable proxyAdmin) { proxyAdmin = getProxyAdmin({ proxy: proxy, nullCheck: true }); } - function getProxyImplementation(address payable proxy, bool nullCheck) internal returns (address payable impl) { + function getProxyImplementation(address payable proxy, bool nullCheck) internal view returns (address payable impl) { impl = payable(address(uint160(uint256(vm.load(address(proxy), IMPLEMENTATION_SLOT))))); if (!nullCheck) return impl; require( @@ -31,7 +31,7 @@ library LibProxy { ); } - function getProxyImplementation(address payable proxy) internal returns (address payable impl) { + function getProxyImplementation(address payable proxy) internal view returns (address payable impl) { impl = getProxyImplementation({ proxy: proxy, nullCheck: true }); } }