Constant path to contracts in oracle-e2e
This commit is contained in:
parent
56b7772439
commit
29da871914
@ -10,5 +10,6 @@
|
|||||||
"validator": {
|
"validator": {
|
||||||
"address": "0xaaB52d66283F7A1D5978bcFcB55721ACB467384b",
|
"address": "0xaaB52d66283F7A1D5978bcFcB55721ACB467384b",
|
||||||
"privateKey": "0x8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9"
|
"privateKey": "0x8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9"
|
||||||
}
|
},
|
||||||
|
"contractsPath": "../contracts-2.2.0"
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
const path = require('path')
|
const path = require('path')
|
||||||
const shell = require('shelljs')
|
const shell = require('shelljs')
|
||||||
|
const { contractsPath } = require('../constants.json')
|
||||||
|
|
||||||
const envsDir = path.join(__dirname, 'envs')
|
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')
|
const erc20ScriptDir = path.join(__dirname, 'scripts')
|
||||||
|
|
||||||
shell.cp(path.join(envsDir, 'contracts-deploy.env'), path.join(deployContractsDir, '.env'))
|
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 */
|
/* eslint import/no-unresolved: 0 node/no-missing-require: 0 */
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
const { contractsPath, user } = require('../constants.json')
|
||||||
require('dotenv').config({
|
require('dotenv').config({
|
||||||
path: path.join(__dirname, '../../contracts-2.2.0/deploy/.env')
|
path: path.join(__dirname, '..', contractsPath, '/deploy/.env')
|
||||||
})
|
})
|
||||||
|
|
||||||
const {
|
const {
|
||||||
deployContract,
|
deployContract,
|
||||||
sendRawTx,
|
sendRawTx,
|
||||||
privateKeyToAddress
|
privateKeyToAddress
|
||||||
} = require('../../contracts-2.2.0/deploy/src/deploymentUtils')
|
} = require(`../${contractsPath}/deploy/src/deploymentUtils`)
|
||||||
const {
|
const {
|
||||||
web3Foreign,
|
web3Foreign,
|
||||||
deploymentPrivateKey
|
deploymentPrivateKey
|
||||||
} = require('../../contracts-2.2.0/deploy/src/web3')
|
} = require(`../${contractsPath}/deploy/src/web3`)
|
||||||
const POA20 = require('../../contracts-2.2.0/build/contracts/ERC677BridgeToken.json')
|
const POA20 = require(`../${contractsPath}/build/contracts/ERC677BridgeToken.json`)
|
||||||
const { user } = require('../constants.json')
|
|
||||||
|
|
||||||
const { DEPLOYMENT_ACCOUNT_PRIVATE_KEY } = process.env
|
const { DEPLOYMENT_ACCOUNT_PRIVATE_KEY } = process.env
|
||||||
const DEPLOYMENT_ACCOUNT_ADDRESS = privateKeyToAddress(DEPLOYMENT_ACCOUNT_PRIVATE_KEY)
|
const DEPLOYMENT_ACCOUNT_ADDRESS = privateKeyToAddress(DEPLOYMENT_ACCOUNT_PRIVATE_KEY)
|
||||||
|
@ -2,10 +2,10 @@ const path = require('path')
|
|||||||
const Web3 = require('web3')
|
const Web3 = require('web3')
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const promiseRetry = require('promise-retry')
|
const promiseRetry = require('promise-retry')
|
||||||
const { user } = require('../constants.json')
|
const { user, contractPath } = require('../constants.json')
|
||||||
const { generateNewBlock } = require('../utils/utils')
|
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 homeWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity1:8545'))
|
||||||
const foreignWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity2: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 Web3 = require('web3')
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const promiseRetry = require('promise-retry')
|
const promiseRetry = require('promise-retry')
|
||||||
const { user } = require('../constants.json')
|
const { user, contractsPath } = require('../constants.json')
|
||||||
const { generateNewBlock } = require('../utils/utils')
|
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 homeWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity1:8545'))
|
||||||
const foreignWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity2: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 Web3 = require('web3')
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const promiseRetry = require('promise-retry')
|
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 { 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 homeWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity1:8545'))
|
||||||
const foreignWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity2:8545'))
|
const foreignWeb3 = new Web3(new Web3.providers.HttpProvider('http://parity2:8545'))
|
||||||
|
Loading…
Reference in New Issue
Block a user