diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-16 20:38:27 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-16 20:38:27 +0800 |
commit | acff177c547dee049b97e4b051fe22e1efaf992c (patch) | |
tree | 4580187592aac7695c1edae15a6f68eea5b1078c /packages/dev-utils | |
parent | ffeb3194a8f5e68c266f0bc6c70c6c9ba0754ec6 (diff) | |
parent | 6bdee26c3037733ad198d54c1e88f3c7647ad230 (diff) | |
download | dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.tar dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.tar.gz dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.tar.bz2 dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.tar.lz dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.tar.xz dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.tar.zst dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.zip |
Merge branch 'v2-prototype' into feature/order-watcher-v2
Diffstat (limited to 'packages/dev-utils')
-rw-r--r-- | packages/dev-utils/package.json | 3 | ||||
-rw-r--r-- | packages/dev-utils/src/web3_factory.ts | 21 |
2 files changed, 11 insertions, 13 deletions
diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index b17d68361..d62533c16 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -51,8 +51,7 @@ "ethereum-types": "^0.0.2", "@0xproject/typescript-typings": "^0.4.2", "@0xproject/web3-wrapper": "^0.7.2", - "lodash": "^4.17.4", - "web3-provider-engine": "14.0.6" + "lodash": "^4.17.4" }, "publishConfig": { "access": "public" diff --git a/packages/dev-utils/src/web3_factory.ts b/packages/dev-utils/src/web3_factory.ts index 362a6c3c6..8e713fa68 100644 --- a/packages/dev-utils/src/web3_factory.ts +++ b/packages/dev-utils/src/web3_factory.ts @@ -1,7 +1,10 @@ -import ProviderEngine = require('web3-provider-engine'); -import RpcSubprovider = require('web3-provider-engine/subproviders/rpc'); - -import { EmptyWalletSubprovider, FakeGasEstimateSubprovider, GanacheSubprovider } from '@0xproject/subproviders'; +import { + EmptyWalletSubprovider, + FakeGasEstimateSubprovider, + GanacheSubprovider, + RPCSubprovider, + Web3ProviderEngine, +} from '@0xproject/subproviders'; import * as fs from 'fs'; import * as _ from 'lodash'; @@ -16,8 +19,8 @@ export interface Web3Config { } export const web3Factory = { - getRpcProvider(config: Web3Config = {}): ProviderEngine { - const provider = new ProviderEngine(); + getRpcProvider(config: Web3Config = {}): Web3ProviderEngine { + const provider = new Web3ProviderEngine(); const hasAddresses = _.isUndefined(config.hasAddresses) || config.hasAddresses; config.shouldUseFakeGasEstimate = _.isUndefined(config.shouldUseFakeGasEstimate) || config.shouldUseFakeGasEstimate; @@ -49,11 +52,7 @@ export const web3Factory = { }), ); } else { - provider.addProvider( - new RpcSubprovider({ - rpcUrl: config.rpcUrl || constants.RPC_URL, - }), - ); + provider.addProvider(new RPCSubprovider(config.rpcUrl || constants.RPC_URL)); } provider.start(); return provider; |