I have my projects in Solidity with contracts in different files, folders. I would like to write a Python/Javascript script to tell me how the files are dependent on each other (i.e. A requires B, then B requires C and D, etc.). I also want to do it for class inheritance. What is the best way to do it? Do I just have to parse the code as text file and look for import or is there a better way? Thanks in advance.

  • This is a textual (or regular expression) parsing issue which has nothing specific with Ethereum. Commented Apr 27, 2020 at 8:30
  • that's true. How can I move it to relevant section? Commented Apr 27, 2020 at 8:41
  • Try stackoverflow.com/questions. Commented Apr 27, 2020 at 8:42

1 Answer 1


There are some existing tools you can use instead to generate a graph of your contracts dependencies


Not the answer you're looking for? Browse other questions tagged or ask your own question.