Omniscia 0xPhase Audit
IPegToken Code Style Findings
IPegToken Code Style Findings
IPT-01C: Multiple Top-Level Declarations
Type | Severity | Location |
---|---|---|
Code Style | IPegToken.sol:L14, L35 |
Description:
The referenced file contains multiple top-level declarations that decrease the legibility of the codebase.
Example:
peg/IPegToken.sol
14interface IPegToken {15 /// @notice Takes a snapshot of the current token state16 function snapshot() external;17
18 /// @notice Mints tokens for the manager19 /// @param to The address to mint tokens to20 /// @param amount The amount of tokens to mint21 function mintManager(address to, uint256 amount) external;22
23 /// @notice Burns tokens for the manager24 /// @param from The address to burn tokens from25 /// @param amount The amount of tokens to burn26 function burnManager(address from, uint256 amount) external;27
28 /// @notice Transfers tokens for the manager29 /// @param from The address to transfer the tokens from30 /// @param to The address to transfer the tokens to31 /// @param amount The amount of tokens to transfer32 function transferManager(address from, address to, uint256 amount) external;33}34
35abstract contract PegTokenV1Storage is
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 PegTokenV1Storage
implementation was relocated to its dedicated file per our recommendation, optimizing the code's maintainability.