Closed 0xfornax closed 1 year ago
The referenced struct pointer has been set as memory yet only one of its members is read.
struct
memory
OracleRecordV2 memory record = _isFallback ? fallbacks[_token] : oracles[_token]; if (record.oracleAddress == address(0)) { _checkOwner(); } else if (msg.sender != timelockAddress) { revert PriceFeed__TimelockOnlyError(); } }
We advise it to be set as storage, optimizing the function's gas cost significantly.
storage
Fixed.
PFD-03C: Inefficient Pointer Type
Description:
The referenced
struct
pointer has been set asmemory
yet only one of its members is read.Example:
Recommendation:
We advise it to be set as
storage
, optimizing the function's gas cost significantly.