The CurveAdapter.sol
, UniswapV2Adapter.sol
and UniswapV3Adapter.sol
contracts contain a duplicate import statement for the Errors.sol
file. This redundancy can lead to compilation warnings, unnecessary gas consumption, and potential issues with code clarity. It's important to remove the duplicate import and ensure proper import practices across all contracts.
The Errors.sol
file is imported twice in CurveAdapter.sol
, UniswapV2Adapter.sol
and UniswapV3Adapter.sol
, which is unnecessary and can cause compilation issues or warnings.
src/utils/dex-adapters/CurveAdapter.sol#L5-L9
src/utils/dex-adapters/UniswapV2Adapter.sol#L5-L11
src/utils/dex-adapters/UniswapV3Adapter.sol#L5-L10
Compilation Warnings: Redundant imports can trigger unnecessary warnings during the compilation process, which can clutter the build output and potentially lead to confusion.
Increased Gas Consumption: Duplicate imports do not add any functionality but may increase the overall gas cost due to the redundancy.
Reduced Code Readability: Repetitive code decreases clarity and maintainability, making the contract harder to read and understand.
Potential Naming Conflicts: Repeated imports may result in naming conflicts or ambiguity, especially if different versions of the same contract are imported elsewhere.
Manual Code Review
It is recommended to remove duplicate import and delete the redundant import of Errors.sol
to ensure cleaner and more efficient code.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.