fuzz-utils icon indicating copy to clipboard operation
fuzz-utils copied to clipboard

[Bug-Candidate]: Functions with the same signature can be generated multiple times

Open tuturu-tech opened this issue 1 year ago • 0 comments

Describe the issue:

When multiple contracts have functions with the same signature fuzz-utils will generate the same function multiple times, preventing compilation.

We should:

  • Add a prefix to the function e.g., contractName_functionName when generating
  • Detect if a function is overriden and only generate one instance in that case

Code example to reproduce the issue:

contract A {
  function transferFrom(address from, address to, uint256 amount) public virtual returns (bool) {
    // Do something
  }
}

contract B is A {
  function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
    // Do something else
  }
}

Version:

0.2.0

Relevant log output:

N/A

tuturu-tech avatar Apr 24 '24 10:04 tuturu-tech