From 26243e21e09d7e839f5796aa0ce7a9369f878bbd Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 3 Jul 2018 16:39:17 -0400 Subject: [PATCH] remove provider-engine as it has been creating lots of issues --- js/embark_node.js | 1 - lib/cmd.js | 4 + lib/contracts/provider.js | 115 +-- lib/tests/test.js | 44 +- package-lock.json | 958 +----------------- package.json | 1 - .../test_app/test/simple_storage_spec.js | 19 +- 7 files changed, 65 insertions(+), 1077 deletions(-) diff --git a/js/embark_node.js b/js/embark_node.js index f93916b22..d7b4a92f2 100644 --- a/js/embark_node.js +++ b/js/embark_node.js @@ -34,7 +34,6 @@ EmbarkJS.Contract = function(options) { if (EmbarkJS.isNewWeb3(this.web3)) { ContractClass = new this.web3.eth.Contract(this.abi, this.address); - ContractClass.setProvider(this.web3.currentProvider); ContractClass.options.data = this.code; ContractClass.options.from = this.from || this.web3.eth.defaultAccount; ContractClass.abi = ContractClass.options.abi; diff --git a/lib/cmd.js b/lib/cmd.js index 2f09eb5dd..419e194d5 100644 --- a/lib/cmd.js +++ b/lib/cmd.js @@ -123,6 +123,10 @@ class Cmd { .description(__('run dapp (default: %s)', 'development')) .action(function (env, options) { i18n.setOrDetectLocale(options.locale); + embark.initConfig(env || 'development', { + embarkConfig: 'embark.json', + interceptLogs: false + }); embark.run({ env: env || 'development', serverPort: options.port, diff --git a/lib/contracts/provider.js b/lib/contracts/provider.js index 6a287b353..b6985ff70 100644 --- a/lib/contracts/provider.js +++ b/lib/contracts/provider.js @@ -1,23 +1,9 @@ -const ProviderEngine = require('embark-web3-provider-engine'); -const RpcSubprovider = require('embark-web3-provider-engine/subproviders/rpc'); -const WsSubprovider = require('embark-web3-provider-engine/subproviders/websocket'); -const CacheSubprovider = require('embark-web3-provider-engine/subproviders/cache.js'); -const FixtureSubprovider = require('embark-web3-provider-engine/subproviders/fixture.js'); -const FilterSubprovider = require('embark-web3-provider-engine/subproviders/filters.js'); -const VmSubprovider = require('embark-web3-provider-engine/subproviders/vm.js'); -const NonceSubprovider = require('embark-web3-provider-engine/subproviders/nonce-tracker.js'); -const SubscriptionSubprovider = require('embark-web3-provider-engine/subproviders/subscriptions'); const async = require('async'); const AccountParser = require('./accountParser'); const fundAccount = require('./fundAccount'); -const EventEmitter = require('events'); -EventEmitter.prototype._maxListeners = 300; -const NO_ACCOUNTS = 'noAccounts'; - -class Provider extends ProviderEngine { +class Provider { constructor(options) { - super(); this.web3 = options.web3; this.accountsConfig = options.accountsConfig; this.blockchainConfig = options.blockchainConfig; @@ -25,71 +11,52 @@ class Provider extends ProviderEngine { this.web3Endpoint = options.web3Endpoint; this.logger = options.logger; this.isDev = options.isDev; - this.asyncMethods = {}; - this.setMaxListeners(300); } startWeb3Provider(callback) { const self = this; -// cache layer -// self.addProvider(new CacheSubprovider()) - - // self.addProvider(new NonceSubprovider()) - if (this.type === 'rpc') { - self.addProvider(new RpcSubprovider({ - rpcUrl: self.web3Endpoint - })); + self.provider = new this.web3.providers.HttpProvider(self.web3Endpoint); } else if (this.type === 'ws') { - console.log('USing ws'); - self.addProvider(new SubscriptionSubprovider()); - self.addProvider(new WsSubprovider({ - rpcUrl: self.web3Endpoint, - origin: this.blockchainConfig.wsOrigins.split(',')[0] - })); + self.provider = new this.web3.providers.WebsocketProvider(self.web3Endpoint, {headers: {Origin: "embark"}}); } else { return callback(__("contracts config error: unknown deployment type %s", this.type)); } - - - // network connectivity error - self.on('error', (err) => { - console.log('ERR', JSON.stringify(err)); - // report connectivity errors as trace due to polling - self.logger.trace('web3 provider error: ', err); - self.logger.trace('stopping web3 provider due to error'); - - // prevent continuous polling errors - self.stop(); - }); - - self.web3.setProvider(self); - self.start(); + self.web3.setProvider(self.provider); self.accounts = AccountParser.parseAccountsConfig(self.accountsConfig, self.web3, self.logger); self.addresses = []; - async.waterfall([ - function populateWeb3Wallet(next) { - if (!self.accounts.length) { - return next(NO_ACCOUNTS); - } - self.accounts.forEach(account => { - self.addresses.push(account.address); - self.web3.eth.accounts.wallet.add(account); - }); - self.asyncMethods = { - eth_accounts: self.eth_accounts.bind(self) - }; - next(); - } - ], function (err) { - if (err && err !== NO_ACCOUNTS) { - self.logger.error((err)); - } - callback(); + if (!self.accounts.length) { + return callback(); + } + self.accounts.forEach(account => { + self.addresses.push(account.address); + self.web3.eth.accounts.wallet.add(account); }); + + self.realAccountFunction = self.web3.eth.getAccounts; + self.web3.eth.getAccounts = function (cb) { + if (!cb) { + cb = function () { + }; + } + return new Promise((resolve, reject) => { + self.realAccountFunction((err, accounts) => { + if (err) { + cb(err); + return reject(err); + } + accounts = accounts.concat(self.addresses); + // accounts = self.addresses.concat(accounts); + cb(null, accounts); + resolve(accounts); + }); + }); + }; + + callback(); } fundAccounts(callback) { @@ -104,24 +71,6 @@ class Provider extends ProviderEngine { fundAccount(self.web3, account.address, account.hexBalance, eachCb); }, callback); } - - eth_accounts(payload, cb) { - return cb(null, this.addresses); - } - - sendAsync(payload, callback) { - let method = this.asyncMethods[payload.method]; - if (method) { - return method.call(method, payload, (err, result) => { - if (err) { - return callback(err); - } - let response = {'id': payload.id, 'jsonrpc': '2.0', 'result': result}; - callback(null, response); - }); - } - super.sendAsync(payload, callback); - } } module.exports = Provider; diff --git a/lib/tests/test.js b/lib/tests/test.js index 5f73ff9d5..af7f81699 100644 --- a/lib/tests/test.js +++ b/lib/tests/test.js @@ -44,12 +44,11 @@ class Test { } initWeb3Provider(callback) { - const self = this; if (this.provider) { this.provider.stop(); } if (this.simOptions.host) { - let {host, port, type, protocol, accounts} = this.simOptions; + let {host, port, type, protocol, accounts} = this.simOptions; if (!protocol) { protocol = (this.simOptions.type === "rpc") ? 'http' : 'ws'; } @@ -71,21 +70,6 @@ class Test { return callback(err); } - /*const ProviderEngine = require('embark-web3-provider-engine'); - const WsSubprovider = require('embark-web3-provider-engine/subproviders/websocket'); - const SubscriptionSubprovider = require('embark-web3-provider-engine/subproviders/subscriptions'); - const engine = new ProviderEngine(); - self.web3 = new Web3(engine); - - engine.addProvider(new SubscriptionSubprovider()); - engine.addProvider(new WsSubprovider({ - rpcUrl: endpoint, - origin: self.engine.config.blockchainConfig.wsOrigins.split(',')[0] - })); - - engine.start(); - return callback();*/ - this.provider = new Provider(providerOptions); this.provider.startWeb3Provider(callback); }); @@ -203,7 +187,11 @@ class Test { if (options.deployment.type !== 'rpc' && options.deployment.type !== 'ws') { callback(__("contracts config error: unknown deployment type %s", options.deployment.type)); } - Object.assign(self.simOptions, {host: options.deployment.host, port: options.deployment.port, type: options.deployment.type}); + Object.assign(self.simOptions, { + host: options.deployment.host, + port: options.deployment.port, + type: options.deployment.type + }); resetServices = true; } if (!resetServices) { @@ -289,7 +277,9 @@ class Test { console.warn("Warning: default account has no funds"); } next(null, accounts); - }).catch((err) => { next(err); }); + }).catch((err) => { + next(err); + }); }, function deploy(accounts, next) { self.engine.deployManager.gasLimit = 6000000; @@ -310,7 +300,13 @@ class Test { } else { data = self.contracts[contractName].options.data; } - Object.assign(self.contracts[contractName], new EmbarkJS.Contract({abi: contract.abiDefinition, address: contract.deployedAddress, from: self.web3.eth.defaultAccount, gas: 6000000, web3: self.web3})); + Object.assign(self.contracts[contractName], new EmbarkJS.Contract({ + abi: contract.abiDefinition, + address: contract.deployedAddress, + from: self.web3.eth.defaultAccount, + gas: 6000000, + web3: self.web3 + })); self.contracts[contractName].address = contract.deployedAddress; if (self.contracts[contractName].options) { @@ -358,7 +354,13 @@ class Test { contract = this.engine.contractsManager.contracts[contractNames[0]]; } } - this.contracts[contractName] = new EmbarkJS.Contract({abi: contract.abiDefinition, address: contract.address, from: this.web3.eth.defaultAccount, gas: 6000000, web3: this.web3}); + this.contracts[contractName] = new EmbarkJS.Contract({ + abi: contract.abiDefinition, + address: contract.address, + from: this.web3.eth.defaultAccount, + gas: 6000000, + web3: this.web3 + }); this.contracts[contractName].address = contract.address; this.contracts[contractName].options.data = contract.code; this.contracts[contractName].options.gas = 6000000; diff --git a/package-lock.json b/package-lock.json index 0b824d1e9..949fc5568 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,14 +94,6 @@ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, - "abstract-leveldown": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", - "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", - "requires": { - "xtend": "4.0.1" - } - }, "accepts": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", @@ -426,14 +418,6 @@ "resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-1.1.0.tgz", "integrity": "sha1-9C/YFV048hpbjqB8KOBj7RcAsTg=" }, - "async-eventemitter": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", - "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", - "requires": { - "async": "2.6.1" - } - }, "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", @@ -1148,54 +1132,6 @@ } } }, - "babel-preset-env": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz", - "integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==", - "requires": { - "babel-plugin-check-es2015-constants": "6.22.0", - "babel-plugin-syntax-trailing-function-commas": "6.22.0", - "babel-plugin-transform-async-to-generator": "6.24.1", - "babel-plugin-transform-es2015-arrow-functions": "6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", - "babel-plugin-transform-es2015-block-scoping": "6.26.0", - "babel-plugin-transform-es2015-classes": "6.24.1", - "babel-plugin-transform-es2015-computed-properties": "6.24.1", - "babel-plugin-transform-es2015-destructuring": "6.23.0", - "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", - "babel-plugin-transform-es2015-for-of": "6.23.0", - "babel-plugin-transform-es2015-function-name": "6.24.1", - "babel-plugin-transform-es2015-literals": "6.22.0", - "babel-plugin-transform-es2015-modules-amd": "6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", - "babel-plugin-transform-es2015-modules-systemjs": "6.24.1", - "babel-plugin-transform-es2015-modules-umd": "6.24.1", - "babel-plugin-transform-es2015-object-super": "6.24.1", - "babel-plugin-transform-es2015-parameters": "6.24.1", - "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", - "babel-plugin-transform-es2015-spread": "6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "6.24.1", - "babel-plugin-transform-es2015-template-literals": "6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", - "babel-plugin-transform-es2015-unicode-regex": "6.24.1", - "babel-plugin-transform-exponentiation-operator": "6.24.1", - "babel-plugin-transform-regenerator": "6.26.0", - "browserslist": "3.2.8", - "invariant": "2.2.4", - "semver": "5.5.0" - }, - "dependencies": { - "browserslist": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", - "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", - "requires": { - "caniuse-lite": "1.0.30000859", - "electron-to-chromium": "1.3.48" - } - } - } - }, "babel-preset-es2015": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", @@ -1360,28 +1296,11 @@ "to-fast-properties": "1.0.3" } }, - "babelify": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz", - "integrity": "sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU=", - "requires": { - "babel-core": "6.26.3", - "object-assign": "4.1.1" - } - }, "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" }, - "backoff": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz", - "integrity": "sha1-9hbtqdPktmuMp/ynn2lXIsX44m8=", - "requires": { - "precond": "0.2.3" - } - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1914,11 +1833,6 @@ "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000853.tgz", "integrity": "sha1-MpAafWuTqH1Z8Iqu5H6o/27JD98=" }, - "caniuse-lite": { - "version": "1.0.30000859", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000859.tgz", - "integrity": "sha512-BucSdVZocKyKAdThos0fx7Ds941M1jddFazv7U3stFqxyWOc2JrxVn87Qo02DzP9Txb4lw9jIQddh9IT4WA3dQ==" - }, "caseless": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.8.0.tgz", @@ -1950,14 +1864,6 @@ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" }, - "checkpoint-store": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", - "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", - "requires": { - "functional-red-black-tree": "1.0.1" - } - }, "chokidar": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", @@ -2400,15 +2306,6 @@ "sha.js": "2.4.11" } }, - "cross-fetch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.1.tgz", - "integrity": "sha1-lshZEE113vyWf7XbYkdOdUJrArA=", - "requires": { - "node-fetch": "2.1.2", - "whatwg-fetch": "2.0.4" - } - }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -2758,30 +2655,6 @@ "clone": "1.0.4" } }, - "deferred-leveldown": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", - "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", - "requires": { - "abstract-leveldown": "2.6.3" - } - }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.12" - }, - "dependencies": { - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" - } - } - }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -3034,63 +2907,6 @@ "minimalistic-crypto-utils": "1.0.1" } }, - "embark-web3-provider-engine": { - "version": "14.0.7", - "resolved": "https://registry.npmjs.org/embark-web3-provider-engine/-/embark-web3-provider-engine-14.0.7.tgz", - "integrity": "sha512-XNa+JPOTK/CLcKkF/Tkz7+Sj9/rKqUW51sknRPmfbgG7Ai39xv5gdI8y8pnp7eR58YbOwm+HDp0tZ25seWycQA==", - "requires": { - "async": "2.6.1", - "backoff": "2.5.0", - "clone": "2.1.1", - "cross-fetch": "2.2.1", - "eth-block-tracker": "4.0.1", - "eth-json-rpc-infura": "3.1.2", - "eth-sig-util": "1.4.2", - "ethereumjs-block": "1.7.1", - "ethereumjs-tx": "1.3.5", - "ethereumjs-util": "5.2.0", - "ethereumjs-vm": "2.3.5", - "json-rpc-error": "2.0.0", - "json-stable-stringify": "1.0.1", - "promise-to-callback": "1.0.0", - "readable-stream": "2.3.6", - "request": "2.87.0", - "semaphore": "1.1.0", - "tape": "4.9.1", - "ws": "5.2.1", - "xhr": "2.5.0", - "xtend": "4.0.1" - }, - "dependencies": { - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" - }, - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "requires": { - "bn.js": "4.11.8", - "create-hash": "1.2.0", - "ethjs-util": "0.1.6", - "keccak": "1.4.0", - "rlp": "2.0.0", - "safe-buffer": "5.1.2", - "secp256k1": "3.5.0" - } - }, - "ws": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.1.tgz", - "integrity": "sha512-2NkHdPKjDBj3CHdnAGNpmlliryKqF+n9MYXX7/wsVC4yqYocKreKNjydPDvT3wShAZnndlM0RytEfTALCDvz7A==", - "requires": { - "async-limiter": "1.0.0" - } - } - } - }, "emojis-list": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", @@ -3101,14 +2917,6 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "requires": { - "iconv-lite": "0.4.23" - } - }, "end-of-stream": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", @@ -3157,28 +2965,6 @@ "is-arrayish": "0.2.1" } }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.1", - "has": "1.0.3", - "is-callable": "1.1.3", - "is-regex": "1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "requires": { - "is-callable": "1.1.3", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" - } - }, "es5-ext": { "version": "0.10.45", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", @@ -3507,16 +3293,6 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, - "eth-block-tracker": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-4.0.1.tgz", - "integrity": "sha512-ytJxddJ0TMcJHYxPlgGhMyr5EH6/Kyp3bg0WsjXgY9X0uYX3xVHTTeU5WVX6KX+9oJ37ZLUjh5PZ6VYnF1Fx/Q==", - "requires": { - "eth-json-rpc-infura": "3.1.2", - "eth-query": "2.1.2", - "pify": "3.0.0" - } - }, "eth-ens-namehash": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", @@ -3526,54 +3302,6 @@ "js-sha3": "0.5.7" } }, - "eth-json-rpc-infura": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eth-json-rpc-infura/-/eth-json-rpc-infura-3.1.2.tgz", - "integrity": "sha512-IuK5Iowfs6taluA/3Okmu6EfZcFMq6MQuyrUL1PrCoJstuuBr3TvVeSy3keDyxfbrjFB34nCo538I8G+qMtsbw==", - "requires": { - "cross-fetch": "2.2.1", - "eth-json-rpc-middleware": "1.6.0", - "json-rpc-engine": "3.7.3", - "json-rpc-error": "2.0.0", - "tape": "4.9.1" - } - }, - "eth-json-rpc-middleware": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz", - "integrity": "sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q==", - "requires": { - "async": "2.6.1", - "eth-query": "2.1.2", - "eth-tx-summary": "3.2.3", - "ethereumjs-block": "1.7.1", - "ethereumjs-tx": "1.3.5", - "ethereumjs-util": "5.2.0", - "ethereumjs-vm": "2.3.5", - "fetch-ponyfill": "4.1.0", - "json-rpc-engine": "3.7.3", - "json-rpc-error": "2.0.0", - "json-stable-stringify": "1.0.1", - "promise-to-callback": "1.0.0", - "tape": "4.9.1" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "requires": { - "bn.js": "4.11.8", - "create-hash": "1.2.0", - "ethjs-util": "0.1.6", - "keccak": "1.4.0", - "rlp": "2.0.0", - "safe-buffer": "5.1.2", - "secp256k1": "3.5.0" - } - } - } - }, "eth-lib": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", @@ -3584,195 +3312,6 @@ "xhr-request-promise": "0.1.2" } }, - "eth-query": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz", - "integrity": "sha1-1nQdkAAQa1FRDHLbktY2VFam2l4=", - "requires": { - "json-rpc-random-id": "1.0.1", - "xtend": "4.0.1" - } - }, - "eth-sig-util": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", - "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", - "requires": { - "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#4ea2fdfed09e8f99117d9362d17c6b01b64a2bcf", - "ethereumjs-util": "5.2.0" - }, - "dependencies": { - "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#4ea2fdfed09e8f99117d9362d17c6b01b64a2bcf", - "requires": { - "bn.js": "4.11.8", - "ethereumjs-util": "5.2.0" - } - }, - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "requires": { - "bn.js": "4.11.8", - "create-hash": "1.2.0", - "ethjs-util": "0.1.6", - "keccak": "1.4.0", - "rlp": "2.0.0", - "safe-buffer": "5.1.2", - "secp256k1": "3.5.0" - } - } - } - }, - "eth-tx-summary": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/eth-tx-summary/-/eth-tx-summary-3.2.3.tgz", - "integrity": "sha512-1gZpA5fKarJOVSb5OUlPnhDQuIazqAkI61zlVvf5LdG47nEgw+/qhyZnuj3CUdE/TLTKuRzPLeyXLjaB4qWTRQ==", - "requires": { - "async": "2.6.1", - "bn.js": "4.11.8", - "clone": "2.1.1", - "concat-stream": "1.6.2", - "end-of-stream": "1.4.1", - "eth-query": "2.1.2", - "ethereumjs-block": "1.7.1", - "ethereumjs-tx": "1.3.5", - "ethereumjs-util": "5.2.0", - "ethereumjs-vm": "2.3.4", - "through2": "2.0.3", - "treeify": "1.1.0", - "web3-provider-engine": "13.8.0" - }, - "dependencies": { - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" - }, - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "requires": { - "bn.js": "4.11.8", - "create-hash": "1.2.0", - "ethjs-util": "0.1.6", - "keccak": "1.4.0", - "rlp": "2.0.0", - "safe-buffer": "5.1.2", - "secp256k1": "3.5.0" - } - }, - "ethereumjs-vm": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.3.4.tgz", - "integrity": "sha512-Y4SlzNDqxrCO58jhp98HdnZVdjOqB+HC0hoU+N/DEp1aU+hFkRX/nru5F7/HkQRPIlA6aJlQp/xIA6xZs1kspw==", - "requires": { - "async": "2.6.1", - "async-eventemitter": "0.2.4", - "ethereum-common": "0.2.0", - "ethereumjs-account": "2.0.5", - "ethereumjs-block": "1.7.1", - "ethereumjs-util": "5.2.0", - "fake-merkle-patricia-tree": "1.0.1", - "functional-red-black-tree": "1.0.1", - "merkle-patricia-tree": "2.3.1", - "rustbn.js": "0.1.2", - "safe-buffer": "5.1.2" - } - } - } - }, - "ethereum-common": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", - "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==" - }, - "ethereumjs-account": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", - "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", - "requires": { - "ethereumjs-util": "5.2.0", - "rlp": "2.0.0", - "safe-buffer": "5.1.2" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "requires": { - "bn.js": "4.11.8", - "create-hash": "1.2.0", - "ethjs-util": "0.1.6", - "keccak": "1.4.0", - "rlp": "2.0.0", - "safe-buffer": "5.1.2", - "secp256k1": "3.5.0" - } - } - } - }, - "ethereumjs-block": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", - "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", - "requires": { - "async": "2.6.1", - "ethereum-common": "0.2.0", - "ethereumjs-tx": "1.3.5", - "ethereumjs-util": "5.2.0", - "merkle-patricia-tree": "2.3.1" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "requires": { - "bn.js": "4.11.8", - "create-hash": "1.2.0", - "ethjs-util": "0.1.6", - "keccak": "1.4.0", - "rlp": "2.0.0", - "safe-buffer": "5.1.2", - "secp256k1": "3.5.0" - } - } - } - }, - "ethereumjs-tx": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.5.tgz", - "integrity": "sha512-cPr0BxitCaffq0qQwZRHJgiNCM/3IIJqkYbweeUCyPwV77S+GlQHou2L3afKEFtfiAjfaa82T9LnSmY/pM8iYQ==", - "requires": { - "ethereum-common": "0.0.18", - "ethereumjs-util": "5.2.0" - }, - "dependencies": { - "ethereum-common": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", - "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" - }, - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "requires": { - "bn.js": "4.11.8", - "create-hash": "1.2.0", - "ethjs-util": "0.1.6", - "keccak": "1.4.0", - "rlp": "2.0.0", - "safe-buffer": "5.1.2", - "secp256k1": "3.5.0" - } - } - } - }, "ethereumjs-util": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz", @@ -3785,40 +3324,6 @@ "secp256k1": "3.5.0" } }, - "ethereumjs-vm": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.3.5.tgz", - "integrity": "sha512-AJ7x44+xqyE5+UO3Nns19WkTdZfyqFZ+sEjIEpvme7Ipbe3iBU1uwCcHEdiu/yY9bdhr3IfSa/NfIKNeXPaRVQ==", - "requires": { - "async": "2.6.1", - "async-eventemitter": "0.2.4", - "ethereum-common": "0.2.0", - "ethereumjs-account": "2.0.5", - "ethereumjs-block": "1.7.1", - "ethereumjs-util": "5.2.0", - "fake-merkle-patricia-tree": "1.0.1", - "functional-red-black-tree": "1.0.1", - "merkle-patricia-tree": "2.3.1", - "rustbn.js": "0.1.2", - "safe-buffer": "5.1.2" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "requires": { - "bn.js": "4.11.8", - "create-hash": "1.2.0", - "ethjs-util": "0.1.6", - "keccak": "1.4.0", - "rlp": "2.0.0", - "safe-buffer": "5.1.2", - "secp256k1": "3.5.0" - } - } - } - }, "ethereumjs-wallet": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.0.tgz", @@ -3856,15 +3361,6 @@ } } }, - "ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", - "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - } - }, "event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", @@ -4260,14 +3756,6 @@ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, - "fake-merkle-patricia-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", - "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", - "requires": { - "checkpoint-store": "1.1.0" - } - }, "fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", @@ -4310,25 +3798,6 @@ "pend": "1.2.0" } }, - "fetch-ponyfill": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz", - "integrity": "sha1-rjzl9zLGReq4fkroeTQUcJsjmJM=", - "requires": { - "node-fetch": "1.7.3" - }, - "dependencies": { - "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "requires": { - "encoding": "0.1.12", - "is-stream": "1.1.0" - } - } - } - }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -4517,11 +3986,6 @@ "for-in": "1.0.2" } }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, "forever-agent": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz", @@ -4646,7 +4110,8 @@ "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true }, "ganache-cli": { "version": "6.1.0", @@ -5736,11 +5201,6 @@ "resolved": "https://registry.npmjs.org/ignorepatterns/-/ignorepatterns-1.1.0.tgz", "integrity": "sha1-rI9DbyI5td+2bV8NOpBKh6xnzF4=" }, - "immediate": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", - "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=" - }, "import-local": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", @@ -6075,11 +5535,6 @@ } } }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" - }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -6128,11 +5583,6 @@ "number-is-nan": "1.0.1" } }, - "is-fn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fn/-/is-fn-1.0.0.tgz", - "integrity": "sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw=" - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -6294,14 +5744,6 @@ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "requires": { - "has": "1.0.3" - } - }, "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", @@ -6334,11 +5776,6 @@ "html-comment-regex": "1.1.1" } }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -6570,39 +6007,6 @@ "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" }, - "json-rpc-engine": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.7.3.tgz", - "integrity": "sha512-+FO3UWu/wafh/+MZ6BXy0HZU+f5plwUn82FgxpC0scJkEh5snOjFrAAtqCITPDfvfLHRUFOG5pQDUx2pspfERQ==", - "requires": { - "async": "2.6.1", - "babel-preset-env": "1.7.0", - "babelify": "7.3.0", - "clone": "2.1.1", - "json-rpc-error": "2.0.0", - "promise-to-callback": "1.0.0" - }, - "dependencies": { - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" - } - } - }, - "json-rpc-error": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/json-rpc-error/-/json-rpc-error-2.0.0.tgz", - "integrity": "sha1-p6+cICg4tekFxyUOVH8a/3cligI=", - "requires": { - "inherits": "2.0.3" - } - }, - "json-rpc-random-id": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz", - "integrity": "sha1-uknZat7RRE27jaPSA3SKy7zeyMg=" - }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -6613,14 +6017,6 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "requires": { - "jsonify": "0.0.0" - } - }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -6650,11 +6046,6 @@ "graceful-fs": "4.1.11" } }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" - }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -6679,17 +6070,6 @@ "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==", "dev": true }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "requires": { - "bindings": "1.3.0", - "inherits": "2.0.3", - "nan": "2.10.0", - "safe-buffer": "5.1.2" - } - }, "keccakjs": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/keccakjs/-/keccakjs-0.2.1.tgz", @@ -6743,114 +6123,6 @@ "invert-kv": "1.0.0" } }, - "level-codec": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", - "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==" - }, - "level-errors": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", - "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", - "requires": { - "errno": "0.1.7" - } - }, - "level-iterator-stream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", - "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", - "requires": { - "inherits": "2.0.3", - "level-errors": "1.0.5", - "readable-stream": "1.1.14", - "xtend": "4.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "level-ws": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", - "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", - "requires": { - "readable-stream": "1.0.34", - "xtend": "2.1.2" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "requires": { - "object-keys": "0.4.0" - } - } - } - }, - "levelup": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", - "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", - "requires": { - "deferred-leveldown": "1.2.2", - "level-codec": "7.0.1", - "level-errors": "1.0.5", - "level-iterator-stream": "1.3.1", - "prr": "1.0.1", - "semver": "5.4.1", - "xtend": "4.0.1" - }, - "dependencies": { - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" - } - } - }, "levenshtein-edit-distance": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/levenshtein-edit-distance/-/levenshtein-edit-distance-1.0.0.tgz", @@ -7437,11 +6709,6 @@ "yallist": "2.1.2" } }, - "ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" - }, "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", @@ -7692,29 +6959,6 @@ } } }, - "memdown": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", - "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", - "requires": { - "abstract-leveldown": "2.7.2", - "functional-red-black-tree": "1.0.1", - "immediate": "3.2.3", - "inherits": "2.0.3", - "ltgt": "2.2.1", - "safe-buffer": "5.1.2" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", - "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", - "requires": { - "xtend": "4.0.1" - } - } - } - }, "memory-fs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", @@ -7849,42 +7093,6 @@ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz", "integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==" }, - "merkle-patricia-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.1.tgz", - "integrity": "sha512-Qp9Mpb3xazznXzzGQBqHbqCpT2AR9joUOHYYPiQjYCarrdCPCnLWXo4BFv77y4xN26KR224xoU1n/qYY7RYYgw==", - "requires": { - "async": "1.5.2", - "ethereumjs-util": "5.2.0", - "level-ws": "0.0.0", - "levelup": "1.3.9", - "memdown": "1.4.1", - "readable-stream": "2.3.6", - "rlp": "2.0.0", - "semaphore": "1.1.0" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "requires": { - "bn.js": "4.11.8", - "create-hash": "1.2.0", - "ethjs-util": "0.1.6", - "keccak": "1.4.0", - "rlp": "2.0.0", - "safe-buffer": "5.1.2", - "secp256k1": "3.5.0" - } - } - } - }, "messageformat": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/messageformat/-/messageformat-0.3.1.tgz", @@ -8874,16 +8082,6 @@ } } }, - "object-inspect": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", - "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==" - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" - }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -9888,11 +9086,6 @@ "uniqs": "2.0.0" } }, - "precond": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", - "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=" - }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -9955,15 +9148,6 @@ } } }, - "promise-to-callback": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/promise-to-callback/-/promise-to-callback-1.0.0.tgz", - "integrity": "sha1-XSp0kBC/tn2WNZj805YHRqaP7vc=", - "requires": { - "is-fn": "1.0.0", - "set-immediate-shim": "1.0.1" - } - }, "promisify-es6": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/promisify-es6/-/promisify-es6-1.0.3.tgz", @@ -10626,14 +9810,6 @@ "signal-exit": "3.0.2" } }, - "resumer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", - "requires": { - "through": "2.3.8" - } - }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -10698,11 +9874,6 @@ "is-promise": "2.1.0" } }, - "rustbn.js": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.1.2.tgz", - "integrity": "sha512-bAkNqSHYdJdFsBC7Z11JgzYktL31HIpB2o70jZcGiL1U1TVtPyvaVhDrGWwS8uZtaqwW2k6NOPGZCqW/Dgh5Lg==" - }, "rx-lite": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", @@ -10845,11 +10016,6 @@ } } }, - "semaphore": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", - "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==" - }, "semver": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", @@ -11588,16 +10754,6 @@ } } }, - "string.prototype.trim": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz", - "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=", - "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.12.0", - "function-bind": "1.1.1" - } - }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -11898,33 +11054,6 @@ "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==" }, - "tape": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/tape/-/tape-4.9.1.tgz", - "integrity": "sha512-6fKIXknLpoe/Jp4rzHKFPpJUHDHDqn8jus99IfPnHIjyz78HYlefTGD3b5EkbQzuLfaEvmfPK3IolLgq2xT3kw==", - "requires": { - "deep-equal": "1.0.1", - "defined": "1.0.0", - "for-each": "0.3.3", - "function-bind": "1.1.1", - "glob": "7.1.2", - "has": "1.0.3", - "inherits": "2.0.3", - "minimist": "1.2.0", - "object-inspect": "1.6.0", - "resolve": "1.7.1", - "resumer": "0.0.0", - "string.prototype.trim": "1.1.2", - "through": "2.3.8" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } - } - }, "tar": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-3.2.1.tgz", @@ -12146,11 +11275,6 @@ } } }, - "treeify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", - "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==" - }, "trim": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", @@ -13045,79 +12169,6 @@ "web3-utils": "1.0.0-beta.34" } }, - "web3-provider-engine": { - "version": "13.8.0", - "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-13.8.0.tgz", - "integrity": "sha512-fZXhX5VWwWpoFfrfocslyg6P7cN3YWPG/ASaevNfeO80R+nzgoPUBXcWQekSGSsNDkeRTis4aMmpmofYf1TNtQ==", - "requires": { - "async": "2.6.1", - "clone": "2.1.1", - "eth-block-tracker": "2.3.1", - "eth-sig-util": "1.4.2", - "ethereumjs-block": "1.7.1", - "ethereumjs-tx": "1.3.5", - "ethereumjs-util": "5.2.0", - "ethereumjs-vm": "2.3.5", - "fetch-ponyfill": "4.1.0", - "json-rpc-error": "2.0.0", - "json-stable-stringify": "1.0.1", - "promise-to-callback": "1.0.0", - "readable-stream": "2.3.6", - "request": "2.87.0", - "semaphore": "1.1.0", - "solc": "0.4.24", - "tape": "4.9.1", - "xhr": "2.5.0", - "xtend": "4.0.1" - }, - "dependencies": { - "async-eventemitter": { - "version": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c", - "requires": { - "async": "2.6.1" - } - }, - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" - }, - "eth-block-tracker": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-2.3.1.tgz", - "integrity": "sha512-NamWuMBIl8kmkJFVj8WzGatySTzQPQag4Xr677yFxdVtIxACFbL/dQowk0MzEqIKk93U1TwY3MjVU6mOcwZnKA==", - "requires": { - "async-eventemitter": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c", - "eth-query": "2.1.2", - "ethereumjs-tx": "1.3.5", - "ethereumjs-util": "5.2.0", - "ethjs-util": "0.1.6", - "json-rpc-engine": "3.7.3", - "pify": "2.3.0", - "tape": "4.9.1" - } - }, - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "requires": { - "bn.js": "4.11.8", - "create-hash": "1.2.0", - "ethjs-util": "0.1.6", - "keccak": "1.4.0", - "rlp": "2.0.0", - "safe-buffer": "5.1.2", - "secp256k1": "3.5.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } - } - }, "web3-providers-http": { "version": "1.0.0-beta.34", "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.0.0-beta.34.tgz", @@ -13653,11 +12704,6 @@ "yaeti": "0.0.6" } }, - "whatwg-fetch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" - }, "whet.extend": { "version": "0.9.9", "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz", diff --git a/package.json b/package.json index 7d348faa7..defcf7158 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "css-loader": "^0.28.11", "deep-equal": "^1.0.1", "ejs": "^2.5.8", - "embark-web3-provider-engine": "14.0.7", "eth-ens-namehash": "^2.0.8", "eth-lib": "^0.2.8", "ethereumjs-wallet": "0.6.0", diff --git a/test_apps/test_app/test/simple_storage_spec.js b/test_apps/test_app/test/simple_storage_spec.js index 6addd6595..22c3f7af7 100644 --- a/test_apps/test_app/test/simple_storage_spec.js +++ b/test_apps/test_app/test/simple_storage_spec.js @@ -3,11 +3,6 @@ const SimpleStorage = require('Embark/contracts/SimpleStorage'); let accounts; config({ - deployment: { - type: 'ws', - host: 'localhost', - port: '8546' - }, contracts: { "SimpleStorage": { args: [100], @@ -43,20 +38,14 @@ contract("SimpleStorage", function () { }); it('listens to events', function (done) { - SimpleStorage.once('EventOnSet2', function(error, _result){ - console.log('error', error); - console.log('result', _result); - - /*assert.strictEqual(error, null); + SimpleStorage.once('EventOnSet2', async function (error, _result) { + assert.strictEqual(error, null); let result = await SimpleStorage.methods.get().call(); - assert.strictEqual(parseInt(result, 10), 150);*/ + assert.strictEqual(parseInt(result, 10), 150); done(error); }); - console.log('TEST'); - SimpleStorage.methods.set2(150, 100).send(() => { - console.log('Done'); - }); + SimpleStorage.methods.set2(150, 100).send(); }); });