File: contracts/upgrades/GraphProxy.sol
105: require(_newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
141: require(Address.isContract(_pendingImplementation), "Implementation must be a contract");
157: require(msg.sender != _admin(), "Cannot fallback to proxy target");
179: revert(ptr, size)
File: contracts/upgrades/GraphProxyStorage.sol
62: require(msg.sender == _admin(), "Caller must be admin");
File: contracts/upgrades/GraphUpgradeable.sol
24: require(msg.sender == _proxy.admin(), "Caller must be the proxy admin");
32: require(msg.sender == _implementation(), "Caller must be the implementation");
[03] Don’t compare boolean expressions to boolean literals
[01] Use != 0 instead of > 0 to save gas.
For unsigned integer types, comparisons with
!= 0
are cheaper then with> 0
.There are 3 instances of this issue.
[02] Update to solidity >= 0.8.4 and use custom errors rather than require/revert strings to save gas
Custom errors are available from solidity version 0.8.4 and can save ~50 gas each time they’re hit by avoiding having to allocate and store the revert string. Not defining the strings also save deployment gas.
There are 56 instances of this issue.
[03] Don’t compare boolean expressions to boolean literals
if ( == true) => if (), if ( == false) => if (!)
There's 1 instance of this issue.