iamdefinitelyahuman / py-solc-ast

A tool for exploring the solc abstract syntax tree
MIT License
37 stars 10 forks source link

Global enums and structs #12

Closed iamdefinitelyahuman closed 4 years ago

iamdefinitelyahuman commented 4 years ago

What I did

When determining contract dependencies, properly handle enums and structs.

Related issue: https://github.com/eth-brownie/brownie/issues/712

How I did it

Check nodeType and handle the node differently depending on ContractDefinition, StructDefinition or EnumDefinition.

How to verify it

Run tests. I've added a new case specifically around this.

Checklist