Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tuturu-tech opened this issue Apr 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@tuturu-tech
Copy link
Collaborator

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 tuturu-tech added the bug Something isn't working label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant