aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/utils/provider_factory.ts
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-09-05 03:32:43 +0800
committerJacob Evans <jacob@dekz.net>2018-09-05 03:32:43 +0800
commit192d4b4dbfa3b3e8a1cc73d4f3e0e11074e3ae6b (patch)
treeaff2c74c7cbebe891f0bf1e17b94da121369f887 /packages/migrations/src/utils/provider_factory.ts
parent68246fc33546a4d2f56e10a014d0bc56723061c0 (diff)
parent7ef86636aad31c4c8253175c0b2356313fada681 (diff)
downloaddexon-0x-contracts-192d4b4dbfa3b3e8a1cc73d4f3e0e11074e3ae6b.tar
dexon-0x-contracts-192d4b4dbfa3b3e8a1cc73d4f3e0e11074e3ae6b.tar.gz
dexon-0x-contracts-192d4b4dbfa3b3e8a1cc73d4f3e0e11074e3ae6b.tar.bz2
dexon-0x-contracts-192d4b4dbfa3b3e8a1cc73d4f3e0e11074e3ae6b.tar.lz
dexon-0x-contracts-192d4b4dbfa3b3e8a1cc73d4f3e0e11074e3ae6b.tar.xz
dexon-0x-contracts-192d4b4dbfa3b3e8a1cc73d4f3e0e11074e3ae6b.tar.zst
dexon-0x-contracts-192d4b4dbfa3b3e8a1cc73d4f3e0e11074e3ae6b.zip
Merge branch 'deployment/2.0.0-beta-testnet/ropsten' of github.com:0xProject/0x-monorepo into deployment/2.0.0-beta-testnet/ropsten
Diffstat (limited to 'packages/migrations/src/utils/provider_factory.ts')
-rw-r--r--packages/migrations/src/utils/provider_factory.ts14
1 files changed, 13 insertions, 1 deletions
diff --git a/packages/migrations/src/utils/provider_factory.ts b/packages/migrations/src/utils/provider_factory.ts
index a0d4e436e..e7e00a039 100644
--- a/packages/migrations/src/utils/provider_factory.ts
+++ b/packages/migrations/src/utils/provider_factory.ts
@@ -12,7 +12,7 @@ async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumC
return ledgerEthClient;
}
export const providerFactory = {
- async getLedgerProviderAsync(): Promise<Provider> {
+ async getKovanLedgerProviderAsync(): Promise<Provider> {
const provider = new Web3ProviderEngine();
const ledgerWalletConfigs = {
networkId: constants.KOVAN_NETWORK_ID,
@@ -24,4 +24,16 @@ export const providerFactory = {
provider.start();
return provider;
},
+ async getMainnetLedgerProviderAsync(): Promise<Provider> {
+ const provider = new Web3ProviderEngine();
+ const ledgerWalletConfigs = {
+ networkId: constants.MAINNET_NETWORK_ID,
+ ledgerEthereumClientFactoryAsync: ledgerEthereumNodeJsClientFactoryAsync,
+ };
+ const ledgerSubprovider = new LedgerSubprovider(ledgerWalletConfigs);
+ provider.addProvider(ledgerSubprovider);
+ provider.addProvider(new RPCSubprovider(constants.MAINNET_RPC_URL));
+ provider.start();
+ return provider;
+ },
};