From 4ddb651568d70e9b4830265f79a27c0c6f89c02c Mon Sep 17 00:00:00 2001 From: Gerardo Nardelli Date: Thu, 23 May 2019 18:01:56 -0300 Subject: [PATCH 1/4] Update contract submodule --- e2e-script/contracts/Dockerfile | 2 +- submodules/poa-bridge-contracts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e-script/contracts/Dockerfile b/e2e-script/contracts/Dockerfile index 6883c35f..d2ab8830 100644 --- a/e2e-script/contracts/Dockerfile +++ b/e2e-script/contracts/Dockerfile @@ -9,7 +9,7 @@ RUN mkdir submodules && \ mv poa-bridge-contracts submodules && \ cd submodules/poa-bridge-contracts && \ git fetch && \ - git checkout 2.1.0 + git checkout 2.3.1 RUN cd submodules/poa-bridge-contracts && \ npm install && \ diff --git a/submodules/poa-bridge-contracts b/submodules/poa-bridge-contracts index 492f6d01..b1c4c35f 160000 --- a/submodules/poa-bridge-contracts +++ b/submodules/poa-bridge-contracts @@ -1 +1 @@ -Subproject commit 492f6d010a1324676801df918f0449965e770c64 +Subproject commit b1c4c35fbc86acacf3a6d857c7e6b232aec2592f From 2fd8fa6741ebc2a28b72b703f0bdf5c03f6283cb Mon Sep 17 00:00:00 2001 From: Gerardo Nardelli Date: Fri, 24 May 2019 08:20:29 -0300 Subject: [PATCH 2/4] Update e2e --- e2e-script/contracts/contracts.env | 8 +++++++- e2e-script/contracts/deployERC20.js | 4 ++-- e2e-script/contracts/erc-contracts.env | 10 +++++++++- e2e-script/contracts/erc-native-contracts.env | 7 ++++++- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/e2e-script/contracts/contracts.env b/e2e-script/contracts/contracts.env index 0a07499c..99d85ed9 100644 --- a/e2e-script/contracts/contracts.env +++ b/e2e-script/contracts/contracts.env @@ -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_EXTRA=0.2 HOME_DEPLOYMENT_GAS_PRICE=10000000000 FOREIGN_DEPLOYMENT_GAS_PRICE=10000000000 GET_RECEIPT_INTERVAL_IN_MILLISECONDS=50 @@ -19,6 +19,7 @@ HOME_MAX_AMOUNT_PER_TX=1500000000000000000000000 HOME_MIN_AMOUNT_PER_TX=10000000000000000 HOME_REQUIRED_BLOCK_CONFIRMATIONS=1 HOME_GAS_PRICE=1000000000 +HOME_REWARDABLE=false FOREIGN_RPC_URL=http://parity2:8545 FOREIGN_OWNER_MULTISIG=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b @@ -29,6 +30,11 @@ FOREIGN_MAX_AMOUNT_PER_TX=750000000000000000000000 FOREIGN_MIN_AMOUNT_PER_TX=10000000000000000 FOREIGN_REQUIRED_BLOCK_CONFIRMATIONS=1 FOREIGN_GAS_PRICE=10000000000 +FOREIGN_REWARDABLE=false REQUIRED_NUMBER_OF_VALIDATORS=1 VALIDATORS="0xaaB52d66283F7A1D5978bcFcB55721ACB467384b" +VALIDATORS_REWARD_ACCOUNTS=0x0000000000000000000000000000000000000000 + +DEPLOY_REWARDABLE_TOKEN=false +BLOCK_REWARD_ADDRESS=0x0000000000000000000000000000000000000000 diff --git a/e2e-script/contracts/deployERC20.js b/e2e-script/contracts/deployERC20.js index 11c4f848..8dd9ea9d 100644 --- a/e2e-script/contracts/deployERC20.js +++ b/e2e-script/contracts/deployERC20.js @@ -3,7 +3,7 @@ const path = require('path') require('dotenv').config(); const { deployContract, - sendRawTx + sendRawTxForeign } = require('./src/deploymentUtils') const { web3Foreign, @@ -29,7 +29,7 @@ async function deployErc20() { const mintData = await poa20foreign.methods .mint(user, '500000000000000000000') .encodeABI({ from: DEPLOYMENT_ACCOUNT_ADDRESS }) - await sendRawTx({ + await sendRawTxForeign({ data: mintData, nonce: foreignNonce, to: poa20foreign.options.address, diff --git a/e2e-script/contracts/erc-contracts.env b/e2e-script/contracts/erc-contracts.env index 869261e5..534e2be6 100644 --- a/e2e-script/contracts/erc-contracts.env +++ b/e2e-script/contracts/erc-contracts.env @@ -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_EXTRA=0.2 HOME_DEPLOYMENT_GAS_PRICE=10000000000 FOREIGN_DEPLOYMENT_GAS_PRICE=10000000000 GET_RECEIPT_INTERVAL_IN_MILLISECONDS=50 @@ -19,6 +19,7 @@ HOME_MAX_AMOUNT_PER_TX=1500000000000000000000000 HOME_MIN_AMOUNT_PER_TX=10000000000000000 HOME_REQUIRED_BLOCK_CONFIRMATIONS=1 HOME_GAS_PRICE=1000000000 +HOME_REWARDABLE=false FOREIGN_RPC_URL=http://parity2:8545 FOREIGN_OWNER_MULTISIG=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b @@ -30,6 +31,13 @@ FOREIGN_MIN_AMOUNT_PER_TX=10000000000000000 FOREIGN_REQUIRED_BLOCK_CONFIRMATIONS=1 FOREIGN_GAS_PRICE=10000000000 ERC20_TOKEN_ADDRESS=0x3C665A31199694Bf723fD08844AD290207B5797f +FOREIGN_REWARDABLE=false REQUIRED_NUMBER_OF_VALIDATORS=1 VALIDATORS="0xaaB52d66283F7A1D5978bcFcB55721ACB467384b" +VALIDATORS_REWARD_ACCOUNTS=0x0000000000000000000000000000000000000000 + +DEPLOY_REWARDABLE_TOKEN=false +BLOCK_REWARD_ADDRESS=0x0000000000000000000000000000000000000000 +DPOS_STAKING_ADDRESS=0x0000000000000000000000000000000000000000 +ERC20_EXTENDED_BY_ERC677=false diff --git a/e2e-script/contracts/erc-native-contracts.env b/e2e-script/contracts/erc-native-contracts.env index fd86652c..1a8651a1 100644 --- a/e2e-script/contracts/erc-native-contracts.env +++ b/e2e-script/contracts/erc-native-contracts.env @@ -1,6 +1,6 @@ BRIDGE_MODE=ERC_TO_NATIVE DEPLOYMENT_ACCOUNT_PRIVATE_KEY=8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9 -DEPLOYMENT_GAS_LIMIT=4000000 +DEPLOYMENT_GAS_LIMIT_EXTRA=0.2 HOME_DEPLOYMENT_GAS_PRICE=10000000000 FOREIGN_DEPLOYMENT_GAS_PRICE=10000000000 GET_RECEIPT_INTERVAL_IN_MILLISECONDS=50 @@ -18,6 +18,7 @@ HOME_MAX_AMOUNT_PER_TX=1500000000000000000000000 HOME_MIN_AMOUNT_PER_TX=10000000000000000 HOME_REQUIRED_BLOCK_CONFIRMATIONS=1 HOME_GAS_PRICE=1000000000 +HOME_REWARDABLE=false FOREIGN_RPC_URL=http://parity2:8545 FOREIGN_OWNER_MULTISIG=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b @@ -31,6 +32,10 @@ FOREIGN_GAS_PRICE=10000000000 BLOCK_REWARD_ADDRESS=0xF9698Eb93702dfdd0e2d802088d4c21822a8A977 ERC20_TOKEN_ADDRESS=0x3C665A31199694Bf723fD08844AD290207B5797f +FOREIGN_REWARDABLE=false REQUIRED_NUMBER_OF_VALIDATORS=1 VALIDATORS="0xaaB52d66283F7A1D5978bcFcB55721ACB467384b" +VALIDATORS_REWARD_ACCOUNTS=0x0000000000000000000000000000000000000000 + +DEPLOY_REWARDABLE_TOKEN=false From cf8cac09e19d561612a52d4886acae42063854c3 Mon Sep 17 00:00:00 2001 From: Gerardo Nardelli Date: Fri, 24 May 2019 09:27:22 -0300 Subject: [PATCH 3/4] Fix e2e tests --- e2e-script/contracts/Dockerfile | 1 + e2e-script/contracts/contracts.env | 12 ++++++------ e2e-script/contracts/erc-contracts.env | 12 ++++++------ e2e-script/contracts/erc-native-contracts.env | 12 ++++++------ 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/e2e-script/contracts/Dockerfile b/e2e-script/contracts/Dockerfile index d2ab8830..d2758efa 100644 --- a/e2e-script/contracts/Dockerfile +++ b/e2e-script/contracts/Dockerfile @@ -15,6 +15,7 @@ RUN cd submodules/poa-bridge-contracts && \ npm install && \ ./node_modules/.bin/truffle compile && \ cd deploy && \ + rm package-lock.json && \ npm install COPY deploy.sh . COPY contracts.env submodules/poa-bridge-contracts/deploy/ diff --git a/e2e-script/contracts/contracts.env b/e2e-script/contracts/contracts.env index 99d85ed9..5890d52a 100644 --- a/e2e-script/contracts/contracts.env +++ b/e2e-script/contracts/contracts.env @@ -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 @@ -22,9 +22,9 @@ HOME_GAS_PRICE=1000000000 HOME_REWARDABLE=false 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 diff --git a/e2e-script/contracts/erc-contracts.env b/e2e-script/contracts/erc-contracts.env index 534e2be6..bcbdfe3c 100644 --- a/e2e-script/contracts/erc-contracts.env +++ b/e2e-script/contracts/erc-contracts.env @@ -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 @@ -22,9 +22,9 @@ HOME_GAS_PRICE=1000000000 HOME_REWARDABLE=false 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 diff --git a/e2e-script/contracts/erc-native-contracts.env b/e2e-script/contracts/erc-native-contracts.env index 1a8651a1..c605ac66 100644 --- a/e2e-script/contracts/erc-native-contracts.env +++ b/e2e-script/contracts/erc-native-contracts.env @@ -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 @@ -21,9 +21,9 @@ HOME_GAS_PRICE=1000000000 HOME_REWARDABLE=false 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 From 0ca3248cd6a3c71cc93e323fff1eaf9070d1e505 Mon Sep 17 00:00:00 2001 From: Gerardo Nardelli Date: Fri, 24 May 2019 11:27:22 -0300 Subject: [PATCH 4/4] Update contract version to 2.3.2 on e2e --- e2e-script/contracts/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/e2e-script/contracts/Dockerfile b/e2e-script/contracts/Dockerfile index d2758efa..3770d736 100644 --- a/e2e-script/contracts/Dockerfile +++ b/e2e-script/contracts/Dockerfile @@ -9,13 +9,12 @@ RUN mkdir submodules && \ mv poa-bridge-contracts submodules && \ cd submodules/poa-bridge-contracts && \ git fetch && \ - git checkout 2.3.1 + git checkout 2.3.2 RUN cd submodules/poa-bridge-contracts && \ npm install && \ ./node_modules/.bin/truffle compile && \ cd deploy && \ - rm package-lock.json && \ npm install COPY deploy.sh . COPY contracts.env submodules/poa-bridge-contracts/deploy/