Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit a86f9e1

Browse files
LefterisJPkonradkonrad
authored andcommitted
Fix the solidity combined-json result key
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.
1 parent 9bd9e9a commit a86f9e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ethereum/_solidity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ def compile_contract(filepath, contract_name, libraries=None, combined='bin,abi'
269269
optimize=optimize,
270270
extra_args=extra_args
271271
)
272-
273-
return all_contracts[contract_name]
272+
_, filename = os.path.split(filepath)
273+
return all_contracts[filename + ":" + contract_name]
274274

275275

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

0 commit comments

Comments
 (0)