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

Colliding contract names #7199

Closed
2 tasks done
ShahriarJavidi opened this issue Feb 21, 2024 · 2 comments
Closed
2 tasks done

Colliding contract names #7199

ShahriarJavidi opened this issue Feb 21, 2024 · 2 comments
Labels
T-bug Type: bug

Comments

@ShahriarJavidi
Copy link

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (2f4b5db 2024-02-21T00:17:48.983570637Z)

What command(s) is the bug in?

forge build

Operating System

Linux

Describe the bug

If there are multiple .sol files with the same name, but in different paths/dependencies, forge build creates the same .json output file for both, hence overwriting one output with another one. A concrete example of this happening is GearBox V3, where they have multiple imports of SafeERC20.sol, once from @1inch/solidity-utils/contracts/libraries/SafeERC201.sol and once from @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol. The output .json is created only for one of them.

@ShahriarJavidi ShahriarJavidi added the T-bug Type: bug label Feb 21, 2024
@0xalpharush
Copy link
Contributor

This looks related/similar to gakonst/ethers-rs#1995

@ShahriarJavidi
Copy link
Author

Fixed as mentioned in this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
None yet
Development

No branches or pull requests

2 participants