Same Named Contracts
Overview
- Severity: High
- Confidence: High
- Affected Versions: All
What is the Same Named Contracts vulnerability?
For a single compilation unit, reused contract names will cause errors in the Solidity compiler. Some frameworks may attempt to mask these errors and will only compile certain contracts as a result. To avoid such difficulties and simplify code, names should not be reused and should follow the guidelines in the Solidity documentation.
Further reading: Solidity Documentation: Contract and Library Names