diff --git a/raiden/network/rpc/client.py b/raiden/network/rpc/client.py index a9476c9dc8..cf48d46d9f 100644 --- a/raiden/network/rpc/client.py +++ b/raiden/network/rpc/client.py @@ -266,6 +266,7 @@ def deploy_contract(self, contract_name, contract_file, constructor_parameters=N contracts, dict(), constructor_parameters, + contract_path=contract_path, gasprice=default_gasprice, timeout=self.poll_timeout, ) diff --git a/raiden/tests/fixtures/blockchain.py b/raiden/tests/fixtures/blockchain.py index b820cc6db3..fca4230bf4 100644 --- a/raiden/tests/fixtures/blockchain.py +++ b/raiden/tests/fixtures/blockchain.py @@ -366,6 +366,7 @@ def _jsonrpc_services( registry_contracts, dict(), tuple(), + contract_path=registry_path, gasprice=default_gasprice, timeout=poll_timeout, ) diff --git a/raiden/tests/integration/test_blockchainservice.py b/raiden/tests/integration/test_blockchainservice.py index 1dd746d6e6..6e42e2db9c 100644 --- a/raiden/tests/integration/test_blockchainservice.py +++ b/raiden/tests/integration/test_blockchainservice.py @@ -12,6 +12,7 @@ from raiden.network.rpc.client import decode_topic, patch_send_transaction from raiden.utils import privatekey_to_address, get_contract_path +from raiden.blockchain.abi import CHANNEL_MANAGER_ABI solidity = _solidity.get_solidity() # pylint: disable=invalid-name @@ -191,6 +192,7 @@ def test_blockchain( humantoken_contracts, dict(), (total_asset, 'raiden', 2, 'Rd'), + contract_path=humantoken_path, gasprice=default_gasprice, timeout=poll_timeout, ) @@ -203,6 +205,7 @@ def test_blockchain( registry_contracts, dict(), tuple(), + contract_path=registry_path, gasprice=default_gasprice, timeout=poll_timeout, ) @@ -258,7 +261,7 @@ def test_blockchain( assert token_proxy.address == event['asset_address'].decode('hex') channel_manager_proxy = jsonrpc_client.new_contract_proxy( - registry_contracts['ChannelManagerContract']['abi'], + CHANNEL_MANAGER_ABI, channel_manager_address, ) diff --git a/raiden/ui/console.py b/raiden/ui/console.py index d471e8d51b..3d5c51217b 100644 --- a/raiden/ui/console.py +++ b/raiden/ui/console.py @@ -179,12 +179,14 @@ def create_token( Returns: token_address: the hex encoded address of the new token/asset. """ + contract_path = get_contract_path('HumanStandardToken.sol') # Deploy a new ERC20 token token_proxy = self._chain.client.deploy_solidity_contract( self._raiden.address, 'HumanStandardToken', - compile_file(get_contract_path('HumanStandardToken.sol')), + compile_file(contract_path), dict(), (initial_alloc, name, decimals, symbol), + contract_path=contract_path, gasprice=gasprice, timeout=timeout) token_address = token_proxy.address.encode('hex') diff --git a/requirements.txt b/requirements.txt index 63bd33ee71..a33017d971 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,14 @@ pysha3 -# temporary until https://github.com/ethereum/pyethapp/pull/184 comes upstream (see also setup.py) --e git+https://github.com/konradkonrad/pyethapp@71f940c6d287b98a35ef524f4c5e3c13d530bfc5#egg=pyethapp +# temporary until new version of pyethereum is released, that supports solc >= v0.4.9 +-e git+https://github.com/LefterisJP/pyethapp@use_new_solc_combinedjson_key#egg=pyethapp ipython<5.0.0 rlp>=0.4.3,<=0.4.6 secp256k1==0.12.1 pycryptodome>=3.4.3 miniupnpc networkx -ethereum>=1.3.2 +# temporary until new version of pyethereum is released, that supports solc >= v0.4.9 +-e git+https://github.com/LefterisJP/pyethereum@fix_solidity_key_combinedjson#egg=ethereum ethereum-serpent repoze.lru gevent-websocket==0.9.4 diff --git a/setup.py b/setup.py index 2e64a619c5..d8d3fc3db8 100755 --- a/setup.py +++ b/setup.py @@ -30,12 +30,14 @@ def run_tests(self): install_requires_replacements = { - "-e git+https://github.com/konradkonrad/pyethapp@71f940c6d287b98a35ef524f4c5e3c13d530bfc5#egg=pyethapp": "pyethapp" +# "-e git+https://github.com/konradkonrad/pyethapp@71f940c6d287b98a35ef524f4c5e3c13d530bfc5#egg=pyethapp": "pyethapp", + "-e git+https://github.com/LefterisJP/pyethapp@use_new_solc_combinedjson_key#egg=pyethapp": "pyethapp", + "-e git+https://github.com/LefterisJP/pyethereum@fix_solidity_key_combinedjson#egg=ethereum": "ethereum" } install_requires = list(set( install_requires_replacements.get(requirement.strip(), requirement.strip()) - for requirement in open('requirements.txt') + for requirement in open('requirements.txt') if not requirement.lstrip().startswith('#') )) test_requirements = [] diff --git a/tools/deploy.py b/tools/deploy.py index baa4799d28..b6efb026e6 100755 --- a/tools/deploy.py +++ b/tools/deploy.py @@ -45,6 +45,7 @@ def deploy_files(contract_files, client): compiled_contracts, libraries, '', + contract_path=c, gasprice=default_gasprice ) libraries[name] = proxy.address diff --git a/tools/init_blockchain.py b/tools/init_blockchain.py index 4cb818a33d..fd6363a76b 100644 --- a/tools/init_blockchain.py +++ b/tools/init_blockchain.py @@ -22,19 +22,23 @@ def connect(host='127.0.0.1', return client -def create_and_distribute_token(client, receivers, - amount_per_receiver=1000, - name=None, - gasprice=default_gasprice, - timeout=120): +def create_and_distribute_token( + client, + receivers, + amount_per_receiver=1000, + name=None, + gasprice=default_gasprice, + timeout=120 +): """Create a new ERC-20 token and distribute it among `receivers`. If `name` is None, the name will be derived from hashing all receivers. """ name = name or sha3(''.join(receivers)).encode('hex') + contract_path = get_contract_path('HumanStandardToken.sol') token_proxy = client.deploy_solidity_contract( client.sender, 'HumanStandardToken', - compile_file(get_contract_path('HumanStandardToken.sol')), + compile_file(contract_path), dict() ( len(receivers) * amount_per_receiver, @@ -42,6 +46,7 @@ def create_and_distribute_token(client, receivers, 2, # decimals name[:4].upper() # symbol ), + contract_path=contract_path, gasprice=gasprice, timeout=timeout )