feat: fixes after audit #32
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
What does this PR change?
Implements audit recommendations from the 2024-12-26 Aqua Protocol Audit Report. Addresses 2 Low severity findings and 8 Informational findings to improve code quality, documentation, and prevent edge-case issues.
Related Issue/Ticket:
0c908761cf9f9b18ada86a6ef8b72c8534dc8005Changes Implemented
Low Severity Fixes
^0.8.0to^0.8.24to match transient storage requirementsdock()undefined behavior with empty tokens arrayrequire(tokens.length > 0, EmptyTokensArray())checkInformational Fixes
safeBalances()missing revert documentation@devtag with specific error referenceIAquainterface with NatSpecFindings NOT Addressed (by design)
ship()can be called multiple times with different tokensFiles Modified
src/interfaces/IAqua.solsrc/Aqua.solsrc/libs/ReentrancyGuard.solsrc/libs/Balance.solsrc/libs/Multicall.soltest/Aqua.t.solAqua.*toIAqua.*Testing & Verification
How was this tested?
Test Results:
Risk Assessment
Risk Level:
Risks & Impact
IAquainterface instead ofAquacontract. External code referencingAqua.ErrorNamemust update toIAqua.ErrorNameEmptyTokensArray()revert indock()Breaking Changes:
Aqua.*toIAqua.*Migration Required: