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

Commit 85845f1

Browse files
committed
Use solidity_get_contract_data in other methods
Some compiler methods were missing the new method for extracting contract data.
1 parent 5731c8f commit 85845f1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ethereum/_solidity.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def _code_or_path(sourcecode, path, contract_name, libraries, combined, extra_ar
362362
last_contract = all_contract_names[-1]
363363

364364
result = compile_code(sourcecode, libraries=libraries, combined=combined, extra_args=extra_args)
365-
return result[last_contract]
365+
return solidity_get_contract_data(result, path, last_contract)
366366

367367
@classmethod
368368
def compile(cls, code, path=None, libraries=None, contract_name='', extra_args=None):
@@ -405,7 +405,12 @@ def combined(cls, code, path=None, extra_args=None):
405405

406406
sorted_contracts = []
407407
for name in solidity_names(code):
408-
sorted_contracts.append((name[1], contracts[name[1]]))
408+
sorted_contracts.append(
409+
(
410+
name[1],
411+
solidity_get_contract_data(contracts, path, name[1])
412+
)
413+
)
409414
return sorted_contracts
410415

411416
@classmethod

0 commit comments

Comments
 (0)