Merge pull request #54 from poanetwork/dockerfile-and-contracts
Remove sub-dockerfiles and sub-contracts
This commit is contained in:
commit
97f80dc95a
@ -36,19 +36,29 @@ jobs:
|
||||
oracle-e2e:
|
||||
docker:
|
||||
- image: circleci/node:10.15
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run: yarn run oracle-e2e
|
||||
ui-e2e:
|
||||
docker:
|
||||
- image: circleci/node:10.15-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- run: git submodule update --init
|
||||
- run: yarn
|
||||
- setup_remote_docker
|
||||
- run: yarn run ui-e2e
|
||||
- run: yarn run oracle-e2e
|
||||
ui-e2e:
|
||||
machine:
|
||||
image: circleci/classic:latest
|
||||
steps:
|
||||
- checkout
|
||||
- run: |
|
||||
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
|
||||
echo ' [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
|
||||
- run: nvm install 11.4.0 && nvm alias default 11.4.0
|
||||
- run: curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
||||
- run: echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
||||
- run: sudo apt-get update && sudo apt-get install yarn
|
||||
- run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||
- run: sudo dpkg -i google-chrome-stable_current_amd64.deb
|
||||
- run: git submodule update --init
|
||||
- run: yarn
|
||||
- run: yarn run ui-e2e
|
||||
cover:
|
||||
docker:
|
||||
- image: circleci/node:10.15
|
||||
@ -68,8 +78,9 @@ workflows:
|
||||
only: master
|
||||
tokenbridge:
|
||||
jobs:
|
||||
- build
|
||||
- lint
|
||||
- test
|
||||
- ansible-lint
|
||||
- test
|
||||
- oracle-e2e
|
||||
# - ui-e2e
|
||||
- ui-e2e
|
||||
|
7
.dockerignore
Normal file
7
.dockerignore
Normal file
@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
**/node_modules
|
||||
**/**/node_modules
|
||||
.git
|
||||
**/.git
|
||||
**/**/.git
|
||||
.gitmodules
|
9
.gitmodules
vendored
9
.gitmodules
vendored
@ -1,9 +1,6 @@
|
||||
[submodule "oracle/submodules/poa-bridge-contracts"]
|
||||
path = oracle/submodules/poa-bridge-contracts
|
||||
url = https://github.com/poanetwork/poa-bridge-contracts.git
|
||||
[submodule "ui/submodules/poa-bridge-contracts"]
|
||||
path = ui/submodules/poa-bridge-contracts
|
||||
url = https://github.com/poanetwork/poa-bridge-contracts.git
|
||||
[submodule "contracts"]
|
||||
path = contracts
|
||||
url = https://github.com/poanetwork/poa-bridge-contracts.git
|
||||
[submodule "contracts-2.2.0"]
|
||||
path = contracts-2.2.0
|
||||
url = https://github.com/poanetwork/poa-bridge-contracts.git
|
||||
|
20
Dockerfile.e2e
Normal file
20
Dockerfile.e2e
Normal file
@ -0,0 +1,20 @@
|
||||
FROM node:10
|
||||
|
||||
WORKDIR /mono
|
||||
COPY package.json .
|
||||
COPY oracle/package.json ./oracle/
|
||||
COPY oracle-e2e/package.json ./oracle-e2e/
|
||||
COPY ui/package.json ./ui/
|
||||
COPY ui-e2e/package.json ./ui-e2e/
|
||||
COPY monitor/package.json ./monitor/
|
||||
COPY contracts/package.json ./contracts/
|
||||
COPY ui/lib/web3-eth/index.js ./ui/lib/web3-eth/index.js
|
||||
COPY yarn.lock .
|
||||
|
||||
RUN yarn install
|
||||
COPY . .
|
||||
|
||||
RUN yarn workspace poa-parity-bridge-contracts run compile
|
||||
RUN cd contracts-2.2.0 && rm -f package-lock.json && npm install --silent && npm install --silent truffle@4.1.11 && npm run compile && cd deploy && rm -f package-lock.json && npm install --silent && npm install --silent web3@1.0.0-beta.33
|
||||
RUN yarn workspace ui run compile:contracts && yarn workspace ui run postinstall
|
||||
RUN cd contracts/deploy && rm -f package-lock.json && npm install
|
@ -1,28 +0,0 @@
|
||||
FROM node:8
|
||||
|
||||
RUN mkdir /stuff
|
||||
WORKDIR /stuff
|
||||
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
|
||||
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 fetch && \
|
||||
git checkout 2.2.0
|
||||
|
||||
RUN npm install --unsafe-perm
|
||||
|
||||
RUN cd submodules/poa-bridge-contracts && \
|
||||
npm install && \
|
||||
./node_modules/.bin/truffle compile && \
|
||||
cd deploy && \
|
||||
npm install
|
||||
|
||||
ADD . .
|
||||
|
||||
|
||||
CMD ["npm", "start"]
|
@ -10,5 +10,6 @@
|
||||
"validator": {
|
||||
"address": "0xaaB52d66283F7A1D5978bcFcB55721ACB467384b",
|
||||
"privateKey": "0x8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9"
|
||||
}
|
||||
},
|
||||
"contractsPath": "../contracts-2.2.0"
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
const path = require('path')
|
||||
const shell = require('shelljs')
|
||||
const { contractsPath } = require('./constants.json')
|
||||
|
||||
const envsDir = path.join(__dirname, 'envs')
|
||||
const deployContractsDir = path.join(__dirname, 'submodules/poa-bridge-contracts/deploy')
|
||||
const deployContractsDir = path.join(__dirname, contractsPath, 'deploy')
|
||||
const erc20ScriptDir = path.join(__dirname, 'scripts')
|
||||
|
||||
shell.cp(path.join(envsDir, 'contracts-deploy.env'), path.join(deployContractsDir, '.env'))
|
||||
|
@ -1,11 +1,11 @@
|
||||
version: '3'
|
||||
services:
|
||||
parity1:
|
||||
build: parity
|
||||
build: ../parity
|
||||
ports:
|
||||
- "8541:8545"
|
||||
parity2:
|
||||
build: parity
|
||||
build: ../parity
|
||||
ports:
|
||||
- "8542:8545"
|
||||
redis:
|
||||
@ -98,5 +98,7 @@ services:
|
||||
- ALLOW_HTTP=yes
|
||||
command: "true"
|
||||
e2e:
|
||||
build: .
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: Dockerfile.e2e
|
||||
command: "true"
|
||||
|
2679
oracle-e2e/package-lock.json
generated
2679
oracle-e2e/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@
|
||||
FROM parity/parity:v2.3.3
|
||||
|
||||
WORKDIR /stuff
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["--chain", "chain.json", "--jsonrpc-interface", "all"]
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,9 @@
|
||||
cd $(dirname $0)
|
||||
|
||||
docker-compose down
|
||||
docker-compose up -d --build --force-recreate
|
||||
docker-compose run e2e npm run deploy
|
||||
|
||||
docker-compose run e2e yarn workspace oracle-e2e run deploy
|
||||
docker-compose run -d bridge npm run watcher:signature-request
|
||||
docker-compose run -d bridge npm run watcher:collected-signatures
|
||||
docker-compose run -d bridge npm run watcher:affirmation-request
|
||||
@ -13,7 +15,7 @@ docker-compose run -d bridge-erc-native npm run watcher:collected-signatures
|
||||
docker-compose run -d bridge-erc-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 e2e npm start
|
||||
docker-compose run e2e yarn workspace oracle-e2e run start
|
||||
|
||||
rc=$?
|
||||
docker-compose down
|
||||
|
@ -1,20 +1,20 @@
|
||||
/* eslint import/no-unresolved: 0 node/no-missing-require: 0 */
|
||||
const path = require('path')
|
||||
const { contractsPath, user } = require('../constants.json')
|
||||
require('dotenv').config({
|
||||
path: path.join(__dirname, '../submodules/poa-bridge-contracts/deploy/.env')
|
||||
path: path.join(__dirname, '..', contractsPath, '/deploy/.env')
|
||||
})
|
||||
|
||||
const {
|
||||
deployContract,
|
||||
sendRawTx,
|
||||
privateKeyToAddress
|
||||
} = require('../submodules/poa-bridge-contracts/deploy/src/deploymentUtils')
|
||||
} = require(`../${contractsPath}/deploy/src/deploymentUtils`)
|
||||
const {
|
||||
web3Foreign,
|
||||
deploymentPrivateKey
|
||||
} = require('../submodules/poa-bridge-contracts/deploy/src/web3')
|
||||
const POA20 = require('../submodules/poa-bridge-contracts/build/contracts/ERC677BridgeToken.json')
|
||||
const { user } = require('../constants.json')
|
||||
} = require(`../${contractsPath}/deploy/src/web3`)
|
||||
const POA20 = require(`../${contractsPath}/build/contracts/ERC677BridgeToken.json`)
|
||||
|
||||
const { DEPLOYMENT_ACCOUNT_PRIVATE_KEY } = process.env
|
||||
const DEPLOYMENT_ACCOUNT_ADDRESS = privateKeyToAddress(DEPLOYMENT_ACCOUNT_PRIVATE_KEY)
|
||||
|
@ -2,10 +2,10 @@ const path = require('path')
|
||||
const Web3 = require('web3')
|
||||
const assert = require('assert')
|
||||
const promiseRetry = require('promise-retry')
|
||||
const { user } = require('../constants.json')
|
||||
const { user, contractsPath } = require('../constants.json')
|
||||
const { generateNewBlock } = require('../utils/utils')
|
||||
|
||||
const abisDir = path.join(__dirname, '..', 'submodules/poa-bridge-contracts/build/contracts')
|
||||
const abisDir = path.join(__dirname, '..', contractsPath, 'build/contracts')
|
||||
|
||||
const homeWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity1:8545'))
|
||||
const foreignWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity2:8545'))
|
||||
|
@ -2,10 +2,10 @@ const path = require('path')
|
||||
const Web3 = require('web3')
|
||||
const assert = require('assert')
|
||||
const promiseRetry = require('promise-retry')
|
||||
const { user } = require('../constants.json')
|
||||
const { user, contractsPath } = require('../constants.json')
|
||||
const { generateNewBlock } = require('../utils/utils')
|
||||
|
||||
const abisDir = path.join(__dirname, '..', 'submodules/poa-bridge-contracts/build/contracts')
|
||||
const abisDir = path.join(__dirname, '..', contractsPath, 'build/contracts')
|
||||
|
||||
const homeWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity1:8545'))
|
||||
const foreignWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity2:8545'))
|
||||
|
@ -2,10 +2,10 @@ const path = require('path')
|
||||
const Web3 = require('web3')
|
||||
const assert = require('assert')
|
||||
const promiseRetry = require('promise-retry')
|
||||
const { user, validator, temp } = require('../constants.json')
|
||||
const { user, validator, temp, contractsPath } = require('../constants.json')
|
||||
const { generateNewBlock } = require('../utils/utils')
|
||||
|
||||
const abisDir = path.join(__dirname, '..', 'submodules/poa-bridge-contracts/build/contracts')
|
||||
const abisDir = path.join(__dirname, '..', contractsPath, '/build/contracts')
|
||||
|
||||
const homeWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity1:8545'))
|
||||
const foreignWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity2:8545'))
|
||||
|
@ -51,7 +51,7 @@ For more information on the Redis/RabbitMQ requirements, see [#90](/../../issues
|
||||
|
||||
## Installation and Deployment
|
||||
|
||||
**Note:** The following steps detail the bridge deployment process for development and testing. For deployment in a production environment we recommend using the [Bridge Deployment Playbooks](https://github.com/poanetwork/deployment-bridge/tree/master/bridge-nodejs).
|
||||
**Note:** The following steps detail the bridge deployment process for development and testing. For deployment in a production environment we recommend using the [Bridge Deployment Playbooks](../deployment/README.md).
|
||||
|
||||
#### Deploy the Bridge Contracts
|
||||
|
||||
|
@ -20,11 +20,11 @@
|
||||
"scripts": {
|
||||
"build": "yarn workspace poa-parity-bridge-contracts run compile && yarn workspace ui run build",
|
||||
"lint": "yarn wsrun --exclude oracle-e2e --exclude ui-e2e --exclude poa-parity-bridge-contracts lint",
|
||||
"test": "yarn wsrun --exclude monitor --exclude oracle-e2e --exclude ui-e2e test",
|
||||
"test": "yarn workspace poa-parity-bridge-contracts run compile && yarn wsrun --exclude monitor --exclude oracle-e2e --exclude ui-e2e test",
|
||||
"ansible-lint": "./deployment/lint.sh",
|
||||
"oracle-e2e": "./oracle-e2e/run-tests.sh",
|
||||
"ui-e2e": "./ui-e2e/run-tests.sh",
|
||||
"clean": "rm -rf ./node_modules ./**/node_modules",
|
||||
"clean": "rm -rf ./node_modules ./**/node_modules ./**/**/node_modules ./**/build",
|
||||
"postinstall": "ln -s $(pwd)/node_modules/openzeppelin-solidity/ contracts/node_modules/openzeppelin-solidity"
|
||||
}
|
||||
}
|
||||
|
@ -3,5 +3,6 @@
|
||||
"erc20Url" : "http://localhost:3001",
|
||||
"erc20NativeUrl" : "http://localhost:3002",
|
||||
"homeAccount": "./accounts/user77_7FC1.json",
|
||||
"foreignAccount": "./accounts/user42_7FC1.json"
|
||||
"foreignAccount": "./accounts/user42_7FC1.json",
|
||||
"contractsPath": "../contracts-2.2.0"
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
FROM node:8
|
||||
|
||||
RUN mkdir /stuff
|
||||
WORKDIR /stuff
|
||||
|
||||
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 fetch && \
|
||||
git checkout 2.1.0
|
||||
|
||||
RUN cd submodules/poa-bridge-contracts && \
|
||||
npm install && \
|
||||
./node_modules/.bin/truffle compile && \
|
||||
cd deploy && \
|
||||
npm install
|
||||
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
|
@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
cd submodules/poa-bridge-contracts/deploy
|
||||
echo "Deploying Native-Erc contracts"
|
||||
node deploy.js
|
||||
echo "Deploying erc20 contract"
|
||||
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
|
@ -1,18 +1,15 @@
|
||||
version: '3'
|
||||
services:
|
||||
parity1:
|
||||
build: parity
|
||||
build: ../parity
|
||||
ports:
|
||||
- "8541:8545"
|
||||
parity2:
|
||||
build:
|
||||
context: parity
|
||||
context: ../parity
|
||||
dockerfile: Dockerfile-foreign
|
||||
ports:
|
||||
- "8542:8545"
|
||||
contracts:
|
||||
build: contracts
|
||||
command: "true"
|
||||
redis:
|
||||
image: "redis:4"
|
||||
rabbit:
|
||||
@ -103,7 +100,9 @@ services:
|
||||
- ALLOW_HTTP=yes
|
||||
command: "true"
|
||||
ui:
|
||||
build: ../ui
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: Dockerfile.e2e
|
||||
environment:
|
||||
- REACT_APP_HOME_BRIDGE_ADDRESS=0x32198D570fffC7033641F8A9094FFDCaAEF42624
|
||||
- REACT_APP_FOREIGN_BRIDGE_ADDRESS=0x2B6871b9B02F73fa24F4864322CdC78604207769
|
||||
@ -126,7 +125,9 @@ services:
|
||||
- REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL=15000
|
||||
command: "true"
|
||||
ui-erc20:
|
||||
build: ../ui
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: Dockerfile.e2e
|
||||
environment:
|
||||
- REACT_APP_HOME_BRIDGE_ADDRESS=0x1feB40aD9420b186F019A717c37f5546165d411E
|
||||
- REACT_APP_FOREIGN_BRIDGE_ADDRESS=0x4a58D6d8D416a5fBCAcf3dC52eb8bE8948E25127
|
||||
@ -149,7 +150,9 @@ services:
|
||||
- REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL=15000
|
||||
command: "true"
|
||||
ui-erc20-native:
|
||||
build: ../ui
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: Dockerfile.e2e
|
||||
environment:
|
||||
- REACT_APP_HOME_BRIDGE_ADDRESS=0x488Af810997eD1730cB3a3918cD83b3216E6eAda
|
||||
- REACT_APP_FOREIGN_BRIDGE_ADDRESS=0x488Af810997eD1730cB3a3918cD83b3216E6eAda
|
||||
@ -171,3 +174,8 @@ services:
|
||||
- REACT_APP_FOREIGN_GAS_PRICE_FALLBACK=5000000000
|
||||
- REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL=15000
|
||||
command: "true"
|
||||
e2e:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: Dockerfile.e2e
|
||||
command: "true"
|
||||
|
@ -1,7 +1,7 @@
|
||||
BRIDGE_MODE=NATIVE_TO_ERC
|
||||
DEPLOYMENT_ACCOUNT_ADDRESS=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
DEPLOYMENT_ACCOUNT_PRIVATE_KEY=8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9
|
||||
DEPLOYMENT_GAS_LIMIT=4000000
|
||||
DEPLOYMENT_GAS_LIMIT=4600000
|
||||
HOME_DEPLOYMENT_GAS_PRICE=10000000000
|
||||
FOREIGN_DEPLOYMENT_GAS_PRICE=10000000000
|
||||
GET_RECEIPT_INTERVAL_IN_MILLISECONDS=50
|
||||
@ -11,9 +11,9 @@ 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_BRIDGE_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
HOME_VALIDATORS_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
HOME_UPGRADEABLE_ADMIN=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
HOME_DAILY_LIMIT=30000000000000000000000000
|
||||
HOME_MAX_AMOUNT_PER_TX=1500000000000000000000000
|
||||
HOME_MIN_AMOUNT_PER_TX=10000000000000000
|
||||
@ -21,9 +21,9 @@ 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_BRIDGE_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
FOREIGN_VALIDATORS_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
FOREIGN_UPGRADEABLE_ADMIN=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
FOREIGN_DAILY_LIMIT=15000000000000000000000000
|
||||
FOREIGN_MAX_AMOUNT_PER_TX=750000000000000000000000
|
||||
FOREIGN_MIN_AMOUNT_PER_TX=10000000000000000
|
@ -1,7 +1,7 @@
|
||||
BRIDGE_MODE=ERC_TO_ERC
|
||||
DEPLOYMENT_ACCOUNT_ADDRESS=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
DEPLOYMENT_ACCOUNT_PRIVATE_KEY=8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9
|
||||
DEPLOYMENT_GAS_LIMIT=4000000
|
||||
DEPLOYMENT_GAS_LIMIT=4600000
|
||||
HOME_DEPLOYMENT_GAS_PRICE=10000000000
|
||||
FOREIGN_DEPLOYMENT_GAS_PRICE=10000000000
|
||||
GET_RECEIPT_INTERVAL_IN_MILLISECONDS=50
|
||||
@ -11,9 +11,9 @@ 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_BRIDGE_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
HOME_VALIDATORS_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
HOME_UPGRADEABLE_ADMIN=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
HOME_DAILY_LIMIT=30000000000000000000000000
|
||||
HOME_MAX_AMOUNT_PER_TX=1500000000000000000000000
|
||||
HOME_MIN_AMOUNT_PER_TX=10000000000000000
|
||||
@ -21,9 +21,9 @@ 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_BRIDGE_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
FOREIGN_VALIDATORS_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
FOREIGN_UPGRADEABLE_ADMIN=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
FOREIGN_DAILY_LIMIT=15000000000000000000000000
|
||||
FOREIGN_MAX_AMOUNT_PER_TX=750000000000000000000000
|
||||
FOREIGN_MIN_AMOUNT_PER_TX=10000000000000000
|
@ -1,6 +1,6 @@
|
||||
BRIDGE_MODE=ERC_TO_NATIVE
|
||||
DEPLOYMENT_ACCOUNT_PRIVATE_KEY=8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9
|
||||
DEPLOYMENT_GAS_LIMIT=4000000
|
||||
DEPLOYMENT_GAS_LIMIT=4600000
|
||||
HOME_DEPLOYMENT_GAS_PRICE=10000000000
|
||||
FOREIGN_DEPLOYMENT_GAS_PRICE=10000000000
|
||||
GET_RECEIPT_INTERVAL_IN_MILLISECONDS=50
|
||||
@ -10,9 +10,9 @@ 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_BRIDGE_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
HOME_VALIDATORS_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
HOME_UPGRADEABLE_ADMIN=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
HOME_DAILY_LIMIT=30000000000000000000000000
|
||||
HOME_MAX_AMOUNT_PER_TX=1500000000000000000000000
|
||||
HOME_MIN_AMOUNT_PER_TX=10000000000000000
|
||||
@ -20,9 +20,9 @@ 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_BRIDGE_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
FOREIGN_VALIDATORS_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
FOREIGN_UPGRADEABLE_ADMIN=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b
|
||||
FOREIGN_DAILY_LIMIT=15000000000000000000000000
|
||||
FOREIGN_MAX_AMOUNT_PER_TX=750000000000000000000000
|
||||
FOREIGN_MIN_AMOUNT_PER_TX=10000000000000000
|
@ -5,5 +5,8 @@
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"mocha": "^5.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"deploy": "node ./scripts/deploy.js"
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
cd $(dirname $0)
|
||||
|
||||
docker-compose down
|
||||
docker-compose up -d --build --force-recreate
|
||||
node ./scripts/blocks.js &
|
||||
|
||||
docker-compose run contracts ./deploy.sh
|
||||
docker-compose run e2e yarn workspace ui-e2e run deploy
|
||||
docker-compose run -d bridge npm run watcher:signature-request
|
||||
docker-compose run -d bridge npm run watcher:collected-signatures
|
||||
docker-compose run -d bridge npm run watcher:affirmation-request
|
||||
@ -15,12 +17,18 @@ 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 -p 3000:3000 ui npm start
|
||||
docker-compose run -d -p 3001:3000 ui-erc20 npm start
|
||||
docker-compose run -d -p 3002:3000 ui-erc20-native npm start
|
||||
docker-compose run -d -p 3000:3000 ui yarn workspace ui run start
|
||||
docker-compose run -d -p 3001:3000 ui-erc20 yarn workspace ui run start
|
||||
docker-compose run -d -p 3002:3000 ui-erc20-native yarn workspace ui run start
|
||||
|
||||
yarn mocha -b ./test.js
|
||||
rc=$?
|
||||
|
||||
if [ $CI ]
|
||||
then
|
||||
exit $rc
|
||||
fi
|
||||
|
||||
ps | grep node | grep -v grep | awk '{print "kill " $1}' | sh
|
||||
docker-compose down
|
||||
exit $rc
|
||||
|
23
ui-e2e/scripts/deploy.js
Normal file
23
ui-e2e/scripts/deploy.js
Normal file
@ -0,0 +1,23 @@
|
||||
const path = require('path')
|
||||
const shell = require('shelljs')
|
||||
const { contractsPath } = require('../config.json')
|
||||
|
||||
const envsDir = path.join(__dirname, '../envs')
|
||||
const deployContractsDir = path.join(__dirname, '..', contractsPath, 'deploy')
|
||||
|
||||
shell.cp(path.join(envsDir, 'contracts.env'), path.join(deployContractsDir, '.env'))
|
||||
shell.cd(deployContractsDir)
|
||||
shell.exec('node deploy.js')
|
||||
shell.cd(__dirname)
|
||||
shell.exec('node deployERC20.js')
|
||||
shell.cd(deployContractsDir)
|
||||
shell.rm('.env')
|
||||
shell.cp(path.join(envsDir, 'erc-contracts.env'), path.join(deployContractsDir, '.env'))
|
||||
shell.exec('node deploy.js')
|
||||
shell.rm('.env')
|
||||
shell.cp(
|
||||
path.join(envsDir, 'erc-native-contracts.env'),
|
||||
path.join(deployContractsDir, '.env')
|
||||
)
|
||||
shell.exec('node src/utils/deployBlockReward.js')
|
||||
shell.exec('node deploy.js')
|
@ -1,15 +1,19 @@
|
||||
/* eslint import/no-unresolved: 0 node/no-missing-require: 0 */
|
||||
const path = require('path')
|
||||
require('dotenv').config();
|
||||
const { contractsPath } = require('../config.json')
|
||||
require('dotenv').config({
|
||||
path: path.join(__dirname, '..', contractsPath, 'deploy/.env')
|
||||
})
|
||||
|
||||
const {
|
||||
deployContract,
|
||||
sendRawTx
|
||||
} = require('./src/deploymentUtils')
|
||||
} = require(path.join('..', contractsPath, 'deploy/src/deploymentUtils'))
|
||||
const {
|
||||
web3Foreign,
|
||||
deploymentPrivateKey
|
||||
} = require('./src/web3')
|
||||
const POA20 = require('../build/contracts/ERC677BridgeToken.json')
|
||||
} = require(path.join('..', contractsPath, 'deploy/src/web3'))
|
||||
const POA20 = require(path.join('..', contractsPath, 'build/contracts/ERC677BridgeToken.json'))
|
||||
const user = '0x7FC1442AB55Da569940Eb750AaD2BAA63DA4010E'
|
||||
|
||||
const { DEPLOYMENT_ACCOUNT_ADDRESS } = process.env
|
@ -8,6 +8,7 @@ const User = require("./User.js").User;
|
||||
test.describe('e2e-test for bridge.poa, version 1.5.0', async function () {
|
||||
this.timeout(5 * 60000);
|
||||
this.slow(1 * 60000);
|
||||
this.retries(2);
|
||||
|
||||
const maxAmountPerTransactionLimit = 1;
|
||||
let startURL;
|
||||
|
@ -1,8 +0,0 @@
|
||||
FROM node:10 as build-deps
|
||||
|
||||
WORKDIR /bridge
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
COPY . .
|
||||
RUN npm install
|
||||
RUN npm run postinstall
|
18096
ui/package-lock.json
generated
18096
ui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -38,15 +38,15 @@
|
||||
"watch-css": "nodemon -e scss -x \"npm run build-css\"",
|
||||
"start": "npm run build-css && npm run select-css-theme && react-app-rewired start",
|
||||
"build": "npm run compile:contracts && npm run build-css && npm run select-css-theme && react-app-rewired build",
|
||||
"test": "react-app-rewired test --env=jsdom --no-watch",
|
||||
"test": "npm run compile:contracts && react-app-rewired test --env=jsdom --no-watch",
|
||||
"test:watch": "react-app-rewired test --env=jsdom",
|
||||
"coverage": "react-app-rewired test --env=jsdom --coverage",
|
||||
"coveralls": "cat ./coverage/lcov.info | node node_modules/.bin/coveralls",
|
||||
"eject": "react-app-rewired eject",
|
||||
"predeploy": "npm run build",
|
||||
"deploy": "gh-pages -d build -o origin",
|
||||
"compile:contracts": "cd submodules/poa-bridge-contracts && npm install && npm run compile && cd ../../ && rm -r -f src/contracts && cp -r submodules/poa-bridge-contracts/build/contracts src/contracts",
|
||||
"postinstall": "(cp lib/web3-eth/index.js ../node_modules/web3-eth/src || cp lib/web3-eth/index.js ./node_modules/web3-eth/src) && npm run compile:contracts"
|
||||
"compile:contracts": "rm -r -f src/contracts && cp -r ../contracts/build/contracts src/contracts",
|
||||
"postinstall": "(cp lib/web3-eth/index.js ../node_modules/web3-eth/src && cp lib/web3-eth/index.js ./node_modules/web3-eth/src)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "5.12.0",
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit 492f6d010a1324676801df918f0449965e770c64
|
Loading…
Reference in New Issue
Block a user