Common deploy

This commit is contained in:
rzadp 2019-06-03 15:47:42 +02:00
parent cc10335d99
commit a11211d813
4 changed files with 10 additions and 40 deletions

@ -4,8 +4,7 @@ const contractsPath = '../../contracts';
require('dotenv').config({ require('dotenv').config({
path: path.join(__dirname, contractsPath, '/deploy/.env') path: path.join(__dirname, contractsPath, '/deploy/.env')
}) })
const oracle_e2e_user = '0xbb140FbA6242a1c3887A7823F7750a73101383e3' const user = '0x7FC1442AB55Da569940Eb750AaD2BAA63DA4010E'
const ui_e2e_user = '0x7FC1442AB55Da569940Eb750AaD2BAA63DA4010E'
const { const {
deployContract, deployContract,
@ -33,48 +32,19 @@ async function deployErc20() {
foreignNonce++ foreignNonce++
console.log('[Foreign] POA20 Test: ', poa20foreign.options.address) console.log('[Foreign] POA20 Test: ', poa20foreign.options.address)
const getMintData = (user) => poa20foreign.methods.mint(user, '1000000000000000000').encodeABI({ from: DEPLOYMENT_ACCOUNT_ADDRESS }) const mintData = await poa20foreign.methods
.mint(user, '500000000000000000000')
.encodeABI({ from: DEPLOYMENT_ACCOUNT_ADDRESS })
await sendRawTxForeign({ await sendRawTxForeign({
data: getMintData(oracle_e2e_user), data: mintData,
nonce: foreignNonce, nonce: foreignNonce,
to: poa20foreign.options.address, to: poa20foreign.options.address,
privateKey: deploymentPrivateKey, privateKey: deploymentPrivateKey,
url: process.env.FOREIGN_RPC_URL url: process.env.FOREIGN_RPC_URL
}) })
foreignNonce++
const receipt = await sendRawTxForeign({
data: getMintData(ui_e2e_user),
nonce: foreignNonce,
to: poa20foreign.options.address,
privateKey: deploymentPrivateKey,
url: process.env.FOREIGN_RPC_URL
})
console.log('receipt is')
console.log(receipt)
// while(true) {
// const tx = await web3Foreign.eth.getTransaction(receipt.transactionHash);
// console.log('tx is: ')
// console.log(tx);
// await new Promise(resolve => setTimeout(resolve, 1000));
// }
} catch (e) { } catch (e) {
console.log(e) console.log(e)
throw e;
} }
} }

@ -4,8 +4,8 @@
"privateKey": "0xcf954e07e6a439faf392eb474e95ddb444c2ca444847f2ad6ecc79e1a585e2b8" "privateKey": "0xcf954e07e6a439faf392eb474e95ddb444c2ca444847f2ad6ecc79e1a585e2b8"
}, },
"user": { "user": {
"address": "0xbb140FbA6242a1c3887A7823F7750a73101383e3", "address": "0x7FC1442AB55Da569940Eb750AaD2BAA63DA4010E",
"privateKey": "0x63e48a8ba0b99e0377c6b483af4a072cbca5ffbcfdac77be72e69f4960125800" "privateKey": "0x460635eb4ac4287de2d2393985e19b4a9f948ac533453a1044ab8d50330b0df9"
}, },
"validator": { "validator": {
"address": "0xaaB52d66283F7A1D5978bcFcB55721ACB467384b", "address": "0xaaB52d66283F7A1D5978bcFcB55721ACB467384b",

@ -1,6 +1,6 @@
cd $(dirname $0) cd $(dirname $0)
../e2e-commons/up.sh oracle oracle-deploy ../e2e-commons/up.sh oracle deploy
docker-compose -f ../e2e-commons/docker-compose.yml run e2e yarn workspace oracle-e2e run start docker-compose -f ../e2e-commons/docker-compose.yml run e2e yarn workspace oracle-e2e run start
rc=$? rc=$?

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
cd $(dirname $0) cd $(dirname $0)
../e2e-commons/up.sh oracle ui ui-deploy ../e2e-commons/up.sh oracle ui deploy
node ./scripts/blocks.js & node ./scripts/blocks.js &
yarn mocha -b ./test.js yarn mocha -b ./test.js