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

Commit 980fab6

Browse files
committed
added compiler version check
1 parent 2c930b3 commit 980fab6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ethereum/_solidity.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ def compile(cls, code, libraries=None, contract_name=''):
4545
else:
4646
idx = -1
4747
if libraries:
48+
if cls.compiler_version() < "0.1.2":
49+
raise CompileError('Compiler does not support libraries. Please update compiler.')
4850
for lib_name, lib_address in libraries.iteritems():
4951
sorted_contracts[idx][1]['bin'] = sorted_contracts[idx][1]['bin'].replace("__{}{}".format(lib_name, "_" * (38-len(lib_name))), lib_address)
5052
return sorted_contracts[idx][1]['bin'].decode('hex')

0 commit comments

Comments
 (0)