Omniscia 0xPhase Audit
IChainlinkOracle Code Style Findings
IChainlinkOracle Code Style Findings
ICO-01C: Multiple Top-Level Declarations
Type | Severity | Location |
---|---|---|
Code Style | IChainlinkOracle.sol:L9, L21 |
Description:
The referenced file contains multiple top-level declarations that decrease the legibility of the codebase.
Example:
oracle/oracles/chainlink/IChainlinkOracle.sol
9interface IChainlinkOracle is IOracle {10 /// @notice Event emitted when the feed for an address is set11 /// @param asset The asset address12 /// @param feed The feed address13 event FeedSet(address indexed asset, address feed);14
15 /// @notice Sets the feed for an asset16 /// @param asset The asset address17 /// @param feed The feed address18 function setFeed(address asset, address feed) external;19}20
21abstract contract ChainlinkOracleStorageV1 is ProxyOwnable, IChainlinkOracle {
Recommendation:
We advise all highlighted top-level declarations to be split into their respective code files, avoiding unnecessary imports as well as increasing the legibility of the codebase.
Alleviation (3dd3d7bf0c2693b2f9c23bacedfa420393f7ea84):
The ChainlinkOracleStorageV1
implementation was split to its dedicated file, rendering this exhibit applied in full.