Skip to content

Commit c74885f

Browse files
committed
fix: add some missing revert strings (C4 QA)
1 parent 8d73fc3 commit c74885f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

contracts/upgrades/GraphProxy.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ contract GraphProxy is GraphProxyStorage, IGraphProxy {
141141
_acceptUpgrade();
142142
// solhint-disable-next-line avoid-low-level-calls
143143
(bool success, ) = _getImplementation().delegatecall(data);
144-
require(success);
144+
require(success, "Impl call failed");
145145
}
146146

147147
/**

contracts/upgrades/GraphProxyAdmin.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ contract GraphProxyAdmin is Governed {
3232
// We need to manually run the static call since the getter cannot be flagged as view
3333
// bytes4(keccak256("implementation()")) == 0x5c60da1b
3434
(bool success, bytes memory returndata) = address(_proxy).staticcall(hex"5c60da1b");
35-
require(success);
35+
require(success, "Proxy impl call failed");
3636
return abi.decode(returndata, (address));
3737
}
3838

@@ -46,7 +46,7 @@ contract GraphProxyAdmin is Governed {
4646
// We need to manually run the static call since the getter cannot be flagged as view
4747
// bytes4(keccak256("pendingImplementation()")) == 0x396f7b23
4848
(bool success, bytes memory returndata) = address(_proxy).staticcall(hex"396f7b23");
49-
require(success);
49+
require(success, "Proxy pendingImpl call failed");
5050
return abi.decode(returndata, (address));
5151
}
5252

@@ -59,7 +59,7 @@ contract GraphProxyAdmin is Governed {
5959
// We need to manually run the static call since the getter cannot be flagged as view
6060
// bytes4(keccak256("admin()")) == 0xf851a440
6161
(bool success, bytes memory returndata) = address(_proxy).staticcall(hex"f851a440");
62-
require(success);
62+
require(success, "Proxy admin call failed");
6363
return abi.decode(returndata, (address));
6464
}
6565

0 commit comments

Comments
 (0)