Forge script crashes when two script contracts have the same name. #3177
Labels
C-forge
Command: forge
Cmd-forge-script
Command: forge script
T-bug
Type: bug
T-to-reproduce
Type: requires reproduction
Milestone
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (63c71b4 2022-09-12T00:05:14.033477Z)
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
When two 'script contracts' have the same name, and
forge script
is run for any function in the contract, forge crashes with this error:It is likely that having two contracts with the same name in different files is not ideal (or possibly not valid, they compiled fine). However, if that is the case then forge should detect this and print a friendly error.
Thanks!
The text was updated successfully, but these errors were encountered: