Omniscia 0xPhase Audit

IPegToken Code Style Findings

IPegToken Code Style Findings

IPT-01C: Multiple Top-Level Declarations

TypeSeverityLocation
Code StyleIPegToken.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 state
16 function snapshot() external;
17
18 /// @notice Mints tokens for the manager
19 /// @param to The address to mint tokens to
20 /// @param amount The amount of tokens to mint
21 function mintManager(address to, uint256 amount) external;
22
23 /// @notice Burns tokens for the manager
24 /// @param from The address to burn tokens from
25 /// @param amount The amount of tokens to burn
26 function burnManager(address from, uint256 amount) external;
27
28 /// @notice Transfers tokens for the manager
29 /// @param from The address to transfer the tokens from
30 /// @param to The address to transfer the tokens to
31 /// @param amount The amount of tokens to transfer
32 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.