Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
return contract with contract_name if contract_name is set
  • Loading branch information
Georgi87 committed Oct 30, 2016
commit 6c6e6bb2899c3ff440452c4f6f3589f7ff406d77
2 changes: 1 addition & 1 deletion ethereum/_solidity.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def _code_or_path(sourcecode, path, contract_name, libraries, combined, extra_ar
last_contract = all_contract_names[-1]

result = compile_code(sourcecode, libraries=libraries, combined=combined, extra_args=extra_args)
return result[last_contract]
return result[contract_name] if contract_name else result[last_contract]

@classmethod
def compile(cls, code, path=None, libraries=None, contract_name='', extra_args=None):
Expand Down