Omniscia Metavisor Audit
Errors Code Style Findings
Errors Code Style Findings
ESR-01C: Potential Error Usability Enhancements
Type | Severity | Location |
---|---|---|
Code Style | Errors.sol:L5-L6, L8-L10, L12-L17, L19 |
Description:
The referenced error
declarations contain no arguments specified.
Example:
contracts/helpers/Errors.sol
4abstract contract Errors {5 error NotGoverner();6 error NotPool();7
8 error InvalidNumerator();9 error AlreadyDeployed();10 error AlreadySet();11
12 error InvalidDeposit();13 error InvalidWithdraw();14 error InvalidCompound();15 error NoLiquidity();16 error CanNotRescale();17 error NotAllowedToRescale();18
19 error TicksOutOfRange();20}
Recommendation:
We advise arguments to be introduced to the error
declarations, permitting them to emit data for off-chain use that might aid in debugging the error
raised, such as the value used for an InvalidNumerator
.
Alleviation:
Arguments have been set for multiple errors as per our recommendation.