slither icon indicating copy to clipboard operation
slither copied to clipboard

Slither does not handle multiple contracts with the same name across compilation units

Open hacker-DOM opened this issue 2 years ago • 2 comments

Consider the codebase https://github.com/hacker-DOM/reference-resolving/tree/ecd8bf0e91a3636104b5ffc805537eaac2eeb8d7

These are the results for inheritance-graph and call-graph, both of which are wrong

image

image

hacker-DOM avatar Sep 01 '23 15:09 hacker-DOM

Indeed the printers merge contracts with the same name, which they should not. We will update the printer.

montyly avatar Sep 05 '23 08:09 montyly

We need to make these id's unique across compilation unit https://github.com/crytic/slither/blob/e5f2a86f0906fd62c6c4eccb9dbfa5ab30671a78/slither/printers/call/call_graph.py#L20-L25 https://github.com/crytic/slither/blob/e5f2a86f0906fd62c6c4eccb9dbfa5ab30671a78/slither/printers/inheritance/inheritance_graph.py#L103-L106

0xalpharush avatar Sep 29 '23 21:09 0xalpharush