diff options
author | Fabio Berger <me@fabioberger.com> | 2018-07-19 23:48:06 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-07-19 23:48:06 +0800 |
commit | d8898cf9a30cc349868afcf2b78e6369e57aa726 (patch) | |
tree | f96d1aa76c7e5aa9e3311d5cdbd0d31c8ec8d7fb /packages/migrations/src/utils | |
parent | 1aaf633df883f62fad890b2d87a2dc89067821c5 (diff) | |
parent | 3de88d5345c7a4549bc69e2ca28f0601f5d42189 (diff) | |
download | dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.gz dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.bz2 dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.lz dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.xz dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.zst dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.zip |
merge v2-prototype
Diffstat (limited to 'packages/migrations/src/utils')
-rw-r--r-- | packages/migrations/src/utils/artifact_writer.ts | 4 | ||||
-rw-r--r-- | packages/migrations/src/utils/provider_factory.ts | 12 |
2 files changed, 5 insertions, 11 deletions
diff --git a/packages/migrations/src/utils/artifact_writer.ts b/packages/migrations/src/utils/artifact_writer.ts index 2da5a09dd..b7522df05 100644 --- a/packages/migrations/src/utils/artifact_writer.ts +++ b/packages/migrations/src/utils/artifact_writer.ts @@ -4,8 +4,8 @@ import * as fs from 'fs'; import * as path from 'path'; export class ArtifactWriter { - private _artifactsDir: string; - private _networkId: number; + private readonly _artifactsDir: string; + private readonly _networkId: number; constructor(artifactsDir: string, networkId: number) { this._artifactsDir = artifactsDir; this._networkId = networkId; diff --git a/packages/migrations/src/utils/provider_factory.ts b/packages/migrations/src/utils/provider_factory.ts index 7a217b1e0..5f69b258d 100644 --- a/packages/migrations/src/utils/provider_factory.ts +++ b/packages/migrations/src/utils/provider_factory.ts @@ -1,10 +1,8 @@ -import { LedgerEthereumClient, LedgerSubprovider } from '@0xproject/subproviders'; +import { LedgerEthereumClient, LedgerSubprovider, RPCSubprovider, Web3ProviderEngine } from '@0xproject/subproviders'; import Eth from '@ledgerhq/hw-app-eth'; // tslint:disable:no-implicit-dependencies import TransportNodeHid from '@ledgerhq/hw-transport-node-hid'; import { Provider } from 'ethereum-types'; -import ProviderEngine = require('web3-provider-engine'); -import RpcSubprovider = require('web3-provider-engine/subproviders/rpc'); import { constants } from './constants'; @@ -15,18 +13,14 @@ async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumC } export const providerFactory = { async getLedgerProviderAsync(): Promise<Provider> { - const provider = new ProviderEngine(); + const provider = new Web3ProviderEngine(); const ledgerWalletConfigs = { networkId: constants.KOVAN_NETWORK_ID, ledgerEthereumClientFactoryAsync: ledgerEthereumNodeJsClientFactoryAsync, }; const ledgerSubprovider = new LedgerSubprovider(ledgerWalletConfigs); provider.addProvider(ledgerSubprovider); - provider.addProvider( - new RpcSubprovider({ - rpcUrl: constants.RPC_URL, - }), - ); + provider.addProvider(new RPCSubprovider(constants.RPC_URL)); provider.start(); return provider; }, |