From 4c99ac0ca2e758faf4f9fa8f9703cea357eb15aa Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 3 Jul 2018 15:59:30 +0200 Subject: Update web3-provider-engine --- packages/contract-wrappers/package.json | 2 +- packages/dev-utils/package.json | 2 +- packages/metacoin/package.json | 2 +- packages/migrations/package.json | 2 +- packages/subproviders/package.json | 2 +- packages/testnet-faucets/package.json | 2 +- packages/website/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 1b4835be6..1408b4269 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -74,7 +74,7 @@ "source-map-support": "^0.5.0", "tslint": "5.8.0", "typescript": "2.7.1", - "web3-provider-engine": "^14.0.4" + "web3-provider-engine": "^14.0.6" }, "dependencies": { "@0xproject/assert": "^0.2.12", diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 621053ed7..00c6aa3fd 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -53,7 +53,7 @@ "@0xproject/web3-wrapper": "^0.7.1", "lodash": "^4.17.4", "web3": "^0.20.0", - "web3-provider-engine": "^14.0.4" + "web3-provider-engine": "^14.0.6" }, "publishConfig": { "access": "public" diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index 6b6ab9c40..db2f2eece 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -45,7 +45,7 @@ "ethers": "3.0.22", "lodash": "^4.17.4", "run-s": "^0.0.0", - "web3-provider-engine": "^14.0.4" + "web3-provider-engine": "^14.0.6" }, "devDependencies": { "@0xproject/dev-utils": "^0.4.4", diff --git a/packages/migrations/package.json b/packages/migrations/package.json index f4190a771..891dc6b1a 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -70,7 +70,7 @@ "ethereum-types": "^0.0.2", "ethers": "3.0.22", "lodash": "^4.17.4", - "web3-provider-engine": "^14.0.4" + "web3-provider-engine": "^14.0.6" }, "optionalDependencies": { "@ledgerhq/hw-transport-node-hid": "^4.3.0" diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index d15f80163..43508aa0f 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -56,7 +56,7 @@ "lodash": "^4.17.4", "semaphore-async-await": "^1.5.1", "web3": "^0.20.0", - "web3-provider-engine": "^14.0.4" + "web3-provider-engine": "^14.0.6" }, "devDependencies": { "@0xproject/monorepo-scripts": "^0.2.1", diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json index fdd71656a..2e3668fdb 100644 --- a/packages/testnet-faucets/package.json +++ b/packages/testnet-faucets/package.json @@ -29,7 +29,7 @@ "lodash": "^4.17.4", "rollbar": "^0.6.5", "web3": "^0.20.0", - "web3-provider-engine": "^14.0.4" + "web3-provider-engine": "^14.0.6" }, "devDependencies": { "@0xproject/tslint-config": "^0.4.20", diff --git a/packages/website/package.json b/packages/website/package.json index cc7b7c05c..3b17fbf98 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -59,7 +59,7 @@ "thenby": "^1.2.3", "truffle-contract": "2.0.1", "web3": "^0.20.0", - "web3-provider-engine": "^14.0.4", + "web3-provider-engine": "^14.0.6", "whatwg-fetch": "^2.0.3", "xml-js": "^1.6.4" }, -- cgit v1.2.3 From 671f29774b9a46420fdee33e3ecbffc7fa6f4c1a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 3 Jul 2018 16:56:49 +0200 Subject: Update web3-provider-engine version w/o caret --- packages/contract-wrappers/package.json | 2 +- packages/dev-utils/package.json | 2 +- packages/metacoin/package.json | 2 +- packages/migrations/package.json | 2 +- packages/subproviders/package.json | 2 +- packages/testnet-faucets/package.json | 2 +- packages/website/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 1408b4269..449c64c2d 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -74,7 +74,7 @@ "source-map-support": "^0.5.0", "tslint": "5.8.0", "typescript": "2.7.1", - "web3-provider-engine": "^14.0.6" + "web3-provider-engine": "14.0.6" }, "dependencies": { "@0xproject/assert": "^0.2.12", diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 00c6aa3fd..74b585d36 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -53,7 +53,7 @@ "@0xproject/web3-wrapper": "^0.7.1", "lodash": "^4.17.4", "web3": "^0.20.0", - "web3-provider-engine": "^14.0.6" + "web3-provider-engine": "14.0.6" }, "publishConfig": { "access": "public" diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index db2f2eece..65372dd78 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -45,7 +45,7 @@ "ethers": "3.0.22", "lodash": "^4.17.4", "run-s": "^0.0.0", - "web3-provider-engine": "^14.0.6" + "web3-provider-engine": "14.0.6" }, "devDependencies": { "@0xproject/dev-utils": "^0.4.4", diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 891dc6b1a..1cd8d209a 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -70,7 +70,7 @@ "ethereum-types": "^0.0.2", "ethers": "3.0.22", "lodash": "^4.17.4", - "web3-provider-engine": "^14.0.6" + "web3-provider-engine": "14.0.6" }, "optionalDependencies": { "@ledgerhq/hw-transport-node-hid": "^4.3.0" diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index 43508aa0f..23037df09 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -56,7 +56,7 @@ "lodash": "^4.17.4", "semaphore-async-await": "^1.5.1", "web3": "^0.20.0", - "web3-provider-engine": "^14.0.6" + "web3-provider-engine": "14.0.6" }, "devDependencies": { "@0xproject/monorepo-scripts": "^0.2.1", diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json index 2e3668fdb..35b5c6805 100644 --- a/packages/testnet-faucets/package.json +++ b/packages/testnet-faucets/package.json @@ -29,7 +29,7 @@ "lodash": "^4.17.4", "rollbar": "^0.6.5", "web3": "^0.20.0", - "web3-provider-engine": "^14.0.6" + "web3-provider-engine": "14.0.6" }, "devDependencies": { "@0xproject/tslint-config": "^0.4.20", diff --git a/packages/website/package.json b/packages/website/package.json index 3b17fbf98..b9177bed2 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -59,7 +59,7 @@ "thenby": "^1.2.3", "truffle-contract": "2.0.1", "web3": "^0.20.0", - "web3-provider-engine": "^14.0.6", + "web3-provider-engine": "14.0.6", "whatwg-fetch": "^2.0.3", "xml-js": "^1.6.4" }, -- cgit v1.2.3 From 688b34710ea4b9262ac67d33b688751d5ca05a01 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 3 Jul 2018 18:15:20 +0200 Subject: Update blockstream to latest version, propogate errors to top-level callers --- packages/contract-wrappers/CHANGELOG.json | 8 ++++++++ packages/contract-wrappers/package.json | 2 +- .../src/contract_wrappers/contract_wrapper.ts | 13 +++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index 33d9bc4c0..e34b50c1a 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -1,4 +1,12 @@ [ + { + "version": "0.0.6", + "changes": [ + { + "note": "Update blockstream to v5.0 and propogate up caught errors to active subscriptions" + } + ] + }, { "timestamp": 1529397769, "version": "0.0.5", diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 449c64c2d..908f52a06 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -87,7 +87,7 @@ "@0xproject/utils": "^0.7.1", "@0xproject/web3-wrapper": "^0.7.1", "ethereum-types": "^0.0.2", - "ethereumjs-blockstream": "^2.0.6", + "ethereumjs-blockstream": "5.0.0", "ethereumjs-util": "^5.1.1", "ethers": "3.0.22", "js-sha3": "^0.7.0", diff --git a/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts index 04f69bc3d..9cc661080 100644 --- a/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts @@ -9,7 +9,7 @@ import { } from '@0xproject/types'; import { intervalUtils } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; -import { Block, BlockAndLogStreamer } from 'ethereumjs-blockstream'; +import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream'; import * as _ from 'lodash'; import { @@ -39,7 +39,7 @@ export abstract class ContractWrapper { public abstract abi: ContractAbi; protected _web3Wrapper: Web3Wrapper; protected _networkId: number; - private _blockAndLogStreamerIfExists?: BlockAndLogStreamer; + private _blockAndLogStreamerIfExists: BlockAndLogStreamer | undefined; private _blockAndLogStreamIntervalIfExists?: NodeJS.Timer; private _filters: { [filterToken: string]: FilterObject }; private _filterCallbacks: { @@ -163,6 +163,7 @@ export abstract class ContractWrapper { this._blockAndLogStreamerIfExists = new BlockAndLogStreamer( this._web3Wrapper.getBlockAsync.bind(this._web3Wrapper), this._web3Wrapper.getLogsAsync.bind(this._web3Wrapper), + this._onBlockAndLogStreamerError.bind(this), ); const catchAllLogFilter = {}; this._blockAndLogStreamerIfExists.addLogFilter(catchAllLogFilter); @@ -180,6 +181,14 @@ export abstract class ContractWrapper { this._onLogStateChanged.bind(this, isRemoved), ); } + private _onBlockAndLogStreamerError(err: Error): void { + // Propogate all Blockstream subscriber errors to all + // top-level subscriptions + const filterCallbacks = _.values(this._filterCallbacks); + _.each(filterCallbacks, filterCallback => { + filterCallback(err); + }); + } private _onReconcileBlockError(err: Error): void { const filterTokens = _.keys(this._filterCallbacks); _.each(filterTokens, filterToken => { -- cgit v1.2.3 From 5e8ef070e2255a1360753e81045cb42572e9c877 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 3 Jul 2018 18:26:12 +0200 Subject: Fix alignment --- packages/contract-wrappers/package.json | 2 +- packages/dev-utils/package.json | 2 +- packages/metacoin/package.json | 2 +- packages/migrations/package.json | 2 +- packages/subproviders/package.json | 2 +- packages/testnet-faucets/package.json | 2 +- packages/website/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 908f52a06..373e023bd 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -74,7 +74,7 @@ "source-map-support": "^0.5.0", "tslint": "5.8.0", "typescript": "2.7.1", - "web3-provider-engine": "14.0.6" + "web3-provider-engine": "14.0.6" }, "dependencies": { "@0xproject/assert": "^0.2.12", diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 74b585d36..ebb2aeb41 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -53,7 +53,7 @@ "@0xproject/web3-wrapper": "^0.7.1", "lodash": "^4.17.4", "web3": "^0.20.0", - "web3-provider-engine": "14.0.6" + "web3-provider-engine": "14.0.6" }, "publishConfig": { "access": "public" diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index 65372dd78..3fa79387e 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -45,7 +45,7 @@ "ethers": "3.0.22", "lodash": "^4.17.4", "run-s": "^0.0.0", - "web3-provider-engine": "14.0.6" + "web3-provider-engine": "14.0.6" }, "devDependencies": { "@0xproject/dev-utils": "^0.4.4", diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 1cd8d209a..a5fd3756a 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -70,7 +70,7 @@ "ethereum-types": "^0.0.2", "ethers": "3.0.22", "lodash": "^4.17.4", - "web3-provider-engine": "14.0.6" + "web3-provider-engine": "14.0.6" }, "optionalDependencies": { "@ledgerhq/hw-transport-node-hid": "^4.3.0" diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index 23037df09..a3ff31f53 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -56,7 +56,7 @@ "lodash": "^4.17.4", "semaphore-async-await": "^1.5.1", "web3": "^0.20.0", - "web3-provider-engine": "14.0.6" + "web3-provider-engine": "14.0.6" }, "devDependencies": { "@0xproject/monorepo-scripts": "^0.2.1", diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json index 35b5c6805..0ec62f097 100644 --- a/packages/testnet-faucets/package.json +++ b/packages/testnet-faucets/package.json @@ -29,7 +29,7 @@ "lodash": "^4.17.4", "rollbar": "^0.6.5", "web3": "^0.20.0", - "web3-provider-engine": "14.0.6" + "web3-provider-engine": "14.0.6" }, "devDependencies": { "@0xproject/tslint-config": "^0.4.20", diff --git a/packages/website/package.json b/packages/website/package.json index b9177bed2..1bfc385b5 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -59,7 +59,7 @@ "thenby": "^1.2.3", "truffle-contract": "2.0.1", "web3": "^0.20.0", - "web3-provider-engine": "14.0.6", + "web3-provider-engine": "14.0.6", "whatwg-fetch": "^2.0.3", "xml-js": "^1.6.4" }, -- cgit v1.2.3