Skip to content

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

Open
@tuturu-tech

Description

@tuturu-tech

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions