diff --git a/ethereum/tools/_solidity.py b/ethereum/tools/_solidity.py index 8eb47f055..b1b1d979c 100644 --- a/ethereum/tools/_solidity.py +++ b/ethereum/tools/_solidity.py @@ -165,6 +165,13 @@ def solidity_names(code): # pylint: disable=too-many-branches if result: names.append(('contract', result.groups()[0])) + if char == 'i' and code[pos: pos + 9] == 'interface': + result = re.match('^interface[^_$a-zA-Z]+([_$a-zA-Z][_$a-zA-Z0-9]*)', code[pos:]) + + if result: + names.append(('contract', result.groups()[0])) + + if char == 'l' and code[pos: pos + 7] == 'library': result = re.match('^library[^_$a-zA-Z]+([_$a-zA-Z][_$a-zA-Z0-9]*)', code[pos:])