From d612234c889efb3967797f67822322d48df2e353 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Thu, 1 Jun 2017 13:59:40 +0200 Subject: [PATCH 1/2] Use interface supporting pyethereum Use https://github.com/ethereum/pyethereum/pull/737 --- requirements.txt | 3 ++- setup.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d562371935..efed5789d1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,13 +5,14 @@ pysha3 git+https://github.com/LefterisJP/pyethapp@raiden_pyethapp_fork#egg=pyethapp # temporary until pystun creates a new release git+https://github.com/konradkonrad/pystun@develop#egg=pystun +# temporary until new version of pyethereum is released, that supports interfaces +git+https://github.com/LefterisJP/pyethereum@take_solidity_interface_into_account#egg=ethereum ipython<5.0.0 rlp>=0.4.3 coincurve==4.5.1 pycryptodome>=3.4.3 miniupnpc networkx -ethereum>=1.6.1 ethereum-serpent repoze.lru gevent-websocket==0.9.4 diff --git a/setup.py b/setup.py index 4de877ed5c..e2b1691669 100755 --- a/setup.py +++ b/setup.py @@ -49,6 +49,7 @@ def run(self): install_requires_replacements = { "git+https://github.com/LefterisJP/pyethapp@raiden_pyethapp_fork#egg=pyethapp": "pyethapp", + "git+https://github.com/LefterisJP/pyethereum@take_solidity_interface_into_account#egg=ethereum": "ethereum", "git+https://github.com/LefterisJP/pyelliptic@make_compatible_with_openssl1_1#egg=pyelliptic": "pyelliptic", "git+https://github.com/konradkonrad/pystun@develop#egg=pystun": "pystun", } From ed31fd9650446930c3401bb35513671f3720e428 Mon Sep 17 00:00:00 2001 From: Konrad Feldmeier Date: Fri, 2 Jun 2017 15:34:47 +0200 Subject: [PATCH 2/2] Skip interfaces in dependency deployment Interfaces compile to empty bytecode, which leads to errors in the deployment function. --- tools/create_compilation_dump.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/create_compilation_dump.py b/tools/create_compilation_dump.py index 5256f9304c..95ef6a5b70 100755 --- a/tools/create_compilation_dump.py +++ b/tools/create_compilation_dump.py @@ -70,13 +70,7 @@ def deploy_all(token_groups=None): tokens[token_name] = address deployed[token_name] = address - deployed.update( - deploy_with_dependencies( - TARGETS['token'], - state - ) - ) - libraries = deployed.copy() + libraries = dict() deployed.update( deploy_with_dependencies( TARGETS['registry'], @@ -202,6 +196,13 @@ def find_dependencies(contract_file): for dependency in dependencies: if dependency not in cleaned: cleaned.append(dependency) + dependencies = cleaned + cleaned = [] + for dependency in dependencies: + with open(get_contract_path(dependency)) as handler: + if any(line.startswith('interface') for line in handler.readlines()): + continue + cleaned.append(dependency) return cleaned