Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support ERC20 to Native #138

Merged
merged 54 commits into from
Oct 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
975e534
Add .nvmrc
patitonar Sep 27, 2018
f6bba80
Update submodule to erc20-to-native-#79 branch
patitonar Sep 27, 2018
847d1dd
Use stable docker image for parity
patitonar Sep 28, 2018
8827f4a
Use explicit tag for redis docker image
patitonar Sep 28, 2018
bf0a2ef
Remove unused variables on TxStore
patitonar Sep 28, 2018
7a0265b
Get bridge mode from contract method
patitonar Sep 28, 2018
79a68dd
Add erc20 to native support
patitonar Oct 1, 2018
81b1fbb
Update e2e contracts branch
patitonar Oct 1, 2018
d932e2f
Fix homeStore erc-to-erc initialization
patitonar Oct 2, 2018
c4ec770
Update e2e contracts address
patitonar Oct 2, 2018
bdfd6ea
Update e2e bridge-nodejs Dockerfile
patitonar Oct 2, 2018
459f423
Check fromBlock value on getEvents
patitonar Oct 2, 2018
627e5db
Add erc20-native e2e tests
patitonar Oct 2, 2018
af91746
Use different gas price in home and foreign
fvictorio Oct 8, 2018
23d06c9
Remove unused computed variable
fvictorio Oct 9, 2018
5cd88dc
Convert price received from oracle from gwei to wei
fvictorio Oct 9, 2018
ec74dcb
Wait for proper promise in GasPriceStore
fvictorio Oct 9, 2018
e5edd4d
Replace Metamask references with wallet text
patitonar Oct 9, 2018
ff6b807
Update success status response check
patitonar Oct 9, 2018
88a608c
Update POA bridge loading
patitonar Oct 9, 2018
7dd5576
Add home native name env var
patitonar Oct 9, 2018
c4eb075
Update daily quota description if no limits
patitonar Oct 9, 2018
42d820d
Replace logos with coin/token name
patitonar Oct 9, 2018
4a92cb3
Add gas price env variables to .env.example
fvictorio Oct 9, 2018
c40f785
Get network names from environment variables
fvictorio Oct 9, 2018
143097a
Add default foreign erc20 symbol
patitonar Oct 9, 2018
ec9f3f8
Fix Status Page on Foreign side
patitonar Oct 9, 2018
b1c6217
Use configured network names in confirmation alert
fvictorio Oct 9, 2018
75f78a4
Show configured network name in success modal
fvictorio Oct 9, 2018
deb9400
Show configured network name in daily quota modal
fvictorio Oct 9, 2018
e1a83a1
Add erc20 token name on show more
patitonar Oct 9, 2018
0b283ff
Merge branch 'add-support-erc20-native' of https://github.com/poanetw…
patitonar Oct 9, 2018
82fc6d8
Change success alert units depending on bridge side and mode
fvictorio Oct 10, 2018
453b557
Get template for transaction link from environment variable
fvictorio Oct 10, 2018
0ba7673
Change link to repo in footer
fvictorio Oct 10, 2018
21fced2
Get template for address link from environment variable
fvictorio Oct 10, 2018
8c7c15f
Use template for address url in the header
fvictorio Oct 10, 2018
572f0fc
Update .env.example to use blockscout
patitonar Oct 10, 2018
b9436c3
Update env variables docker-compose
patitonar Oct 10, 2018
fb21cc1
Remove unused imports
patitonar Oct 10, 2018
cd54e39
Update README with last .env variables
patitonar Oct 10, 2018
e510e8b
Update titles for tokens bridged
patitonar Oct 10, 2018
7afb7f3
Avoid log error if oracle url not defined
patitonar Oct 10, 2018
29e27ac
Display 3 digits after point on network details
patitonar Oct 10, 2018
0189e27
Add support for Bytes32 symbol and name
patitonar Oct 10, 2018
f130527
Use fallback gas price if oracle not available
patitonar Oct 11, 2018
786e058
Add default gas price update Interval
patitonar Oct 11, 2018
c0320e1
Fix statistics title names
patitonar Oct 11, 2018
4b44111
Fix docker parity version to v1.11.11
patitonar Oct 11, 2018
bfb7771
Update networks names
patitonar Oct 11, 2018
6e05c82
Use explorer url from .env on event page
patitonar Oct 11, 2018
c619608
Update network name on event page
patitonar Oct 11, 2018
754875d
Merge branch 'develop' into add-support-erc20-native
patitonar Oct 23, 2018
0ed18c7
Update poa-bridge-contracts branch on Dockerfile
patitonar Oct 23, 2018
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
20 changes: 19 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,22 @@ REACT_APP_HOME_BRIDGE_ADDRESS=0xABb4C1399DcC28FBa3Beb76CAE2b50Be3e087353
REACT_APP_FOREIGN_BRIDGE_ADDRESS=0xE405F6872cE38a7a4Ff63DcF946236D458c2ca3a
REACT_APP_FOREIGN_HTTP_PARITY_URL=https://kovan.infura.io/mew
REACT_APP_HOME_HTTP_PARITY_URL=https://sokol.poa.network
REACT_APP_GAS_PRICE_SPEED_TYPE=fast
REACT_APP_HOME_NATIVE_NAME=POA

REACT_APP_HOME_NETWORK_NAME="POA Sokol"
REACT_APP_FOREIGN_NETWORK_NAME=Kovan

REACT_APP_HOME_EXPLORER_TX_TEMPLATE=https://blockscout.com/poa/sokol/tx/%s
REACT_APP_FOREIGN_EXPLORER_TX_TEMPLATE=https://blockscout.com/eth/kovan/tx/%s
REACT_APP_HOME_EXPLORER_ADDRESS_TEMPLATE=https://blockscout.com/poa/sokol/address/%s
REACT_APP_FOREIGN_EXPLORER_ADDRESS_TEMPLATE=https://blockscout.com/eth/kovan/address/%s

REACT_APP_HOME_GAS_PRICE_ORACLE_URL=https://gasprice.poa.network/
REACT_APP_HOME_GAS_PRICE_SPEED_TYPE=standard
REACT_APP_HOME_GAS_PRICE_FALLBACK=5000000000
REACT_APP_HOME_GAS_PRICE_UPDATE_INTERVAL=15000

REACT_APP_FOREIGN_GAS_PRICE_ORACLE_URL=https://gasprice.poa.network/
REACT_APP_FOREIGN_GAS_PRICE_SPEED_TYPE=standard
REACT_APP_FOREIGN_GAS_PRICE_FALLBACK=5000000000
REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL=15000
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v8.12
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[![Build Status](https://travis-ci.org/patitonar/bridge-ui.svg?branch=master)](https://travis-ci.org/patitonar/bridge-ui)
[![Gitter](https://badges.gitter.im/poanetwork/poa-bridge.svg)](https://gitter.im/poanetwork/poa-bridge?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Coverage Status](https://coveralls.io/repos/github/patitonar/bridge-ui/badge.svg?branch=master)](https://coveralls.io/github/patitonar/bridge-ui?branch=master)
[![dependencies Status](https://david-dm.org/poanetwork/bridge-ui/status.svg)](https://david-dm.org/poanetwork/bridge-ui)

Welcome to the POA Bridge! Following is an overview of the POA Bridge and Bridge UI Application, as well as [basic instructions for getting started](#getting-started).

Expand Down Expand Up @@ -151,15 +153,39 @@ If successful, you will see bridge processes run when you issue a command. For e
REACT_APP_FOREIGN_HTTP_PARITY_URL=https://kovan.infura.io/mew
# public RPC node for Home network
REACT_APP_HOME_HTTP_PARITY_URL=https://sokol.poa.network
# Gas price speed option (slow, standard, fast, instant)
REACT_APP_GAS_PRICE_SPEED_TYPE=fast
```
Explanation:

Name | Description
--------- | -------
REACT_APP_HOME_BRIDGE_ADDRESS | address that you have deployed at step#3. Should also be recorded at `sokol-kovan-bridge/poa-bridge-contracts/deploy/bridgeDeploymentResults.json`
REACT_APP_FOREIGN_BRIDGE_ADDRESS | address that you have deployed at step#3.
REACT_APP_FOREIGN_HTTP_PARITY_URL | http public rpc node for Foreign Network
REACT_APP_HOME_HTTP_PARITY_URL | http public rpc node for Foreign Network
REACT_APP_HOME_NATIVE_NAME | name of the home native coin
REACT_APP_HOME_NETWORK_NAME | name to be displayed for home network
REACT_APP_FOREIGN_NETWORK_NAME | name to be displayed for foreign network
REACT_APP_HOME_EXPLORER_TX_TEMPLATE | template link to transaction on home explorer. `%s` will be replaced by transaction hash
REACT_APP_FOREIGN_EXPLORER_TX_TEMPLATE | template link to transaction on foreign explorer. `%s` will be replaced by transaction hash
REACT_APP_HOME_EXPLORER_ADDRESS_TEMPLATE | template link to address on home explorer. `%s` will be replaced by address
REACT_APP_FOREIGN_EXPLORER_ADDRESS_TEMPLATE | template link to address on foreign explorer. `%s` will be replaced by address
REACT_APP_HOME_GAS_PRICE_ORACLE_URL | The URL used to get a JSON response from the gas price prediction oracle for Home network.
REACT_APP_HOME_GAS_PRICE_SPEED_TYPE | Gas Price speed (slow, standard, fast, instant)
REACT_APP_HOME_GAS_PRICE_FALLBACK | The gas price (in Wei) that is used if both the oracle and the fall back gas price specified in the Home Bridge contract are not available.
REACT_APP_HOME_GAS_PRICE_UPDATE_INTERVAL | An interval in milliseconds used to get the updated gas price value either from the oracle or from the Home Bridge contract.
REACT_APP_FOREIGN_GAS_PRICE_ORACLE_URL | The URL used to get a JSON response from the gas price prediction oracle for Foreign network.
REACT_APP_FOREIGN_GAS_PRICE_SPEED_TYPE | Gas Price speed (slow, standard, fast, instant)
REACT_APP_FOREIGN_GAS_PRICE_FALLBACK | The gas price (in Wei) that is used if both the oracle and the fall back gas price specified in the Foreign Bridge contract are not available.
REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL | An interval in milliseconds used to get the updated gas price value either from the oracle or from the Foreign Bridge contract.

* Run `npm run start`
* Make sure your web3 wallet (Nifty Wallet or MetaMask) is funded and connected to the POA Sokol Network (see step 2)
* Specify an amount and click `Transfer` to complete a cross-chain transaction from Sokol to Kovan

## Testing

To run tests

`npm run test`

To run tests with coverage
Expand Down
3 changes: 2 additions & 1 deletion e2e-script/MetaMask.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ class MetaMask extends Page {
break;
}
}
const index = networks.length > 8 ? 8 : networks.length;
await this.driver.executeScript("document.getElementsByClassName('dropdown-menu-item')[" +
(networks.length - 1) + "].click();");
(index - 1) + "].click();");
return await super.fillWithWait(fieldNewRPCURL, url) &&
await super.clickWithWait(buttonSave) &&
await super.clickWithWait(arrowBackRPCURL);
Expand Down
9 changes: 9 additions & 0 deletions e2e-script/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ class Utils {
}
}

static async getErc20NativeStartURL() {
try {
let obj = JSON.parse(fs.readFileSync(configFile), "utf8");
return obj.erc20NativeUrl;
} catch (err) {
return null;
}
}

static async startBrowserWithMetamask() {
let source = './e2e-script/MetaMask.crx';
let options = new chrome.Options();
Expand Down
3 changes: 2 additions & 1 deletion e2e-script/bridge/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ RUN apt-get clean

RUN git clone https://github.com/poanetwork/bridge-nodejs.git
WORKDIR /bridge-nodejs
RUN cd submodules/poa-bridge-contracts && git submodule update --init --recursive && ls && git checkout refactor_v1
RUN git fetch && git checkout support-erc20-native-#81
RUN cd submodules/poa-bridge-contracts && git submodule update --init --recursive
RUN npm install
1 change: 1 addition & 0 deletions e2e-script/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"startUrl" : "http://10.1.0.101:3000",
"erc20Url" : "http://10.1.0.104:3000",
"erc20NativeUrl" : "http://10.1.0.105:3000",
"homeAccount": "./e2e-script/accounts/user77_7FC1.json",
"foreignAccount": "./e2e-script/accounts/user42_7FC1.json"
}
4 changes: 3 additions & 1 deletion e2e-script/contracts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ RUN git clone https://github.com/poanetwork/poa-bridge-contracts.git
RUN mkdir submodules && \
mv poa-bridge-contracts submodules && \
cd submodules/poa-bridge-contracts && \
git checkout refactor_v1
git fetch && \
git checkout develop

RUN cd submodules/poa-bridge-contracts && \
npm install && \
Expand All @@ -18,5 +19,6 @@ RUN cd submodules/poa-bridge-contracts && \
COPY deploy.sh .
COPY contracts.env submodules/poa-bridge-contracts/deploy/
COPY erc-contracts.env submodules/poa-bridge-contracts/deploy/
COPY erc-native-contracts.env submodules/poa-bridge-contracts/deploy/
COPY deployERC20.js submodules/poa-bridge-contracts/deploy/
RUN cd submodules/poa-bridge-contracts/deploy && cp contracts.env .env
7 changes: 4 additions & 3 deletions e2e-script/contracts/contracts.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ BRIDGE_MODE=NATIVE_TO_ERC
DEPLOYMENT_ACCOUNT_ADDRESS=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
DEPLOYMENT_ACCOUNT_PRIVATE_KEY=8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9
DEPLOYMENT_GAS_LIMIT=4000000
DEPLOYMENT_GAS_PRICE=10
HOME_DEPLOYMENT_GAS_PRICE=10000000000
FOREIGN_DEPLOYMENT_GAS_PRICE=10000000000
GET_RECEIPT_INTERVAL_IN_MILLISECONDS=50

BRIDGEABLE_TOKEN_NAME="Your New Bridged Token"
Expand All @@ -17,7 +18,7 @@ HOME_DAILY_LIMIT=30000000000000000000000000
HOME_MAX_AMOUNT_PER_TX=1500000000000000000000000
HOME_MIN_AMOUNT_PER_TX=10000000000000000
HOME_REQUIRED_BLOCK_CONFIRMATIONS=1
HOME_GAS_PRICE=1
HOME_GAS_PRICE=1000000000

FOREIGN_RPC_URL=http://parity2:8545
FOREIGN_OWNER_MULTISIG=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
Expand All @@ -27,7 +28,7 @@ FOREIGN_DAILY_LIMIT=15000000000000000000000000
FOREIGN_MAX_AMOUNT_PER_TX=750000000000000000000000
FOREIGN_MIN_AMOUNT_PER_TX=10000000000000000
FOREIGN_REQUIRED_BLOCK_CONFIRMATIONS=1
FOREIGN_GAS_PRICE=1
FOREIGN_GAS_PRICE=10000000000

REQUIRED_NUMBER_OF_VALIDATORS=1
VALIDATORS="0xaaB52d66283F7A1D5978bcFcB55721ACB467384b"
5 changes: 5 additions & 0 deletions e2e-script/contracts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ node deployERC20.js
cp erc-contracts.env .env
echo "Deploying erc20-erc20 contracts"
node deploy.js
cp erc-native-contracts.env .env
echo "Deploying Block Reward contract"
node src/utils/deployBlockReward.js
echo "Deploying erc20-native contracts"
node deploy.js
9 changes: 5 additions & 4 deletions e2e-script/contracts/erc-contracts.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ BRIDGE_MODE=ERC_TO_ERC
DEPLOYMENT_ACCOUNT_ADDRESS=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
DEPLOYMENT_ACCOUNT_PRIVATE_KEY=8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9
DEPLOYMENT_GAS_LIMIT=4000000
DEPLOYMENT_GAS_PRICE=10
HOME_DEPLOYMENT_GAS_PRICE=10000000000
FOREIGN_DEPLOYMENT_GAS_PRICE=10000000000
GET_RECEIPT_INTERVAL_IN_MILLISECONDS=50

BRIDGEABLE_TOKEN_NAME="Your New Bridged Token"
Expand All @@ -17,7 +18,7 @@ HOME_DAILY_LIMIT=30000000000000000000000000
HOME_MAX_AMOUNT_PER_TX=1500000000000000000000000
HOME_MIN_AMOUNT_PER_TX=10000000000000000
HOME_REQUIRED_BLOCK_CONFIRMATIONS=1
HOME_GAS_PRICE=10
HOME_GAS_PRICE=1000000000

FOREIGN_RPC_URL=http://parity2:8545
FOREIGN_OWNER_MULTISIG=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
Expand All @@ -27,8 +28,8 @@ FOREIGN_DAILY_LIMIT=15000000000000000000000000
FOREIGN_MAX_AMOUNT_PER_TX=750000000000000000000000
FOREIGN_MIN_AMOUNT_PER_TX=10000000000000000
FOREIGN_REQUIRED_BLOCK_CONFIRMATIONS=1
FOREIGN_GAS_PRICE=10
ERC20_TOKEN_ADDRESS=0x7777D2BF48993088dC1ceD832863b80427Ff5Ec9
FOREIGN_GAS_PRICE=10000000000
ERC20_TOKEN_ADDRESS=0x3C665A31199694Bf723fD08844AD290207B5797f

REQUIRED_NUMBER_OF_VALIDATORS=1
VALIDATORS="0xaaB52d66283F7A1D5978bcFcB55721ACB467384b"
36 changes: 36 additions & 0 deletions e2e-script/contracts/erc-native-contracts.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
BRIDGE_MODE=ERC_TO_NATIVE
DEPLOYMENT_ACCOUNT_PRIVATE_KEY=8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9
DEPLOYMENT_GAS_LIMIT=4000000
HOME_DEPLOYMENT_GAS_PRICE=10000000000
FOREIGN_DEPLOYMENT_GAS_PRICE=10000000000
GET_RECEIPT_INTERVAL_IN_MILLISECONDS=50

BRIDGEABLE_TOKEN_NAME="Your New Bridged Token"
BRIDGEABLE_TOKEN_SYMBOL="TEST"
BRIDGEABLE_TOKEN_DECIMALS="18"

HOME_RPC_URL=http://parity1:8545
HOME_OWNER_MULTISIG=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
HOME_UPGRADEABLE_ADMIN_VALIDATORS=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
HOME_UPGRADEABLE_ADMIN_BRIDGE=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
HOME_DAILY_LIMIT=30000000000000000000000000
HOME_MAX_AMOUNT_PER_TX=1500000000000000000000000
HOME_MIN_AMOUNT_PER_TX=10000000000000000
HOME_REQUIRED_BLOCK_CONFIRMATIONS=1
HOME_GAS_PRICE=1000000000

FOREIGN_RPC_URL=http://parity2:8545
FOREIGN_OWNER_MULTISIG=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
FOREIGN_UPGRADEABLE_ADMIN_VALIDATORS=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
FOREIGN_UPGRADEABLE_ADMIN_BRIDGE=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
FOREIGN_DAILY_LIMIT=15000000000000000000000000
FOREIGN_MAX_AMOUNT_PER_TX=750000000000000000000000
FOREIGN_MIN_AMOUNT_PER_TX=10000000000000000
FOREIGN_REQUIRED_BLOCK_CONFIRMATIONS=1
FOREIGN_GAS_PRICE=10000000000

BLOCK_REWARD_ADDRESS=0xF9698Eb93702dfdd0e2d802088d4c21822a8A977
ERC20_TOKEN_ADDRESS=0x3C665A31199694Bf723fD08844AD290207B5797f

REQUIRED_NUMBER_OF_VALIDATORS=1
VALIDATORS="0xaaB52d66283F7A1D5978bcFcB55721ACB467384b"
97 changes: 92 additions & 5 deletions e2e-script/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ services:
build: bridge
environment:
- NODE_ENV=production
- BRIDGE_MODE=NATIVE_TO_ERC
- QUEUE_URL=amqp://rabbit
- REDIS_URL=redis://redis
- HOME_RPC_URL=http://parity1:8545
Expand Down Expand Up @@ -69,8 +70,38 @@ services:
- HOME_RPC_URL=http://parity1:8545
- FOREIGN_RPC_URL=http://parity2:8545
- HOME_BRIDGE_ADDRESS=0x1feB40aD9420b186F019A717c37f5546165d411E
- FOREIGN_BRIDGE_ADDRESS=0xD0B9745831dDA9cbb47D0dEa904972cDcecc52e8
- ERC20_TOKEN_ADDRESS=0x7777D2BF48993088dC1ceD832863b80427Ff5Ec9
- FOREIGN_BRIDGE_ADDRESS=0x4a58D6d8D416a5fBCAcf3dC52eb8bE8948E25127
- ERC20_TOKEN_ADDRESS=0x3C665A31199694Bf723fD08844AD290207B5797f
- BRIDGEABLE_TOKEN_ADDRESS=0x792455a6bCb62Ed4C4362D323E0590654CA4765c
- VALIDATOR_ADDRESS=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
- VALIDATOR_ADDRESS_PRIVATE_KEY=8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9
- REDIS_LOCK_TTL=1000
- HOME_GAS_PRICE_ORACLE_URL=https://gasprice.poa.network/
- HOME_GAS_PRICE_SPEED_TYPE=standard
- HOME_GAS_PRICE_FALLBACK=1
- HOME_GAS_PRICE_UPDATE_INTERVAL=600000
- FOREIGN_GAS_PRICE_ORACLE_URL=https://gasprice.poa.network/
- FOREIGN_GAS_PRICE_SPEED_TYPE=standard
- FOREIGN_GAS_PRICE_FALLBACK=1
- FOREIGN_GAS_PRICE_UPDATE_INTERVAL=600000
- HOME_POLLING_INTERVAL=500
- FOREIGN_POLLING_INTERVAL=500
- ALLOW_HTTP=yes
networks:
- testnet
command: "true"
bridge-erc20-native:
build: bridge
environment:
- NODE_ENV=production
- BRIDGE_MODE=ERC_TO_NATIVE
- QUEUE_URL=amqp://rabbit
- REDIS_URL=redis://redis
- HOME_RPC_URL=http://parity1:8545
- FOREIGN_RPC_URL=http://parity2:8545
- HOME_BRIDGE_ADDRESS=0x488Af810997eD1730cB3a3918cD83b3216E6eAda
- FOREIGN_BRIDGE_ADDRESS=0x488Af810997eD1730cB3a3918cD83b3216E6eAda
- ERC20_TOKEN_ADDRESS=0x3C665A31199694Bf723fD08844AD290207B5797f
- BRIDGEABLE_TOKEN_ADDRESS=0x792455a6bCb62Ed4C4362D323E0590654CA4765c
- VALIDATOR_ADDRESS=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
- VALIDATOR_ADDRESS_PRIVATE_KEY=8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9
Expand All @@ -96,7 +127,21 @@ services:
- REACT_APP_FOREIGN_BRIDGE_ADDRESS=0x2B6871b9B02F73fa24F4864322CdC78604207769
- REACT_APP_FOREIGN_HTTP_PARITY_URL=http://10.1.0.103:8545
- REACT_APP_HOME_HTTP_PARITY_URL=http://10.1.0.102:8545
- REACT_APP_GAS_PRICE_SPEED_TYPE=fast
- REACT_APP_HOME_NATIVE_NAME=POA
- REACT_APP_HOME_NETWORK_NAME=Sokol
- REACT_APP_FOREIGN_NETWORK_NAME=Kovan
- REACT_APP_HOME_EXPLORER_TX_TEMPLATE=https://blockscout.com/poa/sokol/tx//%s
- REACT_APP_FOREIGN_EXPLORER_TX_TEMPLATE=https://blockscout.com/eth/kovan/tx/%s
- REACT_APP_HOME_EXPLORER_ADDRESS_TEMPLATE=https://blockscout.com/poa/sokol/address/%s
- REACT_APP_FOREIGN_EXPLORER_ADDRESS_TEMPLATE=https://blockscout.com/eth/kovan/address/%s
- REACT_APP_HOME_GAS_PRICE_ORACLE_URL=https://gasprice.poa.network/
- REACT_APP_HOME_GAS_PRICE_SPEED_TYPE=standard
- REACT_APP_HOME_GAS_PRICE_FALLBACK=5000000000
- REACT_APP_HOME_GAS_PRICE_UPDATE_INTERVAL=15000
- REACT_APP_FOREIGN_GAS_PRICE_ORACLE_URL=https://gasprice.poa.network/
- REACT_APP_FOREIGN_GAS_PRICE_SPEED_TYPE=standard
- REACT_APP_FOREIGN_GAS_PRICE_FALLBACK=5000000000
- REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL=15000
ports:
- "3000:3000"
networks:
Expand All @@ -107,16 +152,58 @@ services:
build: ..
environment:
- REACT_APP_HOME_BRIDGE_ADDRESS=0x1feB40aD9420b186F019A717c37f5546165d411E
- REACT_APP_FOREIGN_BRIDGE_ADDRESS=0xD0B9745831dDA9cbb47D0dEa904972cDcecc52e8
- REACT_APP_FOREIGN_BRIDGE_ADDRESS=0x4a58D6d8D416a5fBCAcf3dC52eb8bE8948E25127
- REACT_APP_FOREIGN_HTTP_PARITY_URL=http://10.1.0.103:8545
- REACT_APP_HOME_HTTP_PARITY_URL=http://10.1.0.102:8545
- REACT_APP_GAS_PRICE_SPEED_TYPE=fast
- REACT_APP_HOME_NATIVE_NAME=POA
- REACT_APP_HOME_NETWORK_NAME=Sokol
- REACT_APP_FOREIGN_NETWORK_NAME=Kovan
- REACT_APP_HOME_EXPLORER_TX_TEMPLATE=https://blockscout.com/poa/sokol/tx//%s
- REACT_APP_FOREIGN_EXPLORER_TX_TEMPLATE=https://blockscout.com/eth/kovan/tx/%s
- REACT_APP_HOME_EXPLORER_ADDRESS_TEMPLATE=https://blockscout.com/poa/sokol/address/%s
- REACT_APP_FOREIGN_EXPLORER_ADDRESS_TEMPLATE=https://blockscout.com/eth/kovan/address/%s
- REACT_APP_HOME_GAS_PRICE_ORACLE_URL=https://gasprice.poa.network/
- REACT_APP_HOME_GAS_PRICE_SPEED_TYPE=standard
- REACT_APP_HOME_GAS_PRICE_FALLBACK=5000000000
- REACT_APP_HOME_GAS_PRICE_UPDATE_INTERVAL=15000
- REACT_APP_FOREIGN_GAS_PRICE_ORACLE_URL=https://gasprice.poa.network/
- REACT_APP_FOREIGN_GAS_PRICE_SPEED_TYPE=standard
- REACT_APP_FOREIGN_GAS_PRICE_FALLBACK=5000000000
- REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL=15000
ports:
- "3001:3000"
networks:
testnet:
ipv4_address: 10.1.0.104
command: "true"
ui-erc20-native:
build: ..
environment:
- REACT_APP_HOME_BRIDGE_ADDRESS=0x488Af810997eD1730cB3a3918cD83b3216E6eAda
- REACT_APP_FOREIGN_BRIDGE_ADDRESS=0x488Af810997eD1730cB3a3918cD83b3216E6eAda
- REACT_APP_FOREIGN_HTTP_PARITY_URL=http://10.1.0.103:8545
- REACT_APP_HOME_HTTP_PARITY_URL=http://10.1.0.102:8545
- REACT_APP_HOME_NATIVE_NAME=POA
- REACT_APP_HOME_NETWORK_NAME=Sokol
- REACT_APP_FOREIGN_NETWORK_NAME=Kovan
- REACT_APP_HOME_EXPLORER_TX_TEMPLATE=https://blockscout.com/poa/sokol/tx//%s
- REACT_APP_FOREIGN_EXPLORER_TX_TEMPLATE=https://blockscout.com/eth/kovan/tx/%s
- REACT_APP_HOME_EXPLORER_ADDRESS_TEMPLATE=https://blockscout.com/poa/sokol/address/%s
- REACT_APP_FOREIGN_EXPLORER_ADDRESS_TEMPLATE=https://blockscout.com/eth/kovan/address/%s
- REACT_APP_HOME_GAS_PRICE_ORACLE_URL=https://gasprice.poa.network/
- REACT_APP_HOME_GAS_PRICE_SPEED_TYPE=standard
- REACT_APP_HOME_GAS_PRICE_FALLBACK=5000000000
- REACT_APP_HOME_GAS_PRICE_UPDATE_INTERVAL=15000
- REACT_APP_FOREIGN_GAS_PRICE_ORACLE_URL=https://gasprice.poa.network/
- REACT_APP_FOREIGN_GAS_PRICE_SPEED_TYPE=standard
- REACT_APP_FOREIGN_GAS_PRICE_FALLBACK=5000000000
- REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL=15000
ports:
- "3002:3000"
networks:
testnet:
ipv4_address: 10.1.0.105
command: "true"
networks:
testnet:
driver: bridge
Expand Down
6 changes: 4 additions & 2 deletions e2e-script/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ docker-compose run -d bridge npm run watcher:affirmation-request
docker-compose run -d bridge-erc20 npm run watcher:signature-request
docker-compose run -d bridge-erc20 npm run watcher:collected-signatures
docker-compose run -d bridge-erc20 npm run watcher:affirmation-request
docker-compose run -d bridge-erc20-native npm run watcher:signature-request
docker-compose run -d bridge-erc20-native npm run watcher:collected-signatures
docker-compose run -d bridge-erc20-native npm run watcher:affirmation-request
docker-compose run -d bridge npm run sender:home
docker-compose run -d bridge npm run sender:foreign
docker-compose run -d ui npm start
docker-compose run -d ui-erc20 npm start
echo "Waiting for blocks being generated"
sleep 5m
docker-compose run -d ui-erc20-native npm start
cd ..
npm run startE2e
rc=$?
Expand Down
Loading