Skip to content

Commit ea8cbfd

Browse files
authored
Merge pull request #351 from LefterisJP/solc_combinedjson_v049
Utilize pyeth changes for solc >= 0.4.9
2 parents cb09bb6 + a9f37d0 commit ea8cbfd

8 files changed

Lines changed: 29 additions & 13 deletions

File tree

raiden/network/rpc/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ def deploy_contract(self, contract_name, contract_file, constructor_parameters=N
266266
contracts,
267267
dict(),
268268
constructor_parameters,
269+
contract_path=contract_path,
269270
gasprice=default_gasprice,
270271
timeout=self.poll_timeout,
271272
)

raiden/tests/fixtures/blockchain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ def _jsonrpc_services(
366366
registry_contracts,
367367
dict(),
368368
tuple(),
369+
contract_path=registry_path,
369370
gasprice=default_gasprice,
370371
timeout=poll_timeout,
371372
)

raiden/tests/integration/test_blockchainservice.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
from raiden.network.rpc.client import decode_topic, patch_send_transaction
1414
from raiden.utils import privatekey_to_address, get_contract_path
15+
from raiden.blockchain.abi import CHANNEL_MANAGER_ABI
1516

1617
solidity = _solidity.get_solidity() # pylint: disable=invalid-name
1718

@@ -191,6 +192,7 @@ def test_blockchain(
191192
humantoken_contracts,
192193
dict(),
193194
(total_asset, 'raiden', 2, 'Rd'),
195+
contract_path=humantoken_path,
194196
gasprice=default_gasprice,
195197
timeout=poll_timeout,
196198
)
@@ -203,6 +205,7 @@ def test_blockchain(
203205
registry_contracts,
204206
dict(),
205207
tuple(),
208+
contract_path=registry_path,
206209
gasprice=default_gasprice,
207210
timeout=poll_timeout,
208211
)
@@ -258,7 +261,7 @@ def test_blockchain(
258261
assert token_proxy.address == event['asset_address'].decode('hex')
259262

260263
channel_manager_proxy = jsonrpc_client.new_contract_proxy(
261-
registry_contracts['ChannelManagerContract']['abi'],
264+
CHANNEL_MANAGER_ABI,
262265
channel_manager_address,
263266
)
264267

raiden/ui/console.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,14 @@ def create_token(
179179
Returns:
180180
token_address: the hex encoded address of the new token/asset.
181181
"""
182+
contract_path = get_contract_path('HumanStandardToken.sol')
182183
# Deploy a new ERC20 token
183184
token_proxy = self._chain.client.deploy_solidity_contract(
184185
self._raiden.address, 'HumanStandardToken',
185-
compile_file(get_contract_path('HumanStandardToken.sol')),
186+
compile_file(contract_path),
186187
dict(),
187188
(initial_alloc, name, decimals, symbol),
189+
contract_path=contract_path,
188190
gasprice=gasprice,
189191
timeout=timeout)
190192
token_address = token_proxy.address.encode('hex')

requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
pysha3
2-
# temporary until https://github.com/ethereum/pyethapp/pull/184 comes upstream (see also setup.py)
3-
-e git+https://github.com/konradkonrad/pyethapp@71f940c6d287b98a35ef524f4c5e3c13d530bfc5#egg=pyethapp
2+
# temporary until new version of pyethereum is released, that supports solc >= v0.4.9
3+
-e git+https://github.com/LefterisJP/pyethapp@use_new_solc_combinedjson_key#egg=pyethapp
44
ipython<5.0.0
55
rlp>=0.4.3,<=0.4.6
66
secp256k1==0.12.1
77
pycryptodome>=3.4.3
88
miniupnpc
99
networkx
10-
ethereum>=1.3.2
10+
# temporary until new version of pyethereum is released, that supports solc >= v0.4.9
11+
-e git+https://github.com/LefterisJP/pyethereum@fix_solidity_key_combinedjson#egg=ethereum
1112
ethereum-serpent
1213
repoze.lru
1314
gevent-websocket==0.9.4

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ def run_tests(self):
3030

3131

3232
install_requires_replacements = {
33-
"-e git+https://github.com/konradkonrad/pyethapp@71f940c6d287b98a35ef524f4c5e3c13d530bfc5#egg=pyethapp": "pyethapp"
33+
# "-e git+https://github.com/konradkonrad/pyethapp@71f940c6d287b98a35ef524f4c5e3c13d530bfc5#egg=pyethapp": "pyethapp",
34+
"-e git+https://github.com/LefterisJP/pyethapp@use_new_solc_combinedjson_key#egg=pyethapp": "pyethapp",
35+
"-e git+https://github.com/LefterisJP/pyethereum@fix_solidity_key_combinedjson#egg=ethereum": "ethereum"
3436
}
3537

3638
install_requires = list(set(
3739
install_requires_replacements.get(requirement.strip(), requirement.strip())
38-
for requirement in open('requirements.txt')
40+
for requirement in open('requirements.txt') if not requirement.lstrip().startswith('#')
3941
))
4042

4143
test_requirements = []

tools/deploy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def deploy_files(contract_files, client):
4545
compiled_contracts,
4646
libraries,
4747
'',
48+
contract_path=c,
4849
gasprice=default_gasprice
4950
)
5051
libraries[name] = proxy.address

tools/init_blockchain.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,31 @@ def connect(host='127.0.0.1',
2222
return client
2323

2424

25-
def create_and_distribute_token(client, receivers,
26-
amount_per_receiver=1000,
27-
name=None,
28-
gasprice=default_gasprice,
29-
timeout=120):
25+
def create_and_distribute_token(
26+
client,
27+
receivers,
28+
amount_per_receiver=1000,
29+
name=None,
30+
gasprice=default_gasprice,
31+
timeout=120
32+
):
3033
"""Create a new ERC-20 token and distribute it among `receivers`.
3134
If `name` is None, the name will be derived from hashing all receivers.
3235
"""
3336
name = name or sha3(''.join(receivers)).encode('hex')
37+
contract_path = get_contract_path('HumanStandardToken.sol')
3438
token_proxy = client.deploy_solidity_contract(
3539
client.sender,
3640
'HumanStandardToken',
37-
compile_file(get_contract_path('HumanStandardToken.sol')),
41+
compile_file(contract_path),
3842
dict()
3943
(
4044
len(receivers) * amount_per_receiver,
4145
name,
4246
2, # decimals
4347
name[:4].upper() # symbol
4448
),
49+
contract_path=contract_path,
4550
gasprice=gasprice,
4651
timeout=timeout
4752
)

0 commit comments

Comments
 (0)