trufflesuite / truffle-compile

Compiler helper and artifact manager
22 stars 46 forks source link

Order ABI correctly in multi-contract files #45

Closed cgewecke closed 6 years ago

cgewecke commented 6 years ago

Addresses truffle 812

While processing the AST to identify ContractDefinitions, we have to make sure a given definition node matches the contract name. Solc produces an AST that lays out all the contracts in a file adjacently but only one of these belongs to the contract in question.

Re-factored the tests so that we have examples of single contract files, multi-contract files and inheritance from an imported file.