DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Incorrect Import Path for ECDSA Utility in soliditybranch.sol

Summary

The Solidity file soliditybranch.sol contains an incorrect import path for the ECDSA utility from the OpenZeppelin library. This incorrect path can lead to compilation errors, preventing the contract from being deployed or tested correctly.

Vulnerability Details

Incorrect Import in soliditybranch.sol:

import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

Correct Import:

import { ECDSA } from "@openzeppelin/utils/cryptography/ECDSA.sol";

Issue:

  • The incorrect path @openzeppelin/contracts/utils/cryptography/ECDSA.sol does not exist in the current version of the OpenZeppelin library.

  • The correct path is @openzeppelin/utils/cryptography/ECDSA.sol.

This is because, in the path has been remaped in the remapping.txt

@openzeppelin/=lib/openzeppelin-contracts/contracts/

Impact

The incorrect import path causes the following issues:

  • Compilation Errors: The contract will not compile due to the incorrect import path, halting the development process.

  • Deployment Delays: Incorrect imports need to be identified and fixed before deployment, leading to potential delays in project timelines.

  • Testing Issues: Unit tests and other automated tests will fail if the contract does not compile, hindering continuous integration and deployment workflows.

Tools Used

  • Manual code review

  • Solidity compiler

Recommendations

Correct the Import Path: Update the import statement in soliditybranch.sol to use the correct path for the ECDSA utility from the OpenZeppelin library. The correct import statement is:

import { ECDSA } from "@openzeppelin/utils/cryptography/ECDSA.sol";
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!