Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

CI/test-python: give launch-kit-backend CHAIN_ID, not NETWORK_ID #2327

Merged
merged 3 commits into from
Nov 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ jobs:
- image: 0xorg/launch-kit-backend:v3
environment:
RPC_URL: 'http://localhost:8545'
NETWORK_ID: 50
CHAIN_ID: 1337
WHITELIST_ALL_TOKENS: True
FEE_RECIPIENT: '0x0000000000000000000000000000000000000001'
MAKER_FEE_UNIT_AMOUNT: 0
Expand Down
25 changes: 20 additions & 5 deletions python-packages/sra_client/src/zero_ex/sra_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,24 @@

docker run -d -p 8545:8545 0xorg/ganache-cli

docker run -d -p 60557:60557 --network host \
-e ETHEREUM_RPC_URL=http://localhost:8545 \
-e ETHEREUM_NETWORK_ID=50 \
-e ETHEREUM_CHAIN_ID=1337 \
-e USE_BOOTSTRAP_LIST=false \
-e VERBOSITY=3 \
-e PRIVATE_KEY_PATH= \
-e BLOCK_POLLING_INTERVAL=5s \
-e P2P_LISTEN_PORT=60557
0xorg/mesh:6.0.0-beta-0xv3

docker run -d --network host \
-e RPC_URL=http://localhost:8545 \
-e NETWORK_ID=50 \
-e CHAIN_ID=1337 \
-e FEE_RECIPIENT=0x0000000000000000000000000000000000000001 \
-e MAKER_FEE_UNIT_AMOUNT=0 \
-e TAKER_FEE_UNIT_AMOUNT=0
-e MESH_ENDPOINT=ws://localhost:60557
-e WHITELIST_ALL_TOKENS=True \
0xorg/launch-kit-ci

Expand Down Expand Up @@ -168,7 +183,7 @@
>>> relayer.get_order("0x" + order_hash_hex)
{'meta_data': {'orderHash': '0x...',
'remainingFillableTakerAssetAmount': '2'},
'order': {'chainId': 50,
'order': {'chainId': 1337,
'exchangeAddress': '0x...',
'expirationTimeSeconds': '...',
'feeRecipientAddress': '0x0000000000000000000000000000000000000000',
Expand All @@ -195,7 +210,7 @@
>>> relayer.get_orders()
{'records': [{'meta_data': {'orderHash': '0x...',
'remainingFillableTakerAssetAmount': '2'},
'order': {'chainId': 50,
'order': {'chainId': 1337,
'exchangeAddress': '0x...',
'expirationTimeSeconds': '...',
'feeRecipientAddress': '0x0000000000000000000000000000000000000000',
Expand Down Expand Up @@ -255,7 +270,7 @@
{'asks': {'records': [...]},
'bids': {'records': [{'meta_data': {'orderHash': '0x...',
'remainingFillableTakerAssetAmount': '2'},
'order': {'chainId': 50,
'order': {'chainId': 1337,
'exchangeAddress': '0x...',
'expirationTimeSeconds': '...',
'feeRecipientAddress': '0x0000000000000000000000000000000000000000',
Expand All @@ -280,7 +295,7 @@
>>> order = jsdict_to_order(orderbook.bids.records[0].order)
>>> from pprint import pprint
>>> pprint(order)
{'chainId': 50,
{'chainId': 1337,
'expirationTimeSeconds': ...,
'feeRecipientAddress': '0x0000000000000000000000000000000000000000',
'makerAddress': '0x...',
Expand Down
2 changes: 1 addition & 1 deletion python-packages/sra_client/test/relayer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ services:
- "3000:3000"
network_mode: "host" # to connect to ganache
environment:
- NETWORK_ID=50
- CHAIN_ID=1337
- RPC_URL=http://localhost:8545
- WHITELIST_ALL_TOKENS=True
- FEE_RECIPIENT=0x0000000000000000000000000000000000000001
Expand Down