Skip to content

Commit 751240d

Browse files
committed
fix: emit the correct old admin in _setAdmin (C4 QA)
1 parent ba1a870 commit 751240d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contracts/upgrades/GraphProxyStorage.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,14 @@ contract GraphProxyStorage {
7979
* @param _newAdmin Address of the new proxy admin
8080
*/
8181
function _setAdmin(address _newAdmin) internal {
82+
address oldAdmin = _getAdmin();
8283
bytes32 slot = ADMIN_SLOT;
8384
// solhint-disable-next-line no-inline-assembly
8485
assembly {
8586
sstore(slot, _newAdmin)
8687
}
8788

88-
emit AdminUpdated(_getAdmin(), _newAdmin);
89+
emit AdminUpdated(oldAdmin, _newAdmin);
8990
}
9091

9192
/**

0 commit comments

Comments
 (0)