Skip to content

Commit

Permalink
Fix the solidity combined-json result key
Browse files Browse the repository at this point in the history
In solidity version 0.4.9 the `--combined-json` output has
[changed](https://github.com/ethereum/solidity/blob/develop/Changelog.md#049-unreleased).

Now the dictionary key by which a contract is identified is the relative
filepath followed by ':' and finally follow by the contract name.
  • Loading branch information
LefterisJP authored and konradkonrad committed Mar 3, 2017
1 parent 9bd9e9a commit a86f9e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ethereum/_solidity.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ def compile_contract(filepath, contract_name, libraries=None, combined='bin,abi'
optimize=optimize,
extra_args=extra_args
)

return all_contracts[contract_name]
_, filename = os.path.split(filepath)
return all_contracts[filename + ":" + contract_name]


def compile_last_contract(filepath, libraries=None, combined='bin,abi', optimize=True, extra_args=None):
Expand Down

0 comments on commit a86f9e1

Please sign in to comment.