From d577a71096f28dce99fc68f68601d265378f9d87 Mon Sep 17 00:00:00 2001 From: Gerardo Nardelli Date: Wed, 18 Sep 2019 16:45:13 -0300 Subject: [PATCH 1/7] Add support for AMB contracts (#199) --- README.md | 3 +- commons/abis.js | 11 +- commons/constants.js | 9 +- commons/index.js | 4 +- commons/message.js | 27 ++++ commons/package.json | 6 +- .../test/{constants.js => constants.test.js} | 2 +- commons/test/message.test.js | 69 ++++++++++ commons/utils.js | 2 + e2e-commons/components-envs/oracle-amb.env | 23 ++++ e2e-commons/constants.json | 6 + e2e-commons/contracts-envs/amb.env | 25 ++++ e2e-commons/docker-compose.yml | 11 ++ e2e-commons/scripts/deploy.sh | 11 ++ e2e-commons/up.sh | 5 +- monitor/alerts.js | 23 +++- monitor/eventsStats.js | 65 +++++++--- monitor/getBalances.js | 6 + monitor/getShortEventStats.js | 43 +++++-- monitor/utils/events.js | 39 +++--- monitor/utils/message.js | 47 +++++++ oracle-e2e/test/amb.js | 102 +++++++++++++++ oracle/README.md | 4 +- oracle/config/base.config.js | 9 +- .../estimateGas.js | 51 ++++++++ .../processAMBAffirmationRequests/index.js | 95 ++++++++++++++ .../estimateGas.js | 62 +++++++++ .../processAMBCollectedSignatures/index.js | 118 ++++++++++++++++++ .../processAMBSignatureRequests/index.js | 99 +++++++++++++++ .../processAffirmationRequests/index.js | 6 +- .../processCollectedSignatures/index.js | 115 +++++++++-------- .../events/processSignatureRequests/index.js | 6 +- oracle/src/events/processTransfers/index.js | 6 +- oracle/src/utils/message.js | 32 ++++- oracle/src/watcher.js | 9 ++ 35 files changed, 1018 insertions(+), 133 deletions(-) create mode 100644 commons/message.js rename commons/test/{constants.js => constants.test.js} (84%) create mode 100644 commons/test/message.test.js create mode 100644 e2e-commons/components-envs/oracle-amb.env create mode 100644 e2e-commons/contracts-envs/amb.env create mode 100644 monitor/utils/message.js create mode 100644 oracle-e2e/test/amb.js create mode 100644 oracle/src/events/processAMBAffirmationRequests/estimateGas.js create mode 100644 oracle/src/events/processAMBAffirmationRequests/index.js create mode 100644 oracle/src/events/processAMBCollectedSignatures/estimateGas.js create mode 100644 oracle/src/events/processAMBCollectedSignatures/index.js create mode 100644 oracle/src/events/processAMBSignatureRequests/index.js diff --git a/README.md b/README.md index d25e595ea..46cd308ff 100644 --- a/README.md +++ b/README.md @@ -52,11 +52,12 @@ Additionally there are [Smart Contracts](https://github.com/poanetwork/poa-bridg ## Operational Modes -The POA TokenBridge provides three operational modes: +The POA TokenBridge provides four operational modes: - [x] `Native-to-ERC20` **Coins** on a Home network can be converted to ERC20-compatible **tokens** on a Foreign network. Coins are locked on the Home side and the corresponding amount of ERC20 tokens are minted on the Foreign side. When the operation is reversed, tokens are burnt on the Foreign side and unlocked in the Home network. **More Information: [POA-to-POA20 Bridge](https://medium.com/poa-network/introducing-poa-bridge-and-poa20-55d8b78058ac)** - [x] `ERC20-to-ERC20` ERC20-compatible tokens on the Foreign network are locked and minted as ERC20-compatible tokens (ERC677 tokens) on the Home network. When transferred from Home to Foreign, they are burnt on the Home side and unlocked in the Foreign network. This can be considered a form of atomic swap when a user swaps the token "X" in network "A" to the token "Y" in network "B". **More Information: [ERC20-to-ERC20](https://medium.com/poa-network/introducing-the-erc20-to-erc20-tokenbridge-ce266cc1a2d0)** - [x] `ERC20-to-Native`: Pre-existing **tokens** in the Foreign network are locked and **coins** are minted in the `Home` network. In this mode, the Home network consensus engine invokes [Parity's Block Reward contract](https://wiki.parity.io/Block-Reward-Contract.html) to mint coins per the bridge contract request. **More Information: [xDai Chain](https://medium.com/poa-network/poa-network-partners-with-makerdao-on-xdai-chain-the-first-ever-usd-stable-blockchain-65a078c41e6a)** +- [x] `Arbitrary-Message`: Transfer arbitrary data between two networks as so the data could be interpreted as an arbitrary contract method invocation. ## Initializing the monorepository diff --git a/commons/abis.js b/commons/abis.js index 05e97a2bb..03a4fc3fb 100644 --- a/commons/abis.js +++ b/commons/abis.js @@ -10,6 +10,9 @@ const ERC677_BRIDGE_TOKEN_ABI = require('../contracts/build/contracts/ERC677Brid const BLOCK_REWARD_ABI = require('../contracts/build/contracts/IBlockReward').abi const BRIDGE_VALIDATORS_ABI = require('../contracts/build/contracts/BridgeValidators').abi const REWARDABLE_VALIDATORS_ABI = require('../contracts/build/contracts/RewardableValidators').abi +const HOME_AMB_ABI = require('../contracts/build/contracts/HomeAMB').abi +const FOREIGN_AMB_ABI = require('../contracts/build/contracts/ForeignAMB').abi +const BOX_ABI = require('../contracts/build/contracts/Box').abi const { HOME_V1_ABI, FOREIGN_V1_ABI } = require('./v1Abis') const { BRIDGE_MODES } = require('./constants') @@ -60,6 +63,9 @@ function getBridgeABIs(bridgeMode) { } else if (bridgeMode === BRIDGE_MODES.NATIVE_TO_ERC_V1) { HOME_ABI = HOME_V1_ABI FOREIGN_ABI = FOREIGN_V1_ABI + } else if (bridgeMode === BRIDGE_MODES.ARBITRARY_MESSAGE) { + HOME_ABI = HOME_AMB_ABI + FOREIGN_ABI = FOREIGN_AMB_ABI } else { throw new Error(`Unrecognized bridge mode: ${bridgeMode}`) } @@ -83,5 +89,8 @@ module.exports = { REWARDABLE_VALIDATORS_ABI, HOME_V1_ABI, FOREIGN_V1_ABI, - ERC20_BYTES32_ABI + ERC20_BYTES32_ABI, + HOME_AMB_ABI, + FOREIGN_AMB_ABI, + BOX_ABI } diff --git a/commons/constants.js b/commons/constants.js index 27cffa415..53c86b685 100644 --- a/commons/constants.js +++ b/commons/constants.js @@ -2,7 +2,8 @@ const BRIDGE_MODES = { NATIVE_TO_ERC: 'NATIVE_TO_ERC', ERC_TO_ERC: 'ERC_TO_ERC', ERC_TO_NATIVE: 'ERC_TO_NATIVE', - NATIVE_TO_ERC_V1: 'NATIVE_TO_ERC_V1' + NATIVE_TO_ERC_V1: 'NATIVE_TO_ERC_V1', + ARBITRARY_MESSAGE: 'ARBITRARY_MESSAGE' } const ERC_TYPES = { @@ -16,4 +17,8 @@ const FEE_MANAGER_MODE = { UNDEFINED: 'UNDEFINED' } -module.exports = { BRIDGE_MODES, ERC_TYPES, FEE_MANAGER_MODE } +module.exports = { + BRIDGE_MODES, + ERC_TYPES, + FEE_MANAGER_MODE +} diff --git a/commons/index.js b/commons/index.js index e66ac4014..7d81545fb 100644 --- a/commons/index.js +++ b/commons/index.js @@ -1,9 +1,11 @@ const constants = require('./constants') const abis = require('./abis') const utils = require('./utils') +const message = require('./message') module.exports = { ...constants, ...abis, - ...utils + ...utils, + ...message } diff --git a/commons/message.js b/commons/message.js new file mode 100644 index 000000000..16d4e31d4 --- /dev/null +++ b/commons/message.js @@ -0,0 +1,27 @@ +function strip0x(input) { + return input.replace(/^0x/, '') +} + +function addTxHashToData({ encodedData, transactionHash }) { + return encodedData.slice(0, 2) + strip0x(transactionHash) + encodedData.slice(2) +} + +function parseAMBMessage(message) { + message = strip0x(message) + + const txHash = `0x${message.slice(0, 64)}` + const sender = `0x${message.slice(64, 104)}` + const executor = `0x${message.slice(104, 144)}` + + return { + sender, + executor, + txHash + } +} + +module.exports = { + addTxHashToData, + parseAMBMessage, + strip0x +} diff --git a/commons/package.json b/commons/package.json index a5872c3d2..200922ac1 100644 --- a/commons/package.json +++ b/commons/package.json @@ -8,6 +8,10 @@ "test": "NODE_ENV=test mocha" }, "dependencies": { - "web3-utils": "1.0.0-beta.30" + "web3-utils": "1.0.0-beta.34" + }, + "devDependencies": { + "bn-chai": "^1.0.1", + "chai": "^4.2.0" } } diff --git a/commons/test/constants.js b/commons/test/constants.test.js similarity index 84% rename from commons/test/constants.js rename to commons/test/constants.test.js index 7cdf72730..cc986e19e 100644 --- a/commons/test/constants.js +++ b/commons/test/constants.test.js @@ -3,7 +3,7 @@ const { BRIDGE_MODES, ERC_TYPES } = require('../constants') describe('constants', () => { it('should contain correct number of bridge types', () => { - expect(Object.keys(BRIDGE_MODES).length).to.be.equal(4) + expect(Object.keys(BRIDGE_MODES).length).to.be.equal(5) }) it('should contain correct number of erc types', () => { diff --git a/commons/test/message.test.js b/commons/test/message.test.js new file mode 100644 index 000000000..1eb3e2e63 --- /dev/null +++ b/commons/test/message.test.js @@ -0,0 +1,69 @@ +const { BN } = require('web3-utils') +const { expect } = require('chai').use(require('bn-chai')(BN)) +const { parseAMBMessage, strip0x, addTxHashToData } = require('../message') + +describe('strip0x', () => { + it('should remove 0x from input', () => { + // Given + const input = '0x12345' + + // When + const result = strip0x(input) + + // Then + expect(result).to.be.equal('12345') + }) + it('should not modify input if 0x is not present', () => { + // Given + const input = '12345' + + // When + const result = strip0x(input) + + // Then + expect(result).to.be.equal(input) + }) +}) +describe('addTxHashToData', () => { + it('should add txHash to encoded data at position 2', () => { + // Given + const msgSender = '0x003667154bb32e42bb9e1e6532f19d187fa0082e' + const msgExecutor = '0xf4bef13f9f4f2b203faf0c3cbbaabe1afe056955' + const msgGasLimit = '000000000000000000000000000000000000000000000000000000005b877705' + const msgDataType = '00' + const msgData = '0xb1591967aed668a4b27645ff40c444892d91bf5951b382995d4d4f6ee3a2ce03' + const encodedData = `0x${strip0x(msgSender)}${strip0x(msgExecutor)}${msgGasLimit}${msgDataType}${strip0x(msgData)}` + + const transactionHash = '0xbdceda9d8c94838aca10c687da1411a07b1390e88239c0638cb9cc264219cc10' + const message = `0x${strip0x(transactionHash)}${strip0x(msgSender)}${strip0x( + msgExecutor + )}${msgGasLimit}${msgDataType}${strip0x(msgData)}` + + // When + const result = addTxHashToData({ encodedData, transactionHash }) + + // Then + expect(result).to.be.equal(message) + }) +}) +describe('parseAMBMessage', () => { + it('should parse data type 00', () => { + const msgSender = '0x003667154bb32e42bb9e1e6532f19d187fa0082e' + const msgExecutor = '0xf4bef13f9f4f2b203faf0c3cbbaabe1afe056955' + const msgTxHash = '0xbdceda9d8c94838aca10c687da1411a07b1390e88239c0638cb9cc264219cc10' + const msgGasLimit = '000000000000000000000000000000000000000000000000000000005b877705' + const msgDataType = '00' + const msgData = '0xb1591967aed668a4b27645ff40c444892d91bf5951b382995d4d4f6ee3a2ce03' + const message = `0x${strip0x(msgTxHash)}${strip0x(msgSender)}${strip0x( + msgExecutor + )}${msgGasLimit}${msgDataType}${strip0x(msgData)}` + + // when + const { sender, executor, txHash } = parseAMBMessage(message) + + // then + expect(sender).to.be.equal(msgSender) + expect(executor).to.be.equal(msgExecutor) + expect(txHash).to.be.equal(msgTxHash) + }) +}) diff --git a/commons/utils.js b/commons/utils.js index 2bf6a459b..e8779816f 100644 --- a/commons/utils.js +++ b/commons/utils.js @@ -10,6 +10,8 @@ function decodeBridgeMode(bridgeModeHash) { return BRIDGE_MODES.ERC_TO_ERC case '0x18762d46': return BRIDGE_MODES.ERC_TO_NATIVE + case '0x2544fbb9': + return BRIDGE_MODES.ARBITRARY_MESSAGE default: throw new Error(`Unrecognized bridge mode hash: '${bridgeModeHash}'`) } diff --git a/e2e-commons/components-envs/oracle-amb.env b/e2e-commons/components-envs/oracle-amb.env new file mode 100644 index 000000000..47565dc1d --- /dev/null +++ b/e2e-commons/components-envs/oracle-amb.env @@ -0,0 +1,23 @@ + +ORACLE_BRIDGE_MODE=ARBITRARY_MESSAGE +ORACLE_QUEUE_URL=amqp://rabbit +ORACLE_REDIS_URL=redis://redis +COMMON_HOME_RPC_URL=http://parity1:8545 +COMMON_FOREIGN_RPC_URL=http://parity2:8545 +COMMON_HOME_BRIDGE_ADDRESS=0x0AEe1FCD12dDFab6265F7f8956e6E012A9Fe4Aa0 +COMMON_FOREIGN_BRIDGE_ADDRESS=0x0AEe1FCD12dDFab6265F7f8956e6E012A9Fe4Aa0 +ORACLE_VALIDATOR_ADDRESS=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b +ORACLE_VALIDATOR_ADDRESS_PRIVATE_KEY=8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9 +COMMON_HOME_GAS_PRICE_SUPPLIER_URL=https://gasprice.poa.network/ +COMMON_HOME_GAS_PRICE_SPEED_TYPE=standard +COMMON_HOME_GAS_PRICE_FALLBACK=1000000000 +ORACLE_HOME_GAS_PRICE_UPDATE_INTERVAL=600000 +COMMON_HOME_GAS_PRICE_FACTOR=1 +COMMON_FOREIGN_GAS_PRICE_SUPPLIER_URL=https://gasprice.poa.network/ +COMMON_FOREIGN_GAS_PRICE_SPEED_TYPE=standard +COMMON_FOREIGN_GAS_PRICE_FALLBACK=10000000000 +ORACLE_FOREIGN_GAS_PRICE_UPDATE_INTERVAL=600000 +COMMON_FOREIGN_GAS_PRICE_FACTOR=1 +ORACLE_HOME_RPC_POLLING_INTERVAL=500 +ORACLE_FOREIGN_RPC_POLLING_INTERVAL=500 +ORACLE_ALLOW_HTTP_FOR_RPC=yes diff --git a/e2e-commons/constants.json b/e2e-commons/constants.json index 246cd20af..a8fc19fc5 100644 --- a/e2e-commons/constants.json +++ b/e2e-commons/constants.json @@ -37,6 +37,12 @@ "ui": "http://localhost:3002", "monitor": "http://monitor-erc20-native:3012" }, + "amb": { + "home": "0x0AEe1FCD12dDFab6265F7f8956e6E012A9Fe4Aa0", + "foreign": "0x0AEe1FCD12dDFab6265F7f8956e6E012A9Fe4Aa0", + "homeBox": "0x6C4EaAb8756d53Bf599FFe2347FAFF1123D6C8A1", + "foreignBox": "0x6C4EaAb8756d53Bf599FFe2347FAFF1123D6C8A1" + }, "homeRPC": { "URL": "http://parity1:8545", "ID": "77" diff --git a/e2e-commons/contracts-envs/amb.env b/e2e-commons/contracts-envs/amb.env new file mode 100644 index 000000000..9335c5044 --- /dev/null +++ b/e2e-commons/contracts-envs/amb.env @@ -0,0 +1,25 @@ +BRIDGE_MODE=ARBITRARY_MESSAGE +DEPLOYMENT_ACCOUNT_PRIVATE_KEY=8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9 +HOME_DEPLOYMENT_GAS_PRICE=10000000000 +FOREIGN_DEPLOYMENT_GAS_PRICE=10000000000 +GET_RECEIPT_INTERVAL_IN_MILLISECONDS=50 +DEPLOYMENT_GAS_LIMIT_EXTRA=0.2 + +HOME_RPC_URL=http://parity1:8545 +HOME_BRIDGE_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b +HOME_VALIDATORS_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b +HOME_UPGRADEABLE_ADMIN=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b +HOME_MAX_AMOUNT_PER_TX=8000000 +HOME_REQUIRED_BLOCK_CONFIRMATIONS=1 +HOME_GAS_PRICE=1000000000 + +FOREIGN_RPC_URL=http://parity2:8545 +FOREIGN_BRIDGE_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b +FOREIGN_VALIDATORS_OWNER=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b +FOREIGN_UPGRADEABLE_ADMIN=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b +FOREIGN_MAX_AMOUNT_PER_TX=8000000 +FOREIGN_REQUIRED_BLOCK_CONFIRMATIONS=1 +FOREIGN_GAS_PRICE=10000000000 + +REQUIRED_NUMBER_OF_VALIDATORS=1 +VALIDATORS=0xaaB52d66283F7A1D5978bcFcB55721ACB467384b diff --git a/e2e-commons/docker-compose.yml b/e2e-commons/docker-compose.yml index 8bc9d877a..f4fe59d4a 100644 --- a/e2e-commons/docker-compose.yml +++ b/e2e-commons/docker-compose.yml @@ -61,6 +61,17 @@ services: command: "true" networks: - ultimate + oracle-amb: + build: + context: .. + dockerfile: oracle/Dockerfile + args: + DOT_ENV_PATH: e2e-commons/components-envs/oracle-amb.env + environment: + - NODE_ENV=production + command: "true" + networks: + - ultimate ui: build: context: .. diff --git a/e2e-commons/scripts/deploy.sh b/e2e-commons/scripts/deploy.sh index b95728274..d3dfd2012 100755 --- a/e2e-commons/scripts/deploy.sh +++ b/e2e-commons/scripts/deploy.sh @@ -29,3 +29,14 @@ cp "$ENVS_PATH/erc-to-native.env" "$DEPLOY_PATH/.env" cd "$DEPLOY_PATH" node deploy.js cd - > /dev/null + +echo -e "\n\n############ Deploying amb ############\n" +cp "$ENVS_PATH/amb.env" "$DEPLOY_PATH/.env" +cd "$DEPLOY_PATH" +node deploy.js +cd - > /dev/null + +echo -e "\n\n############ Deploying test contract for amb ############\n" +cd "$DEPLOY_PATH" +node src/utils/deployTestBox.js +cd - > /dev/null diff --git a/e2e-commons/up.sh b/e2e-commons/up.sh index da998775d..1142f274a 100755 --- a/e2e-commons/up.sh +++ b/e2e-commons/up.sh @@ -9,7 +9,7 @@ docker-compose up -d parity1 parity2 e2e while [ "$1" != "" ]; do if [ "$1" == "oracle" ]; then - docker-compose up -d redis rabbit oracle oracle-erc20 oracle-erc20-native + docker-compose up -d redis rabbit oracle oracle-erc20 oracle-erc20-native oracle-amb docker-compose run -d oracle yarn watcher:signature-request docker-compose run -d oracle yarn watcher:collected-signatures @@ -20,6 +20,9 @@ while [ "$1" != "" ]; do docker-compose run -d oracle-erc20-native yarn watcher:signature-request docker-compose run -d oracle-erc20-native yarn watcher:collected-signatures docker-compose run -d oracle-erc20-native yarn watcher:affirmation-request + docker-compose run -d oracle-amb yarn watcher:signature-request + docker-compose run -d oracle-amb yarn watcher:collected-signatures + docker-compose run -d oracle-amb yarn watcher:affirmation-request docker-compose run -d oracle yarn sender:home docker-compose run -d oracle yarn sender:foreign fi diff --git a/monitor/alerts.js b/monitor/alerts.js index 3eff08bac..26ca40560 100644 --- a/monitor/alerts.js +++ b/monitor/alerts.js @@ -3,6 +3,8 @@ const Web3 = require('web3') const logger = require('./logger')('alerts') const eventsInfo = require('./utils/events') const { getBlockNumber } = require('./utils/contract') +const { processedMsgNotDelivered } = require('./utils/message') +const { BRIDGE_MODES } = require('../commons') const { COMMON_HOME_RPC_URL, COMMON_FOREIGN_RPC_URL } = process.env @@ -13,10 +15,23 @@ const foreignProvider = new Web3.providers.HttpProvider(COMMON_FOREIGN_RPC_URL) const web3Foreign = new Web3(foreignProvider) async function main() { - const { foreignDeposits, homeDeposits, homeWithdrawals, foreignWithdrawals } = await eventsInfo() - - const xSignatures = foreignDeposits.filter(findDifferences(homeDeposits)) - const xAffirmations = homeWithdrawals.filter(findDifferences(foreignWithdrawals)) + const { + homeToForeignRequests, + homeToForeignConfirmations, + foreignToHomeConfirmations, + foreignToHomeRequests, + bridgeMode + } = await eventsInfo() + + let xSignatures + let xAffirmations + if (bridgeMode === BRIDGE_MODES.ARBITRARY_MESSAGE) { + xSignatures = homeToForeignConfirmations.filter(processedMsgNotDelivered(homeToForeignRequests)) + xAffirmations = foreignToHomeConfirmations.filter(processedMsgNotDelivered(foreignToHomeRequests)) + } else { + xSignatures = homeToForeignConfirmations.filter(findDifferences(homeToForeignRequests)) + xAffirmations = foreignToHomeConfirmations.filter(findDifferences(foreignToHomeRequests)) + } logger.debug('building misbehavior blocks') const [homeBlockNumber, foreignBlockNumber] = await getBlockNumber(web3Home, web3Foreign) diff --git a/monitor/eventsStats.js b/monitor/eventsStats.js index a960bf1b5..480cb616a 100644 --- a/monitor/eventsStats.js +++ b/monitor/eventsStats.js @@ -1,6 +1,7 @@ require('dotenv').config() -const logger = require('./logger')('eventsStats') const eventsInfo = require('./utils/events') +const { processedMsgNotDelivered, deliveredMsgNotProcessed } = require('./utils/message') +const { BRIDGE_MODES } = require('../commons') function compareDepositsHome(foreign) { return homeDeposit => { @@ -57,25 +58,55 @@ function compareTransferForeign(home) { } async function main() { - const { foreignDeposits, homeDeposits, homeWithdrawals, foreignWithdrawals, isExternalErc20 } = await eventsInfo() + const { + homeToForeignRequests, + homeToForeignConfirmations, + foreignToHomeConfirmations, + foreignToHomeRequests, + isExternalErc20, + bridgeMode + } = await eventsInfo() - const onlyInHomeDeposits = homeDeposits.filter(compareDepositsHome(foreignDeposits)) - const onlyInForeignDeposits = foreignDeposits.concat([]).filter(compareDepositsForeign(homeDeposits)) + if (bridgeMode === BRIDGE_MODES.ARBITRARY_MESSAGE) { + return { + home: { + deliveredMsgNotProcessedInForeign: homeToForeignRequests.filter( + deliveredMsgNotProcessed(homeToForeignConfirmations) + ), + processedMsgNotDeliveredInForeign: foreignToHomeConfirmations.filter( + processedMsgNotDelivered(foreignToHomeRequests) + ) + }, + foreign: { + deliveredMsgNotProcessedInHome: foreignToHomeRequests.filter( + deliveredMsgNotProcessed(foreignToHomeConfirmations) + ), + processedMsgNotDeliveredInHome: homeToForeignConfirmations.filter( + processedMsgNotDelivered(homeToForeignRequests) + ) + }, + lastChecked: Math.floor(Date.now() / 1000) + } + } else { + const onlyInHomeDeposits = homeToForeignRequests.filter(compareDepositsHome(homeToForeignConfirmations)) + const onlyInForeignDeposits = homeToForeignConfirmations + .concat([]) + .filter(compareDepositsForeign(homeToForeignRequests)) - const onlyInHomeWithdrawals = isExternalErc20 - ? homeWithdrawals.filter(compareTransferHome(foreignWithdrawals)) - : homeWithdrawals.filter(compareDepositsForeign(foreignWithdrawals)) - const onlyInForeignWithdrawals = isExternalErc20 - ? foreignWithdrawals.filter(compareTransferForeign(homeWithdrawals)) - : foreignWithdrawals.filter(compareDepositsHome(homeWithdrawals)) + const onlyInHomeWithdrawals = isExternalErc20 + ? foreignToHomeConfirmations.filter(compareTransferHome(foreignToHomeRequests)) + : foreignToHomeConfirmations.filter(compareDepositsForeign(foreignToHomeRequests)) + const onlyInForeignWithdrawals = isExternalErc20 + ? foreignToHomeRequests.filter(compareTransferForeign(foreignToHomeConfirmations)) + : foreignToHomeRequests.filter(compareDepositsHome(foreignToHomeConfirmations)) - logger.debug('Done') - return { - onlyInHomeDeposits, - onlyInForeignDeposits, - onlyInHomeWithdrawals, - onlyInForeignWithdrawals, - lastChecked: Math.floor(Date.now() / 1000) + return { + onlyInHomeDeposits, + onlyInForeignDeposits, + onlyInHomeWithdrawals, + onlyInForeignWithdrawals, + lastChecked: Math.floor(Date.now() / 1000) + } } } diff --git a/monitor/getBalances.js b/monitor/getBalances.js index 97a279a72..e7fcf8992 100644 --- a/monitor/getBalances.js +++ b/monitor/getBalances.js @@ -112,6 +112,12 @@ async function main(bridgeMode) { balanceDiff: Number(Web3Utils.fromWei(diff)), lastChecked: Math.floor(Date.now() / 1000) } + } else if (bridgeMode === BRIDGE_MODES.ARBITRARY_MESSAGE) { + return { + home: {}, + foreign: {}, + lastChecked: Math.floor(Date.now() / 1000) + } } else { throw new Error(`Unrecognized bridge mode: '${bridgeMode}'`) } diff --git a/monitor/getShortEventStats.js b/monitor/getShortEventStats.js index 9571a5d67..f314abd09 100644 --- a/monitor/getShortEventStats.js +++ b/monitor/getShortEventStats.js @@ -1,19 +1,40 @@ require('dotenv').config() const eventsInfo = require('./utils/events') +const { BRIDGE_MODES } = require('../commons') async function main(bridgeMode) { - const { foreignDeposits, homeDeposits, homeWithdrawals, foreignWithdrawals } = await eventsInfo(bridgeMode) + const { + homeToForeignConfirmations, + homeToForeignRequests, + foreignToHomeConfirmations, + foreignToHomeRequests + } = await eventsInfo(bridgeMode) - return { - depositsDiff: homeDeposits.length - foreignDeposits.length, - withdrawalDiff: homeWithdrawals.length - foreignWithdrawals.length, - home: { - deposits: homeDeposits.length, - withdrawals: homeWithdrawals.length - }, - foreign: { - deposits: foreignDeposits.length, - withdrawals: foreignWithdrawals.length + if (bridgeMode === BRIDGE_MODES.ARBITRARY_MESSAGE) { + return { + fromHomeToForeignDiff: homeToForeignRequests.length - homeToForeignConfirmations.length, + fromForeignToHomeDiff: foreignToHomeConfirmations.length - foreignToHomeRequests.length, + home: { + toForeign: homeToForeignRequests.length, + fromForeign: foreignToHomeConfirmations.length + }, + foreign: { + fromHome: homeToForeignConfirmations.length, + toHome: foreignToHomeRequests.length + } + } + } else { + return { + depositsDiff: homeToForeignRequests.length - homeToForeignConfirmations.length, + withdrawalDiff: foreignToHomeConfirmations.length - foreignToHomeRequests.length, + home: { + deposits: homeToForeignRequests.length, + withdrawals: foreignToHomeConfirmations.length + }, + foreign: { + deposits: homeToForeignConfirmations.length, + withdrawals: foreignToHomeRequests.length + } } } } diff --git a/monitor/utils/events.js b/monitor/utils/events.js index b3223106f..a63bd233b 100644 --- a/monitor/utils/events.js +++ b/monitor/utils/events.js @@ -38,41 +38,45 @@ async function main(mode) { const homeBridge = new web3Home.eth.Contract(HOME_ABI, COMMON_HOME_BRIDGE_ADDRESS) const foreignBridge = new web3Foreign.eth.Contract(FOREIGN_ABI, COMMON_FOREIGN_BRIDGE_ADDRESS) const v1Bridge = bridgeMode === BRIDGE_MODES.NATIVE_TO_ERC_V1 - const erc20MethodName = bridgeMode === BRIDGE_MODES.NATIVE_TO_ERC || v1Bridge ? 'erc677token' : 'erc20token' - const erc20Address = await foreignBridge.methods[erc20MethodName]().call() - const tokenType = await getTokenType( - new web3Foreign.eth.Contract(ERC677_BRIDGE_TOKEN_ABI, erc20Address), - COMMON_FOREIGN_BRIDGE_ADDRESS - ) - const isExternalErc20 = tokenType === ERC_TYPES.ERC20 - const erc20Contract = new web3Foreign.eth.Contract(ERC20_ABI, erc20Address) + let isExternalErc20 + let erc20Contract + if (bridgeMode !== BRIDGE_MODES.ARBITRARY_MESSAGE) { + const erc20MethodName = bridgeMode === BRIDGE_MODES.NATIVE_TO_ERC || v1Bridge ? 'erc677token' : 'erc20token' + const erc20Address = await foreignBridge.methods[erc20MethodName]().call() + const tokenType = await getTokenType( + new web3Foreign.eth.Contract(ERC677_BRIDGE_TOKEN_ABI, erc20Address), + COMMON_FOREIGN_BRIDGE_ADDRESS + ) + isExternalErc20 = tokenType === ERC_TYPES.ERC20 + erc20Contract = new web3Foreign.eth.Contract(ERC20_ABI, erc20Address) + } logger.debug('getting last block numbers') const [homeBlockNumber, foreignBlockNumber] = await getBlockNumber(web3Home, web3Foreign) logger.debug("calling homeBridge.getPastEvents('UserRequestForSignature')") - const homeDeposits = await getPastEvents(homeBridge, { + const homeToForeignRequests = await getPastEvents(homeBridge, { event: v1Bridge ? 'Deposit' : 'UserRequestForSignature', fromBlock: MONITOR_HOME_START_BLOCK, toBlock: homeBlockNumber }) logger.debug("calling foreignBridge.getPastEvents('RelayedMessage')") - const foreignDeposits = await getPastEvents(foreignBridge, { + const homeToForeignConfirmations = await getPastEvents(foreignBridge, { event: v1Bridge ? 'Deposit' : 'RelayedMessage', fromBlock: MONITOR_FOREIGN_START_BLOCK, toBlock: foreignBlockNumber }) logger.debug("calling homeBridge.getPastEvents('AffirmationCompleted')") - const homeWithdrawals = await getPastEvents(homeBridge, { + const foreignToHomeConfirmations = await getPastEvents(homeBridge, { event: v1Bridge ? 'Withdraw' : 'AffirmationCompleted', fromBlock: MONITOR_HOME_START_BLOCK, toBlock: homeBlockNumber }) logger.debug("calling foreignBridge.getPastEvents('UserRequestForAffirmation')") - const foreignWithdrawals = isExternalErc20 + const foreignToHomeRequests = isExternalErc20 ? await getPastEvents(erc20Contract, { event: 'Transfer', fromBlock: MONITOR_FOREIGN_START_BLOCK, @@ -88,11 +92,12 @@ async function main(mode) { }) logger.debug('Done') return { - homeDeposits, - foreignDeposits, - homeWithdrawals, - foreignWithdrawals, - isExternalErc20 + homeToForeignRequests, + homeToForeignConfirmations, + foreignToHomeConfirmations, + foreignToHomeRequests, + isExternalErc20, + bridgeMode } } diff --git a/monitor/utils/message.js b/monitor/utils/message.js new file mode 100644 index 000000000..dda2bba5b --- /dev/null +++ b/monitor/utils/message.js @@ -0,0 +1,47 @@ +const web3Utils = require('web3').utils +const { addTxHashToData, parseAMBMessage } = require('../../commons') + +function deliveredMsgNotProcessed(processedList) { + return deliveredMsg => { + const msg = parseAMBMessage( + addTxHashToData({ + encodedData: deliveredMsg.returnValues.encodedData, + transactionHash: deliveredMsg.transactionHash + }) + ) + return ( + processedList.filter(processedMsg => { + return messageEqualsEvent(msg, processedMsg.returnValues) + }).length === 0 + ) + } +} + +function processedMsgNotDelivered(deliveredList) { + return processedMsg => { + return ( + deliveredList.filter(deliveredMsg => { + const msg = parseAMBMessage( + addTxHashToData({ + encodedData: deliveredMsg.returnValues.encodedData, + transactionHash: deliveredMsg.transactionHash + }) + ) + return messageEqualsEvent(msg, processedMsg.returnValues) + }).length === 0 + ) + } +} + +function messageEqualsEvent(parsedMsg, event) { + return ( + web3Utils.toChecksumAddress(parsedMsg.sender) === event.sender && + web3Utils.toChecksumAddress(parsedMsg.executor) === event.executor && + parsedMsg.txHash === event.transactionHash + ) +} + +module.exports = { + deliveredMsgNotProcessed, + processedMsgNotDelivered +} diff --git a/oracle-e2e/test/amb.js b/oracle-e2e/test/amb.js new file mode 100644 index 000000000..351c4b96b --- /dev/null +++ b/oracle-e2e/test/amb.js @@ -0,0 +1,102 @@ +const Web3 = require('web3') +const assert = require('assert') +const promiseRetry = require('promise-retry') +const { user, homeRPC, foreignRPC, amb } = require('../../e2e-commons/constants.json') +const { generateNewBlock } = require('../../e2e-commons/utils') +const { BOX_ABI } = require('../../commons') + +const { toBN } = Web3.utils + +const homeWeb3 = new Web3(new Web3.providers.HttpProvider(homeRPC.URL)) +const foreignWeb3 = new Web3(new Web3.providers.HttpProvider(foreignRPC.URL)) + +homeWeb3.eth.accounts.wallet.add(user.privateKey) +foreignWeb3.eth.accounts.wallet.add(user.privateKey) + +const homeBox = new homeWeb3.eth.Contract(BOX_ABI, amb.homeBox) +const foreignBox = new foreignWeb3.eth.Contract(BOX_ABI, amb.foreignBox) + +describe('arbitrary message bridging', () => { + describe('Home to Foreign', () => { + describe('Subsidized Mode', () => { + it('should bridge message', async () => { + const newValue = 3 + + const initialValue = await foreignBox.methods.value().call() + assert(!toBN(initialValue).eq(toBN(newValue)), 'initial value should be different from new value') + + const setValueTx = await homeBox.methods + .setValueOnOtherNetwork(newValue, amb.home, amb.foreignBox) + .send({ + from: user.address, + gas: '400000' + }) + .catch(e => { + console.error(e) + }) + + // Send a trivial transaction to generate a new block since the watcher + // is configured to wait 1 confirmation block + await generateNewBlock(homeWeb3, user.address) + + // The bridge should create a new transaction with a CollectedSignatures + // event so we generate another trivial transaction + await promiseRetry( + async retry => { + const lastBlockNumber = await homeWeb3.eth.getBlockNumber() + if (lastBlockNumber >= setValueTx.blockNumber + 2) { + await generateNewBlock(homeWeb3, user.address) + } else { + retry() + } + }, + { + forever: true, + factor: 1, + minTimeout: 500 + } + ) + + // check that value changed and balance decreased + await promiseRetry(async retry => { + const value = await foreignBox.methods.value().call() + if (!toBN(value).eq(toBN(newValue))) { + retry() + } + }) + }) + }) + }) + describe('Foreign to Home', () => { + describe('Subsidized Mode', () => { + it('should bridge message', async () => { + const newValue = 7 + + const initialValue = await homeBox.methods.value().call() + assert(!toBN(initialValue).eq(toBN(newValue)), 'initial value should be different from new value') + + await foreignBox.methods + .setValueOnOtherNetwork(newValue, amb.foreign, amb.homeBox) + .send({ + from: user.address, + gas: '400000' + }) + .catch(e => { + console.error(e) + }) + + // Send a trivial transaction to generate a new block since the watcher + // is configured to wait 1 confirmation block + await generateNewBlock(foreignWeb3, user.address) + + // check that value changed and balance decreased + await promiseRetry(async retry => { + const value = await homeBox.methods.value().call() + if (!toBN(value).eq(toBN(newValue))) { + retry() + } + }) + }) + }) + }) +}) diff --git a/oracle/README.md b/oracle/README.md index 0d8065724..6277bdd44 100644 --- a/oracle/README.md +++ b/oracle/README.md @@ -10,7 +10,7 @@ The Oracle is deployed on specified validator nodes (only nodes whose private ke ## Architecture -### Native-to-ERC20 +### Native-to-ERC20 and Arbitrary-Message ![Native-to-ERC](Native-to-ERC.png) @@ -27,7 +27,7 @@ There are three Watchers: - **Signature Request Watcher**: Listens to `UserRequestForSignature` events on the Home network. - **Collected Signatures Watcher**: Listens to `CollectedSignatures` events on the Home network. - **Affirmation Request Watcher**: Depends on the bridge mode. - - `Native-to-ERC20`: Listens to `UserRequestForAffirmation` raised by the bridge contract. + - `Native-to-ERC20` and `Arbitrary-Message`: Listens to `UserRequestForAffirmation` raised by the bridge contract. - `ERC20-to-ERC20` and `ERC20-to-Native`: Listens to `Transfer` events raised by the token contract. ### Sender diff --git a/oracle/config/base.config.js b/oracle/config/base.config.js index 8e6bb4245..1e2398cd9 100644 --- a/oracle/config/base.config.js +++ b/oracle/config/base.config.js @@ -8,7 +8,9 @@ const { HOME_ERC_TO_ERC_ABI, FOREIGN_ERC_TO_ERC_ABI, HOME_ERC_TO_NATIVE_ABI, - FOREIGN_ERC_TO_NATIVE_ABI + FOREIGN_ERC_TO_NATIVE_ABI, + HOME_AMB_ABI, + FOREIGN_AMB_ABI } = require('../../commons') const { web3Home, web3Foreign } = require('../src/services/web3') const { privateKeyToAddress } = require('../src/utils/utils') @@ -35,6 +37,11 @@ switch (process.env.ORACLE_BRIDGE_MODE) { foreignAbi = FOREIGN_ERC_TO_NATIVE_ABI id = 'erc-native' break + case BRIDGE_MODES.ARBITRARY_MESSAGE: + homeAbi = HOME_AMB_ABI + foreignAbi = FOREIGN_AMB_ABI + id = 'amb' + break default: if (process.env.NODE_ENV !== 'test') { throw new Error(`Bridge Mode: ${process.env.ORACLE_BRIDGE_MODE} not supported.`) diff --git a/oracle/src/events/processAMBAffirmationRequests/estimateGas.js b/oracle/src/events/processAMBAffirmationRequests/estimateGas.js new file mode 100644 index 000000000..231b93268 --- /dev/null +++ b/oracle/src/events/processAMBAffirmationRequests/estimateGas.js @@ -0,0 +1,51 @@ +const { HttpListProviderError } = require('http-list-provider') +const { AlreadyProcessedError, AlreadySignedError, InvalidValidatorError } = require('../../utils/errors') +const logger = require('../../services/logger').child({ + module: 'processAffirmationRequests:estimateGas' +}) + +async function estimateGas({ web3, homeBridge, validatorContract, message, address }) { + try { + const gasEstimate = await homeBridge.methods.executeAffirmation(message).estimateGas({ + from: address + }) + + return gasEstimate + } catch (e) { + if (e instanceof HttpListProviderError) { + throw e + } + + const messageHash = web3.utils.soliditySha3(message) + const senderHash = web3.utils.soliditySha3(address, messageHash) + + // Check if minimum number of validations was already reached + logger.debug('Check if minimum number of validations was already reached') + const numAffirmationsSigned = await homeBridge.methods.numAffirmationsSigned(messageHash).call() + const alreadyProcessed = await homeBridge.methods.isAlreadyProcessed(numAffirmationsSigned).call() + + if (alreadyProcessed) { + throw new AlreadyProcessedError(e.message) + } + + // Check if the message was already signed by this validator + logger.debug('Check if the message was already signed') + const alreadySigned = await homeBridge.methods.affirmationsSigned(senderHash).call() + + if (alreadySigned) { + throw new AlreadySignedError(e.message) + } + + // Check if address is validator + logger.debug('Check if address is a validator') + const isValidator = await validatorContract.methods.isValidator(address).call() + + if (!isValidator) { + throw new InvalidValidatorError(`${address} is not a validator`) + } + + throw new Error('Unknown error while processing message') + } +} + +module.exports = estimateGas diff --git a/oracle/src/events/processAMBAffirmationRequests/index.js b/oracle/src/events/processAMBAffirmationRequests/index.js new file mode 100644 index 000000000..492e97732 --- /dev/null +++ b/oracle/src/events/processAMBAffirmationRequests/index.js @@ -0,0 +1,95 @@ +require('dotenv').config() +const { HttpListProviderError } = require('http-list-provider') +const promiseLimit = require('promise-limit') +const rootLogger = require('../../services/logger') +const { web3Home } = require('../../services/web3') +const bridgeValidatorsABI = require('../../../../contracts/build/contracts/BridgeValidators').abi +const { EXIT_CODES, MAX_CONCURRENT_EVENTS } = require('../../utils/constants') +const estimateGas = require('./estimateGas') +const { addTxHashToData, parseAMBMessage } = require('../../../../commons') +const { AlreadyProcessedError, AlreadySignedError, InvalidValidatorError } = require('../../utils/errors') + +const limit = promiseLimit(MAX_CONCURRENT_EVENTS) + +let validatorContract = null + +function processAffirmationRequestsBuilder(config) { + const homeBridge = new web3Home.eth.Contract(config.homeBridgeAbi, config.homeBridgeAddress) + + return async function processAffirmationRequests(affirmationRequests) { + const txToSend = [] + + if (validatorContract === null) { + rootLogger.debug('Getting validator contract address') + const validatorContractAddress = await homeBridge.methods.validatorContract().call() + rootLogger.debug({ validatorContractAddress }, 'Validator contract address obtained') + + validatorContract = new web3Home.eth.Contract(bridgeValidatorsABI, validatorContractAddress) + } + + rootLogger.debug(`Processing ${affirmationRequests.length} AffirmationRequest events`) + const callbacks = affirmationRequests + .map(affirmationRequest => async () => { + const { encodedData } = affirmationRequest.returnValues + + const logger = rootLogger.child({ + eventTransactionHash: affirmationRequest.transactionHash + }) + + const message = addTxHashToData({ + encodedData, + transactionHash: affirmationRequest.transactionHash + }) + + const { sender, executor } = parseAMBMessage(message) + + logger.info({ sender, executor }, `Processing affirmationRequest ${affirmationRequest.transactionHash}`) + + let gasEstimate + try { + logger.debug('Estimate gas') + gasEstimate = await estimateGas({ + web3: web3Home, + homeBridge, + validatorContract, + message, + address: config.validatorAddress + }) + logger.debug({ gasEstimate }, 'Gas estimated') + } catch (e) { + if (e instanceof HttpListProviderError) { + throw new Error('RPC Connection Error: submitSignature Gas Estimate cannot be obtained.') + } else if (e instanceof InvalidValidatorError) { + logger.fatal({ address: config.validatorAddress }, 'Invalid validator') + process.exit(EXIT_CODES.INCOMPATIBILITY) + } else if (e instanceof AlreadySignedError) { + logger.info(`Already signed affirmationRequest ${affirmationRequest.transactionHash}`) + return + } else if (e instanceof AlreadyProcessedError) { + logger.info( + `affirmationRequest ${affirmationRequest.transactionHash} was already processed by other validators` + ) + return + } else { + logger.error(e, 'Unknown error while processing transaction') + throw e + } + } + + const data = await homeBridge.methods.executeAffirmation(message).encodeABI() + + txToSend.push({ + data, + gasEstimate, + transactionReference: affirmationRequest.transactionHash, + to: config.homeBridgeAddress + }) + }) + .map(promise => limit(promise)) + + await Promise.all(callbacks) + return txToSend + } +} + +module.exports = processAffirmationRequestsBuilder diff --git a/oracle/src/events/processAMBCollectedSignatures/estimateGas.js b/oracle/src/events/processAMBCollectedSignatures/estimateGas.js new file mode 100644 index 000000000..4168ff672 --- /dev/null +++ b/oracle/src/events/processAMBCollectedSignatures/estimateGas.js @@ -0,0 +1,62 @@ +const Web3 = require('web3') +const { HttpListProviderError } = require('http-list-provider') +const { AlreadyProcessedError, IncompatibleContractError, InvalidValidatorError } = require('../../utils/errors') +const logger = require('../../services/logger').child({ + module: 'processCollectedSignatures:estimateGas' +}) + +const web3 = new Web3() +const { toBN } = Web3.utils + +async function estimateGas({ + foreignBridge, + validatorContract, + message, + numberOfCollectedSignatures, + v, + r, + s, + signatures, + txHash, + address +}) { + try { + const gasEstimate = await foreignBridge.methods.executeSignatures(message, signatures).estimateGas({ + from: address + }) + return gasEstimate + } catch (e) { + if (e instanceof HttpListProviderError) { + throw e + } + + // check if the message was already processed + logger.debug('Check if the message was already processed') + const alreadyProcessed = await foreignBridge.methods.relayedMessages(txHash).call() + if (alreadyProcessed) { + throw new AlreadyProcessedError() + } + + // check if the number of signatures is enough + logger.debug('Check if number of signatures is enough') + const requiredSignatures = await validatorContract.methods.requiredSignatures().call() + if (toBN(requiredSignatures).gt(toBN(numberOfCollectedSignatures))) { + throw new IncompatibleContractError('The number of collected signatures does not match') + } + + // check if all the signatures were made by validators + for (let i = 0; i < v.length; i++) { + const address = web3.eth.accounts.recover(message, web3.utils.toHex(v[i]), r[i], s[i]) + logger.debug({ address }, 'Check that signature is from a validator') + const isValidator = await validatorContract.methods.isValidator(address).call() + + if (!isValidator) { + throw new InvalidValidatorError(`Message signed by ${address} that is not a validator`) + } + } + + throw new Error('Unknown error while processing message') + } +} + +module.exports = estimateGas diff --git a/oracle/src/events/processAMBCollectedSignatures/index.js b/oracle/src/events/processAMBCollectedSignatures/index.js new file mode 100644 index 000000000..c3ed54cb9 --- /dev/null +++ b/oracle/src/events/processAMBCollectedSignatures/index.js @@ -0,0 +1,118 @@ +require('dotenv').config() +const promiseLimit = require('promise-limit') +const { HttpListProviderError } = require('http-list-provider') +const bridgeValidatorsABI = require('../../../../contracts/build/contracts/BridgeValidators').abi +const rootLogger = require('../../services/logger') +const { web3Home, web3Foreign } = require('../../services/web3') +const { signatureToVRS, signatureToVRSAMB, packSignatures } = require('../../utils/message') +const { parseAMBMessage } = require('../../../../commons') +const estimateGas = require('./estimateGas') +const { AlreadyProcessedError, IncompatibleContractError, InvalidValidatorError } = require('../../utils/errors') +const { MAX_CONCURRENT_EVENTS } = require('../../utils/constants') + +const limit = promiseLimit(MAX_CONCURRENT_EVENTS) + +let validatorContract = null + +function processCollectedSignaturesBuilder(config) { + const homeBridge = new web3Home.eth.Contract(config.homeBridgeAbi, config.homeBridgeAddress) + + const foreignBridge = new web3Foreign.eth.Contract(config.foreignBridgeAbi, config.foreignBridgeAddress) + + return async function processCollectedSignatures(signatures) { + const txToSend = [] + + if (validatorContract === null) { + rootLogger.debug('Getting validator contract address') + const validatorContractAddress = await foreignBridge.methods.validatorContract().call() + rootLogger.debug({ validatorContractAddress }, 'Validator contract address obtained') + + validatorContract = new web3Foreign.eth.Contract(bridgeValidatorsABI, validatorContractAddress) + } + + rootLogger.debug(`Processing ${signatures.length} CollectedSignatures events`) + const callbacks = signatures + .map(colSignature => async () => { + const { authorityResponsibleForRelay, messageHash, NumberOfCollectedSignatures } = colSignature.returnValues + + const logger = rootLogger.child({ + eventTransactionHash: colSignature.transactionHash + }) + + if (authorityResponsibleForRelay !== web3Home.utils.toChecksumAddress(config.validatorAddress)) { + logger.info(`Validator not responsible for relaying CollectedSignatures ${colSignature.transactionHash}`) + return + } + + logger.info(`Processing CollectedSignatures ${colSignature.transactionHash}`) + const message = await homeBridge.methods.message(messageHash).call() + + const requiredSignatures = new Array(NumberOfCollectedSignatures).fill(0) + + const signaturesArray = [] + const [v, r, s] = [[], [], []] + logger.debug('Getting message signatures') + const signaturePromises = requiredSignatures.map(async (el, index) => { + logger.debug({ index }, 'Getting message signature') + const signature = await homeBridge.methods.signature(messageHash, index).call() + const vrs = signatureToVRS(signature) + v.push(vrs.v) + r.push(vrs.r) + s.push(vrs.s) + const recover = signatureToVRSAMB(signature) + signaturesArray.push(recover) + }) + + await Promise.all(signaturePromises) + const signatures = packSignatures(signaturesArray) + + const { txHash } = parseAMBMessage(message) + + let gasEstimate + try { + logger.debug('Estimate gas') + gasEstimate = await estimateGas({ + foreignBridge, + validatorContract, + v, + r, + s, + signatures, + message, + numberOfCollectedSignatures: NumberOfCollectedSignatures, + txHash, + address: config.validatorAddress + }) + logger.debug({ gasEstimate }, 'Gas estimated') + } catch (e) { + if (e instanceof HttpListProviderError) { + throw new Error('RPC Connection Error: submitSignature Gas Estimate cannot be obtained.') + } else if (e instanceof AlreadyProcessedError) { + logger.info(`Already processed CollectedSignatures ${colSignature.transactionHash}`) + return + } else if (e instanceof IncompatibleContractError || e instanceof InvalidValidatorError) { + logger.error(`The message couldn't be processed; skipping: ${e.message}`) + return + } else { + logger.error(e, 'Unknown error while processing transaction') + throw e + } + } + const data = await foreignBridge.methods.executeSignatures(message, signatures).encodeABI() + + txToSend.push({ + data, + gasEstimate, + transactionReference: colSignature.transactionHash, + to: config.foreignBridgeAddress + }) + }) + .map(promise => limit(promise)) + + await Promise.all(callbacks) + + return txToSend + } +} + +module.exports = processCollectedSignaturesBuilder diff --git a/oracle/src/events/processAMBSignatureRequests/index.js b/oracle/src/events/processAMBSignatureRequests/index.js new file mode 100644 index 000000000..5d26f001f --- /dev/null +++ b/oracle/src/events/processAMBSignatureRequests/index.js @@ -0,0 +1,99 @@ +require('dotenv').config() +const promiseLimit = require('promise-limit') +const { HttpListProviderError } = require('http-list-provider') +const bridgeValidatorsABI = require('../../../../contracts/build/contracts/BridgeValidators').abi +const rootLogger = require('../../services/logger') +const { web3Home } = require('../../services/web3') +const { addTxHashToData, parseAMBMessage } = require('../../../../commons') +const estimateGas = require('../processSignatureRequests/estimateGas') +const { AlreadyProcessedError, AlreadySignedError, InvalidValidatorError } = require('../../utils/errors') +const { EXIT_CODES, MAX_CONCURRENT_EVENTS } = require('../../utils/constants') + +const { ORACLE_VALIDATOR_ADDRESS_PRIVATE_KEY } = process.env + +const limit = promiseLimit(MAX_CONCURRENT_EVENTS) + +let validatorContract = null + +function processSignatureRequestsBuilder(config) { + const homeBridge = new web3Home.eth.Contract(config.homeBridgeAbi, config.homeBridgeAddress) + + return async function processSignatureRequests(signatureRequests) { + const txToSend = [] + + if (validatorContract === null) { + rootLogger.debug('Getting validator contract address') + const validatorContractAddress = await homeBridge.methods.validatorContract().call() + rootLogger.debug({ validatorContractAddress }, 'Validator contract address obtained') + + validatorContract = new web3Home.eth.Contract(bridgeValidatorsABI, validatorContractAddress) + } + + rootLogger.debug(`Processing ${signatureRequests.length} SignatureRequest events`) + const callbacks = signatureRequests + .map(signatureRequest => async () => { + const { encodedData } = signatureRequest.returnValues + + const logger = rootLogger.child({ + eventTransactionHash: signatureRequest.transactionHash + }) + + const message = addTxHashToData({ + encodedData, + transactionHash: signatureRequest.transactionHash + }) + + const { sender, executor } = parseAMBMessage(message) + logger.info({ sender, executor }, `Processing signatureRequest ${signatureRequest.transactionHash}`) + + const signature = web3Home.eth.accounts.sign(message, `0x${ORACLE_VALIDATOR_ADDRESS_PRIVATE_KEY}`) + + let gasEstimate + try { + logger.debug('Estimate gas') + gasEstimate = await estimateGas({ + web3: web3Home, + homeBridge, + validatorContract, + signature: signature.signature, + message, + address: config.validatorAddress + }) + logger.debug({ gasEstimate }, 'Gas estimated') + } catch (e) { + if (e instanceof HttpListProviderError) { + throw new Error('RPC Connection Error: submitSignature Gas Estimate cannot be obtained.') + } else if (e instanceof InvalidValidatorError) { + logger.fatal({ address: config.validatorAddress }, 'Invalid validator') + process.exit(EXIT_CODES.INCOMPATIBILITY) + } else if (e instanceof AlreadySignedError) { + logger.info(`Already signed signatureRequest ${signatureRequest.transactionHash}`) + return + } else if (e instanceof AlreadyProcessedError) { + logger.info( + `signatureRequest ${signatureRequest.transactionHash} was already processed by other validators` + ) + return + } else { + logger.error(e, 'Unknown error while processing transaction') + throw e + } + } + + const data = await homeBridge.methods.submitSignature(signature.signature, message).encodeABI() + + txToSend.push({ + data, + gasEstimate, + transactionReference: signatureRequest.transactionHash, + to: config.homeBridgeAddress + }) + }) + .map(promise => limit(promise)) + + await Promise.all(callbacks) + return txToSend + } +} + +module.exports = processSignatureRequestsBuilder diff --git a/oracle/src/events/processAffirmationRequests/index.js b/oracle/src/events/processAffirmationRequests/index.js index 16b726ad7..d7f198bac 100644 --- a/oracle/src/events/processAffirmationRequests/index.js +++ b/oracle/src/events/processAffirmationRequests/index.js @@ -28,8 +28,8 @@ function processAffirmationRequestsBuilder(config) { } rootLogger.debug(`Processing ${affirmationRequests.length} AffirmationRequest events`) - const callbacks = affirmationRequests.map(affirmationRequest => - limit(async () => { + const callbacks = affirmationRequests + .map(affirmationRequest => async () => { const { recipient, value } = affirmationRequest.returnValues const logger = rootLogger.child({ @@ -82,7 +82,7 @@ function processAffirmationRequestsBuilder(config) { to: config.homeBridgeAddress }) }) - ) + .map(promise => limit(promise)) await Promise.all(callbacks) return txToSend diff --git a/oracle/src/events/processCollectedSignatures/index.js b/oracle/src/events/processCollectedSignatures/index.js index a6f0773b0..e88516463 100644 --- a/oracle/src/events/processCollectedSignatures/index.js +++ b/oracle/src/events/processCollectedSignatures/index.js @@ -30,74 +30,73 @@ function processCollectedSignaturesBuilder(config) { } rootLogger.debug(`Processing ${signatures.length} CollectedSignatures events`) - const callbacks = signatures.map(colSignature => - limit(async () => { + const callbacks = signatures + .map(colSignature => async () => { const { authorityResponsibleForRelay, messageHash, NumberOfCollectedSignatures } = colSignature.returnValues const logger = rootLogger.child({ eventTransactionHash: colSignature.transactionHash }) - if (authorityResponsibleForRelay === web3Home.utils.toChecksumAddress(config.validatorAddress)) { - logger.info(`Processing CollectedSignatures ${colSignature.transactionHash}`) - const message = await homeBridge.methods.message(messageHash).call() - - const requiredSignatures = [] - requiredSignatures.length = NumberOfCollectedSignatures - requiredSignatures.fill(0) - - const [v, r, s] = [[], [], []] - logger.debug('Getting message signatures') - const signaturePromises = requiredSignatures.map(async (el, index) => { - logger.debug({ index }, 'Getting message signature') - const signature = await homeBridge.methods.signature(messageHash, index).call() - const recover = signatureToVRS(signature) - v.push(recover.v) - r.push(recover.r) - s.push(recover.s) - }) + if (authorityResponsibleForRelay !== web3Home.utils.toChecksumAddress(config.validatorAddress)) { + logger.info(`Validator not responsible for relaying CollectedSignatures ${colSignature.transactionHash}`) + return + } - await Promise.all(signaturePromises) - - let gasEstimate - try { - logger.debug('Estimate gas') - gasEstimate = await estimateGas({ - foreignBridge, - validatorContract, - v, - r, - s, - message, - numberOfCollectedSignatures: NumberOfCollectedSignatures - }) - logger.debug({ gasEstimate }, 'Gas estimated') - } catch (e) { - if (e instanceof HttpListProviderError) { - throw new Error('RPC Connection Error: submitSignature Gas Estimate cannot be obtained.') - } else if (e instanceof AlreadyProcessedError) { - logger.info(`Already processed CollectedSignatures ${colSignature.transactionHash}`) - return - } else if (e instanceof IncompatibleContractError || e instanceof InvalidValidatorError) { - logger.error(`The message couldn't be processed; skipping: ${e.message}`) - return - } else { - logger.error(e, 'Unknown error while processing transaction') - throw e - } - } - const data = await foreignBridge.methods.executeSignatures(v, r, s, message).encodeABI() - txToSend.push({ - data, - gasEstimate, - transactionReference: colSignature.transactionHash, - to: config.foreignBridgeAddress + logger.info(`Processing CollectedSignatures ${colSignature.transactionHash}`) + const message = await homeBridge.methods.message(messageHash).call() + + const requiredSignatures = new Array(NumberOfCollectedSignatures).fill(0) + + const [v, r, s] = [[], [], []] + logger.debug('Getting message signatures') + const signaturePromises = requiredSignatures.map(async (el, index) => { + logger.debug({ index }, 'Getting message signature') + const signature = await homeBridge.methods.signature(messageHash, index).call() + const recover = signatureToVRS(signature) + v.push(recover.v) + r.push(recover.r) + s.push(recover.s) + }) + + await Promise.all(signaturePromises) + + let gasEstimate + try { + logger.debug('Estimate gas') + gasEstimate = await estimateGas({ + foreignBridge, + validatorContract, + v, + r, + s, + message, + numberOfCollectedSignatures: NumberOfCollectedSignatures }) - } else { - logger.info(`Validator not responsible for relaying CollectedSignatures ${colSignature.transactionHash}`) + logger.debug({ gasEstimate }, 'Gas estimated') + } catch (e) { + if (e instanceof HttpListProviderError) { + throw new Error('RPC Connection Error: submitSignature Gas Estimate cannot be obtained.') + } else if (e instanceof AlreadyProcessedError) { + logger.info(`Already processed CollectedSignatures ${colSignature.transactionHash}`) + return + } else if (e instanceof IncompatibleContractError || e instanceof InvalidValidatorError) { + logger.error(`The message couldn't be processed; skipping: ${e.message}`) + return + } else { + logger.error(e, 'Unknown error while processing transaction') + throw e + } } + const data = await foreignBridge.methods.executeSignatures(v, r, s, message).encodeABI() + txToSend.push({ + data, + gasEstimate, + transactionReference: colSignature.transactionHash, + to: config.foreignBridgeAddress + }) }) - ) + .map(promise => limit(promise)) await Promise.all(callbacks) diff --git a/oracle/src/events/processSignatureRequests/index.js b/oracle/src/events/processSignatureRequests/index.js index 3da2b3886..9a465044a 100644 --- a/oracle/src/events/processSignatureRequests/index.js +++ b/oracle/src/events/processSignatureRequests/index.js @@ -35,8 +35,8 @@ function processSignatureRequestsBuilder(config) { } rootLogger.debug(`Processing ${signatureRequests.length} SignatureRequest events`) - const callbacks = signatureRequests.map(signatureRequest => - limit(async () => { + const callbacks = signatureRequests + .map(signatureRequest => async () => { const { recipient, value } = signatureRequest.returnValues const logger = rootLogger.child({ @@ -98,7 +98,7 @@ function processSignatureRequestsBuilder(config) { to: config.homeBridgeAddress }) }) - ) + .map(promise => limit(promise)) await Promise.all(callbacks) return txToSend diff --git a/oracle/src/events/processTransfers/index.js b/oracle/src/events/processTransfers/index.js index 5cb135cce..624eaed88 100644 --- a/oracle/src/events/processTransfers/index.js +++ b/oracle/src/events/processTransfers/index.js @@ -27,8 +27,8 @@ function processTransfersBuilder(config) { } rootLogger.debug(`Processing ${transfers.length} Transfer events`) - const callbacks = transfers.map(transfer => - limit(async () => { + const callbacks = transfers + .map(transfer => async () => { const { from, value } = transfer.returnValues const logger = rootLogger.child({ @@ -79,7 +79,7 @@ function processTransfersBuilder(config) { to: config.homeBridgeAddress }) }) - ) + .map(promise => limit(promise)) await Promise.all(callbacks) return txToSend diff --git a/oracle/src/utils/message.js b/oracle/src/utils/message.js index dca93dcb8..d20359b10 100644 --- a/oracle/src/utils/message.js +++ b/oracle/src/utils/message.js @@ -1,10 +1,6 @@ const assert = require('assert') const Web3Utils = require('web3-utils') - -// strips leading "0x" if present -function strip0x(input) { - return input.replace(/^0x/, '') -} +const { strip0x } = require('../../../commons') function createMessage({ recipient, value, transactionHash, bridgeAddress, expectedMessageLength }) { recipient = strip0x(recipient) @@ -63,8 +59,32 @@ function signatureToVRS(signature) { return { v, r, s } } +function signatureToVRSAMB(rawSignature) { + const signature = strip0x(rawSignature) + const v = signature.substr(64 * 2) + const r = signature.substr(0, 32 * 2) + const s = signature.substr(32 * 2, 32 * 2) + return { v, r, s } +} + +function packSignatures(array) { + const length = strip0x(Web3Utils.toHex(array.length)) + const msgLength = length.length === 1 ? `0${length}` : length + let v = '' + let r = '' + let s = '' + array.forEach(e => { + v = v.concat(e.v) + r = r.concat(e.r) + s = s.concat(e.s) + }) + return `0x${msgLength}${v}${r}${s}` +} + module.exports = { createMessage, parseMessage, - signatureToVRS + signatureToVRS, + signatureToVRSAMB, + packSignatures } diff --git a/oracle/src/watcher.js b/oracle/src/watcher.js index 428c8979b..e96a4f605 100644 --- a/oracle/src/watcher.js +++ b/oracle/src/watcher.js @@ -21,6 +21,9 @@ const processSignatureRequests = require('./events/processSignatureRequests')(co const processCollectedSignatures = require('./events/processCollectedSignatures')(config) const processAffirmationRequests = require('./events/processAffirmationRequests')(config) const processTransfers = require('./events/processTransfers')(config) +const processAMBSignatureRequests = require('./events/processAMBSignatureRequests')(config) +const processAMBCollectedSignatures = require('./events/processAMBCollectedSignatures')(config) +const processAMBAffirmationRequests = require('./events/processAMBAffirmationRequests')(config) const ZERO = toBN(0) const ONE = toBN(1) @@ -97,6 +100,12 @@ function processEvents(events) { case 'erc-erc-affirmation-request': case 'erc-native-affirmation-request': return processTransfers(events) + case 'amb-signature-request': + return processAMBSignatureRequests(events) + case 'amb-collected-signatures': + return processAMBCollectedSignatures(events) + case 'amb-affirmation-request': + return processAMBAffirmationRequests(events) default: return [] } From 1d79cf82f34e64cc3397257146b56a2503847082 Mon Sep 17 00:00:00 2001 From: Gerardo Nardelli Date: Fri, 25 Oct 2019 09:38:30 -0300 Subject: [PATCH 2/7] Fix suggested gas price in trasaction for ui production build (#222) * use string version of bignumber when converting gasPrice to hex * update chromedriver version --- ui-e2e/package.json | 4 +- ui/src/stores/GasPriceStore.js | 2 +- yarn.lock | 1951 ++++++++------------------------ 3 files changed, 502 insertions(+), 1455 deletions(-) diff --git a/ui-e2e/package.json b/ui-e2e/package.json index cdcfeef90..aca56fc08 100644 --- a/ui-e2e/package.json +++ b/ui-e2e/package.json @@ -4,9 +4,9 @@ "license": "MIT", "private": true, "devDependencies": { - "selenium-webdriver": "3.6.0", + "chromedriver": "^77.0.0", "mocha": "^5.2.0", - "chromedriver": "76.0.0" + "selenium-webdriver": "3.6.0" }, "scripts": { "lint": "eslint . --ignore-path ../.eslintignore" diff --git a/ui/src/stores/GasPriceStore.js b/ui/src/stores/GasPriceStore.js index 03909c733..328c588e0 100644 --- a/ui/src/stores/GasPriceStore.js +++ b/ui/src/stores/GasPriceStore.js @@ -60,7 +60,7 @@ class GasPriceStore { @computed get gasPriceInHex() { - return toHex(this.gasPrice) + return toHex(this.gasPrice.toString()) } } diff --git a/yarn.lock b/yarn.lock index f02730ad2..96d36e50e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,58 +2,58 @@ # yarn lockfile v1 -"@0x/assert@^2.1.1", "@0x/assert@^2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@0x/assert/-/assert-2.1.3.tgz#ff35336730246140ad9584b0521046bf2962b62a" - integrity sha512-uOA4tQ3LQTPnVUaQrFkbFtGKWhvW51CNwS8DO65xXPszSUmWOc9Pqtrk2Ee10TxfA90ImaXYgWGves9lDI+Nog== +"@0x/assert@^2.1.6": + version "2.1.6" + resolved "https://registry.yarnpkg.com/@0x/assert/-/assert-2.1.6.tgz#61c5854b555bca1f1f0503754f2fd0169bee0ef1" + integrity sha512-Gu8eBnFdEuIAH2GubWYOSVz/BIoRccKof68AziduYDHxh4nSPM6NUH52xtfUGk4nXljiOXU1XHZJhcjTObI+8Q== dependencies: - "@0x/json-schemas" "^3.1.13" - "@0x/typescript-typings" "^4.2.4" - "@0x/utils" "^4.5.0" + "@0x/json-schemas" "^4.0.2" + "@0x/typescript-typings" "^4.3.0" + "@0x/utils" "^4.5.2" lodash "^4.17.11" valid-url "^1.0.9" -"@0x/dev-utils@^2.3.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@0x/dev-utils/-/dev-utils-2.3.0.tgz#2ab1c54b0eb1e0353428220f8450781e034b2d59" - integrity sha512-6EdcJSL7fe/U3AlvSOXRevbGgamjsyy2Al5kHmnYBid+WCaHfHDr7GbBhU+UwHr/g2QR5SunhGsNV9DrLk/AXg== - dependencies: - "@0x/subproviders" "^5.0.1" - "@0x/types" "^2.4.1" - "@0x/typescript-typings" "^4.2.4" - "@0x/utils" "^4.5.0" - "@0x/web3-wrapper" "^6.0.10" +"@0x/dev-utils@^2.3.3": + version "2.3.3" + resolved "https://registry.yarnpkg.com/@0x/dev-utils/-/dev-utils-2.3.3.tgz#9b6df00fea357fa6da02b35ca93fc89d100e1992" + integrity sha512-Pi664W/jj1U6WU+kHEPyKpflBnmKRsclB69RaL7wpnvOOFjAPhFV2/0FvIZ25w62rMzKEpfD1/1NcZ7NjAk7OQ== + dependencies: + "@0x/subproviders" "^5.0.4" + "@0x/types" "^2.4.3" + "@0x/typescript-typings" "^4.3.0" + "@0x/utils" "^4.5.2" + "@0x/web3-wrapper" "^6.0.13" "@types/web3-provider-engine" "^14.0.0" chai "^4.0.1" - ethereum-types "^2.1.4" + ethereum-types "^2.1.6" lodash "^4.17.11" -"@0x/json-schemas@^3.1.13": - version "3.1.13" - resolved "https://registry.yarnpkg.com/@0x/json-schemas/-/json-schemas-3.1.13.tgz#4b9010f1bdeaf2aef1daba1753aa2e5ecf57f654" - integrity sha512-V93sF6seHDHFCSLZOOEhgY5k+w+78tLmxJRhj8XvsW4+EnXcgpshxK38P6SQAmBoNLDutmM8Wk1inf6ghiW0qA== +"@0x/json-schemas@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@0x/json-schemas/-/json-schemas-4.0.2.tgz#6f7c1dcde04d3acc3e8ca2f24177b9705c10e772" + integrity sha512-JHOwESZeWKAzT5Z42ZNvOvQUQ5vuRIFQWS0FNjYwV8Cv4/dRlLHd7kwxxsvlm9NxgXnOW0ddEDBbVGxhVSYNIg== dependencies: - "@0x/typescript-typings" "^4.2.4" + "@0x/typescript-typings" "^4.3.0" "@types/node" "*" jsonschema "^1.2.0" lodash.values "^4.3.0" -"@0x/sol-compiler@^3.1.12": - version "3.1.12" - resolved "https://registry.yarnpkg.com/@0x/sol-compiler/-/sol-compiler-3.1.12.tgz#f5cecf7252bf10490473b9de62018cf46b0ea332" - integrity sha512-DaOJaME81FOG7+PvJAgUUj32XqMQY3pNYLQZhExCt6Br63uHbEz7FDM+EwO+UBoREdHhBfPEvBx7Z9tlByBb4Q== - dependencies: - "@0x/assert" "^2.1.3" - "@0x/json-schemas" "^3.1.13" - "@0x/sol-resolver" "^2.0.9" - "@0x/types" "^2.4.1" - "@0x/typescript-typings" "^4.2.4" - "@0x/utils" "^4.5.0" - "@0x/web3-wrapper" "^6.0.10" +"@0x/sol-compiler@^3.1.15": + version "3.1.15" + resolved "https://registry.yarnpkg.com/@0x/sol-compiler/-/sol-compiler-3.1.15.tgz#aaaad55008dddd69ad1e3226aa4a2832e0dd13b3" + integrity sha512-IobhcQ/whFRL942/ykKc0fV6/YstHhvnQJ0noUZ9GabMDtaBlW6k5vAerSkXZU/YyOd8sD9nw7QSm295D6HoTA== + dependencies: + "@0x/assert" "^2.1.6" + "@0x/json-schemas" "^4.0.2" + "@0x/sol-resolver" "^2.0.11" + "@0x/types" "^2.4.3" + "@0x/typescript-typings" "^4.3.0" + "@0x/utils" "^4.5.2" + "@0x/web3-wrapper" "^6.0.13" "@types/yargs" "^11.0.0" chalk "^2.3.0" chokidar "^3.0.2" - ethereum-types "^2.1.4" + ethereum-types "^2.1.6" ethereumjs-util "^5.1.1" lodash "^4.17.11" mkdirp "^0.5.1" @@ -65,59 +65,59 @@ web3-eth-abi "^1.0.0-beta.24" yargs "^10.0.3" -"@0x/sol-coverage@^3.0.5": - version "3.0.9" - resolved "https://registry.yarnpkg.com/@0x/sol-coverage/-/sol-coverage-3.0.9.tgz#906524c4a890b1289f4b685e0b5107ed133bd035" - integrity sha512-VpcLJI1VmcD0rpeghjkbiGTcGFHYmI/DzM0IoSmW6dLZ9HsJ5pTDPx8SHiSchk54xIiJAPFKiujBNcbwnUbCQQ== +"@0x/sol-coverage@^3.0.11": + version "3.0.12" + resolved "https://registry.yarnpkg.com/@0x/sol-coverage/-/sol-coverage-3.0.12.tgz#4ca602495f7bcc4f045854850cd7f20fdf64e984" + integrity sha512-V4Iq8LU8HWNctVCt+gMHKcZ0moiawpna7bd3SWQuiQIig0iNpXBBCQl9SEIwpboTcv4Xhzo4cZuCGsWwKAQSpw== dependencies: - "@0x/sol-tracing-utils" "^6.0.16" - "@0x/subproviders" "^5.0.1" - "@0x/typescript-typings" "^4.2.4" + "@0x/sol-tracing-utils" "^6.0.19" + "@0x/subproviders" "^5.0.4" + "@0x/typescript-typings" "^4.3.0" "@types/minimatch" "^3.0.3" - ethereum-types "^2.1.4" + ethereum-types "^2.1.6" lodash "^4.17.11" minimatch "^3.0.4" web3-provider-engine "14.0.6" -"@0x/sol-resolver@^2.0.9": - version "2.0.9" - resolved "https://registry.yarnpkg.com/@0x/sol-resolver/-/sol-resolver-2.0.9.tgz#afac0e4611565766c4e8b0b20a88cce08348a53b" - integrity sha512-A1G8qc/hNPHbj242aDZynTN0GJOls86ZIbCBpFu9ZQHzfgYbTI3ZRhG329hSZeIeqy9KQVyNM8CyA6/Lwps7Jg== +"@0x/sol-resolver@^2.0.11": + version "2.0.11" + resolved "https://registry.yarnpkg.com/@0x/sol-resolver/-/sol-resolver-2.0.11.tgz#282d545a423baf0d478c498fd3adf607339d5504" + integrity sha512-TGvkuWoEMghPB4OZaPz49OJ/J0cw/I3yV7VLbE/OeN0K/J2P8uOkzhNgWLOVSi8EK3hcJ1JVc0iDSkCnzGj4xQ== dependencies: - "@0x/types" "^2.4.1" - "@0x/typescript-typings" "^4.2.4" + "@0x/types" "^2.4.3" + "@0x/typescript-typings" "^4.3.0" lodash "^4.17.11" -"@0x/sol-trace@^2.0.13": - version "2.0.17" - resolved "https://registry.yarnpkg.com/@0x/sol-trace/-/sol-trace-2.0.17.tgz#04fcd9f9b268cdf8ae1f102f6dd2bd61a29c634b" - integrity sha512-3Nnj0zMU6UN67Zc3CAsr7mlajDap7Q+fJMgeFi/68WOOW7oJePr9v7ZTA9elHvC1BQMOzdGUXyvNzCwHd79mpA== +"@0x/sol-trace@^2.0.19": + version "2.0.20" + resolved "https://registry.yarnpkg.com/@0x/sol-trace/-/sol-trace-2.0.20.tgz#4c14af3f5c30ab50882e9667926ca9533446711d" + integrity sha512-lkw+8l+InqXKoyVFPCxdLA0oZnLLPvmpFm+lIJwEkPjrbwIyhvQbwSwyzPW/1XUWj0wIwWOpq6PSyofWZgt4KA== dependencies: - "@0x/sol-tracing-utils" "^6.0.16" - "@0x/subproviders" "^5.0.1" - "@0x/typescript-typings" "^4.2.4" + "@0x/sol-tracing-utils" "^6.0.19" + "@0x/subproviders" "^5.0.4" + "@0x/typescript-typings" "^4.3.0" chalk "^2.3.0" - ethereum-types "^2.1.4" + ethereum-types "^2.1.6" ethereumjs-util "^5.1.1" lodash "^4.17.11" loglevel "^1.6.1" web3-provider-engine "14.0.6" -"@0x/sol-tracing-utils@^6.0.16": - version "6.0.16" - resolved "https://registry.yarnpkg.com/@0x/sol-tracing-utils/-/sol-tracing-utils-6.0.16.tgz#dde1f153ed0e9844872cc45677926e6e5fbb6114" - integrity sha512-81kecPkc6fr0wJD8CU5MO4ATA3VqeWjktBdUaxzTqhOtB1rZZq32eKeZIEMCc2AckgYCI6xxBeAmAL309Z3P5g== - dependencies: - "@0x/dev-utils" "^2.3.0" - "@0x/sol-compiler" "^3.1.12" - "@0x/sol-resolver" "^2.0.9" - "@0x/subproviders" "^5.0.1" - "@0x/typescript-typings" "^4.2.4" - "@0x/utils" "^4.5.0" - "@0x/web3-wrapper" "^6.0.10" +"@0x/sol-tracing-utils@^6.0.19": + version "6.0.19" + resolved "https://registry.yarnpkg.com/@0x/sol-tracing-utils/-/sol-tracing-utils-6.0.19.tgz#3c119c7e5b6d2bd1c94663985b7641aec85ef625" + integrity sha512-5tQOEo+dUYWiclT7UDy5IRm/EPEwDzCqAY3J8l0ecIsssBk0r2YLKKf/ugWkdwASGeAxiepjYpC+mxcxOT6yDA== + dependencies: + "@0x/dev-utils" "^2.3.3" + "@0x/sol-compiler" "^3.1.15" + "@0x/sol-resolver" "^2.0.11" + "@0x/subproviders" "^5.0.4" + "@0x/typescript-typings" "^4.3.0" + "@0x/utils" "^4.5.2" + "@0x/web3-wrapper" "^6.0.13" "@types/solidity-parser-antlr" "^0.2.3" chalk "^2.3.0" - ethereum-types "^2.1.4" + ethereum-types "^2.1.6" ethereumjs-util "^5.1.1" ethers "~4.0.4" glob "^7.1.2" @@ -130,53 +130,23 @@ solc "^0.5.5" solidity-parser-antlr "^0.4.2" -"@0x/subproviders@^4.1.0": - version "4.1.2" - resolved "https://registry.yarnpkg.com/@0x/subproviders/-/subproviders-4.1.2.tgz#ab7bb0f482b11ccb4615fb5dd8ca85199cd0ae23" - integrity sha512-PaK/+cC6+o3glVITnBdb/AN/ej7ulfr49KGftNRATB8Y/yI6Xa3adqgFvDh7jiKBoB/auTRFQ/TabQTcieKl6g== - dependencies: - "@0x/assert" "^2.1.1" - "@0x/types" "^2.4.1" - "@0x/typescript-typings" "^4.2.4" - "@0x/utils" "^4.4.1" - "@0x/web3-wrapper" "^6.0.8" - "@ledgerhq/hw-app-eth" "^4.3.0" - "@ledgerhq/hw-transport-u2f" "4.24.0" - "@types/eth-lightwallet" "^3.0.0" - "@types/hdkey" "^0.7.0" - "@types/web3-provider-engine" "^14.0.0" - bip39 "^2.5.0" - bn.js "^4.11.8" - eth-lightwallet "^3.0.1" - ethereum-types "^2.1.4" - ethereumjs-tx "^1.3.5" - ethereumjs-util "^5.1.1" - ganache-core "^2.5.3" - hdkey "^0.7.1" - json-rpc-error "2.0.0" - lodash "^4.17.11" - semaphore-async-await "^1.5.1" - web3-provider-engine "14.0.6" - optionalDependencies: - "@ledgerhq/hw-transport-node-hid" "^4.3.0" - -"@0x/subproviders@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@0x/subproviders/-/subproviders-5.0.1.tgz#167e0fddc8da6dc629c741d33dd68e0142f759d4" - integrity sha512-qt3pSbuOev9G0mOjf0DnpGRifFeVdntdFI+BMgO1YhXUdu4DM0t3WlJo6HXlnWmjx/2+Yr00N0lz2G3JACUDsQ== - dependencies: - "@0x/assert" "^2.1.3" - "@0x/types" "^2.4.1" - "@0x/typescript-typings" "^4.2.4" - "@0x/utils" "^4.5.0" - "@0x/web3-wrapper" "^6.0.10" +"@0x/subproviders@^5.0.3", "@0x/subproviders@^5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@0x/subproviders/-/subproviders-5.0.4.tgz#e4b165634ef6a50c4bd41baacf0dbd2a9390c2f8" + integrity sha512-1LiGcOXkP5eUOl/0JRqkrqYtCvIL4NJj1GbbLIRq4TvkfqrRbF7zJM2SaayxPo3Z48zVsqk0ZE5+RrNAdK/Rrg== + dependencies: + "@0x/assert" "^2.1.6" + "@0x/types" "^2.4.3" + "@0x/typescript-typings" "^4.3.0" + "@0x/utils" "^4.5.2" + "@0x/web3-wrapper" "^6.0.13" "@ledgerhq/hw-app-eth" "^4.3.0" "@ledgerhq/hw-transport-u2f" "4.24.0" "@types/hdkey" "^0.7.0" "@types/web3-provider-engine" "^14.0.0" bip39 "^2.5.0" bn.js "^4.11.8" - ethereum-types "^2.1.4" + ethereum-types "^2.1.6" ethereumjs-tx "^1.3.5" ethereumjs-util "^5.1.1" ganache-core "^2.6.0" @@ -188,55 +158,55 @@ optionalDependencies: "@ledgerhq/hw-transport-node-hid" "^4.3.0" -"@0x/types@^2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@0x/types/-/types-2.4.1.tgz#41a42185dcd093b19ef0d4595a432b285aae4746" - integrity sha512-gJrpxwoV1c1rSWg94RH1fLdfMCwaSCene8p4ckCgwmOzoLaD9Oj1ImErgjzGhmbPugwn6n5HnjoU7cQzeek4nw== +"@0x/types@^2.4.3": + version "2.4.3" + resolved "https://registry.yarnpkg.com/@0x/types/-/types-2.4.3.tgz#ea014889789e9013fdf48ce97b79f2c016e10fb3" + integrity sha512-3z4ca9fb9pyTu9lJhTSll5EuEthkA3tLAayyZixCoCnwi4ok6PJ83PnMMsSxlRY2iXr7QGbrQr6nU64YWk2WjA== dependencies: "@types/node" "*" bignumber.js "~8.0.2" - ethereum-types "^2.1.4" + ethereum-types "^2.1.6" -"@0x/typescript-typings@^4.2.4": - version "4.2.4" - resolved "https://registry.yarnpkg.com/@0x/typescript-typings/-/typescript-typings-4.2.4.tgz#0858639ddfdf7e9e1a3f9fd8f7d8f2e8ebfdce85" - integrity sha512-yIg8q/bj9+Y0OzNuq59D3JDe4OoQR3bU2QKy+7d8NV6CIfA0GqfWWS+JFdUB45S45qT5P0EmThh/szQ7zuW4oQ== +"@0x/typescript-typings@^4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@0x/typescript-typings/-/typescript-typings-4.3.0.tgz#4813a996ac5101841d1c22f4aa1738ab56168857" + integrity sha512-6IH2JyKyl33+40tJ5rEhaMPTS2mVuRvoNmoXlCd/F0GPYSsDHMGObIXOkx+Qsw5SyCmqNs/3CTLeeCCqiSUdaw== dependencies: "@types/bn.js" "^4.11.0" "@types/react" "*" bignumber.js "~8.0.2" - ethereum-types "^2.1.4" + ethereum-types "^2.1.6" popper.js "1.14.3" -"@0x/utils@^4.4.1", "@0x/utils@^4.5.0": - version "4.5.0" - resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-4.5.0.tgz#b5780ea76f4553ef458c4dddc970262c5d6cee75" - integrity sha512-tdMpfccExkuuVDznJBJ0m813GocNv0RdyHckmjPQVdpaAlcehY6u9WB2+b8O9Coop5l8p1Y71Z4DeNuFrEqHpQ== +"@0x/utils@^4.5.2": + version "4.5.2" + resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-4.5.2.tgz#6cc89f2d0dda341e0fb4e76049a35abfb67a4ac5" + integrity sha512-NWfNcvyiOhouk662AWxX0ZVe4ednBZJS9WZT/by3DBCY/WvN7WHMpEy9M5rBCxO+JJndLYeB5eBztDp7W+Ytkw== dependencies: - "@0x/types" "^2.4.1" - "@0x/typescript-typings" "^4.2.4" + "@0x/types" "^2.4.3" + "@0x/typescript-typings" "^4.3.0" "@types/node" "*" abortcontroller-polyfill "^1.1.9" bignumber.js "~8.0.2" chalk "^2.3.0" detect-node "2.0.3" - ethereum-types "^2.1.4" + ethereum-types "^2.1.6" ethereumjs-util "^5.1.1" ethers "~4.0.4" isomorphic-fetch "2.2.1" js-sha3 "^0.7.0" lodash "^4.17.11" -"@0x/web3-wrapper@^6.0.10", "@0x/web3-wrapper@^6.0.8": - version "6.0.10" - resolved "https://registry.yarnpkg.com/@0x/web3-wrapper/-/web3-wrapper-6.0.10.tgz#6be653dc2ed7e82e208c1131f4a8ee538991ce7d" - integrity sha512-jPsKVoBNb/IeJOgdhVwtkceYgayA1L/9RCqSzZ5uvqQtdpZho4Xa6SaJIeE+XnBnluicunvc9swILrknNLNKKA== +"@0x/web3-wrapper@^6.0.13": + version "6.0.13" + resolved "https://registry.yarnpkg.com/@0x/web3-wrapper/-/web3-wrapper-6.0.13.tgz#2e666221bd44ceebe02762028214d4aa41ad7247" + integrity sha512-LQjKBCCNdkJuhcJld+/sy+G0+sJu5qp9VDNNwJGLDxWIJpgoshhUpBPi7vUnZ79UY4SYuNcC4yM9yI61cs7ZiA== dependencies: - "@0x/assert" "^2.1.3" - "@0x/json-schemas" "^3.1.13" - "@0x/typescript-typings" "^4.2.4" - "@0x/utils" "^4.5.0" - ethereum-types "^2.1.4" + "@0x/assert" "^2.1.6" + "@0x/json-schemas" "^4.0.2" + "@0x/typescript-typings" "^4.3.0" + "@0x/utils" "^4.5.2" + ethereum-types "^2.1.6" ethereumjs-util "^5.1.1" ethers "~4.0.4" lodash "^4.17.11" @@ -1238,10 +1208,10 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@codechecks/client@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@codechecks/client/-/client-0.1.5.tgz#635d905ea2db6e2502a7510dabdba24ddef44d56" - integrity sha512-/IcKf0j8dDXjlC3D1RgRNGGk0oo1733v+QH9rnp9urZe/+9fAi0M0aTqYl060ZTnyJgwh9Fek+/5zkOswVFJQA== +"@codechecks/client@^0.1.9": + version "0.1.10" + resolved "https://registry.yarnpkg.com/@codechecks/client/-/client-0.1.10.tgz#41fe736c424976d9feb8116b131fb9c1f099d105" + integrity sha512-rvX+LknmMohsLTU8mHJqIcNTo8fKfw6A5i7JvT6JJWqwCLi+TujHpRO8BLf48iF96+gU5viVvKfRaUyhc3wloA== dependencies: bluebird "^3.5.3" chalk "^2.4.2" @@ -1253,8 +1223,8 @@ js-yaml "^3.13.1" json5 "^2.1.0" lodash "^4.17.11" - marked "^0.6.2" - marked-terminal "^3.2.0" + marked "^0.7.0" + marked-terminal "^3.3.0" mkdirp "^0.5.1" ms "^2.1.1" promise "^8.0.2" @@ -1765,13 +1735,6 @@ dependencies: "@types/node" "*" -"@types/eth-lightwallet@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/eth-lightwallet/-/eth-lightwallet-3.0.0.tgz#9be5b59dc6fb3fcdb01e65c2c2a79cd601f72dd4" - integrity sha512-AgE1V0Z9VqZ3bwZgUeIwJkKuyCP/vFaIFtZd7OZxhwD0Vsqjy9HqfT6IolrxXCTLWy9YkqcN7gL1jtIiH+Ml7Q== - dependencies: - "@types/node" "*" - "@types/ethereum-protocol@*": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/ethereum-protocol/-/ethereum-protocol-1.0.0.tgz#416e3827d5fdfa4658b0045b35a008747871b271" @@ -2107,7 +2070,7 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -JSONStream@^1.3.4, JSONStream@^1.3.5: +JSONStream@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== @@ -2120,7 +2083,7 @@ abab@^2.0.0: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f" integrity sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w== -abbrev@1, abbrev@~1.1.1: +abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== @@ -2130,12 +2093,13 @@ abbrev@1.0.x: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" integrity sha1-kbR5JYinc4wl813W9jdSovh3YTU= -abi-decoder@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/abi-decoder/-/abi-decoder-2.0.1.tgz#fd3c1ca79eedb3e663bb88f34f146f112d4ee59e" - integrity sha512-hkcSuzQJJFSht4wDAcLn6cfFVx/1qddfV0wG+VCmZBP0h7iZqbHPpmNOmt7nb2oxPSA0cn3Lfmoi6iselvvwCQ== +abi-decoder@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/abi-decoder/-/abi-decoder-2.2.2.tgz#aa1e6679f43c6c6be5d2a3fb20e9578e14e44440" + integrity sha512-viRNIt7FzBC9/Y99AVKsAvEMJsIe9Yc/PMrqYT7edSlZ4EnbXlxAq7hS08XTeMzjMP6DpoVrYyCwhSCskCPQqA== dependencies: - web3 "1.0.0-beta.37" + web3-eth-abi "^1.2.1" + web3-utils "^1.2.1" abortcontroller-polyfill@^1.1.9: version "1.3.0" @@ -2196,6 +2160,11 @@ acorn-jsx@^5.0.0: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== +acorn-jsx@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384" + integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw== + acorn-walk@^6.0.1: version "6.1.1" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" @@ -2211,6 +2180,11 @@ acorn@^6.0.1, acorn@^6.0.4, acorn@^6.0.5, acorn@^6.0.7: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" integrity sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA== +acorn@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" + integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== + address@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" @@ -2272,7 +2246,7 @@ ajv@^6.1.0, ajv@^6.5.5, ajv@^6.9.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^6.6.1: +ajv@^6.10.0, ajv@^6.6.1: version "6.10.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== @@ -2391,11 +2365,6 @@ ansicolors@~0.3.2: resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" integrity sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk= -ansistyles@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ansistyles/-/ansistyles-0.1.3.tgz#5de60415bda071bb37127854c864f41b23254539" - integrity sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk= - antlr4@4.7.1: version "4.7.1" resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773" @@ -2441,17 +2410,12 @@ append-transform@^0.4.0: dependencies: default-require-extensions "^1.0.0" -aproba@^1.0.3, aproba@^1.1.1, aproba@^1.1.2: +aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== -"aproba@^1.1.2 || 2", aproba@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" - integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== - -archy@^1.0.0, archy@~1.0.0: +archy@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= @@ -2639,7 +2603,7 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= -asap@^2.0.0, asap@~2.0.6: +asap@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= @@ -2783,7 +2747,7 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== -axios@^0.19.0: +axios@0.19.0: version "0.19.0" resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.0.tgz#8e09bff3d9122e133f7b8101c8fbdd00ed3d2ab8" integrity sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ== @@ -3544,26 +3508,11 @@ bignumber.js@^6.0.0: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-6.0.0.tgz#bbfa047644609a5af093e9cbd83b0461fa3f6002" integrity sha512-x247jIuy60/+FtMRvscqfxtVHQf8AGx2hm9c6btkgC0x/hp9yt+teISNhvF8WlwRkCc5yF2fDECH8SIMe8j+GA== -"bignumber.js@git+https://github.com/frozeman/bignumber.js-nolookahead.git": - version "2.0.7" - resolved "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934" - bignumber.js@~8.0.2: version "8.0.2" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-8.0.2.tgz#d8c4e1874359573b1ef03011a2d861214aeef137" integrity sha512-EiuvFrnbv0jFixEQ9f58jo7X0qI2lNGIr/MxntmVzQc5JUweDSh8y8hbTCAomFtqwUPIOWcLXP0VEOSZTG7FFw== -bin-links@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-1.1.2.tgz#fb74bd54bae6b7befc6c6221f25322ac830d9757" - integrity sha512-8eEHVgYP03nILphilltWjeIjMbKyJo3wvp9K816pHbhP301ismzw15mxAAEVQ/USUwcP++1uNrbERbp8lOA6Fg== - dependencies: - bluebird "^3.5.0" - cmd-shim "^2.0.2" - gentle-fs "^2.0.0" - graceful-fs "^4.1.11" - write-file-atomic "^2.3.0" - binary-extensions@^1.0.0: version "1.13.1" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" @@ -3610,38 +3559,6 @@ bip66@^1.1.5: dependencies: safe-buffer "^5.0.1" -bitcore-lib@^0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/bitcore-lib/-/bitcore-lib-0.15.0.tgz#f924be13869f2aab7e04aeec5642ad3359b6cec2" - integrity sha512-AeXLWhiivF6CDFzrABZHT4jJrflyylDWTi32o30rF92HW9msfuKpjzrHtFKYGa9w0kNVv5HABQjCB3OEav4PhQ== - dependencies: - bn.js "=4.11.8" - bs58 "=4.0.1" - buffer-compare "=1.1.1" - elliptic "=6.4.0" - inherits "=2.0.1" - lodash "=4.17.4" - -bitcore-lib@^0.16.0: - version "0.16.0" - resolved "https://registry.yarnpkg.com/bitcore-lib/-/bitcore-lib-0.16.0.tgz#a2c3ec1108cdb90386f728282ab833e0c77c9533" - integrity sha512-CEtcrPAH2gwgaMN+OPMJc18TBEak1+TtzMyafrqrIbK9PIa3kat195qBJhC0liJSHRiRr6IE2eLcXeIFFs+U8w== - dependencies: - bn.js "=4.11.8" - bs58 "=4.0.1" - buffer-compare "=1.1.1" - elliptic "=6.4.0" - inherits "=2.0.1" - lodash "=4.17.11" - -bitcore-mnemonic@^1.5.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/bitcore-mnemonic/-/bitcore-mnemonic-1.7.0.tgz#253295a773135e1a0b455871de614996afc8f5e1" - integrity sha512-1JV1okgz9Vv+Y4fG2m3ToR+BGdKA6tSoqjepIxA95BZjW6YaeopVW4iOe/dY9dnkZH4+LA2AJ4YbDE6H3ih3Yw== - dependencies: - bitcore-lib "^0.16.0" - unorm "^1.4.1" - bitsyntax@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/bitsyntax/-/bitsyntax-0.1.0.tgz#b0c59acef03505de5a2ed62a2f763c56ae1d6205" @@ -3696,16 +3613,11 @@ bn.js@4.11.6: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= -bn.js@4.11.8, bn.js@=4.11.8, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^4.8.0: +bn.js@4.11.8, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^4.8.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== -bn.js@^2.0.3: - version "2.2.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-2.2.0.tgz#12162bc2ae71fc40a5626c33438f3a875cd37625" - integrity sha1-EhYrwq5x/EClYmwzQ486h1zTdiU= - body-parser@1.19.0, body-parser@^1.16.0: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" @@ -3921,18 +3833,18 @@ browserslist@^4.0.0, browserslist@^4.1.1, browserslist@^4.4.2, browserslist@^4.5 electron-to-chromium "^1.3.133" node-releases "^1.1.19" -bs58@=4.0.1, bs58@^4.0.0: +bs58@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-2.0.1.tgz#55908d58f1982aba2008fa1bed8f91998a29bf8d" + integrity sha1-VZCNWPGYKrogCPob7Y+RmYopv40= + +bs58@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= dependencies: base-x "^3.0.2" -bs58@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-2.0.1.tgz#55908d58f1982aba2008fa1bed8f91998a29bf8d" - integrity sha1-VZCNWPGYKrogCPob7Y+RmYopv40= - bs58check@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" @@ -3962,11 +3874,6 @@ buffer-alloc@^1.2.0: buffer-alloc-unsafe "^1.1.0" buffer-fill "^1.0.0" -buffer-compare@=1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-compare/-/buffer-compare-1.1.1.tgz#5be7be853af89198d1f4ddc090d1d66a48aef596" - integrity sha1-W+e+hTr4kZjR9N3AkNHWakiu9ZY= - buffer-crc32@~0.2.3: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" @@ -4007,7 +3914,7 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= -buffer@^4.3.0, buffer@^4.9.0: +buffer@^4.3.0: version "4.9.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= @@ -4034,16 +3941,6 @@ builtins@^1.0.3: resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= -byline@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" - integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= - -byte-size@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-5.0.1.tgz#4b651039a5ecd96767e71a3d7ed380e48bed4191" - integrity sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw== - bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -4089,7 +3986,7 @@ cacache@^11.0.2, cacache@^11.3.2: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^12.0.0, cacache@^12.0.2: +cacache@^12.0.0: version "12.0.2" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.2.tgz#8db03205e36089a3df6954c66ce92541441ac46c" integrity sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg== @@ -4155,11 +4052,6 @@ caching-transform@^1.0.0: mkdirp "^0.5.1" write-file-atomic "^1.1.4" -call-limit@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/call-limit/-/call-limit-1.1.1.tgz#ef15f2670db3f1992557e2d965abc459e6e358d4" - integrity sha512-5twvci5b9eRBw2wCfPtN0GmlR2/gadZqyFpPhOK6CvMFoFgA+USnZ6Jpu1lhG9h85pQ3Ouil3PfXWRD4EUaRiQ== - call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -4385,7 +4277,7 @@ chokidar@^3.0.2: optionalDependencies: fsevents "^2.0.6" -chownr@^1.0.1, chownr@^1.1.2: +chownr@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.2.tgz#a18f1e0b269c8a6a5d3c86eb298beb14c3dd7bf6" integrity sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A== @@ -4402,10 +4294,10 @@ chrome-trace-event@^1.0.0: dependencies: tslib "^1.9.0" -chromedriver@76.0.0: - version "76.0.0" - resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-76.0.0.tgz#cbf618c5b370799ff6e15b23de07e80f67f89025" - integrity sha512-jGyqs0N+lMo9iaNQxGKNPiLJWb2L9s2rwbRr1jJeQ37n6JQ1+5YMGviv/Fx5Z08vBWYbAvrKEzFsuYf8ppl+lw== +chromedriver@^77.0.0: + version "77.0.0" + resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-77.0.0.tgz#bd916cc87a0ccb7a6e4fb4b43cb2368bc54db6a0" + integrity sha512-mZa1IVx4HD8rDaItWbnS470mmypgiWsDiu98r0NkiT4uLm3qrANl4vOU6no6vtWtLQiW5kt1POcIbjeNpsLbXA== dependencies: del "^4.1.1" extract-zip "^1.6.7" @@ -4423,13 +4315,6 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -cidr-regex@^2.0.10: - version "2.0.10" - resolved "https://registry.yarnpkg.com/cidr-regex/-/cidr-regex-2.0.10.tgz#af13878bd4ad704de77d6dc800799358b3afa70d" - integrity sha512-sB3ogMQXWvreNPbJUZMRApxuRYd+KoIo4RGQ81VatjmMW6WJPo+IJZ2846FGItr9VzKo5w7DXzijPLGtSd0N3Q== - dependencies: - ip-regex "^2.1.0" - cint@^8.2.1: version "8.2.1" resolved "https://registry.yarnpkg.com/cint/-/cint-8.2.1.tgz#70386b1b48e2773d0d63166a55aff94ef4456a12" @@ -4470,14 +4355,6 @@ cli-boxes@^2.2.0: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d" integrity sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w== -cli-columns@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/cli-columns/-/cli-columns-3.1.2.tgz#6732d972979efc2ae444a1f08e08fa139c96a18e" - integrity sha1-ZzLZcpee/CrkRKHwjgj6E5yWoY4= - dependencies: - string-width "^2.0.0" - strip-ansi "^3.0.1" - cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -4485,7 +4362,7 @@ cli-cursor@^2.1.0: dependencies: restore-cursor "^2.0.0" -cli-table3@^0.5.0, cli-table3@^0.5.1: +cli-table3@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== @@ -4525,6 +4402,15 @@ cliui@^4.0.0: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + clone-buffer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" @@ -4568,11 +4454,6 @@ clone@2.1.2, clone@^2.0.0, clone@^2.1.1: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= - cloneable-readable@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.3.tgz#120a00cb053bfb63a222e709f9683ea2e11d8cec" @@ -4587,14 +4468,6 @@ cluster-key-slot@^1.0.6: resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.0.12.tgz#d5deff2a520717bc98313979b687309b2d368e29" integrity sha512-21O0kGmvED5OJ7ZTdqQ5lQQ+sjuez33R+d35jZKLwqUb5mqcPHUsxOSzj61+LHVtxGZd1kShbQM3MjB/gBJkVg== -cmd-shim@^2.0.2, cmd-shim@~2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb" - integrity sha1-b8vamUg6j9FdfTChlspp1oii79s= - dependencies: - graceful-fs "^4.1.2" - mkdirp "~0.5.0" - co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -4687,14 +4560,6 @@ colors@^1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg== -columnify@~1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" - integrity sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs= - dependencies: - strip-ansi "^3.0.0" - wcwidth "^1.0.0" - combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -4814,14 +4679,6 @@ concurrently@^3.6.0: supports-color "^3.2.3" tree-kill "^1.1.0" -config-chain@^1.1.12: - version "1.1.12" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" - integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== - dependencies: - ini "^1.3.4" - proto-list "~1.2.1" - configstore@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f" @@ -4863,7 +4720,7 @@ console-browserify@^1.1.0: dependencies: date-now "^0.1.4" -console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: +console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= @@ -5018,10 +4875,10 @@ coveralls@^3.0.0: minimist "^1.2.0" request "^2.86.0" -coveralls@^3.0.4: - version "3.0.6" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.6.tgz#5c63b2759b6781118e7439bd870ba5e9ee428b25" - integrity sha512-Pgh4v3gCI4T/9VijVrm8Ym5v0OgjvGLKj3zTUwkvsCiwqae/p6VLzpsFNjQS2i6ewV7ef+DjFJ5TSKxYt/mCrA== +coveralls@^3.0.6: + version "3.0.7" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.7.tgz#1eca48e47976e9573d6a2f18b97c2fea4026f34a" + integrity sha512-mUuH2MFOYB2oBaA4D4Ykqi9LaEYpMMlsiOMJOrv358yAjP6enPIk55fod2fNJ8AvwoYXStWQls37rA+s5e7boA== dependencies: growl "~> 1.10.0" js-yaml "^3.13.1" @@ -5134,11 +4991,6 @@ crypto-browserify@3.12.0, crypto-browserify@^3.11.0, crypto-browserify@^3.12.0: randombytes "^2.0.0" randomfill "^1.0.3" -crypto-js@^3.1.4, crypto-js@^3.1.5: - version "3.1.8" - resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.1.8.tgz#715f070bf6014f2ae992a98b3929258b713f08d5" - integrity sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU= - crypto-random-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" @@ -5477,11 +5329,6 @@ debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: dependencies: ms "^2.1.1" -debuglog@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" - integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= - decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -5613,13 +5460,6 @@ default-resolution@^2.0.0: resolved "https://registry.yarnpkg.com/default-resolution/-/default-resolution-2.0.0.tgz#bcb82baa72ad79b426a76732f1a81ad6df26d684" integrity sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ= -defaults@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" - integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= - dependencies: - clone "^1.0.2" - defer-to-connect@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.2.tgz#4bae758a314b034ae33902b5aac25a8dd6a8633e" @@ -5744,11 +5584,6 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" -detect-indent@~5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= - detect-libc@^1.0.2, detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" @@ -5777,14 +5612,6 @@ detect-port-alt@1.1.6: address "^1.0.1" debug "^2.6.0" -dezalgo@^1.0.0, dezalgo@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" - integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY= - dependencies: - asap "^2.0.0" - wrappy "1" - diff-sequences@^24.3.0: version "24.3.0" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.3.0.tgz#0f20e8a1df1abddaf4d9c226680952e64118b975" @@ -6013,11 +5840,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -editor@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/editor/-/editor-1.0.0.tgz#60c7f87bd62bcc6a894fa8ccd6afb7823a24f742" - integrity sha1-YMf4e9YrzGqJT6jM1q+3gjok90I= - ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -6043,29 +5865,6 @@ elliptic@6.3.3: hash.js "^1.0.0" inherits "^2.0.1" -elliptic@=6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" - integrity sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8= - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -elliptic@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-3.1.0.tgz#c21682ef762769b56a74201609105da11d5f60cc" - integrity sha1-whaC73YnabVqdCAWCRBdoR1fYMw= - dependencies: - bn.js "^2.0.3" - brorand "^1.0.1" - hash.js "^1.0.0" - inherits "^2.0.1" - elliptic@^6.0.0, elliptic@^6.4.0: version "6.4.1" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" @@ -6151,11 +5950,6 @@ entities@^1.1.1: resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== -env-paths@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-1.0.0.tgz#4168133b42bb05c38a35b1ae4397c8298ab369e0" - integrity sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA= - err-code@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" @@ -6259,6 +6053,11 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + escodegen@1.8.x: version "1.8.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" @@ -6292,6 +6091,15 @@ eslint-config-airbnb-base@^13.1.0: object.assign "^4.1.0" object.entries "^1.0.4" +eslint-config-airbnb-base@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.0.0.tgz#8a7bcb9643d13c55df4dd7444f138bf4efa61e17" + integrity sha512-2IDHobw97upExLmsebhtfoD3NAKhV4H0CJWP3Uprd/uk+cHuWYOczPVxQ8PxLFUAw7o3Th1RAU8u1DoUpr+cMA== + dependencies: + confusing-browser-globals "^1.0.7" + object.assign "^4.1.0" + object.entries "^1.1.0" + eslint-config-airbnb@17.1.0: version "17.1.0" resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-17.1.0.tgz#3964ed4bc198240315ff52030bf8636f42bc4732" @@ -6308,10 +6116,10 @@ eslint-config-prettier@3.1.0: dependencies: get-stdin "^6.0.0" -eslint-config-prettier@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-4.3.0.tgz#c55c1fcac8ce4518aeb77906984e134d9eb5a4f0" - integrity sha512-sZwhSTHVVz78+kYD3t5pCWSYEdVSBR0PXnwjDRsUs8ytIrK8PLXw+6FKp8r3Z7rx4ZszdetWlXYKOHoUrrwPlA== +eslint-config-prettier@^6.2.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.4.0.tgz#0a04f147e31d33c6c161b2dd0971418ac52d0477" + integrity sha512-YrKucoFdc7SEko5Sxe4r6ixqXPDP1tunGw91POeZTTRKItf/AMFYt/YLEQtZMkR2LVpAVhcAcZgcWpm1oGPW7w== dependencies: get-stdin "^6.0.0" @@ -6349,7 +6157,7 @@ eslint-module-utils@^2.2.0, eslint-module-utils@^2.3.0, eslint-module-utils@^2.4 debug "^2.6.8" pkg-dir "^2.0.0" -eslint-plugin-es@^1.3.1, eslint-plugin-es@^1.4.0: +eslint-plugin-es@^1.3.1: version "1.4.0" resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz#475f65bb20c993fc10e8c8fe77d1d60068072da6" integrity sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw== @@ -6357,6 +6165,14 @@ eslint-plugin-es@^1.3.1, eslint-plugin-es@^1.4.0: eslint-utils "^1.3.0" regexpp "^2.0.1" +eslint-plugin-es@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz#0f5f5da5f18aa21989feebe8a73eadefb3432976" + integrity sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ== + dependencies: + eslint-utils "^1.4.2" + regexpp "^3.0.0" + eslint-plugin-flowtype@2.50.1: version "2.50.1" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.1.tgz#36d4c961ac8b9e9e1dc091d3fba0537dad34ae8a" @@ -6403,10 +6219,10 @@ eslint-plugin-import@2.16.0: read-pkg-up "^2.0.0" resolve "^1.9.0" -eslint-plugin-import@^2.17.2: - version "2.17.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.17.2.tgz#d227d5c6dc67eca71eb590d2bb62fb38d86e9fcb" - integrity sha512-m+cSVxM7oLsIpmwNn2WXTJoReOF9f/CtLMo7qOVmKd1KntBy0hEcuNZ3erTmWjx+DxRO0Zcrm5KwAvI9wHcV5g== +eslint-plugin-import@^2.18.2: + version "2.18.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz#02f1180b90b077b33d447a17a2326ceb400aceb6" + integrity sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ== dependencies: array-includes "^3.0.3" contains-path "^0.1.0" @@ -6415,10 +6231,10 @@ eslint-plugin-import@^2.17.2: eslint-import-resolver-node "^0.3.2" eslint-module-utils "^2.4.0" has "^1.0.3" - lodash "^4.17.11" minimatch "^3.0.4" + object.values "^1.1.0" read-pkg-up "^2.0.0" - resolve "^1.10.0" + resolve "^1.11.0" eslint-plugin-jsx-a11y@6.2.1, eslint-plugin-jsx-a11y@^6.2.1: version "6.2.1" @@ -6446,13 +6262,13 @@ eslint-plugin-node@7.0.1: resolve "^1.8.1" semver "^5.5.0" -eslint-plugin-node@^9.0.1: - version "9.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-9.1.0.tgz#f2fd88509a31ec69db6e9606d76dabc5adc1b91a" - integrity sha512-ZwQYGm6EoV2cfLpE1wxJWsfnKUIXfM/KM09/TlorkukgCAwmkgajEJnPCmyzoFPQQkmvo5DrW/nyKutNIw36Mw== +eslint-plugin-node@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz#fd1adbc7a300cf7eb6ac55cf4b0b6fc6e577f5a6" + integrity sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ== dependencies: - eslint-plugin-es "^1.4.0" - eslint-utils "^1.3.1" + eslint-plugin-es "^2.0.0" + eslint-utils "^1.4.2" ignore "^5.1.1" minimatch "^3.0.4" resolve "^1.10.1" @@ -6525,16 +6341,36 @@ eslint-scope@^4.0.0, eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + eslint-utils@^1.3.0, eslint-utils@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" integrity sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q== +eslint-utils@^1.4.2: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" + eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== +eslint-visitor-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + eslint@5.16.0, eslint@^5.16.0, eslint@^5.6.0: version "5.16.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" @@ -6577,6 +6413,49 @@ eslint@5.16.0, eslint@^5.16.0, eslint@^5.6.0: table "^5.2.3" text-table "^0.2.0" +eslint@^6.3.0: + version "6.5.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.5.1.tgz#828e4c469697d43bb586144be152198b91e96ed6" + integrity sha512-32h99BoLYStT1iq1v2P9uwpyznQ4M2jRiFB6acitKz52Gqn+vPaMDUTB1bYi1WN4Nquj2w+t+bimYUG83DC55A== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.10.0" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^5.0.0" + eslint-utils "^1.4.2" + eslint-visitor-keys "^1.1.0" + espree "^6.1.1" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^6.4.1" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.14" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" + table "^5.2.3" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + espree@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" @@ -6586,6 +6465,15 @@ espree@^5.0.1: acorn-jsx "^5.0.0" eslint-visitor-keys "^1.0.0" +espree@^6.1.1: + version "6.1.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.2.tgz#6c272650932b4f91c3714e5e7b5f5e2ecf47262d" + integrity sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA== + dependencies: + acorn "^7.1.0" + acorn-jsx "^5.1.0" + eslint-visitor-keys "^1.1.0" + esprima-extract-comments@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/esprima-extract-comments/-/esprima-extract-comments-1.1.0.tgz#0dacab567a5900240de6d344cf18c33617becbc9" @@ -6655,34 +6543,24 @@ eth-block-tracker@^3.0.0: pify "^2.3.0" tape "^4.6.3" -eth-ens-namehash@2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" - integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= - dependencies: - idna-uts46-hx "^2.3.1" - js-sha3 "^0.5.7" - -eth-gas-reporter@^0.2.9: - version "0.2.10" - resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.10.tgz#3d6d8f4ff41e7e3a5081db4196f8080218147ece" - integrity sha512-M5MbaiNNWs49dQyu6j6/SP9mS5XyzYoUBxP/TR1A6k6N+6mOa6k45QnGZaPz97nDbKdTofiyFT0J0j0n8StQ7g== +eth-gas-reporter@^0.2.11: + version "0.2.12" + resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.12.tgz#e89ab977eb43e5102a948b2cb1dc0e0a988f3a1a" + integrity sha512-CKHisR92TyGv70r95eDc+mEythEzb57y0RCq9LWzDFpieR3Uat+FliPmJ6ni3cGp07IfU2gECb7AfXuYEoUWWQ== dependencies: - abi-decoder "^2.0.1" + abi-decoder "^2.2.0" cli-table3 "^0.5.0" colors "^1.1.2" ethers "^4.0.28" fs-readdir-recursive "^1.1.0" - install "^0.13.0" lodash "^4.17.14" markdown-table "^1.1.3" mocha "^5.2.0" - npm "^6.10.2" req-cwd "^2.0.0" request "^2.88.0" request-promise-native "^1.0.5" sha1 "^1.1.1" - solidity-parser-antlr "^0.4.2" + solidity-parser-antlr "0.4.7" sync-request "^6.0.0" eth-json-rpc-infura@^3.1.0: @@ -6737,23 +6615,6 @@ eth-lib@0.2.7: elliptic "^6.4.0" xhr-request-promise "^0.1.2" -eth-lightwallet@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eth-lightwallet/-/eth-lightwallet-3.0.1.tgz#297022932aa568f4e4eb0873bff257f5e5b78709" - integrity sha512-79vVCETy+4l1b6wuOWwjqPW3Bom5ZK46BgkUNwaXhiMG1rrMRHjpjYEWMqH0JHeCzOzB4HBIFz7eK1/4s6w5nA== - dependencies: - bitcore-lib "^0.15.0" - bitcore-mnemonic "^1.5.0" - buffer "^4.9.0" - crypto-js "^3.1.5" - elliptic "^3.1.0" - ethereumjs-tx "^1.3.3" - ethereumjs-util "^5.1.1" - rlp "^2.0.0" - scrypt-async "^1.2.0" - tweetnacl "0.13.2" - web3 "0.20.2" - eth-query@^2.0.2, eth-query@^2.1.0, eth-query@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" @@ -6808,6 +6669,13 @@ ethashjs@~0.0.7: ethereumjs-util "^4.0.1" miller-rabin "^4.0.0" +ethereum-bloom-filters@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.6.tgz#9cdebb3ec20de96ec4a434c6bad6ea5a513037aa" + integrity sha512-dE9CGNzgOOsdh7msZirvv8qjHtnHpvBlKe2647kM8v+yeF71IRso55jpojemvHV+jMjr48irPWxMRaHuOWzAFA== + dependencies: + js-sha3 "^0.8.0" + ethereum-common@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" @@ -6818,10 +6686,10 @@ ethereum-common@^0.0.18: resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8= -ethereum-types@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/ethereum-types/-/ethereum-types-2.1.4.tgz#5e3f5fd562f354d6334500af7a10bea10da0c7c4" - integrity sha512-plsM51Nj4+yC0G5Z+cxWxQ7OTtwnjKDCT6GZyrpt6NVKTANc5woJTJsjvye2o0xwbbtu89/npFvXpH6D5ohwSA== +ethereum-types@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/ethereum-types/-/ethereum-types-2.1.6.tgz#57d9d515fad86ab987c0f6962c4203be37da8579" + integrity sha512-xaN5TxLvkdFCGjGfUQ5wV00GHzDHStozP1j+K/YdmUeQXVGiD15cogYPhBVWG3pQJM/aBjtYrpMrjywvKkNC4A== dependencies: "@types/node" "*" bignumber.js "~8.0.2" @@ -7018,22 +6886,6 @@ ethereumjs-wallet@0.6.3: utf8 "^3.0.0" uuid "^3.3.2" -ethers@4.0.0-beta.1: - version "4.0.0-beta.1" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.0-beta.1.tgz#0648268b83e0e91a961b1af971c662cdf8cbab6d" - integrity sha512-SoYhktEbLxf+fiux5SfCEwdzWENMvgIbMZD90I62s4GZD9nEjgEWy8ZboI3hck193Vs0bDoTohDISx84f2H2tw== - dependencies: - "@types/node" "^10.3.2" - aes-js "3.0.0" - bn.js "^4.4.0" - elliptic "6.3.3" - hash.js "1.1.3" - js-sha3 "0.5.7" - scrypt-js "2.0.3" - setimmediate "1.0.4" - uuid "2.0.1" - xmlhttprequest "1.8.0" - ethers@4.0.0-beta.3: version "4.0.0-beta.3" resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.0-beta.3.tgz#15bef14e57e94ecbeb7f9b39dd0a4bd435bc9066" @@ -7543,11 +7395,6 @@ find-cache-dir@^2.0.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-npm-prefix@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz#8d8ce2c78b3b4b9e66c8acc6a37c231eb841cfdf" - integrity sha512-KEftzJ+H90x6pcKtdXZEPsQse8/y/UnvzRKrOSQFprnrGaFuJ62fVkP34Iu2IYuMvyauCyoLTNkJZgrrGA2wkA== - find-up@3.0.0, find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -7754,14 +7601,6 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -from2@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-1.3.0.tgz#88413baaa5f9a597cfde9221d86986cd3c061dfd" - integrity sha1-iEE7qqX5pZfP3pIh2GmGzTwGHf0= - dependencies: - inherits "~2.0.1" - readable-stream "~1.1.10" - from2@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" @@ -7851,16 +7690,7 @@ fs-readdir-recursive@^1.1.0: resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== -fs-vacuum@^1.2.10, fs-vacuum@~1.2.10: - version "1.2.10" - resolved "https://registry.yarnpkg.com/fs-vacuum/-/fs-vacuum-1.2.10.tgz#b7629bec07a4031a2548fdf99f5ecf1cc8b31e36" - integrity sha1-t2Kb7AekAxolSP35n17PHMizHjY= - dependencies: - graceful-fs "^4.1.2" - path-is-inside "^1.0.1" - rimraf "^2.5.2" - -fs-write-stream-atomic@^1.0.8, fs-write-stream-atomic@~1.0.10: +fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= @@ -7913,16 +7743,16 @@ functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= -ganache-cli@^6.4.3: - version "6.4.3" - resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.4.3.tgz#2fb66c10f9df157b2cd9aeaf007a9fd47cd79cb1" - integrity sha512-3G+CK4ojipDvxQHlpX8PjqaOMRWVcaLZZSW97Bv7fdcPTXQwkji2yY5CY6J12Atiub4M4aJc0va+q3HXeerbIA== +ganache-cli@^6.6.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.7.0.tgz#b59845578221bdf686cf124d007c5ee62e85a62f" + integrity sha512-9CZsClo9hl5MxGL7hkk14mie89Q94P0idh92jcV7LmppTYTCG7SHatuwcfqN7emFHArMt3fneN4QbH2do2N6Ow== dependencies: - bn.js "4.11.8" - source-map-support "0.5.9" - yargs "11.1.0" + ethereumjs-util "6.1.0" + source-map-support "0.5.12" + yargs "13.2.4" -ganache-core@^2.5.3, ganache-core@^2.6.0: +ganache-core@^2.6.0: version "2.6.1" resolved "https://registry.yarnpkg.com/ganache-core/-/ganache-core-2.6.1.tgz#b97156cd53d0492477c1229d57f8a97763d30d46" integrity sha512-P3X8yo1GAabYuc8SOnWAFyHL8LhOlNOG6amtItgOEDBTUXMKlkGKP42OxjKovxCAlE7d9CXmYXo1Bu0rffBm9w== @@ -7981,25 +7811,16 @@ genfun@^5.0.0: resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== -gentle-fs@^2.0.0, gentle-fs@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/gentle-fs/-/gentle-fs-2.0.1.tgz#585cfd612bfc5cd52471fdb42537f016a5ce3687" - integrity sha512-cEng5+3fuARewXktTEGbwsktcldA+YsnUEaXZwcK/3pjSE1X9ObnTs+/8rYf8s+RnIcQm2D5x3rwpN7Zom8Bew== - dependencies: - aproba "^1.1.2" - fs-vacuum "^1.2.10" - graceful-fs "^4.1.11" - iferr "^0.1.5" - mkdirp "^0.5.1" - path-is-inside "^1.0.2" - read-cmd-shim "^1.0.1" - slide "^1.1.6" - get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-func-name@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" @@ -8327,7 +8148,7 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.0.0, graceful-fs@^4.1.9, graceful-fs@^4.2.0: +graceful-fs@^4.0.0, graceful-fs@^4.1.9: version "4.2.1" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.1.tgz#1c1f0c364882c868f5bff6512146328336a11b1d" integrity sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw== @@ -8474,7 +8295,7 @@ has-to-string-tag-x@^1.2.0: dependencies: has-symbol-support-x "^1.4.1" -has-unicode@^2.0.0, has-unicode@~2.0.1: +has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= @@ -8662,13 +8483,6 @@ hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== -hosted-git-info@^2.8.2: - version "2.8.2" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.2.tgz#a35c3f355ac1249f1093c0c2a542ace8818c171a" - integrity sha512-CyjlXII6LMsPMyUzxpTt8fzh5QwzGqPmQXgY/Jyf4Zfp27t/FvfhwoE/8laaMUcMy816CkWF20I7NeQhwwY88w== - dependencies: - lru-cache "^5.1.1" - hpack.js@^2.1.6: version "2.1.6" resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" @@ -8897,13 +8711,6 @@ identity-obj-proxy@3.0.0: dependencies: harmony-reflect "^1.4.6" -idna-uts46-hx@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" - integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== - dependencies: - punycode "2.1.0" - ieee754@^1.1.4: version "1.1.13" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" @@ -8914,11 +8721,6 @@ iferr@^0.1.5: resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= -iferr@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-1.0.2.tgz#e9fde49a9da06dc4a4194c6c9ed6d08305037a6d" - integrity sha512-9AfeLfji44r5TKInjhz3W9DyZI1zR1JAf2hVBMGhddAKPqBsupb89jGfbCTHIGZd6fGZl9WlHdn4AObygyMKwg== - ignore-by-default@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" @@ -9036,12 +8838,12 @@ indexof@0.0.1: resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= -infer-owner@^1.0.3, infer-owner@^1.0.4: +infer-owner@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== -inflight@^1.0.4, inflight@~1.0.6: +inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= @@ -9054,12 +8856,12 @@ inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, i resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -inherits@2.0.1, inherits@=2.0.1: +inherits@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= -inherits@^2.0.4, inherits@~2.0.4: +inherits@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -9069,24 +8871,10 @@ ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== -init-package-json@^1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe" - integrity sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw== - dependencies: - glob "^7.1.1" - npm-package-arg "^4.0.0 || ^5.0.0 || ^6.0.0" - promzard "^0.3.0" - read "~1.0.1" - read-package-json "1 || 2" - semver "2.x || 3.x || 4 || 5" - validate-npm-package-license "^3.0.1" - validate-npm-package-name "^3.0.0" - -inquirer@6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.2.tgz#46941176f65c9eb20804627149b743a218f25406" - integrity sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA== +inquirer@6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.2.tgz#46941176f65c9eb20804627149b743a218f25406" + integrity sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA== dependencies: ansi-escapes "^3.2.0" chalk "^2.4.2" @@ -9121,10 +8909,24 @@ inquirer@^6.2.2: strip-ansi "^5.1.0" through "^2.3.6" -install@^0.13.0: - version "0.13.0" - resolved "https://registry.yarnpkg.com/install/-/install-0.13.0.tgz#6af6e9da9dd0987de2ab420f78e60d9c17260776" - integrity sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA== +inquirer@^6.4.1: + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" internal-ip@^4.2.0: version "4.3.0" @@ -9280,13 +9082,6 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-cidr@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-cidr/-/is-cidr-3.0.0.tgz#1acf35c9e881063cd5f696d48959b30fed3eed56" - integrity sha512-8Xnnbjsb0x462VoYiGlhEi+drY8SFwrHiSYuzc/CEwco55vkehTaxAyIjEdpi3EMvLPPJAJi9FlzP+h+03gp0Q== - dependencies: - cidr-regex "^2.0.10" - is-color-stop@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" @@ -9399,6 +9194,11 @@ is-fullwidth-code-point@^2.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + is-function@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" @@ -10260,7 +10060,7 @@ js-levenshtein@^1.1.3: resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" integrity sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g== -js-sha3@0.5.7, js-sha3@^0.5.7: +js-sha3@0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= @@ -10275,6 +10075,11 @@ js-sha3@^0.7.0: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.7.0.tgz#0a5c57b36f79882573b2d84051f8bb85dd1bd63a" integrity sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA== +js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" @@ -10648,11 +10453,6 @@ lazy-cache@^1.0.3: resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= -lazy-property@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lazy-property/-/lazy-property-1.0.0.tgz#84ddc4b370679ba8bd4cdcfa4c06b43d57111147" - integrity sha1-hN3Es3Bnm6i9TNz6TAa0PVcREUc= - lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -10833,63 +10633,6 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -libcipm@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/libcipm/-/libcipm-4.0.0.tgz#30053bee09b0b1f4df855137d631a6d27f5d59de" - integrity sha512-5IIamvUIqWYjfNscYdirKisXyaTMw7Mf7yuGrjHH2isz7xBZDCUOIdujZxNk2g6lBBs8AGxYW6lHpNnnt92bww== - dependencies: - bin-links "^1.1.2" - bluebird "^3.5.1" - figgy-pudding "^3.5.1" - find-npm-prefix "^1.0.2" - graceful-fs "^4.1.11" - ini "^1.3.5" - lock-verify "^2.0.2" - mkdirp "^0.5.1" - npm-lifecycle "^3.0.0" - npm-logical-tree "^1.2.1" - npm-package-arg "^6.1.0" - pacote "^9.1.0" - read-package-json "^2.0.13" - rimraf "^2.6.2" - worker-farm "^1.6.0" - -libnpm@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/libnpm/-/libnpm-3.0.1.tgz#0be11b4c9dd4d1ffd7d95c786e92e55d65be77a2" - integrity sha512-d7jU5ZcMiTfBqTUJVZ3xid44fE5ERBm9vBnmhp2ECD2Ls+FNXWxHSkO7gtvrnbLO78gwPdNPz1HpsF3W4rjkBQ== - dependencies: - bin-links "^1.1.2" - bluebird "^3.5.3" - find-npm-prefix "^1.0.2" - libnpmaccess "^3.0.2" - libnpmconfig "^1.2.1" - libnpmhook "^5.0.3" - libnpmorg "^1.0.1" - libnpmpublish "^1.1.2" - libnpmsearch "^2.0.2" - libnpmteam "^1.0.2" - lock-verify "^2.0.2" - npm-lifecycle "^3.0.0" - npm-logical-tree "^1.2.1" - npm-package-arg "^6.1.0" - npm-profile "^4.0.2" - npm-registry-fetch "^4.0.0" - npmlog "^4.1.2" - pacote "^9.5.3" - read-package-json "^2.0.13" - stringify-package "^1.0.0" - -libnpmaccess@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-3.0.2.tgz#8b2d72345ba3bef90d3b4f694edd5c0417f58923" - integrity sha512-01512AK7MqByrI2mfC7h5j8N9V4I7MHJuk9buo8Gv+5QgThpOgpjB7sQBDDkeZqRteFb1QM/6YNdHfG7cDvfAQ== - dependencies: - aproba "^2.0.0" - get-stream "^4.0.0" - npm-package-arg "^6.1.0" - npm-registry-fetch "^4.0.0" - libnpmconfig@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/libnpmconfig/-/libnpmconfig-1.2.1.tgz#c0c2f793a74e67d4825e5039e7a02a0044dfcbc0" @@ -10899,74 +10642,6 @@ libnpmconfig@^1.2.1: find-up "^3.0.0" ini "^1.3.5" -libnpmhook@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/libnpmhook/-/libnpmhook-5.0.3.tgz#4020c0f5edbf08ebe395325caa5ea01885b928f7" - integrity sha512-UdNLMuefVZra/wbnBXECZPefHMGsVDTq5zaM/LgKNE9Keyl5YXQTnGAzEo+nFOpdRqTWI9LYi4ApqF9uVCCtuA== - dependencies: - aproba "^2.0.0" - figgy-pudding "^3.4.1" - get-stream "^4.0.0" - npm-registry-fetch "^4.0.0" - -libnpmorg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/libnpmorg/-/libnpmorg-1.0.1.tgz#5d2503f6ceb57f33dbdcc718e6698fea6d5ad087" - integrity sha512-0sRUXLh+PLBgZmARvthhYXQAWn0fOsa6T5l3JSe2n9vKG/lCVK4nuG7pDsa7uMq+uTt2epdPK+a2g6btcY11Ww== - dependencies: - aproba "^2.0.0" - figgy-pudding "^3.4.1" - get-stream "^4.0.0" - npm-registry-fetch "^4.0.0" - -libnpmpublish@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-1.1.2.tgz#4201cfc4a69c44e6f454ec548fa1cd90f10df0a0" - integrity sha512-2yIwaXrhTTcF7bkJKIKmaCV9wZOALf/gsTDxVSu/Gu/6wiG3fA8ce8YKstiWKTxSFNC0R7isPUb6tXTVFZHt2g== - dependencies: - aproba "^2.0.0" - figgy-pudding "^3.5.1" - get-stream "^4.0.0" - lodash.clonedeep "^4.5.0" - normalize-package-data "^2.4.0" - npm-package-arg "^6.1.0" - npm-registry-fetch "^4.0.0" - semver "^5.5.1" - ssri "^6.0.1" - -libnpmsearch@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/libnpmsearch/-/libnpmsearch-2.0.2.tgz#9a4f059102d38e3dd44085bdbfe5095f2a5044cf" - integrity sha512-VTBbV55Q6fRzTdzziYCr64+f8AopQ1YZ+BdPOv16UegIEaE8C0Kch01wo4s3kRTFV64P121WZJwgmBwrq68zYg== - dependencies: - figgy-pudding "^3.5.1" - get-stream "^4.0.0" - npm-registry-fetch "^4.0.0" - -libnpmteam@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/libnpmteam/-/libnpmteam-1.0.2.tgz#8b48bcbb6ce70dd8150c950fcbdbf3feb6eec820" - integrity sha512-p420vM28Us04NAcg1rzgGW63LMM6rwe+6rtZpfDxCcXxM0zUTLl7nPFEnRF3JfFBF5skF/yuZDUthTsHgde8QA== - dependencies: - aproba "^2.0.0" - figgy-pudding "^3.4.1" - get-stream "^4.0.0" - npm-registry-fetch "^4.0.0" - -libnpx@^10.2.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/libnpx/-/libnpx-10.2.0.tgz#1bf4a1c9f36081f64935eb014041da10855e3102" - integrity sha512-X28coei8/XRCt15cYStbLBph+KGhFra4VQhRBPuH/HHMkC5dxM8v24RVgUsvODKCrUZ0eTgiTqJp6zbl0sskQQ== - dependencies: - dotenv "^5.0.1" - npm-package-arg "^6.0.0" - rimraf "^2.6.2" - safe-buffer "^5.1.0" - update-notifier "^2.3.0" - which "^1.3.0" - y18n "^4.0.0" - yargs "^11.0.0" - lie@~3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" @@ -11064,44 +10739,11 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lock-verify@^2.0.2, lock-verify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/lock-verify/-/lock-verify-2.1.0.tgz#fff4c918b8db9497af0c5fa7f6d71555de3ceb47" - integrity sha512-vcLpxnGvrqisKvLQ2C2v0/u7LVly17ak2YSgoK4PrdsYBXQIax19vhKiLfvKNFx7FRrpTnitrpzF/uuCMuorIg== - dependencies: - npm-package-arg "^6.1.0" - semver "^5.4.1" - -lockfile@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" - integrity sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA== - dependencies: - signal-exit "^3.0.2" - -lodash._baseuniq@~4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" - integrity sha1-DrtE5FaBSveQXGIS+iybLVG4Qeg= - dependencies: - lodash._createset "~4.0.0" - lodash._root "~3.0.0" - -lodash._createset@~4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" - integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= - lodash._reinterpolate@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= -lodash._root@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" - integrity sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI= - lodash.assign@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" @@ -11117,7 +10759,7 @@ lodash.clone@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" integrity sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y= -lodash.clonedeep@^4.5.0, lodash.clonedeep@~4.5.0: +lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= @@ -11227,12 +10869,7 @@ lodash.unescape@4.0.1: resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw= -lodash.union@~4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" - integrity sha1-SLtQiECfFvGCFmZkHETdGqrjzYg= - -lodash.uniq@^4.5.0, lodash.uniq@~4.5.0: +lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= @@ -11242,27 +10879,17 @@ lodash.values@^4.3.0: resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-4.3.0.tgz#a3a6c2b0ebecc5c2cba1c17e6e620fe81b53d347" integrity sha1-o6bCsOvsxcLLocF+bmIP6BtT00c= -lodash.without@~4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" - integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw= - lodash@4.17.14: version "4.17.14" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== -lodash@=4.17.11, "lodash@>=3.5 <5", lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.5.1, lodash@~4.17.10: +"lodash@>=3.5 <5", lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.5.1, lodash@~4.17.10: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== -lodash@=4.17.4: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" - integrity sha1-eCA6TRwyiuHYbcpkYONptX9AVa4= - -lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.2.0: +lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.2.0: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -11444,7 +11071,7 @@ markdown-table@^1.1.3: resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== -marked-terminal@^3.2.0: +marked-terminal@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-3.3.0.tgz#25ce0c0299285998c7636beaefc87055341ba1bd" integrity sha512-+IUQJ5VlZoAFsM5MHNT7g3RHSkA3eETqhRCdXv4niUMAKHQ7lb1yvAcuGPmm4soxhmtX13u4Li6ZToXtvSEH+A== @@ -11456,10 +11083,10 @@ marked-terminal@^3.2.0: node-emoji "^1.4.1" supports-hyperlinks "^1.0.1" -marked@^0.6.2: - version "0.6.3" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.6.3.tgz#79babad78af638ba4d522a9e715cdfdd2429e946" - integrity sha512-Fqa7eq+UaxfMriqzYLayfqAE40WN03jf+zHjT18/uXNuzjq3TY0XTbrAoPeqSJrAmPz11VuUA+kBPYOhHt9oOQ== +marked@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.7.0.tgz#b64201f051d271b1edc10a04d1ae9b74bb8e5c0e" + integrity sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg== matchdep@^2.0.0: version "2.0.0" @@ -11502,11 +11129,6 @@ mdn-data@~1.1.0: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-1.1.4.tgz#50b5d4ffc4575276573c4eedb8780812a8419f01" integrity sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA== -meant@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/meant/-/meant-1.0.1.tgz#66044fea2f23230ec806fb515efea29c44d2115d" - integrity sha512-UakVLFjKkbbUwNWJ2frVLnnAtbb7D7DsloxRd3s/gDpI8rdv8W5Hp3NaDb+POBI1fQdeussER6NB8vpcRURvlg== - media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -11930,11 +11552,6 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= -mute-stream@~0.0.4: - version "0.0.8" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== - mz@^2.6.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -12120,23 +11737,6 @@ node-gyp@^3.8.0: tar "^2.0.0" which "1" -node-gyp@^5.0.2, node-gyp@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.0.3.tgz#80d64c23790244991b6d44532f0a351bedd3dd45" - integrity sha512-z/JdtkFGUm0QaQUusvloyYuGDub3nUbOo5de1Fz57cM++osBTvQatBUSTlF1k/w8vFHPxxXW6zxGvkxXSpaBkQ== - dependencies: - env-paths "^1.0.0" - glob "^7.0.3" - graceful-fs "^4.1.2" - mkdirp "^0.5.0" - nopt "2 || 3" - npmlog "0 || 1 || 2 || 3 || 4" - request "^2.87.0" - rimraf "2" - semver "~5.3.0" - tar "^4.4.8" - which "1" - node-hid@^0.7.9: version "0.7.9" resolved "https://registry.yarnpkg.com/node-hid/-/node-hid-0.7.9.tgz#cc0cdf1418a286a7667f0b63642b5eeb544ccd05" @@ -12284,7 +11884,7 @@ noop-logger@^0.1.1: dependencies: abbrev "1" -nopt@^4.0.1, nopt@~4.0.1: +nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= @@ -12299,7 +11899,7 @@ nopt@~1.0.10: dependencies: abbrev "1" -normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0: +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.4.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== @@ -12343,24 +11943,11 @@ now-and-later@^2.0.0: dependencies: once "^1.3.2" -npm-audit-report@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/npm-audit-report/-/npm-audit-report-1.3.2.tgz#303bc78cd9e4c226415076a4f7e528c89fc77018" - integrity sha512-abeqS5ONyXNaZJPGAf6TOUMNdSe1Y6cpc9MLBRn+CuUoYbfdca6AxOyXVlfIv9OgKX+cacblbG5w7A6ccwoTPw== - dependencies: - cli-table3 "^0.5.0" - console-control-strings "^1.1.0" - npm-bundled@^1.0.1: version "1.0.6" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== -npm-cache-filename@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz#ded306c5b0bfc870a9e9faf823bc5f283e05ae11" - integrity sha1-3tMGxbC/yHCp6fr4I7xfKD4FrhE= - npm-check-updates@^3.1.11: version "3.1.20" resolved "https://registry.yarnpkg.com/npm-check-updates/-/npm-check-updates-3.1.20.tgz#9dd719bc04af9c273b33b44a7d5368d5e85ae9c2" @@ -12387,33 +11974,7 @@ npm-check-updates@^3.1.11: spawn-please "^0.3.0" update-notifier "^3.0.1" -npm-install-checks@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-3.0.0.tgz#d4aecdfd51a53e3723b7b2f93b2ee28e307bc0d7" - integrity sha1-1K7N/VGlPjcjt7L5Oy7ijjB7wNc= - dependencies: - semver "^2.3.0 || 3.x || 4 || 5" - -npm-lifecycle@^3.0.0, npm-lifecycle@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-3.1.2.tgz#06f2253ea3b9e122ce3e55e3496670a810afcc84" - integrity sha512-nhfOcoTHrW1lJJlM2o77vTE2RWR4YOVyj7YzmY0y5itsMjEuoJHteio/ez0BliENEPsNxIUQgwhyEW9dShj3Ww== - dependencies: - byline "^5.0.0" - graceful-fs "^4.1.15" - node-gyp "^5.0.2" - resolve-from "^4.0.0" - slide "^1.1.6" - uid-number "0.0.6" - umask "^1.1.0" - which "^1.3.1" - -npm-logical-tree@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz#44610141ca24664cad35d1e607176193fd8f5b88" - integrity sha512-AJI/qxDB2PWI4LG1CYN579AY1vCiNyWfkiquCsJWqntRu/WwimVrC8yXeILBFHDwxfOejxewlmnvW9XXjMlYIg== - -"npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: +npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" integrity sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA== @@ -12423,7 +11984,7 @@ npm-logical-tree@^1.2.1: semver "^5.5.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.12, npm-packlist@^1.4.4: +npm-packlist@^1.1.12: version "1.4.4" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.4.tgz#866224233850ac534b63d1a6e76050092b5d2f44" integrity sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw== @@ -12448,15 +12009,6 @@ npm-pick-manifest@^2.2.3: npm-package-arg "^6.0.0" semver "^5.4.1" -npm-profile@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/npm-profile/-/npm-profile-4.0.2.tgz#8272a71c19634d0dce9c35a5daf8ee589cbb0f52" - integrity sha512-VRsC04pvRH+9cF+PoVh2nTmJjiG21yu59IHpsBpkxk+jaGAV8lxx96G4SDc0jOHAkfWLXbc6kIph3dGAuRnotQ== - dependencies: - aproba "^1.1.2 || 2" - figgy-pudding "^3.4.1" - npm-registry-fetch "^4.0.0" - npm-registry-fetch@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.0.tgz#5ef75845b605855c7964472542c25da172af8677" @@ -12476,133 +12028,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npm-user-validate@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.0.tgz#8ceca0f5cea04d4e93519ef72d0557a75122e951" - integrity sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE= - -npm@^6.10.2: - version "6.10.3" - resolved "https://registry.yarnpkg.com/npm/-/npm-6.10.3.tgz#83195598f8930a40ee480567883863321626666e" - integrity sha512-AH2uhSRaIMll7xz1JuLA6XbZu5k6DMSc77U6uWfuyBch4EzwpEc5dd54/OsX4Njioi7fSL7YmuPQbqKE2qiklw== - dependencies: - JSONStream "^1.3.5" - abbrev "~1.1.1" - ansicolors "~0.3.2" - ansistyles "~0.1.3" - aproba "^2.0.0" - archy "~1.0.0" - bin-links "^1.1.2" - bluebird "^3.5.5" - byte-size "^5.0.1" - cacache "^12.0.2" - call-limit "^1.1.1" - chownr "^1.1.2" - ci-info "^2.0.0" - cli-columns "^3.1.2" - cli-table3 "^0.5.1" - cmd-shim "~2.0.2" - columnify "~1.5.4" - config-chain "^1.1.12" - detect-indent "~5.0.0" - detect-newline "^2.1.0" - dezalgo "~1.0.3" - editor "~1.0.0" - figgy-pudding "^3.5.1" - find-npm-prefix "^1.0.2" - fs-vacuum "~1.2.10" - fs-write-stream-atomic "~1.0.10" - gentle-fs "^2.0.1" - glob "^7.1.4" - graceful-fs "^4.2.0" - has-unicode "~2.0.1" - hosted-git-info "^2.8.2" - iferr "^1.0.2" - infer-owner "^1.0.4" - inflight "~1.0.6" - inherits "^2.0.4" - ini "^1.3.5" - init-package-json "^1.10.3" - is-cidr "^3.0.0" - json-parse-better-errors "^1.0.2" - lazy-property "~1.0.0" - libcipm "^4.0.0" - libnpm "^3.0.1" - libnpmaccess "^3.0.2" - libnpmhook "^5.0.3" - libnpmorg "^1.0.1" - libnpmsearch "^2.0.2" - libnpmteam "^1.0.2" - libnpx "^10.2.0" - lock-verify "^2.1.0" - lockfile "^1.0.4" - lodash._baseuniq "~4.6.0" - lodash.clonedeep "~4.5.0" - lodash.union "~4.6.0" - lodash.uniq "~4.5.0" - lodash.without "~4.4.0" - lru-cache "^5.1.1" - meant "~1.0.1" - mississippi "^3.0.0" - mkdirp "~0.5.1" - move-concurrently "^1.0.1" - node-gyp "^5.0.3" - nopt "~4.0.1" - normalize-package-data "^2.5.0" - npm-audit-report "^1.3.2" - npm-cache-filename "~1.0.2" - npm-install-checks "~3.0.0" - npm-lifecycle "^3.1.2" - npm-package-arg "^6.1.0" - npm-packlist "^1.4.4" - npm-pick-manifest "^2.2.3" - npm-profile "^4.0.2" - npm-registry-fetch "^4.0.0" - npm-user-validate "~1.0.0" - npmlog "~4.1.2" - once "~1.4.0" - opener "^1.5.1" - osenv "^0.1.5" - pacote "^9.5.4" - path-is-inside "~1.0.2" - promise-inflight "~1.0.1" - qrcode-terminal "^0.12.0" - query-string "^6.8.2" - qw "~1.0.1" - read "~1.0.7" - read-cmd-shim "~1.0.1" - read-installed "~4.0.3" - read-package-json "^2.0.13" - read-package-tree "^5.3.1" - readable-stream "^3.4.0" - readdir-scoped-modules "^1.1.0" - request "^2.88.0" - retry "^0.12.0" - rimraf "^2.6.3" - safe-buffer "^5.1.2" - semver "^5.7.0" - sha "^3.0.0" - slide "~1.1.6" - sorted-object "~2.0.1" - sorted-union-stream "~2.1.3" - ssri "^6.0.1" - stringify-package "^1.0.0" - tar "^4.4.10" - text-table "~0.2.0" - tiny-relative-date "^1.3.0" - uid-number "0.0.6" - umask "~1.1.0" - unique-filename "^1.1.1" - unpipe "~1.0.0" - update-notifier "^2.5.0" - uuid "^3.3.2" - validate-npm-package-license "^3.0.4" - validate-npm-package-name "~3.0.0" - which "^1.3.1" - worker-farm "^1.7.0" - write-file-atomic "^2.4.3" - -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.1, npmlog@^4.0.2, npmlog@^4.1.2, npmlog@~4.1.2: +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.1, npmlog@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== @@ -12746,7 +12172,7 @@ object.defaults@^1.0.0, object.defaults@^1.1.0: for-own "^1.0.0" isobject "^3.0.0" -object.entries@^1.0.4: +object.entries@^1.0.4, object.entries@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.0.tgz#2024fc6d6ba246aee38bdb0ffd5cfbcf371b7519" integrity sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA== @@ -12839,7 +12265,7 @@ on-headers@~1.0.2: resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0, once@~1.4.0: +once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= @@ -12853,11 +12279,6 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -opener@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" - integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== - openzeppelin-solidity@1.12.0: version "1.12.0" resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-1.12.0.tgz#7b9c55975e73370d4541e3442b30cb3d91ac973a" @@ -12950,7 +12371,7 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" -os-locale@^3.0.0: +os-locale@^3.0.0, os-locale@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== @@ -13091,7 +12512,7 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -pacote@^9.1.0, pacote@^9.5.1, pacote@^9.5.3, pacote@^9.5.4: +pacote@^9.5.1: version "9.5.4" resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.4.tgz#8baa26f3d1326d13dc2fe0fe84040a364ae30aad" integrity sha512-nWr0ari6E+apbdoN0hToTKZElO5h4y8DGFa2pyNA5GQIdcP0imC96bA0bbPw1gpeguVIiUgHHaAlq/6xfPp8Qw== @@ -13278,7 +12699,7 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@^1.0.1, path-is-inside@^1.0.2, path-is-inside@~1.0.2: +path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= @@ -14203,35 +13624,30 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier-plugin-solidity@^1.0.0-alpha.27: - version "1.0.0-alpha.30" - resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-alpha.30.tgz#61b6e23620c6999a73662abc157dc66cb1c22da1" - integrity sha512-k32vlCuFshs0lreRhlkMlF+pJFR5VPYkPjf5vnNIewTs+6qqRdmQVLZtmqR8De/fg4H0UqOEpwY8vrTKR8XVIg== +prettier-plugin-solidity@^1.0.0-alpha.32: + version "1.0.0-alpha.34" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-alpha.34.tgz#9a2584fb1773569e2b22c0edba36cd4b80aa3905" + integrity sha512-cg/HrnS4P6m7rdnazZt3QdN7TwuW+TO5quLpTLzvN2BTsbyNFjBjTBUFIJwlFVhjUjw8mQ2uxKfk3b7pSvXJyw== dependencies: dir-to-object "^2.0.0" emoji-regex "^8.0.0" - escape-string-regexp "^1.0.5" + escape-string-regexp "^2.0.0" extract-comments "^1.1.0" prettier "^1.15.3" - semver "^6.1.2" - solidity-parser-antlr "^0.4.8" - string-width "^3.1.0" + semver "^6.3.0" + solidity-parser-antlr "^0.4.11" + string-width "^4.1.0" prettier@1.14.3: version "1.14.3" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895" integrity sha512-qZDVnCrnpsRJJq5nSsiHCE3BYMED2OtsI+cmzIzF1QIfqm5ALf8tEJcO27zV1gKNKRPdhjO0dNWnrzssDQ1tFg== -prettier@^1.14.3, prettier@^1.15.3: +prettier@^1.14.3, prettier@^1.15.3, prettier@^1.18.2: version "1.18.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw== -prettier@^1.17.1: - version "1.17.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.1.tgz#ed64b4e93e370cb8a25b9ef7fef3e4fd1c0995db" - integrity sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg== - pretty-bytes@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.2.0.tgz#96c92c6e95a0b35059253fb33c03e260d40f5a1f" @@ -14295,7 +13711,7 @@ promise-breaker@^4.1.2: resolved "https://registry.yarnpkg.com/promise-breaker/-/promise-breaker-4.1.13.tgz#fe57ad0a1f14912682942391de1e6a2b4e2e447b" integrity sha512-+lGBqmBEgyvKweIrK4smdN1YxdYp5YjSL1us2XhTMBbZf98jdeGys/Edt5S1b1NXMVRQrvh4DrMgGpYPbXZf3g== -promise-inflight@^1.0.1, promise-inflight@~1.0.1: +promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= @@ -14356,13 +13772,6 @@ prompts@^2.1.0: kleur "^3.0.3" sisteransi "^1.0.3" -promzard@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" - integrity sha1-JqXW7ox97kyxIggwWs+5O6OCqe4= - dependencies: - read "1" - prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" @@ -14379,11 +13788,6 @@ property-information@^5.0.0, property-information@^5.0.1: dependencies: xtend "^4.0.1" -proto-list@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" - integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= - protoduck@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" @@ -14526,11 +13930,6 @@ punycode@1.3.2: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= -punycode@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= - punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" @@ -14546,11 +13945,6 @@ q@^1.1.2: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= -qrcode-terminal@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" - integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== - qs@6.7.0, qs@^6.4.0: version "6.7.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" @@ -14570,15 +13964,6 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -query-string@^6.8.2: - version "6.8.2" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.8.2.tgz#36cb7e452ae11a4b5e9efee83375e0954407b2f6" - integrity sha512-J3Qi8XZJXh93t2FiKyd/7Ec6GNifsjKXUsVFkSBj/kjLsDylWhnCz4NT1bkPcKotttPW+QbKGqqPH8OoI2pdqw== - dependencies: - decode-uri-component "^0.2.0" - split-on-first "^1.0.0" - strict-uri-encode "^2.0.0" - querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" @@ -14601,11 +13986,6 @@ quick-format-unescaped@^1.1.2: dependencies: fast-safe-stringify "^1.0.8" -qw@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/qw/-/qw-1.0.1.tgz#efbfdc740f9ad054304426acb183412cc8b996d4" - integrity sha1-77/cdA+a0FQwRCassYNBLMi5ltQ= - raf@3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" @@ -14622,7 +14002,7 @@ randomatic@^3.0.0: kind-of "^6.0.0" math-random "^1.0.1" -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6: +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== @@ -14885,48 +14265,6 @@ react@^16.2.0: prop-types "^15.6.2" scheduler "^0.13.6" -read-cmd-shim@^1.0.1, read-cmd-shim@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b" - integrity sha1-LV0Vd4ajfAVdIgd8MsU/gynpHHs= - dependencies: - graceful-fs "^4.1.2" - -read-installed@~4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/read-installed/-/read-installed-4.0.3.tgz#ff9b8b67f187d1e4c29b9feb31f6b223acd19067" - integrity sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc= - dependencies: - debuglog "^1.0.1" - read-package-json "^2.0.0" - readdir-scoped-modules "^1.0.0" - semver "2 || 3 || 4 || 5" - slide "~1.1.3" - util-extend "^1.0.1" - optionalDependencies: - graceful-fs "^4.1.2" - -"read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13: - version "2.0.13" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a" - integrity sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg== - dependencies: - glob "^7.1.1" - json-parse-better-errors "^1.0.1" - normalize-package-data "^2.0.0" - slash "^1.0.0" - optionalDependencies: - graceful-fs "^4.1.2" - -read-package-tree@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.3.1.tgz#a32cb64c7f31eb8a6f31ef06f9cedf74068fe636" - integrity sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw== - dependencies: - read-package-json "^2.0.0" - readdir-scoped-modules "^1.0.0" - util-promisify "^2.1.0" - read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -14978,13 +14316,6 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -read@1, read@~1.0.1, read@~1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" - integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= - dependencies: - mute-stream "~0.0.4" - "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" @@ -14998,7 +14329,7 @@ read@1, read@~1.0.1, read@~1.0.7: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@1.x >=1.1.9", readable-stream@^1.0.33, readable-stream@~1.1.10: +"readable-stream@1.x >=1.1.9", readable-stream@^1.0.33: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= @@ -15017,15 +14348,6 @@ readable-stream@^3.0.0, readable-stream@^3.0.6, readable-stream@^3.1.1: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" - integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - readable-stream@~1.0.15: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" @@ -15036,16 +14358,6 @@ readable-stream@~1.0.15: isarray "0.0.1" string_decoder "~0.10.x" -readdir-scoped-modules@^1.0.0, readdir-scoped-modules@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" - integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw== - dependencies: - debuglog "^1.0.1" - dezalgo "^1.0.0" - graceful-fs "^4.1.2" - once "^1.3.0" - readdirp@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" @@ -15179,6 +14491,11 @@ regexpp@^2.0.1: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== +regexpp@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.0.0.tgz#dd63982ee3300e67b41c1956f850aa680d9d330e" + integrity sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g== + regexpu-core@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" @@ -15503,7 +14820,7 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.3.2, resolve@^1.5.0 dependencies: path-parse "^1.0.6" -resolve@^1.1.7, resolve@^1.4.0: +resolve@^1.1.7, resolve@^1.11.0, resolve@^1.4.0: version "1.12.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== @@ -15563,11 +14880,6 @@ retry@^0.10.0: resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q= -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= - rgb-regex@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" @@ -15578,7 +14890,7 @@ rgba-regex@^1.0.0: resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= -rimraf@2, rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@2, rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== @@ -15727,11 +15039,6 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -scrypt-async@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/scrypt-async/-/scrypt-async-1.3.1.tgz#a11fd6fac981b4b823ee01dee0221169500ddae9" - integrity sha1-oR/W+smBtLgj7gHe4CIRaVAN2uk= - scrypt-js@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.3.tgz#bb0040be03043da9a012a2cea9fc9f852cfc87d4" @@ -15858,7 +15165,7 @@ semver-utils@^1.1.4: resolved "https://registry.yarnpkg.com/semver-utils/-/semver-utils-1.1.4.tgz#cf0405e669a57488913909fc1c3f29bf2a4871e2" integrity sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA== -"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0: +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== @@ -15878,7 +15185,7 @@ semver@^6.0.0, semver@^6.1.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.0.tgz#e95dc415d45ecf03f2f9f83b264a6b11f49c0cca" integrity sha512-kCqEOOHoBcFs/2Ccuk4Xarm/KiWRSLEX9CAZF8xkJ6ZPlIoTZ8V5f7J16vYLJqDbR7KrxTJpR2lqjIEm2Qx9cQ== -semver@^6.1.2, semver@^6.2.0: +semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -16024,13 +15331,6 @@ sha3@^1.2.2: dependencies: nan "2.13.2" -sha@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/sha/-/sha-3.0.0.tgz#b2f2f90af690c16a3a839a6a6c680ea51fedd1ae" - integrity sha512-DOYnM37cNsLNSGIG/zZWch5CKIRNoLdYUQTQlcgkRkoYIUwDYjqDyye16YcDZg/OPdcbUgTKMjc4SY6TB7ZAPw== - dependencies: - graceful-fs "^4.1.2" - shallow-clone@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-0.1.2.tgz#5909e874ba77106d73ac414cfec1ffca87d97060" @@ -16161,7 +15461,7 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" -slide@^1.1.5, slide@^1.1.6, slide@~1.1.3, slide@~1.1.6: +slide@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= @@ -16258,13 +15558,14 @@ solhint-plugin-prettier@0.0.3: dependencies: prettier-linter-helpers "^1.0.0" -solhint@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/solhint/-/solhint-2.1.2.tgz#3cde9ecbd3c41f095ab9298337db6970df64fa6a" - integrity sha512-ryJrxNyy7pfx5724HxMtsDFrYLmei02ihHe+dRZL67sFWXInbrHXY1jItNNH3qlj5KYTdgSmBC6PRvHcIv0eAA== +solhint@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-2.3.0.tgz#810ef6427c7a6bd2ef1c31f6024ac79c1954d346" + integrity sha512-2yiELLp+MsDtuOTrjc14lgsYmlMchp++SicvqCBu01VXsi9Mk2uynhyN3nBfbGzYq1YfmOEBpUqJfFYXVAR/Ig== dependencies: ajv "^6.6.1" antlr4 "4.7.1" + chalk "^2.4.2" commander "2.18.0" cosmiconfig "^5.0.7" eslint "^5.6.0" @@ -16273,35 +15574,29 @@ solhint@^2.1.2: ignore "^4.0.6" js-yaml "^3.12.0" lodash "^4.17.11" - semver "^6.0.0" + semver "^6.3.0" optionalDependencies: prettier "^1.14.3" -solidity-parser-antlr@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/solidity-parser-antlr/-/solidity-parser-antlr-0.4.2.tgz#b862eba5936e7a90b4f5f1c8eb1d33fe86650f78" - integrity sha512-0OKT2YKZAqPe14HN7Nbo24hjmnyUYh92UjyZG0Zz2rpQhl/w8asX8qHb+ASSXfayQaiW8g9zGIupXEE355tOQQ== +solidity-parser-antlr@0.4.7: + version "0.4.7" + resolved "https://registry.yarnpkg.com/solidity-parser-antlr/-/solidity-parser-antlr-0.4.7.tgz#8e18867c95a956958ed008371e43f9e571dee6af" + integrity sha512-iVjNhgqkXw+o+0E+xoLcji+3KuXLe8Rm8omUuVGhsV14+ZsTwQ70nhBRXg8O3t9xwdS0iST1q9NJ5IqHnqpWkA== + dependencies: + npm-check-updates "^3.1.11" + +solidity-parser-antlr@^0.4.11: + version "0.4.11" + resolved "https://registry.yarnpkg.com/solidity-parser-antlr/-/solidity-parser-antlr-0.4.11.tgz#af43e1f13b3b88309a875455f5d6e565b05ee5f1" + integrity sha512-4jtxasNGmyC0midtjH/lTFPZYvTTUMy6agYcF+HoMnzW8+cqo3piFrINb4ZCzpPW+7tTVFCGa5ubP34zOzeuMg== -solidity-parser-antlr@^0.4.2, solidity-parser-antlr@^0.4.8: +solidity-parser-antlr@^0.4.2: version "0.4.8" resolved "https://registry.yarnpkg.com/solidity-parser-antlr/-/solidity-parser-antlr-0.4.8.tgz#69f77a56ed5596458ee42f7240e80f23b8eb75b9" integrity sha512-HkAAvzLfw2OPmkuGLcy8M5yVaO4PWagmV4t7DSKYi3pXQZG7TPQ2dWl1c0QTp56snX08FeKsBAsPhXY43yjZUQ== dependencies: npm-check-updates "^3.1.11" -sorted-object@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/sorted-object/-/sorted-object-2.0.1.tgz#7d631f4bd3a798a24af1dffcfbfe83337a5df5fc" - integrity sha1-fWMfS9OnmKJK8d/8+/6DM3pd9fw= - -sorted-union-stream@~2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/sorted-union-stream/-/sorted-union-stream-2.1.3.tgz#c7794c7e077880052ff71a8d4a2dbb4a9a638ac7" - integrity sha1-x3lMfgd4gAUv9xqNSi27Sppjisc= - dependencies: - from2 "^1.3.0" - stream-iterate "^1.1.0" - source-list-map@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" @@ -16326,14 +15621,6 @@ source-map-support@0.5.12, source-map-support@^0.5.6, source-map-support@~0.5.10 buffer-from "^1.0.0" source-map "^0.6.0" -source-map-support@0.5.9: - version "0.5.9" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" - integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map-support@^0.4.15: version "0.4.18" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" @@ -16459,11 +15746,6 @@ spdy@^4.0.0: select-hose "^2.0.0" spdy-transport "^3.0.0" -split-on-first@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" - integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== - split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" @@ -16591,14 +15873,6 @@ stream-http@^2.7.2: to-arraybuffer "^1.0.0" xtend "^4.0.0" -stream-iterate@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/stream-iterate/-/stream-iterate-1.2.0.tgz#2bd7c77296c1702a46488b8ad41f79865eecd4e1" - integrity sha1-K9fHcpbBcCpGSIuK1B95hl7s1OE= - dependencies: - readable-stream "^2.1.5" - stream-shift "^1.0.0" - stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" @@ -16617,11 +15891,6 @@ strict-uri-encode@^1.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= -strict-uri-encode@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" - integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= - string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" @@ -16656,6 +15925,15 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" +string-width@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.1.0.tgz#ba846d1daa97c3c596155308063e075ed1c99aff" + integrity sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^5.2.0" + string.prototype.trim@^1.1.2, string.prototype.trim@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" @@ -16693,12 +15971,7 @@ stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -stringify-package@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.0.tgz#e02828089333d7d45cd8c287c30aa9a13375081b" - integrity sha512-JIQqiWmLiEozOC0b0BtxZ/AOUtdUZHCBPgqIZ2kSJJqGwgb9neo44XdTHUC4HZSGqi03hOeB7W/E8rAlKnGe9g== - -strip-ansi@5.2.0, strip-ansi@^5.0.0, strip-ansi@^5.1.0: +strip-ansi@5.2.0, strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== @@ -16775,6 +16048,11 @@ strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +strip-json-comments@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + style-loader@0.23.1: version "0.23.1" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925" @@ -16999,7 +16277,7 @@ tar@^4: safe-buffer "^5.1.2" yallist "^3.0.2" -tar@^4.4.10, tar@^4.4.8: +tar@^4.4.8: version "4.4.10" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.10.tgz#946b2810b9a5e0b26140cf78bea6b0b0d689eba1" integrity sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA== @@ -17096,7 +16374,7 @@ test-exclude@^5.2.3: read-pkg-up "^4.0.0" require-main-filename "^2.0.0" -text-table@0.2.0, text-table@^0.2.0, text-table@~0.2.0: +text-table@0.2.0, text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= @@ -17190,11 +16468,6 @@ tiny-invariant@^1.0.2: resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.0.4.tgz#346b5415fd93cb696b0c4e8a96697ff590f92463" integrity sha512-lMhRd/djQJ3MoaHEBrw8e2/uM4rs9YMNk0iOr8rHQ0QdbM7D4l0gFl3szKdeixrlyfm9Zqi4dxHCM2qVG8ND5g== -tiny-relative-date@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz#fa08aad501ed730f31cc043181d995c39a935e07" - integrity sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A== - tiny-warning@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.2.tgz#1dfae771ee1a04396bdfde27a3adcebc6b648b28" @@ -17365,21 +16638,21 @@ trough@^1.0.0: dependencies: glob "^7.1.2" -truffle-flattener@^1.2.3: - version "1.3.0" - resolved "https://registry.yarnpkg.com/truffle-flattener/-/truffle-flattener-1.3.0.tgz#a5b0340897e32cf8389fea105b52fa93c335f04c" - integrity sha512-ppJ9xI0tDuvCYjQlcWwMBcOKZph5U4YpG/gChyUVDxOjUIniG5g7y9vZho2PRj1FohPPnOjg1KOAVNlk/bPZrw== +truffle-flattener@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/truffle-flattener/-/truffle-flattener-1.4.2.tgz#7460d0eec88ac67b150e8de3476f55d4420a4ba0" + integrity sha512-7qUIzaW8a4vI4nui14wsytht2oaqvqnZ1Iet2wRq2T0bCJ0wb6HByMKQhZKpU46R+n5BMTY4K5n+0ITyeNlmuQ== dependencies: "@resolver-engine/imports-fs" "^0.2.2" find-up "^2.1.0" mkdirp "^0.5.1" - solidity-parser-antlr "^0.4.0" + solidity-parser-antlr "^0.4.11" tsort "0.0.1" -truffle@^5.0.15: - version "5.0.31" - resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.0.31.tgz#372a826e330720e29514458ff25750aa2b5efa65" - integrity sha512-dNBH5OFcqHXCaaQO0YGcEtNarIPcToU+tbq+lBph4tI2YjboiwakguvrNCL+cTP4sySKqeg+2QA1W5miyOQGpA== +truffle@^5.0.35: + version "5.0.41" + resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.0.41.tgz#a7ef0b6e97d3a22aaf5da2cc4ef6a13f39596ffb" + integrity sha512-vQm7OHRN8qh4Te3QZ9A74JsDoZfcYoJLuI1FrcLpJoicdTrzCZU4UXGIYFUIZ+UmOTlMS07lUufxDSraSHxpdg== dependencies: app-module-path "^2.2.0" mocha "5.2.0" @@ -17440,11 +16713,6 @@ tweetnacl-util@^0.15.0: resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.0.tgz#4576c1cee5e2d63d207fee52f1ba02819480bc75" integrity sha1-RXbBzuXi1j0gf+5S8boCgZSAvHU= -tweetnacl@0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.13.2.tgz#453161770469d45cd266c36404e2bc99a8fa9944" - integrity sha1-RTFhdwRp1FzSZsNkBOK8maj6mUQ= - tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" @@ -17535,21 +16803,11 @@ uglify-js@^3.1.4: commander "~2.20.0" source-map "~0.6.1" -uid-number@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE= - ultron@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== -umask@^1.1.0, umask@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" - integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= - unbzip2-stream@^1.0.9: version "1.3.3" resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz#d156d205e670d8d8c393e1c02ebd506422873f6a" @@ -17703,7 +16961,7 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -unorm@^1.3.3, unorm@^1.4.1: +unorm@^1.3.3: version "1.6.0" resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af" integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== @@ -17736,7 +16994,7 @@ upath@^1.1.1: resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== -update-notifier@^2.3.0, update-notifier@^2.5.0: +update-notifier@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" integrity sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw== @@ -17865,28 +17123,11 @@ utf8@3.0.0, utf8@^3.0.0: resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== -utf8@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.2.tgz#1fa0d9270e9be850d9b05027f63519bf46457d96" - integrity sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY= - util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -util-extend@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f" - integrity sha1-p8IW0mdUUWljeztu3GypEZ4v+T8= - -util-promisify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/util-promisify/-/util-promisify-2.1.0.tgz#3c2236476c4d32c5ff3c47002add7c13b9a82a53" - integrity sha1-PCI2R2xNMsX/PEcAKt18E7moKlM= - dependencies: - object.getownpropertydescriptors "^2.0.3" - util.promisify@1.0.0, util.promisify@^1.0.0, util.promisify@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" @@ -17929,6 +17170,11 @@ uuid@^3.0.1, uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== +v8-compile-cache@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" + integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== + v8flags@^3.0.1: version "3.1.3" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.1.3.tgz#fc9dc23521ca20c5433f81cc4eb9b3033bb105d8" @@ -17941,7 +17187,7 @@ valid-url@^1.0.9: resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200" integrity sha1-HBRHm0DxOXp1eC8RXkCGRHQzogA= -validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: +validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== @@ -17949,7 +17195,7 @@ validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -validate-npm-package-name@^3.0.0, validate-npm-package-name@~3.0.0: +validate-npm-package-name@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" integrity sha1-X6kS2B630MdK/BQN5zF/DKffQ34= @@ -18127,13 +17373,6 @@ wbuf@^1.1.0, wbuf@^1.7.3: dependencies: minimalistic-assert "^1.0.0" -wcwidth@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= - dependencies: - defaults "^1.0.3" - web-namespaces@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.3.tgz#9bbf5c99ff0908d2da031f1d732492a96571a83f" @@ -18166,15 +17405,6 @@ web3-bzz@1.0.0-beta.35: swarm-js "0.1.37" underscore "1.8.3" -web3-bzz@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.0.0-beta.37.tgz#59e3e4f5a9d732731008fe9165c3ec8bf85d502f" - integrity sha512-E+dho49Nsm/QpQvYWOF35YDsQrMvLB19AApENxhlQsu6HpWQt534DQul0t3Y/aAh8rlKD6Kanxt8LhHDG3vejQ== - dependencies: - got "7.1.0" - swarm-js "0.1.37" - underscore "1.8.3" - web3-core-helpers@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.30.tgz#a000cee3f0a09eea13d74b5730335d4635fe1f2f" @@ -18202,15 +17432,6 @@ web3-core-helpers@1.0.0-beta.35: web3-eth-iban "1.0.0-beta.35" web3-utils "1.0.0-beta.35" -web3-core-helpers@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.37.tgz#04ec354b7f5c57234c309eea2bda9bf1f2fe68ba" - integrity sha512-efaLOzN28RMnbugnyelgLwPWWaSwElQzcAJ/x3PZu+uPloM/lE5x0YuBKvIh7/PoSMlHqtRWj1B8CpuQOUQ5Ew== - dependencies: - underscore "1.8.3" - web3-eth-iban "1.0.0-beta.37" - web3-utils "1.0.0-beta.37" - web3-core-method@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.0.0-beta.30.tgz#8dd6ff789e8d1563b8786d13a78c7facefae471c" @@ -18244,17 +17465,6 @@ web3-core-method@1.0.0-beta.35: web3-core-subscriptions "1.0.0-beta.35" web3-utils "1.0.0-beta.35" -web3-core-method@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.0.0-beta.37.tgz#53d148e63f818b23461b26307afdfbdaa9457744" - integrity sha512-pKWFUeqnVmzx3VrZg+CseSdrl/Yrk2ioid/HzolNXZE6zdoITZL0uRjnsbqXGEzgRRd1Oe/pFndpTlRsnxXloA== - dependencies: - underscore "1.8.3" - web3-core-helpers "1.0.0-beta.37" - web3-core-promievent "1.0.0-beta.37" - web3-core-subscriptions "1.0.0-beta.37" - web3-utils "1.0.0-beta.37" - web3-core-promievent@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.0.0-beta.30.tgz#6205192bfb097441132226a5939ec5aed3a8a291" @@ -18279,14 +17489,6 @@ web3-core-promievent@1.0.0-beta.35: any-promise "1.3.0" eventemitter3 "1.1.1" -web3-core-promievent@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.0.0-beta.37.tgz#4e51c469d0a7ac0a969885a4dbcde8504abe5b02" - integrity sha512-GTF2r1lP8nJBeA5Gxq5yZpJy9l8Fb9CXGZPfF8jHvaRdQHtm2Z+NDhqYmF833lcdkokRSyfPcXlz1mlWeClFpg== - dependencies: - any-promise "1.3.0" - eventemitter3 "1.1.1" - web3-core-requestmanager@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.0.0-beta.30.tgz#6ee56fb8a6cb85fd01b3080854f50d64e52240c6" @@ -18320,17 +17522,6 @@ web3-core-requestmanager@1.0.0-beta.35: web3-providers-ipc "1.0.0-beta.35" web3-providers-ws "1.0.0-beta.35" -web3-core-requestmanager@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.0.0-beta.37.tgz#721a75df5920621bff42d9d74f7a64413675d56b" - integrity sha512-66VUqye5BGp1Zz1r8psCxdNH+GtTjaFwroum2Osx+wbC5oRjAiXkkadiitf6wRb+edodjEMPn49u7B6WGNuewQ== - dependencies: - underscore "1.8.3" - web3-core-helpers "1.0.0-beta.37" - web3-providers-http "1.0.0-beta.37" - web3-providers-ipc "1.0.0-beta.37" - web3-providers-ws "1.0.0-beta.37" - web3-core-subscriptions@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.30.tgz#31652c75356c3f67e5a19cd14b8d314bad4e2127" @@ -18358,15 +17549,6 @@ web3-core-subscriptions@1.0.0-beta.35: underscore "1.8.3" web3-core-helpers "1.0.0-beta.35" -web3-core-subscriptions@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.37.tgz#40de5e2490cc05b15faa8f935c97fd48d670cd9a" - integrity sha512-FdXl8so9kwkRRWziuCSpFsAuAdg9KvpXa1fQlT16uoGcYYfxwFO/nkwyBGQzkZt7emShI2IRugcazyPCZDwkOA== - dependencies: - eventemitter3 "1.1.1" - underscore "1.8.3" - web3-core-helpers "1.0.0-beta.37" - web3-core@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.0.0-beta.30.tgz#f75f4d3b85be74c7674637921c3e013bc5d27679" @@ -18397,16 +17579,6 @@ web3-core@1.0.0-beta.35: web3-core-requestmanager "1.0.0-beta.35" web3-utils "1.0.0-beta.35" -web3-core@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.0.0-beta.37.tgz#66c2c7000772c9db36d737ada31607ace09b7e90" - integrity sha512-cIwEqCj7OJyefQNauI0HOgW4sSaOQ98V99H2/HEIlnCZylsDzfw7gtQUdwnRFiIyIxjbWy3iWsjwDPoXNPZBYg== - dependencies: - web3-core-helpers "1.0.0-beta.37" - web3-core-method "1.0.0-beta.37" - web3-core-requestmanager "1.0.0-beta.37" - web3-utils "1.0.0-beta.37" - web3-eth-abi@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.30.tgz#6ea52c999a8505b47c2f88ba61d2a680a1066409" @@ -18437,15 +17609,6 @@ web3-eth-abi@1.0.0-beta.35: web3-core-helpers "1.0.0-beta.35" web3-utils "1.0.0-beta.35" -web3-eth-abi@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.37.tgz#55592fa9cd2427d9f0441d78f3b8d0c1359a2a24" - integrity sha512-g9DKZGM2OqwKp/tX3W/yihcj7mQCtJ6CXyZXEIZfuDyRBED/iSEIFfieDOd+yo16sokLMig6FG7ADhhu+19hdA== - dependencies: - ethers "4.0.0-beta.1" - underscore "1.8.3" - web3-utils "1.0.0-beta.37" - web3-eth-abi@^1.0.0-beta.24: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.1.tgz#9b915b1c9ebf82f70cca631147035d5419064689" @@ -18455,6 +17618,15 @@ web3-eth-abi@^1.0.0-beta.24: underscore "1.9.1" web3-utils "1.2.1" +web3-eth-abi@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.2.tgz#d5616d88a90020f894763423a9769f2da11fe37a" + integrity sha512-Yn/ZMgoOLxhTVxIYtPJ0eS6pnAnkTAaJgUJh1JhZS4ekzgswMfEYXOwpMaD5eiqPJLpuxmZFnXnBZlnQ1JMXsw== + dependencies: + ethers "4.0.0-beta.3" + underscore "1.9.1" + web3-utils "1.2.2" + web3-eth-accounts@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.30.tgz#8f0a1b342c4283812372242a6e2df268887b3b70" @@ -18503,22 +17675,6 @@ web3-eth-accounts@1.0.0-beta.35: web3-core-method "1.0.0-beta.35" web3-utils "1.0.0-beta.35" -web3-eth-accounts@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.37.tgz#0a5a9f14a6c3bd285e001c15eb3bb38ffa4b5204" - integrity sha512-uvbHL62/zwo4GDmwKdqH9c/EgYd8QVnAfpVw8D3epSISpgbONNY7Hr4MRMSd/CqAP12l2Ls9JVQGLhhC83bW6g== - dependencies: - any-promise "1.3.0" - crypto-browserify "3.12.0" - eth-lib "0.2.7" - scrypt.js "0.2.0" - underscore "1.8.3" - uuid "2.0.1" - web3-core "1.0.0-beta.37" - web3-core-helpers "1.0.0-beta.37" - web3-core-method "1.0.0-beta.37" - web3-utils "1.0.0-beta.37" - web3-eth-contract@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.30.tgz#d7eba2385084dff3c75aac48235af2c8d2d6a258" @@ -18561,34 +17717,6 @@ web3-eth-contract@1.0.0-beta.35: web3-eth-abi "1.0.0-beta.35" web3-utils "1.0.0-beta.35" -web3-eth-contract@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.37.tgz#87f93c95ed16f320ba54943b7886890de6766013" - integrity sha512-h1B3A8Z/C7BlnTCHkrWbXZQTViDxfR12lKMeTkT8Sqj5phFmxrBlPE4ORy4lf1Dk5b23mZYE0r/IRACx4ThCrQ== - dependencies: - underscore "1.8.3" - web3-core "1.0.0-beta.37" - web3-core-helpers "1.0.0-beta.37" - web3-core-method "1.0.0-beta.37" - web3-core-promievent "1.0.0-beta.37" - web3-core-subscriptions "1.0.0-beta.37" - web3-eth-abi "1.0.0-beta.37" - web3-utils "1.0.0-beta.37" - -web3-eth-ens@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.0.0-beta.37.tgz#714ecb01eb447ee3eb39b2b20a10ae96edb1f01f" - integrity sha512-dR3UkrVzdRrJhfP57xBPx0CMiVnCcYFvh+u2XMkGydrhHgupSUkjqGr89xry/j1T0BkuN9mikpbyhdCVMXqMbg== - dependencies: - eth-ens-namehash "2.0.8" - underscore "1.8.3" - web3-core "1.0.0-beta.37" - web3-core-helpers "1.0.0-beta.37" - web3-core-promievent "1.0.0-beta.37" - web3-eth-abi "1.0.0-beta.37" - web3-eth-contract "1.0.0-beta.37" - web3-utils "1.0.0-beta.37" - web3-eth-iban@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.30.tgz#3b080a5c4da1fa37477b17e4c900781b92150645" @@ -18613,14 +17741,6 @@ web3-eth-iban@1.0.0-beta.35: bn.js "4.11.6" web3-utils "1.0.0-beta.35" -web3-eth-iban@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.37.tgz#313a3f18ae2ab00ba98678ea1156b09ef32a3655" - integrity sha512-WQRniGJFxH/XCbd7miO6+jnUG+6bvuzfeufPIiOtCbeIC1ypp1kSqER8YVBDrTyinU1xnf1U5v0KBZ2yiWBJxQ== - dependencies: - bn.js "4.11.6" - web3-utils "1.0.0-beta.37" - web3-eth-personal@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.30.tgz#8bd4ef40b3b5f841dd3a8b97873d9dc791caf748" @@ -18654,17 +17774,6 @@ web3-eth-personal@1.0.0-beta.35: web3-net "1.0.0-beta.35" web3-utils "1.0.0-beta.35" -web3-eth-personal@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.37.tgz#187472f51861e2b6d45da43411801bc91a859f9a" - integrity sha512-B4dZpGbD+nGnn48i6nJBqrQ+HB7oDmd+Q3wGRKOsHSK5HRWO/KwYeA7wgwamMAElkut50lIsT9EJl4Apfk3G5Q== - dependencies: - web3-core "1.0.0-beta.37" - web3-core-helpers "1.0.0-beta.37" - web3-core-method "1.0.0-beta.37" - web3-net "1.0.0-beta.37" - web3-utils "1.0.0-beta.37" - web3-eth@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.0.0-beta.30.tgz#029b15e14cb608b9cfe02603b504d651870f0501" @@ -18719,25 +17828,6 @@ web3-eth@1.0.0-beta.35: web3-net "1.0.0-beta.35" web3-utils "1.0.0-beta.35" -web3-eth@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.0.0-beta.37.tgz#0e8ffcd857a5f85ae4b5f052ad831ca5c56f4f74" - integrity sha512-Eb3aGtkz3G9q+Z9DKgSQNbn/u8RtcZQQ0R4sW9hy5KK47GoT6vab5c6DiD3QWzI0BzitHzR5Ji+3VHf/hPUGgw== - dependencies: - underscore "1.8.3" - web3-core "1.0.0-beta.37" - web3-core-helpers "1.0.0-beta.37" - web3-core-method "1.0.0-beta.37" - web3-core-subscriptions "1.0.0-beta.37" - web3-eth-abi "1.0.0-beta.37" - web3-eth-accounts "1.0.0-beta.37" - web3-eth-contract "1.0.0-beta.37" - web3-eth-ens "1.0.0-beta.37" - web3-eth-iban "1.0.0-beta.37" - web3-eth-personal "1.0.0-beta.37" - web3-net "1.0.0-beta.37" - web3-utils "1.0.0-beta.37" - web3-net@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.0.0-beta.30.tgz#0a352ede296e6d4b7f88b67aa474e49703de73bf" @@ -18765,15 +17855,6 @@ web3-net@1.0.0-beta.35: web3-core-method "1.0.0-beta.35" web3-utils "1.0.0-beta.35" -web3-net@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.0.0-beta.37.tgz#b494136043f3c6ba84fe4a47d4c028c2a63c9a8e" - integrity sha512-xG/uBtMdDa1UMXw9KjDUgf3fXA/fDEJUYUS0TDn+U9PMgngA+UVECHNNvQTrVVDxEky38V3sahwIDiopNsQdsw== - dependencies: - web3-core "1.0.0-beta.37" - web3-core-method "1.0.0-beta.37" - web3-utils "1.0.0-beta.37" - web3-provider-engine@14.0.6: version "14.0.6" resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.0.6.tgz#cbdd66fe20c0136a3a495cbe40d18b6c4160d5f0" @@ -18851,14 +17932,6 @@ web3-providers-http@1.0.0-beta.35: web3-core-helpers "1.0.0-beta.35" xhr2-cookies "1.1.0" -web3-providers-http@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.0.0-beta.37.tgz#c06efd60e16e329e25bd268d2eefc68d82d13651" - integrity sha512-FM/1YDB1jtZuTo78habFj7S9tNHoqt0UipdyoQV29b8LkGKZV9Vs3is8L24hzuj1j/tbwkcAH+ewIseHwu0DTg== - dependencies: - web3-core-helpers "1.0.0-beta.37" - xhr2-cookies "1.1.0" - web3-providers-ipc@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.0.0-beta.30.tgz#ee2d8d18a3f120b777044a56e67e0aee20854587" @@ -18886,15 +17959,6 @@ web3-providers-ipc@1.0.0-beta.35: underscore "1.8.3" web3-core-helpers "1.0.0-beta.35" -web3-providers-ipc@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.0.0-beta.37.tgz#55d247e7197257ca0c3e4f4b0fe1561311b9d5b9" - integrity sha512-NdRPRxYMIU0C3u18NI8u4bwbhI9pCg5nRgDGYcmSAx5uOBxiYcQy+hb0WkJRRhBoyIXJmy+s26FoH8904+UnPg== - dependencies: - oboe "2.1.3" - underscore "1.8.3" - web3-core-helpers "1.0.0-beta.37" - web3-providers-ws@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.0.0-beta.30.tgz#9ae69a9ead8a8761f86379fa347b6db5ae44b12d" @@ -18922,15 +17986,6 @@ web3-providers-ws@1.0.0-beta.35: web3-core-helpers "1.0.0-beta.35" websocket "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible" -web3-providers-ws@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.0.0-beta.37.tgz#77c15aebc00b75d760d22d063ac2e415bdbef72f" - integrity sha512-8p6ZLv+1JYa5Vs8oBn33Nn3VGFBbF+wVfO+b78RJS1Qf1uIOzjFVDk3XwYDD7rlz9G5BKpxhaQw+6EGQ7L02aw== - dependencies: - underscore "1.8.3" - web3-core-helpers "1.0.0-beta.37" - websocket "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible" - web3-shh@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.0.0-beta.30.tgz#2bfe3220d958ff4ca592017790852bc57b7b0ca7" @@ -18961,16 +18016,6 @@ web3-shh@1.0.0-beta.35: web3-core-subscriptions "1.0.0-beta.35" web3-net "1.0.0-beta.35" -web3-shh@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.0.0-beta.37.tgz#3246ce5229601b525020828a56ee283307057105" - integrity sha512-h5STG/xqZNQWtCLYOu7NiMqwqPea8SfkKQUPUFxXKIPVCFVKpHuQEwW1qcPQRJMLhlQIv17xuoUe1A+RzDNbrw== - dependencies: - web3-core "1.0.0-beta.37" - web3-core-method "1.0.0-beta.37" - web3-core-subscriptions "1.0.0-beta.37" - web3-net "1.0.0-beta.37" - web3-utils@1.0.0-beta.30: version "1.0.0-beta.30" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.0.0-beta.30.tgz#eae408cc8d6d6fecc8d5097cfead51773f231ff9" @@ -19010,19 +18055,6 @@ web3-utils@1.0.0-beta.35: underscore "1.8.3" utf8 "2.1.1" -web3-utils@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.0.0-beta.37.tgz#ab868a90fe5e649337e38bdaf72133fcbf4d414d" - integrity sha512-kA1fyhO8nKgU21wi30oJQ/ssvu+9srMdjOTKbHYbQe4ATPcr5YNwwrxG3Bcpbu1bEwRUVKHCkqi+wTvcAWBdlQ== - dependencies: - bn.js "4.11.6" - eth-lib "0.1.27" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randomhex "0.1.5" - underscore "1.8.3" - utf8 "2.1.1" - web3-utils@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.1.tgz#21466e38291551de0ab34558de21512ac4274534" @@ -19036,16 +18068,19 @@ web3-utils@1.2.1: underscore "1.9.1" utf8 "3.0.0" -web3@0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/web3/-/web3-0.20.2.tgz#c54dac5fc0e377399c04c1a6ecbb12e4513278d6" - integrity sha1-xU2sX8DjdzmcBMGm7LsS5FEyeNY= +web3-utils@1.2.2, web3-utils@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.2.tgz#b53a08c40d2c3f31d3c4a28e7d749405df99c8c0" + integrity sha512-joF+s3243TY5cL7Z7y4h1JsJpUCf/kmFmj+eJar7Y2yNIGVcW961VyrAms75tjUysSuHaUQ3eQXjBEUJueT52A== dependencies: - bignumber.js "git+https://github.com/frozeman/bignumber.js-nolookahead.git" - crypto-js "^3.1.4" - utf8 "^2.1.1" - xhr2 "*" - xmlhttprequest "*" + bn.js "4.11.8" + eth-lib "0.2.7" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" web3@1.0.0-beta.30: version "1.0.0-beta.30" @@ -19086,19 +18121,6 @@ web3@1.0.0-beta.35: web3-shh "1.0.0-beta.35" web3-utils "1.0.0-beta.35" -web3@1.0.0-beta.37: - version "1.0.0-beta.37" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.0.0-beta.37.tgz#b42c30e67195f816cd19d048fda872f70eca7083" - integrity sha512-8XLgUspdzicC/xHG82TLrcF/Fxzj2XYNJ1KTYnepOI77bj5rvpsxxwHYBWQ6/JOjk0HkZqoBfnXWgcIHCDhZhQ== - dependencies: - web3-bzz "1.0.0-beta.37" - web3-core "1.0.0-beta.37" - web3-eth "1.0.0-beta.37" - web3-eth-personal "1.0.0-beta.37" - web3-net "1.0.0-beta.37" - web3-shh "1.0.0-beta.37" - web3-utils "1.0.0-beta.37" - webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -19469,7 +18491,7 @@ workbox-window@^4.3.1: dependencies: workbox-core "^4.3.1" -worker-farm@^1.5.2, worker-farm@^1.6.0, worker-farm@^1.7.0: +worker-farm@^1.5.2, worker-farm@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== @@ -19491,6 +18513,15 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -19523,15 +18554,6 @@ write-file-atomic@^2.0.0: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write-file-atomic@^2.3.0, write-file-atomic@^2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" - integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - write@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" @@ -19613,7 +18635,7 @@ xhr2-cookies@1.1.0: dependencies: cookiejar "^2.1.1" -xhr2@*, xhr2@0.1.4: +xhr2@0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/xhr2/-/xhr2-0.1.4.tgz#7f87658847716db5026323812f818cadab387a5f" integrity sha1-f4dliEdxbbUCYyOBL4GMras4el8= @@ -19651,7 +18673,7 @@ xmlchars@^1.3.1: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-1.3.1.tgz#1dda035f833dbb4f86a0c28eaa6ca769214793cf" integrity sha512-tGkGJkN8XqCod7OT+EvGYK5Z4SfDQGD30zAa58OcnAa0RRWgzUEK72tkXhsX1FZd+rgnhRxFtmO+ihkp8LHSkw== -xmlhttprequest@*, xmlhttprequest@1.8.0: +xmlhttprequest@1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= @@ -19718,6 +18740,14 @@ yargs-parser@^11.1.1: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^13.1.0: + version "13.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" + integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" @@ -19775,6 +18805,23 @@ yargs@12.0.2: y18n "^3.2.1 || ^4.0.0" yargs-parser "^10.1.0" +yargs@13.2.4: + version "13.2.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + yargs@^10.0.3: version "10.1.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5" From 7a54e584d547fbfa13893ae25014176aeb01efbf Mon Sep 17 00:00:00 2001 From: Gerardo Nardelli Date: Tue, 29 Oct 2019 11:55:47 -0300 Subject: [PATCH 3/7] Support alternative receiver in Oracle (#221) * Add transfer watcher * Filter userRequestForAffirmation events in Transfer events * Add extended oracle composer file --- contracts | 2 +- .../oracle-docker-compose.yml | 26 ++++++ deployment/roles/oracle/tasks/post_config.yml | 15 +++ .../roles/oracle/templates/poabridge.j2 | 17 ++-- e2e-commons/up.sh | 2 + oracle-e2e/test/ercToErc.js | 49 +++++++++- oracle-e2e/test/ercToNative.js | 51 ++++++++++- .../affirmation-request-watcher.config.js | 31 ++----- oracle/config/transfer-watcher.config.js | 42 +++++++++ oracle/docker-compose-transfer.yml | 91 +++++++++++++++++++ oracle/package.json | 3 +- oracle/src/events/processTransfers/index.js | 20 +++- oracle/src/utils/constants.js | 1 + oracle/src/watcher.js | 6 +- ui/src/stores/TxStore.js | 2 +- 15 files changed, 316 insertions(+), 42 deletions(-) create mode 100644 oracle/config/transfer-watcher.config.js create mode 100644 oracle/docker-compose-transfer.yml diff --git a/contracts b/contracts index 86b35f838..39910b771 160000 --- a/contracts +++ b/contracts @@ -1 +1 @@ -Subproject commit 86b35f8382d5cb98e5738128a0c1a3718c471c72 +Subproject commit 39910b771b1a93a10db829a0b3dddd074c9e1b4e diff --git a/deployment-e2e/molecule/ultimate-commons/oracle-docker-compose.yml b/deployment-e2e/molecule/ultimate-commons/oracle-docker-compose.yml index b2fc8f480..cbef48657 100644 --- a/deployment-e2e/molecule/ultimate-commons/oracle-docker-compose.yml +++ b/deployment-e2e/molecule/ultimate-commons/oracle-docker-compose.yml @@ -32,5 +32,31 @@ content: "{{ docker_compose_parsed | to_yaml }}" dest: "/home/poadocker/bridge/oracle/docker-compose.yml" + - name: Slurp docker compose extended file + slurp: + src: "/home/poadocker/bridge/oracle/docker-compose-transfer.yml" + register: docker_compose_extended_slurp + - name: Parse docker compose file + set_fact: + docker_compose_extended_parsed: "{{ docker_compose_extended_slurp['content'] | b64decode | from_yaml }}" + + - name: Add the external network used to connect to Parity nodes in compose extended file + set_fact: + docker_compose_extended_parsed: "{{ docker_compose_extended_parsed |combine({'networks': {'ultimate': {'external': 'true'}}}, recursive=True) }}" + + - name: Add all Oracle containers to the network in compose extended file + set_fact: + docker_compose_extended_parsed: "{{ docker_compose_extended_parsed | combine({'services': {item: {'networks': docker_compose_extended_parsed.services[item].networks | union(['ultimate'])}}}, recursive=True) }}" + with_items: "{{ docker_compose_extended_parsed.services }}" + + - name: Expose Redis port to allow connecting from redis-cli in compose extended file + set_fact: + docker_compose_extended_parsed: "{{ docker_compose_extended_parsed | combine({'services': {'redis': {'ports': ['6379:6379']}}}, recursive=True) }}" + + - name: Write new docker-compose extended file + copy: + content: "{{ docker_compose_extended_parsed | to_yaml }}" + dest: "/home/poadocker/bridge/oracle/docker-compose-transfer.yml" + - name: start the service shell: service poabridge start diff --git a/deployment/roles/oracle/tasks/post_config.yml b/deployment/roles/oracle/tasks/post_config.yml index 18441f021..1ba073649 100644 --- a/deployment/roles/oracle/tasks/post_config.yml +++ b/deployment/roles/oracle/tasks/post_config.yml @@ -25,6 +25,21 @@ set_fact: ORACLE_VALIDATOR_ADDRESS: "{{ VADDRESS.stdout }}" +- name: Get foreign erc type + become_user: "{{ compose_service_user }}" + shell: docker-compose run --entrypoint "node scripts/initialChecks.js" bridge_affirmation + args: + chdir: "{{ bridge_path }}/oracle" + register: ERCTYPE + +- name: Set FOREIGN_ERC_TYPE variable + set_fact: + FOREIGN_ERC_TYPE: "{{ (ERCTYPE.stdout).foreignERC | default('') }}" + +- name: Extend docker compose file + set_fact: composefileoverride="-f docker-compose-transfer.yml" + when: ORACLE_BRIDGE_MODE == "ERC_TO_NATIVE" or ( ORACLE_BRIDGE_MODE == "ERC_TO_ERC" and FOREIGN_ERC_TYPE != "ERC677") + - name: Install .key config template: src: key.j2 diff --git a/deployment/roles/oracle/templates/poabridge.j2 b/deployment/roles/oracle/templates/poabridge.j2 index f06883b48..370c9cdf3 100644 --- a/deployment/roles/oracle/templates/poabridge.j2 +++ b/deployment/roles/oracle/templates/poabridge.j2 @@ -16,6 +16,7 @@ WORKDIR="{{ '/home/' + compose_service_user | default('poadocker') + '/' + bridg keyfile="{{ keyfile_path }}" vaddr="ORACLE_VALIDATOR_ADDRESS=" vkey="ORACLE_VALIDATOR_ADDRESS_PRIVATE_KEY=" +composefileoverride="{{ composefileoverride | default('') }}" #Parsing file content and add key to variable while read -r line @@ -33,30 +34,30 @@ done < $keyfile start(){ echo "Starting bridge.." cd $WORKDIR - sudo -u "{{ compose_service_user }}" /usr/local/bin/docker-compose down -v - sudo -u "{{ compose_service_user }}" /usr/local/bin/docker-compose rm -fv - sudo -u "{{ compose_service_user }}" ORACLE_VALIDATOR_ADDRESS=$vaddr ORACLE_VALIDATOR_ADDRESS_PRIVATE_KEY=$vkey /usr/local/bin/docker-compose up --detach + sudo -u "{{ compose_service_user }}" /usr/local/bin/docker-compose $composefileoverride down -v + sudo -u "{{ compose_service_user }}" /usr/local/bin/docker-compose $composefileoverride rm -fv + sudo -u "{{ compose_service_user }}" ORACLE_VALIDATOR_ADDRESS=$vaddr ORACLE_VALIDATOR_ADDRESS_PRIVATE_KEY=$vkey /usr/local/bin/docker-compose $composefileoverride up --detach } stop(){ echo "Stopping bridge.." cd $WORKDIR - sudo -u "{{ compose_service_user }}" /usr/local/bin/docker-compose down -v + sudo -u "{{ compose_service_user }}" /usr/local/bin/docker-compose $composefileoverride down -v sleep 2 } status(){ echo "Bridge status:" cd $WORKDIR - sudo -u "{{ compose_service_user }}" /usr/local/bin/docker-compose ps + sudo -u "{{ compose_service_user }}" /usr/local/bin/docker-compose $composefileoverride ps } rebuild(){ echo "Rebuild bridge.." cd $WORKDIR - sudo -u "{{ compose_service_user }}" /usr/local/bin/docker-compose down -v - sudo -u "{{ compose_service_user }}" /usr/local/bin/docker-compose rm -fv - sudo -u "{{ compose_service_user }}" ORACLE_VALIDATOR_ADDRESS=$vaddr ORACLE_VALIDATOR_ADDRESS_PRIVATE_KEY=$vkey /usr/local/bin/docker-compose up --detach --force-recreate --no-deps --build + sudo -u "{{ compose_service_user }}" /usr/local/bin/docker-compose $composefileoverride down -v + sudo -u "{{ compose_service_user }}" /usr/local/bin/docker-compose $composefileoverride rm -fv + sudo -u "{{ compose_service_user }}" ORACLE_VALIDATOR_ADDRESS=$vaddr ORACLE_VALIDATOR_ADDRESS_PRIVATE_KEY=$vkey /usr/local/bin/docker-compose $composefileoverride up --detach --force-recreate --no-deps --build } diff --git a/e2e-commons/up.sh b/e2e-commons/up.sh index 1142f274a..246cd8e5a 100755 --- a/e2e-commons/up.sh +++ b/e2e-commons/up.sh @@ -17,9 +17,11 @@ while [ "$1" != "" ]; do docker-compose run -d oracle-erc20 yarn watcher:signature-request docker-compose run -d oracle-erc20 yarn watcher:collected-signatures docker-compose run -d oracle-erc20 yarn watcher:affirmation-request + docker-compose run -d oracle-erc20 yarn watcher:transfer docker-compose run -d oracle-erc20-native yarn watcher:signature-request docker-compose run -d oracle-erc20-native yarn watcher:collected-signatures docker-compose run -d oracle-erc20-native yarn watcher:affirmation-request + docker-compose run -d oracle-erc20-native yarn watcher:transfer docker-compose run -d oracle-amb yarn watcher:signature-request docker-compose run -d oracle-amb yarn watcher:collected-signatures docker-compose run -d oracle-amb yarn watcher:affirmation-request diff --git a/oracle-e2e/test/ercToErc.js b/oracle-e2e/test/ercToErc.js index e45d2d0f0..ef155bf80 100644 --- a/oracle-e2e/test/ercToErc.js +++ b/oracle-e2e/test/ercToErc.js @@ -1,8 +1,8 @@ const Web3 = require('web3') const assert = require('assert') const promiseRetry = require('promise-retry') -const { user, ercToErcBridge, homeRPC, foreignRPC } = require('../../e2e-commons/constants.json') -const { ERC677_BRIDGE_TOKEN_ABI } = require('../../commons') +const { user, secondUser, ercToErcBridge, homeRPC, foreignRPC } = require('../../e2e-commons/constants.json') +const { ERC677_BRIDGE_TOKEN_ABI, FOREIGN_ERC_TO_NATIVE_ABI } = require('../../commons') const { generateNewBlock } = require('../../e2e-commons/utils') const homeWeb3 = new Web3(new Web3.providers.HttpProvider(homeRPC.URL)) @@ -17,6 +17,7 @@ homeWeb3.eth.accounts.wallet.add(user.privateKey) foreignWeb3.eth.accounts.wallet.add(user.privateKey) const erc20Token = new foreignWeb3.eth.Contract(ERC677_BRIDGE_TOKEN_ABI, ercToErcBridge.foreignToken) +const foreignBridge = new foreignWeb3.eth.Contract(FOREIGN_ERC_TO_NATIVE_ABI, COMMON_FOREIGN_BRIDGE_ADDRESS) const erc677Token = new homeWeb3.eth.Contract(ERC677_BRIDGE_TOKEN_ABI, ercToErcBridge.homeToken) describe('erc to erc', () => { @@ -24,9 +25,49 @@ describe('erc to erc', () => { const balance = await erc20Token.methods.balanceOf(user.address).call() assert(!toBN(balance).isZero(), 'Account should have tokens') + const firstTransferValue = homeWeb3.utils.toWei('0.01') + + // approve tokens to foreign bridge + await erc20Token.methods + .approve(COMMON_FOREIGN_BRIDGE_ADDRESS, firstTransferValue) + .send({ + from: user.address, + gas: '1000000' + }) + .catch(e => { + console.error(e) + }) + + // call bridge method to transfer tokens to a different recipient + await foreignBridge.methods + .relayTokens(secondUser.address, firstTransferValue) + .send({ + from: user.address, + gas: '1000000' + }) + .catch(e => { + console.error(e) + }) + + // Send a trivial transaction to generate a new block since the watcher + // is configured to wait 1 confirmation block + await generateNewBlock(foreignWeb3, user.address) + + // check that balance increases + await promiseRetry(async retry => { + const balance = await erc677Token.methods.balanceOf(user.address).call() + const recipientBalance = await erc677Token.methods.balanceOf(secondUser.address).call() + assert(toBN(balance).isZero(), 'User balance should be the same') + if (toBN(recipientBalance).isZero()) { + retry() + } + }) + + const secondTransferValue = homeWeb3.utils.toWei('0.05') + // send tokens to foreign bridge await erc20Token.methods - .transfer(COMMON_FOREIGN_BRIDGE_ADDRESS, homeWeb3.utils.toWei('0.01')) + .transfer(COMMON_FOREIGN_BRIDGE_ADDRESS, secondTransferValue) .send({ from: user.address, gas: '1000000' @@ -44,6 +85,8 @@ describe('erc to erc', () => { const balance = await erc677Token.methods.balanceOf(user.address).call() if (toBN(balance).isZero()) { retry() + } else { + assert(toBN(balance).eq(toBN(secondTransferValue)), 'User balance should be increased only by second transfer') } }) }) diff --git a/oracle-e2e/test/ercToNative.js b/oracle-e2e/test/ercToNative.js index f34b4d7ca..dd5483226 100644 --- a/oracle-e2e/test/ercToNative.js +++ b/oracle-e2e/test/ercToNative.js @@ -1,8 +1,8 @@ const Web3 = require('web3') const assert = require('assert') const promiseRetry = require('promise-retry') -const { user, ercToNativeBridge, homeRPC, foreignRPC } = require('../../e2e-commons/constants.json') -const { ERC677_BRIDGE_TOKEN_ABI } = require('../../commons') +const { user, secondUser, ercToNativeBridge, homeRPC, foreignRPC } = require('../../e2e-commons/constants.json') +const { ERC677_BRIDGE_TOKEN_ABI, FOREIGN_ERC_TO_NATIVE_ABI } = require('../../commons') const { generateNewBlock } = require('../../e2e-commons/utils') const homeWeb3 = new Web3(new Web3.providers.HttpProvider(homeRPC.URL)) @@ -17,16 +17,56 @@ homeWeb3.eth.accounts.wallet.add(user.privateKey) foreignWeb3.eth.accounts.wallet.add(user.privateKey) const erc20Token = new foreignWeb3.eth.Contract(ERC677_BRIDGE_TOKEN_ABI, ercToNativeBridge.foreignToken) +const foreignBridge = new foreignWeb3.eth.Contract(FOREIGN_ERC_TO_NATIVE_ABI, COMMON_FOREIGN_BRIDGE_ADDRESS) describe('erc to native', () => { it('should convert tokens in foreign to coins in home', async () => { const balance = await erc20Token.methods.balanceOf(user.address).call() const originalBalanceOnHome = await homeWeb3.eth.getBalance(user.address) + const initialBalanceSecondUser = await homeWeb3.eth.getBalance(secondUser.address) assert(!toBN(balance).isZero(), 'Account should have tokens') + // approve tokens to foreign bridge + await erc20Token.methods + .approve(COMMON_FOREIGN_BRIDGE_ADDRESS, homeWeb3.utils.toWei('0.01')) + .send({ + from: user.address, + gas: '1000000' + }) + .catch(e => { + console.error(e) + }) + + // call bridge method to transfer tokens to a different recipient + await foreignBridge.methods + .relayTokens(secondUser.address, homeWeb3.utils.toWei('0.01')) + .send({ + from: user.address, + gas: '1000000' + }) + .catch(e => { + console.error(e) + }) + + // Send a trivial transaction to generate a new block since the watcher + // is configured to wait 1 confirmation block + await generateNewBlock(foreignWeb3, user.address) + + // check that balance increases + await promiseRetry(async retry => { + const balance = await homeWeb3.eth.getBalance(user.address) + const secondUserbalance = await homeWeb3.eth.getBalance(secondUser.address) + assert(toBN(balance).lte(toBN(originalBalanceOnHome)), 'User balance should be the same') + if (toBN(secondUserbalance).lte(toBN(initialBalanceSecondUser))) { + retry() + } + }) + + const transferValue = homeWeb3.utils.toWei('0.05') + // send tokens to foreign bridge await erc20Token.methods - .transfer(COMMON_FOREIGN_BRIDGE_ADDRESS, homeWeb3.utils.toWei('0.01')) + .transfer(COMMON_FOREIGN_BRIDGE_ADDRESS, transferValue) .send({ from: user.address, gas: '1000000' @@ -44,6 +84,11 @@ describe('erc to native', () => { const balance = await homeWeb3.eth.getBalance(user.address) if (toBN(balance).lte(toBN(originalBalanceOnHome))) { retry() + } else { + assert( + toBN(balance).eq(toBN(originalBalanceOnHome).add(toBN(transferValue))), + 'User balance should be increased only by second transfer' + ) } }) }) diff --git a/oracle/config/affirmation-request-watcher.config.js b/oracle/config/affirmation-request-watcher.config.js index 2f8ead8f0..f91cc4719 100644 --- a/oracle/config/affirmation-request-watcher.config.js +++ b/oracle/config/affirmation-request-watcher.config.js @@ -1,5 +1,5 @@ const baseConfig = require('./base.config') -const { ERC20_ABI, ERC_TYPES } = require('../../commons') +const { ERC_TYPES } = require('../../commons') const initialChecksJson = process.argv[3] @@ -20,24 +20,11 @@ if (baseConfig.id === 'erc-erc' && initialChecks.foreignERC === ERC_TYPES.ERC677 const id = `${baseConfig.id}-affirmation-request` -module.exports = - (baseConfig.id === 'erc-erc' && initialChecks.foreignERC === ERC_TYPES.ERC20) || baseConfig.id === 'erc-native' - ? { - ...baseConfig.bridgeConfig, - ...baseConfig.foreignConfig, - event: 'Transfer', - eventContractAddress: initialChecks.bridgeableTokenAddress, - eventAbi: ERC20_ABI, - eventFilter: { to: process.env.COMMON_FOREIGN_BRIDGE_ADDRESS }, - queue: 'home', - name: `watcher-${id}`, - id - } - : { - ...baseConfig.bridgeConfig, - ...baseConfig.foreignConfig, - event: 'UserRequestForAffirmation', - queue: 'home', - name: `watcher-${id}`, - id - } +module.exports = { + ...baseConfig.bridgeConfig, + ...baseConfig.foreignConfig, + event: 'UserRequestForAffirmation', + queue: 'home', + name: `watcher-${id}`, + id +} diff --git a/oracle/config/transfer-watcher.config.js b/oracle/config/transfer-watcher.config.js new file mode 100644 index 000000000..ce4d05756 --- /dev/null +++ b/oracle/config/transfer-watcher.config.js @@ -0,0 +1,42 @@ +const baseConfig = require('./base.config') +const { ERC20_ABI, ERC_TYPES } = require('../../commons') +const { EXIT_CODES } = require('../src/utils/constants') + +const initialChecksJson = process.argv[3] + +if (!initialChecksJson) { + throw new Error('initial check parameter was not provided.') +} + +let initialChecks +try { + initialChecks = JSON.parse(initialChecksJson) +} catch (e) { + throw new Error('Error on decoding values from initial checks.') +} + +if (baseConfig.id === 'erc-erc' && initialChecks.foreignERC === ERC_TYPES.ERC677) { + baseConfig.id = 'erc677-erc677' +} + +const id = `${baseConfig.id}-transfer` + +const transferWatcherRequired = + (baseConfig.id === 'erc-erc' && initialChecks.foreignERC === ERC_TYPES.ERC20) || baseConfig.id === 'erc-native' + +if (!transferWatcherRequired) { + console.error(`Transfer watcher not required for bridge mode ${process.env.ORACLE_BRIDGE_MODE}`) + process.exit(EXIT_CODES.WATCHER_NOT_REQUIRED) +} + +module.exports = { + ...baseConfig.bridgeConfig, + ...baseConfig.foreignConfig, + event: 'Transfer', + eventContractAddress: initialChecks.bridgeableTokenAddress, + eventAbi: ERC20_ABI, + eventFilter: { to: process.env.COMMON_FOREIGN_BRIDGE_ADDRESS }, + queue: 'home', + name: `watcher-${id}`, + id +} diff --git a/oracle/docker-compose-transfer.yml b/oracle/docker-compose-transfer.yml new file mode 100644 index 000000000..10180d945 --- /dev/null +++ b/oracle/docker-compose-transfer.yml @@ -0,0 +1,91 @@ +--- +version: '2.4' +services: + rabbit: + extends: + file: docker-compose.yml + service: rabbit + networks: + - net_rabbit_bridge_transfer + redis: + extends: + file: docker-compose.yml + service: redis + networks: + - net_db_bridge_transfer + bridge_request: + extends: + file: docker-compose.yml + service: bridge_request + networks: + - net_db_bridge_request + - net_rabbit_bridge_request + bridge_collected: + extends: + file: docker-compose.yml + service: bridge_collected + networks: + - net_db_bridge_request + - net_rabbit_bridge_request + bridge_affirmation: + extends: + file: docker-compose.yml + service: bridge_affirmation + networks: + - net_db_bridge_request + - net_rabbit_bridge_request + bridge_transfer: + cpus: 0.1 + mem_limit: 500m + build: + context: .. + dockerfile: oracle/Dockerfile + env_file: ./.env + environment: + - NODE_ENV=production + - ORACLE_VALIDATOR_ADDRESS=${ORACLE_VALIDATOR_ADDRESS} + restart: unless-stopped + entrypoint: yarn watcher:transfer + networks: + - net_db_bridge_transfer + - net_rabbit_bridge_transfer + bridge_senderhome: + extends: + file: docker-compose.yml + service: bridge_senderhome + networks: + - net_db_bridge_request + - net_rabbit_bridge_request + bridge_senderforeign: + extends: + file: docker-compose.yml + service: bridge_senderforeign + networks: + - net_db_bridge_request + - net_rabbit_bridge_request + +networks: + net_db_bridge_request: + driver: bridge + net_db_bridge_collected: + driver: bridge + net_db_bridge_affirmation: + driver: bridge + net_db_bridge_transfer: + driver: bridge + net_db_bridge_senderhome: + driver: bridge + net_db_bridge_senderforeign: + driver: bridge + net_rabbit_bridge_request: + driver: bridge + net_rabbit_bridge_collected: + driver: bridge + net_rabbit_bridge_affirmation: + driver: bridge + net_rabbit_bridge_transfer: + driver: bridge + net_rabbit_bridge_senderhome: + driver: bridge + net_rabbit_bridge_senderforeign: + driver: bridge diff --git a/oracle/package.json b/oracle/package.json index dc333d2fc..66b3d3f6a 100644 --- a/oracle/package.json +++ b/oracle/package.json @@ -8,9 +8,10 @@ "watcher:signature-request": "./scripts/start-worker.sh watcher signature-request-watcher", "watcher:collected-signatures": "./scripts/start-worker.sh watcher collected-signatures-watcher", "watcher:affirmation-request": "./scripts/start-worker.sh watcher affirmation-request-watcher", + "watcher:transfer": "./scripts/start-worker.sh watcher transfer-watcher", "sender:home": "./scripts/start-worker.sh sender home-sender", "sender:foreign": "./scripts/start-worker.sh sender foreign-sender", - "dev": "concurrently -n 'watcher:signature-request,watcher:collected-signatures,watcher:affirmation-request,sender:home,sender:foreign' -c 'red,green,yellow,blue,magenta' 'yarn watcher:signature-request' 'yarn watcher:collected-signatures' 'yarn watcher:affirmation-request' 'yarn sender:home' 'yarn sender:foreign'", + "dev": "concurrently -n 'watcher:signature-request,watcher:collected-signatures,watcher:affirmation-request,watcher:transfer,sender:home,sender:foreign' -c 'red,green,yellow,blue,magenta,cyan' 'yarn watcher:signature-request' 'yarn watcher:collected-signatures' 'yarn watcher:affirmation-request' 'yarn watcher:transfer' 'yarn sender:home' 'yarn sender:foreign'", "test": "NODE_ENV=test mocha", "test:watch": "NODE_ENV=test mocha --watch --reporter=min", "coverage": "NODE_ENV=test nyc --reporter=text --reporter=html mocha", diff --git a/oracle/src/events/processTransfers/index.js b/oracle/src/events/processTransfers/index.js index 624eaed88..9bf716a90 100644 --- a/oracle/src/events/processTransfers/index.js +++ b/oracle/src/events/processTransfers/index.js @@ -3,7 +3,7 @@ const promiseLimit = require('promise-limit') const { HttpListProviderError } = require('http-list-provider') const { BRIDGE_VALIDATORS_ABI } = require('../../../../commons') const rootLogger = require('../../services/logger') -const { web3Home } = require('../../services/web3') +const { web3Home, web3Foreign } = require('../../services/web3') const { AlreadyProcessedError, AlreadySignedError, InvalidValidatorError } = require('../../utils/errors') const { EXIT_CODES, MAX_CONCURRENT_EVENTS } = require('../../utils/constants') const estimateGas = require('../processAffirmationRequests/estimateGas') @@ -14,6 +14,10 @@ let validatorContract = null function processTransfersBuilder(config) { const homeBridge = new web3Home.eth.Contract(config.homeBridgeAbi, config.homeBridgeAddress) + const userRequestForAffirmationAbi = config.foreignBridgeAbi.filter( + e => e.type === 'event' && e.name === 'UserRequestForAffirmation' + )[0] + const userRequestForAffirmationHash = web3Home.eth.abi.encodeEventSignature(userRequestForAffirmationAbi) return async function processTransfers(transfers) { const txToSend = [] @@ -37,6 +41,20 @@ function processTransfersBuilder(config) { logger.info({ from, value }, `Processing transfer ${transfer.transactionHash}`) + const receipt = await web3Foreign.eth.getTransactionReceipt(transfer.transactionHash) + const existsAffirmationEvent = receipt.logs.some( + e => e.address === config.foreignBridgeAddress && e.topics[0] === userRequestForAffirmationHash + ) + + if (existsAffirmationEvent) { + logger.info( + `Transfer event discarded because a transaction with alternative receiver detected in transaction ${ + transfer.transactionHash + }` + ) + return + } + let gasEstimate try { logger.debug('Estimate gas') diff --git a/oracle/src/utils/constants.js b/oracle/src/utils/constants.js index d05c9506e..5641f37e8 100644 --- a/oracle/src/utils/constants.js +++ b/oracle/src/utils/constants.js @@ -11,6 +11,7 @@ module.exports = { DEFAULT_GAS_PRICE_FACTOR: 1, EXIT_CODES: { GENERAL_ERROR: 1, + WATCHER_NOT_REQUIRED: 0, INCOMPATIBILITY: 10, MAX_TIME_REACHED: 11 }, diff --git a/oracle/src/watcher.js b/oracle/src/watcher.js index e96a4f605..388bfb51a 100644 --- a/oracle/src/watcher.js +++ b/oracle/src/watcher.js @@ -96,9 +96,11 @@ function processEvents(events) { return processCollectedSignatures(events) case 'native-erc-affirmation-request': case 'erc677-erc677-affirmation-request': - return processAffirmationRequests(events) - case 'erc-erc-affirmation-request': case 'erc-native-affirmation-request': + case 'erc-erc-affirmation-request': + return processAffirmationRequests(events) + case 'erc-erc-transfer': + case 'erc-native-transfer': return processTransfers(events) case 'amb-signature-request': return processAMBSignatureRequests(events) diff --git a/ui/src/stores/TxStore.js b/ui/src/stores/TxStore.js index 3c55901a6..d8efadbaf 100644 --- a/ui/src/stores/TxStore.js +++ b/ui/src/stores/TxStore.js @@ -64,7 +64,7 @@ class TxStore { try { return this.web3Store.getWeb3Promise.then(async () => { if (this.web3Store.defaultAccount.address) { - const data = await contract.methods.transferAndCall(to, value, '0x00').encodeABI() + const data = await contract.methods.transferAndCall(to, value, '0x').encodeABI() return this.doSend({ to: tokenAddress, from, value: '0x00', data, sentValue: value }) } else { this.alertStore.pushError('Please unlock wallet') From 1564ccc580edd5b622c21e83668c25177ec7eb53 Mon Sep 17 00:00:00 2001 From: Gerardo Nardelli Date: Tue, 29 Oct 2019 16:22:02 -0300 Subject: [PATCH 4/7] Support alternative receiver feature in Monitor (#223) * Update monitor to support changes from alternative receiver * Add monitor event processing unit tests * update chrome version used en e2e tests * update chromedriver version --- monitor/.eslintrc | 3 + monitor/alerts.js | 47 +------- monitor/eventsStats.js | 71 +----------- monitor/package.json | 4 +- monitor/test/message.test.js | 206 +++++++++++++++++++++++++++++++++++ monitor/utils/events.js | 54 +++++---- monitor/utils/message.js | 27 ++++- package.json | 2 +- 8 files changed, 284 insertions(+), 130 deletions(-) create mode 100644 monitor/test/message.test.js diff --git a/monitor/.eslintrc b/monitor/.eslintrc index 870747ba8..e9e00b304 100644 --- a/monitor/.eslintrc +++ b/monitor/.eslintrc @@ -8,5 +8,8 @@ "rules": { "no-use-before-define": "off", "node/no-unpublished-require": "off" + }, + "env": { + "mocha": true } } diff --git a/monitor/alerts.js b/monitor/alerts.js index 26ca40560..b5215dfa5 100644 --- a/monitor/alerts.js +++ b/monitor/alerts.js @@ -3,7 +3,7 @@ const Web3 = require('web3') const logger = require('./logger')('alerts') const eventsInfo = require('./utils/events') const { getBlockNumber } = require('./utils/contract') -const { processedMsgNotDelivered } = require('./utils/message') +const { processedMsgNotDelivered, eventWithoutReference } = require('./utils/message') const { BRIDGE_MODES } = require('../commons') const { COMMON_HOME_RPC_URL, COMMON_FOREIGN_RPC_URL } = process.env @@ -29,10 +29,9 @@ async function main() { xSignatures = homeToForeignConfirmations.filter(processedMsgNotDelivered(homeToForeignRequests)) xAffirmations = foreignToHomeConfirmations.filter(processedMsgNotDelivered(foreignToHomeRequests)) } else { - xSignatures = homeToForeignConfirmations.filter(findDifferences(homeToForeignRequests)) - xAffirmations = foreignToHomeConfirmations.filter(findDifferences(foreignToHomeRequests)) + xSignatures = homeToForeignConfirmations.filter(eventWithoutReference(homeToForeignRequests)) + xAffirmations = foreignToHomeConfirmations.filter(eventWithoutReference(foreignToHomeRequests)) } - logger.debug('building misbehavior blocks') const [homeBlockNumber, foreignBlockNumber] = await getBlockNumber(web3Home, web3Foreign) @@ -52,8 +51,8 @@ async function main() { const foreignValidators = await Promise.all(xSignatures.map(event => findTxSender(web3Foreign)(event))) const homeValidators = await Promise.all(xAffirmations.map(event => findTxSender(web3Home)(event))) - const xSignaturesTxs = xSignatures.map(normalizeEventInformation).reduce(buildTxList(foreignValidators), {}) - const xAffirmationsTxs = xAffirmations.map(normalizeEventInformation).reduce(buildTxList(homeValidators), {}) + const xSignaturesTxs = xSignatures.reduce(buildTxList(foreignValidators), {}) + const xAffirmationsTxs = xAffirmations.reduce(buildTxList(homeValidators), {}) logger.debug('Done') @@ -150,7 +149,7 @@ const findTxSender = web3 => async ({ transactionHash }) => { * }}} */ const buildTxList = validatorsList => (acc, event, index) => { - acc[event.txHash] = { + acc[event.transactionHash] = { value: event.value, block: event.blockNumber, referenceTx: event.referenceTx, @@ -160,38 +159,4 @@ const buildTxList = validatorsList => (acc, event, index) => { return acc } -/** - * Finds a missing destDeposit in src list if there's any - * @param {Array} src - * @returns {function(*=): boolean} - */ -const findDifferences = src => dest => { - const b = normalizeEventInformation(dest) - - return ( - src - .map(normalizeEventInformation) - .filter(a => a.referenceTx === b.referenceTx && a.recipient === b.recipient && a.value === b.value).length === 0 - ) -} - -/** - * Normalizes the different event objects to facilitate data processing - * @param {Object} event - * @returns {{ - * txHash: string, - * blockNumber: number, - * referenceTx: string, - * recipient: string | *, - * value: * - * }} - */ -const normalizeEventInformation = event => ({ - txHash: event.transactionHash, - blockNumber: event.blockNumber, - referenceTx: event.returnValues.transactionHash || event.transactionHash, - recipient: event.returnValues.recipient || event.returnValues.from, - value: event.returnValues.value -}) - module.exports = main diff --git a/monitor/eventsStats.js b/monitor/eventsStats.js index 480cb616a..c0e49f301 100644 --- a/monitor/eventsStats.js +++ b/monitor/eventsStats.js @@ -1,69 +1,14 @@ require('dotenv').config() const eventsInfo = require('./utils/events') -const { processedMsgNotDelivered, deliveredMsgNotProcessed } = require('./utils/message') +const { processedMsgNotDelivered, deliveredMsgNotProcessed, eventWithoutReference } = require('./utils/message') const { BRIDGE_MODES } = require('../commons') -function compareDepositsHome(foreign) { - return homeDeposit => { - return ( - foreign.filter(foreignDeposit => { - return ( - foreignDeposit.returnValues.transactionHash === homeDeposit.transactionHash && - foreignDeposit.returnValues.recipient === homeDeposit.returnValues.recipient && - foreignDeposit.returnValues.value === homeDeposit.returnValues.value - ) - }).length === 0 - ) - } -} -function compareDepositsForeign(home) { - return foreignDeposit => { - return ( - home.filter(homeDeposit => { - return ( - homeDeposit.transactionHash === foreignDeposit.returnValues.transactionHash && - homeDeposit.returnValues.recipient === foreignDeposit.returnValues.recipient && - homeDeposit.returnValues.value === foreignDeposit.returnValues.value - ) - }).length === 0 - ) - } -} - -function compareTransferHome(foreign) { - return homeDeposit => { - return ( - foreign.filter(foreignDeposit => { - return ( - homeDeposit.returnValues.transactionHash === foreignDeposit.transactionHash && - homeDeposit.returnValues.recipient === foreignDeposit.returnValues.from && - homeDeposit.returnValues.value === foreignDeposit.returnValues.value - ) - }).length === 0 - ) - } -} -function compareTransferForeign(home) { - return foreignDeposit => { - return ( - home.filter(homeDeposit => { - return ( - foreignDeposit.transactionHash === homeDeposit.returnValues.transactionHash && - foreignDeposit.returnValues.from === homeDeposit.returnValues.recipient && - foreignDeposit.returnValues.value === homeDeposit.returnValues.value - ) - }).length === 0 - ) - } -} - async function main() { const { homeToForeignRequests, homeToForeignConfirmations, foreignToHomeConfirmations, foreignToHomeRequests, - isExternalErc20, bridgeMode } = await eventsInfo() @@ -88,17 +33,11 @@ async function main() { lastChecked: Math.floor(Date.now() / 1000) } } else { - const onlyInHomeDeposits = homeToForeignRequests.filter(compareDepositsHome(homeToForeignConfirmations)) - const onlyInForeignDeposits = homeToForeignConfirmations - .concat([]) - .filter(compareDepositsForeign(homeToForeignRequests)) + const onlyInHomeDeposits = homeToForeignRequests.filter(eventWithoutReference(homeToForeignConfirmations)) + const onlyInForeignDeposits = homeToForeignConfirmations.filter(eventWithoutReference(homeToForeignRequests)) - const onlyInHomeWithdrawals = isExternalErc20 - ? foreignToHomeConfirmations.filter(compareTransferHome(foreignToHomeRequests)) - : foreignToHomeConfirmations.filter(compareDepositsForeign(foreignToHomeRequests)) - const onlyInForeignWithdrawals = isExternalErc20 - ? foreignToHomeRequests.filter(compareTransferForeign(foreignToHomeConfirmations)) - : foreignToHomeRequests.filter(compareDepositsHome(foreignToHomeConfirmations)) + const onlyInHomeWithdrawals = foreignToHomeConfirmations.filter(eventWithoutReference(foreignToHomeRequests)) + const onlyInForeignWithdrawals = foreignToHomeRequests.filter(eventWithoutReference(foreignToHomeConfirmations)) return { onlyInHomeDeposits, diff --git a/monitor/package.json b/monitor/package.json index f3471340e..d314fa984 100644 --- a/monitor/package.json +++ b/monitor/package.json @@ -8,7 +8,8 @@ "start": "node index.js", "check-and-start": "yarn check-all && yarn start", "lint": "eslint . --ignore-path ../.eslintignore", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint . --fix", + "test": "NODE_ENV=test mocha" }, "author": "", "license": "ISC", @@ -23,5 +24,6 @@ "node": ">=8.9" }, "devDependencies": { + "chai": "^4.2.0" } } diff --git a/monitor/test/message.test.js b/monitor/test/message.test.js new file mode 100644 index 000000000..1ba7cbdce --- /dev/null +++ b/monitor/test/message.test.js @@ -0,0 +1,206 @@ +const { expect } = require('chai') +const { normalizeEventInformation, eventWithoutReference } = require('../utils/message') + +describe('normalizeEventInformation', () => { + it('should return normalized object for UserRequestForSignature event', () => { + // Given + const event = { + address: '0x7301CFA0e1756B71869E93d4e4Dca5c7d0eb0AA6', + blockNumber: 324231, + transactionHash: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + returnValues: { + recipient: '0xA84944735B66e957Fe385567dcc85975022Fe68A', + value: '100000000000000000000' + }, + event: 'UserRequestForSignature' + } + + // When + const result = normalizeEventInformation(event) + + // Then + expect(result.transactionHash).to.equal(event.transactionHash) + expect(result.blockNumber).to.equal(event.blockNumber) + expect(result.referenceTx).to.equal(event.transactionHash) + expect(result.recipient).to.equal(event.returnValues.recipient) + expect(result.value).to.equal(event.returnValues.value) + }) + it('should return normalized object for UserRequestForAffirmation event', () => { + // Given + const event = { + address: '0x7301CFA0e1756B71869E93d4e4Dca5c7d0eb0AA6', + blockNumber: 324231, + transactionHash: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + returnValues: { + recipient: '0xA84944735B66e957Fe385567dcc85975022Fe68A', + value: '100000000000000000000' + }, + event: 'UserRequestForAffirmation' + } + + // When + const result = normalizeEventInformation(event) + + // Then + expect(result.transactionHash).to.equal(event.transactionHash) + expect(result.blockNumber).to.equal(event.blockNumber) + expect(result.referenceTx).to.equal(event.transactionHash) + expect(result.recipient).to.equal(event.returnValues.recipient) + expect(result.value).to.equal(event.returnValues.value) + }) + it('should return normalized object for transfer event', () => { + // Given + const event = { + address: '0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359', + blockNumber: 6593953, + transactionHash: '0x05afb402e27946d3600b100020dc23419ffd10cb61d3b241cee7b4a84909b48a', + returnValues: { + from: '0x13C0a8009A578837fB7A80Aa252F6A3ba4aD6B79', + to: '0x4aa42145Aa6Ebf72e164C9bBC74fbD3788045016', + value: '4000000000000000000' + }, + event: 'Transfer' + } + + // When + const result = normalizeEventInformation(event) + + // Then + expect(result.transactionHash).to.equal(event.transactionHash) + expect(result.blockNumber).to.equal(event.blockNumber) + expect(result.referenceTx).to.equal(event.transactionHash) + expect(result.recipient).to.equal(event.returnValues.from) + expect(result.value).to.equal(event.returnValues.value) + }) + it('should return normalized object for RelayedMessage event', () => { + // Given + const event = { + address: '0x4aa42145Aa6Ebf72e164C9bBC74fbD3788045016', + blockNumber: 7025826, + transactionHash: '0x6ee5969973da763d6d9f162d2dd1b1ec34c2dd977dc39e6b25030b4f04471567', + returnValues: { + recipient: '0x38BC00Ea43EbB5ef5150593A0BA6C381803717e2', + value: '4900000000000000000', + transactionHash: '0x5c5c2ab5e333bda4acd035a6a30ea29c7370351891d85373b2d06c7cc6cbb210' + }, + event: 'RelayedMessage' + } + + // When + const result = normalizeEventInformation(event) + + // Then + expect(result.transactionHash).to.equal(event.transactionHash) + expect(result.blockNumber).to.equal(event.blockNumber) + expect(result.referenceTx).to.equal(event.returnValues.transactionHash) + expect(result.recipient).to.equal(event.returnValues.recipient) + expect(result.value).to.equal(event.returnValues.value) + }) + it('should return normalized object for AffirmationCompleted event', () => { + // Given + const event = { + address: '0x7301CFA0e1756B71869E93d4e4Dca5c7d0eb0AA6', + blockNumber: 474439, + transactionHash: '0x654004b372ba32754cef34f403153bbdf43f0fbb3191d5e4683bba7f32e0dc4a', + + returnValues: { + recipient: '0x9b7b2B4f7a391b6F14A81221AE0920A9735B67Fb', + value: '5000000000000000000', + transactionHash: '0xe96da94bbda2cfc865acd3f98040f5c79a627ee9de839d86885d34acd8ecd10d' + }, + event: 'AffirmationCompleted' + } + + // When + const result = normalizeEventInformation(event) + + // Then + expect(result.transactionHash).to.equal(event.transactionHash) + expect(result.blockNumber).to.equal(event.blockNumber) + expect(result.referenceTx).to.equal(event.returnValues.transactionHash) + expect(result.recipient).to.equal(event.returnValues.recipient) + expect(result.value).to.equal(event.returnValues.value) + }) +}) +describe('eventWithoutReference', () => { + it('should return false if event is present', () => { + // Given + const event = { + txHash: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + blockNumber: 474439, + referenceTx: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + recipient: '0x9b7b2B4f7a391b6F14A81221AE0920A9735B67Fb', + value: '5000000000000000000' + } + + const otherSideEvents = [ + { + txHash: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + blockNumber: 474439, + referenceTx: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + recipient: '0x9b7b2B4f7a391b6F14A81221AE0920A9735B67Fb', + value: '5000000000000000000' + }, + { + txHash: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + blockNumber: 474439, + referenceTx: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + recipient: '0x38BC00Ea43EbB5ef5150593A0BA6C381803717e2', + value: '6000000000000000000' + }, + { + txHash: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + blockNumber: 474439, + referenceTx: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + recipient: '0x38BC00Ea43EbB5ef5150593A0BA6C381803717e2', + value: '8000000000000000000' + } + ] + + // When + const result = eventWithoutReference(otherSideEvents)(event) + + // Then + expect(result).to.equal(false) + }) + it('should return true if event is not present', () => { + // Given + const event = { + txHash: '0xe96da94bbda2cfc865acd3f98040f5c79a627ee9de839d86885d34acd8ecd10d', + blockNumber: 474439, + referenceTx: '0xe96da94bbda2cfc865acd3f98040f5c79a627ee9de839d86885d34acd8ecd10d', + recipient: '0x9b7b2B4f7a391b6F14A81221AE0920A9735B67Fb', + value: '2000000000000000000' + } + + const otherSideEvents = [ + { + txHash: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + blockNumber: 474439, + referenceTx: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + recipient: '0x9b7b2B4f7a391b6F14A81221AE0920A9735B67Fb', + value: '5000000000000000000' + }, + { + txHash: '0x05afb402e27946d3600b100020dc23419ffd10cb61d3b241cee7b4a84909b48a', + blockNumber: 474439, + referenceTx: '0x05afb402e27946d3600b100020dc23419ffd10cb61d3b241cee7b4a84909b48a', + recipient: '0x38BC00Ea43EbB5ef5150593A0BA6C381803717e2', + value: '6000000000000000000' + }, + { + txHash: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + blockNumber: 474439, + referenceTx: '0x17be1e0745136b9e2857124542f8218812db8fe4458236d5ae045c1ceeb79978', + recipient: '0x38BC00Ea43EbB5ef5150593A0BA6C381803717e2', + value: '8000000000000000000' + } + ] + + // When + const result = eventWithoutReference(otherSideEvents)(event) + + // Then + expect(result).to.equal(true) + }) +}) diff --git a/monitor/utils/events.js b/monitor/utils/events.js index a63bd233b..7ea4eef1d 100644 --- a/monitor/utils/events.js +++ b/monitor/utils/events.js @@ -13,6 +13,7 @@ const { getTokenType, getPastEvents } = require('../../commons') +const { normalizeEventInformation } = require('./message') const { COMMON_HOME_RPC_URL, @@ -40,6 +41,7 @@ async function main(mode) { const v1Bridge = bridgeMode === BRIDGE_MODES.NATIVE_TO_ERC_V1 let isExternalErc20 let erc20Contract + let normalizeEvent = normalizeEventInformation if (bridgeMode !== BRIDGE_MODES.ARBITRARY_MESSAGE) { const erc20MethodName = bridgeMode === BRIDGE_MODES.NATIVE_TO_ERC || v1Bridge ? 'erc677token' : 'erc20token' const erc20Address = await foreignBridge.methods[erc20MethodName]().call() @@ -49,47 +51,59 @@ async function main(mode) { ) isExternalErc20 = tokenType === ERC_TYPES.ERC20 erc20Contract = new web3Foreign.eth.Contract(ERC20_ABI, erc20Address) + } else { + normalizeEvent = e => e } logger.debug('getting last block numbers') const [homeBlockNumber, foreignBlockNumber] = await getBlockNumber(web3Home, web3Foreign) logger.debug("calling homeBridge.getPastEvents('UserRequestForSignature')") - const homeToForeignRequests = await getPastEvents(homeBridge, { + const homeToForeignRequests = (await getPastEvents(homeBridge, { event: v1Bridge ? 'Deposit' : 'UserRequestForSignature', fromBlock: MONITOR_HOME_START_BLOCK, toBlock: homeBlockNumber - }) + })).map(normalizeEvent) logger.debug("calling foreignBridge.getPastEvents('RelayedMessage')") - const homeToForeignConfirmations = await getPastEvents(foreignBridge, { + const homeToForeignConfirmations = (await getPastEvents(foreignBridge, { event: v1Bridge ? 'Deposit' : 'RelayedMessage', fromBlock: MONITOR_FOREIGN_START_BLOCK, toBlock: foreignBlockNumber - }) + })).map(normalizeEvent) logger.debug("calling homeBridge.getPastEvents('AffirmationCompleted')") - const foreignToHomeConfirmations = await getPastEvents(homeBridge, { + const foreignToHomeConfirmations = (await getPastEvents(homeBridge, { event: v1Bridge ? 'Withdraw' : 'AffirmationCompleted', fromBlock: MONITOR_HOME_START_BLOCK, toBlock: homeBlockNumber - }) + })).map(normalizeEvent) logger.debug("calling foreignBridge.getPastEvents('UserRequestForAffirmation')") - const foreignToHomeRequests = isExternalErc20 - ? await getPastEvents(erc20Contract, { - event: 'Transfer', - fromBlock: MONITOR_FOREIGN_START_BLOCK, - toBlock: foreignBlockNumber, - options: { - filter: { to: COMMON_FOREIGN_BRIDGE_ADDRESS } - } - }) - : await getPastEvents(foreignBridge, { - event: v1Bridge ? 'Withdraw' : 'UserRequestForAffirmation', - fromBlock: MONITOR_FOREIGN_START_BLOCK, - toBlock: foreignBlockNumber - }) + let foreignToHomeRequests = (await getPastEvents(foreignBridge, { + event: v1Bridge ? 'Withdraw' : 'UserRequestForAffirmation', + fromBlock: MONITOR_FOREIGN_START_BLOCK, + toBlock: foreignBlockNumber + })).map(normalizeEvent) + if (isExternalErc20) { + logger.debug("calling erc20Contract.getPastEvents('Transfer')") + const transferEvents = (await getPastEvents(erc20Contract, { + event: 'Transfer', + fromBlock: MONITOR_FOREIGN_START_BLOCK, + toBlock: foreignBlockNumber, + options: { + filter: { to: COMMON_FOREIGN_BRIDGE_ADDRESS } + } + })).map(normalizeEvent) + + // Get transfer events that didn't have a UserRequestForAffirmation event in the same transaction + const directTransfers = transferEvents.filter( + e => foreignToHomeRequests.findIndex(t => t.referenceTx === e.referenceTx) === -1 + ) + + foreignToHomeRequests = [...foreignToHomeRequests, ...directTransfers] + } + logger.debug('Done') return { homeToForeignRequests, diff --git a/monitor/utils/message.js b/monitor/utils/message.js index dda2bba5b..5b3ccf2d5 100644 --- a/monitor/utils/message.js +++ b/monitor/utils/message.js @@ -41,7 +41,32 @@ function messageEqualsEvent(parsedMsg, event) { ) } +/** + * Normalizes the different event objects to facilitate data processing + * @param {Object} event + * @returns {{ + * transactionHash: string, + * blockNumber: number, + * referenceTx: string, + * recipient: string | *, + * value: * + * }} + */ +const normalizeEventInformation = event => ({ + transactionHash: event.transactionHash, + blockNumber: event.blockNumber, + referenceTx: event.returnValues.transactionHash || event.transactionHash, + recipient: event.returnValues.recipient || event.returnValues.from, + value: event.returnValues.value +}) + +const eventWithoutReference = otherSideEvents => e => + otherSideEvents.filter(a => a.referenceTx === e.referenceTx && a.recipient === e.recipient && a.value === e.value) + .length === 0 + module.exports = { deliveredMsgNotProcessed, - processedMsgNotDelivered + processedMsgNotDelivered, + normalizeEventInformation, + eventWithoutReference } diff --git a/package.json b/package.json index faaeefa1a..69df30b9e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "initialize": "yarn clean && git submodule update --init && yarn install --unsafe-perm --frozen-lockfile && yarn install:deploy && yarn compile:contracts", "build": "yarn workspace ui run build", "lint": "yarn wsrun --exclude token-bridge-contracts lint", - "test": "yarn wsrun --exclude monitor --exclude oracle-e2e --exclude ui-e2e --exclude monitor-e2e test", + "test": "yarn wsrun --exclude oracle-e2e --exclude ui-e2e --exclude monitor-e2e test", "oracle-e2e": "./oracle-e2e/run-tests.sh", "ui-e2e": "./ui-e2e/run-tests.sh", "clean": "rm -rf ./node_modules ./**/node_modules ./**/**/node_modules ./**/build", From f6fa83d7ea79f8482cecaa24d2c5116f3fde76f1 Mon Sep 17 00:00:00 2001 From: Alexander Kolotov Date: Tue, 5 Nov 2019 15:53:47 +0300 Subject: [PATCH 5/7] Updated links to new repo with tokenbridge contracts (#226) --- .gitmodules | 2 +- README.md | 2 +- oracle/README.md | 6 +++--- ui/README.md | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitmodules b/.gitmodules index 8b9087a2e..95ba12f54 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "contracts"] path = contracts - url = https://github.com/poanetwork/poa-bridge-contracts.git + url = https://github.com/poanetwork/tokenbridge-contracts.git diff --git a/README.md b/README.md index 46cd308ff..9eac72fa1 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Sub-repositories maintained within this monorepo are listed below. | [Commons](commons/README.md) | Interfaces, constants and utilities shared between the sub-repositories | | [E2E-Commons](e2e-commons/README.md) | Common utilities and configuration used in end to end tests | -Additionally there are [Smart Contracts](https://github.com/poanetwork/poa-bridge-contracts) used to manage bridge validators, collect signatures, and confirm asset relay and disposal. +Additionally there are [Smart Contracts](https://github.com/poanetwork/tokenbridge-contracts) used to manage bridge validators, collect signatures, and confirm asset relay and disposal. ## Available deployments diff --git a/oracle/README.md b/oracle/README.md index 6277bdd44..d740be63e 100644 --- a/oracle/README.md +++ b/oracle/README.md @@ -53,7 +53,7 @@ For more information on the Redis/RabbitMQ requirements, see [#90](/../../issues **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). -1. [Deploy the bridge contracts](https://github.com/poanetwork/poa-bridge-contracts/blob/master/deploy/README.md) +1. [Deploy the bridge contracts](https://github.com/poanetwork/tokenbridge-contracts/blob/master/deploy/README.md) 2. Open `bridgeDeploymentResults.json` or copy the JSON output generated by the bridge contract deployment process. @@ -232,10 +232,10 @@ When running the processes, the following commands can be used to test functiona | `USER_ADDRESS` | An account - the current owner of coins/tokens. | | `USER_ADDRESS_PRIVATE_KEY` | A private key belonging to the account. | | `COMMON_HOME_BRIDGE_ADDRESS` | Address of the bridge in the Home network to send transactions. | -| `HOME_MIN_AMOUNT_PER_TX` | Value (in _eth_ or tokens) to be sent in one transaction for the Home network. This should be greater than or equal to the value specified in the `poa-bridge-contracts/deploy/.env` file. The default value in that file is 500000000000000000, which is equivalent to 0.5. | +| `HOME_MIN_AMOUNT_PER_TX` | Value (in _eth_ or tokens) to be sent in one transaction for the Home network. This should be greater than or equal to the value specified in the `tokenbridge-contracts/deploy/.env` file. The default value in that file is 500000000000000000, which is equivalent to 0.5. | | `HOME_TEST_TX_GAS_PRICE` | The gas price (in Wei) that is used to send transactions in the Home network . | | `COMMON_FOREIGN_BRIDGE_ADDRESS` | Address of the bridge in the Foreign network to send transactions. | -| `FOREIGN_MIN_AMOUNT_PER_TX` | Value (in _eth_ or tokens) to be sent in one transaction for the Foreign network. This should be greater than or equal to the value specified in the `poa-bridge-contracts/deploy/.env` file. The default value in that file is 500000000000000000, which is equivalent to 0.5. | +| `FOREIGN_MIN_AMOUNT_PER_TX` | Value (in _eth_ or tokens) to be sent in one transaction for the Foreign network. This should be greater than or equal to the value specified in the `tokenbridge-contracts/deploy/.env` file. The default value in that file is 500000000000000000, which is equivalent to 0.5. | | `FOREIGN_TEST_TX_GAS_PRICE` | The gas price (in Wei) that is used to send transactions in the Foreign network . | ## Contributing diff --git a/ui/README.md b/ui/README.md index 998deea4f..96b634047 100644 --- a/ui/README.md +++ b/ui/README.md @@ -52,7 +52,7 @@ The following is an example setup using the POA Sokol testnet as the Home networ ### Dependencies -- [Smart Contracts](https://github.com/poanetwork/poa-bridge-contracts) +- [Smart Contracts](https://github.com/poanetwork/tokenbridge-contracts) - [Oracle](../oracle/README.md) - [Node.js](https://nodejs.org/en/download/) - [AlphaWallet](https://alphawallet.com/) or [Nifty Wallet](https://github.com/poanetwork/nifty-wallet) or [MetaMask](https://metamask.io/) @@ -72,8 +72,8 @@ The following is an example setup using the POA Sokol testnet as the Home networ * Get free Kovan Coins from the [gitter channel](https://gitter.im/kovan-testnet/faucet) or [Iracus faucet](https://github.com/kovan-testnet/faucet) for Foreign account(s). Get 5 Keth to 1 acc, and transfer from there to all other wallets if more than one account is used. 4. Deploy the Sokol <-> Kovan Bridge contracts. - * Go to the the `sokol-kovan-bridge` folder created in step 1 and `git clone https://github.com/poanetwork/poa-bridge-contracts` - * Follow instructions in the [POA Bridge contracts repo](https://github.com/poanetwork/poa-bridge-contracts). + * Go to the the `sokol-kovan-bridge` folder created in step 1 and `git clone https://github.com/poanetwork/tokenbridge-contracts` + * Follow instructions in the [POA Bridge contracts repo](https://github.com/poanetwork/tokenbridge-contracts). * Set the parameters in the .env file. * `DEPLOYMENT_ACCOUNT_PRIVATE_KEY`: Export the private key from step 2 * `HOME_RPC_URL`=https://sokol.poa.network @@ -86,7 +86,7 @@ The following is an example setup using the POA Sokol testnet as the Home networ * `FOREIGN_UPGRADEABLE_ADMIN_BRIDGE` * `VALIDATORS` _Note: Wallet address(es) for validator(s) are separated by a space. For testing, you can use the same address that was used as the bridge contracts management account._ * `FOREIGN_RPC_URL`=https://kovan.infura.io/mew - * When deployment is finished, check that the `bridgeDeploymentResults.json` file exists in the `poa-bridge-contracts/deploy` directory and includes the bridge contract addresses. + * When deployment is finished, check that the `bridgeDeploymentResults.json` file exists in the `tokenbridge-contracts/deploy` directory and includes the bridge contract addresses. 5. Install and run the TokenBridge Oracle. * Go to the `sokol-kovan-bridge` folder @@ -125,7 +125,7 @@ cp .env.example .env ```` * Insert the addresses from the bridgeDeploymentResults.json file (from step 4) into the .env file. No other changes are needed, see [Env Parameter Details](#env-parameter-details) for information about each parameter. ``` -cat ../poa-bridge-contracts/deploy/bridgeDeploymentResults.json +cat ../tokenbridge-contracts/deploy/bridgeDeploymentResults.json ``` ```bash From 346fa1e732d9fac3c393b09a6477f9dc19cd2fe7 Mon Sep 17 00:00:00 2001 From: Gerardo Nardelli Date: Wed, 6 Nov 2019 16:49:01 -0300 Subject: [PATCH 6/7] Support token migration (#224) * Filter transfer event in token swap in Oracle * Support token swap in monitor --- commons/constants.js | 5 ++- contracts | 2 +- monitor/utils/events.js | 46 +++++++++++++++++++-- oracle/src/events/processTransfers/index.js | 16 ++++++- 4 files changed, 63 insertions(+), 6 deletions(-) diff --git a/commons/constants.js b/commons/constants.js index 53c86b685..fe2304b5f 100644 --- a/commons/constants.js +++ b/commons/constants.js @@ -17,8 +17,11 @@ const FEE_MANAGER_MODE = { UNDEFINED: 'UNDEFINED' } +const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' + module.exports = { BRIDGE_MODES, ERC_TYPES, - FEE_MANAGER_MODE + FEE_MANAGER_MODE, + ZERO_ADDRESS } diff --git a/contracts b/contracts index 39910b771..cc7718284 160000 --- a/contracts +++ b/contracts @@ -1 +1 @@ -Subproject commit 39910b771b1a93a10db829a0b3dddd074c9e1b4e +Subproject commit cc7718284d8a35cf74f6ec6847fd7dc7ed1ca885 diff --git a/monitor/utils/events.js b/monitor/utils/events.js index 7ea4eef1d..d71454eaf 100644 --- a/monitor/utils/events.js +++ b/monitor/utils/events.js @@ -11,7 +11,8 @@ const { ERC20_ABI, ERC677_BRIDGE_TOKEN_ABI, getTokenType, - getPastEvents + getPastEvents, + ZERO_ADDRESS } = require('../../commons') const { normalizeEventInformation } = require('./message') @@ -87,7 +88,7 @@ async function main(mode) { })).map(normalizeEvent) if (isExternalErc20) { logger.debug("calling erc20Contract.getPastEvents('Transfer')") - const transferEvents = (await getPastEvents(erc20Contract, { + let transferEvents = (await getPastEvents(erc20Contract, { event: 'Transfer', fromBlock: MONITOR_FOREIGN_START_BLOCK, toBlock: foreignBlockNumber, @@ -96,8 +97,47 @@ async function main(mode) { } })).map(normalizeEvent) + let directTransfers = transferEvents + const tokensSwappedAbiExists = FOREIGN_ABI.filter(e => e.type === 'event' && e.name === 'TokensSwapped')[0] + if (tokensSwappedAbiExists) { + const tokensSwappedEvents = await getPastEvents(foreignBridge, { + event: 'TokensSwapped', + fromBlock: MONITOR_FOREIGN_START_BLOCK, + toBlock: foreignBlockNumber + }) + + // Get token swap events emitted by foreign bridge + const bridgeTokensSwappedEvents = tokensSwappedEvents.filter(e => e.address === COMMON_FOREIGN_BRIDGE_ADDRESS) + + // Get transfer events for each previous erc20 + const uniqueTokenAddresses = [...new Set(bridgeTokensSwappedEvents.map(e => e.returnValues.from))] + await Promise.all( + uniqueTokenAddresses.map(async tokenAddress => { + const previousERC20 = new web3Foreign.eth.Contract(ERC20_ABI, tokenAddress) + + const previousTransferEvents = (await getPastEvents(previousERC20, { + event: 'Transfer', + fromBlock: MONITOR_FOREIGN_START_BLOCK, + toBlock: foreignBlockNumber, + options: { + filter: { to: COMMON_FOREIGN_BRIDGE_ADDRESS } + } + })).map(normalizeEvent) + transferEvents = [...previousTransferEvents, ...transferEvents] + }) + ) + + // filter transfer that is part of a token swap + directTransfers = transferEvents.filter( + e => + bridgeTokensSwappedEvents.findIndex( + t => t.transactionHash === e.referenceTx && e.recipient === ZERO_ADDRESS + ) === -1 + ) + } + // Get transfer events that didn't have a UserRequestForAffirmation event in the same transaction - const directTransfers = transferEvents.filter( + directTransfers = directTransfers.filter( e => foreignToHomeRequests.findIndex(t => t.referenceTx === e.referenceTx) === -1 ) diff --git a/oracle/src/events/processTransfers/index.js b/oracle/src/events/processTransfers/index.js index 9bf716a90..0b8d8c939 100644 --- a/oracle/src/events/processTransfers/index.js +++ b/oracle/src/events/processTransfers/index.js @@ -1,7 +1,7 @@ require('../../../env') const promiseLimit = require('promise-limit') const { HttpListProviderError } = require('http-list-provider') -const { BRIDGE_VALIDATORS_ABI } = require('../../../../commons') +const { BRIDGE_VALIDATORS_ABI, ZERO_ADDRESS } = require('../../../../commons') const rootLogger = require('../../services/logger') const { web3Home, web3Foreign } = require('../../services/web3') const { AlreadyProcessedError, AlreadySignedError, InvalidValidatorError } = require('../../utils/errors') @@ -17,7 +17,9 @@ function processTransfersBuilder(config) { const userRequestForAffirmationAbi = config.foreignBridgeAbi.filter( e => e.type === 'event' && e.name === 'UserRequestForAffirmation' )[0] + const tokensSwappedAbi = config.foreignBridgeAbi.filter(e => e.type === 'event' && e.name === 'TokensSwapped')[0] const userRequestForAffirmationHash = web3Home.eth.abi.encodeEventSignature(userRequestForAffirmationAbi) + const tokensSwappedHash = tokensSwappedAbi ? web3Home.eth.abi.encodeEventSignature(tokensSwappedAbi) : '0x' return async function processTransfers(transfers) { const txToSend = [] @@ -42,6 +44,7 @@ function processTransfersBuilder(config) { logger.info({ from, value }, `Processing transfer ${transfer.transactionHash}`) const receipt = await web3Foreign.eth.getTransactionReceipt(transfer.transactionHash) + const existsAffirmationEvent = receipt.logs.some( e => e.address === config.foreignBridgeAddress && e.topics[0] === userRequestForAffirmationHash ) @@ -55,6 +58,17 @@ function processTransfersBuilder(config) { return } + const existsTokensSwappedEvent = tokensSwappedAbi + ? receipt.logs.some(e => e.address === config.foreignBridgeAddress && e.topics[0] === tokensSwappedHash) + : false + + if (from === ZERO_ADDRESS && existsTokensSwappedEvent) { + logger.info( + `Transfer event discarded because token swap is detected in transaction ${transfer.transactionHash}` + ) + return + } + let gasEstimate try { logger.debug('Estimate gas') From cbd9d607cee5b67c91adcc54fb08aff0c584c0d3 Mon Sep 17 00:00:00 2001 From: Alexander Kolotov Date: Thu, 7 Nov 2019 22:50:37 +0100 Subject: [PATCH 7/7] Update the contract's submodule to the release 3.2.0 (#228) --- contracts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts b/contracts index cc7718284..20d262702 160000 --- a/contracts +++ b/contracts @@ -1 +1 @@ -Subproject commit cc7718284d8a35cf74f6ec6847fd7dc7ed1ca885 +Subproject commit 20d262702defd3aed39870f3379f1cf0c314305e