Constant path to contracts in oracle-e2e

This commit is contained in:
rzadp 2019-05-22 10:12:41 +02:00
parent 56b7772439
commit 29da871914
6 changed files with 15 additions and 13 deletions

@ -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, '../contracts-2.2.0/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,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, '../../contracts-2.2.0/deploy/.env')
path: path.join(__dirname, '..', contractsPath, '/deploy/.env')
})
const {
deployContract,
sendRawTx,
privateKeyToAddress
} = require('../../contracts-2.2.0/deploy/src/deploymentUtils')
} = require(`../${contractsPath}/deploy/src/deploymentUtils`)
const {
web3Foreign,
deploymentPrivateKey
} = require('../../contracts-2.2.0/deploy/src/web3')
const POA20 = require('../../contracts-2.2.0/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, contractPath } = require('../constants.json')
const { generateNewBlock } = require('../utils/utils')
const abisDir = path.join(__dirname, '..', '../contracts-2.2.0/build/contracts')
const abisDir = path.join(__dirname, '..', contractPath, '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, '..', '../contracts-2.2.0/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, '..', '../contracts-2.2.0/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'))