Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Using two times the same filename will lead to corrupted compilation artifacts #5059

Closed
1 task
montyly opened this issue Apr 27, 2022 · 1 comment
Closed
1 task

Comments

@montyly
Copy link

montyly commented Apr 27, 2022


Issue

If there are two files with the same name, the compilation artifacts will only contain one of the .json, preventing the analysis from third parties tool (such as Slither - see crytic/slither#1176)

Steps to Reproduce

See the example in crytic/slither#1176

Expected Behavior

After running truffle compile, there should be two IERC721Receiver.json file in build/contracts

Actual Results

Due to the compilation artifacts filenames structure, only one file is generated (the second one is overwritten)

Environment

Truffle v5.5.11 (core: 5.5.11)
Ganache v^7.0.4
Solidity - 0.8.13 (solc-js)
Node v16.13.0
Web3.js v1.5.3

@lsqproduction
Copy link
Contributor

@montyly Thank you for the report. This is a known limitation at present, the contract name (not file name) needs to be unique. We have a long-standing open issue for this, please see #1087. Closing this for duplication and hopefully, we will address the original issue soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants