aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'packages/migrations/src/utils')
-rw-r--r--packages/migrations/src/utils/constants.ts2
-rw-r--r--packages/migrations/src/utils/provider_factory.ts14
-rw-r--r--packages/migrations/src/utils/token_info.ts18
3 files changed, 31 insertions, 3 deletions
diff --git a/packages/migrations/src/utils/constants.ts b/packages/migrations/src/utils/constants.ts
index 4ae2ff833..63898ac02 100644
--- a/packages/migrations/src/utils/constants.ts
+++ b/packages/migrations/src/utils/constants.ts
@@ -13,4 +13,6 @@ export const constants = {
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
KOVAN_RPC_URL: 'https://kovan.infura.io/',
KOVAN_NETWORK_ID: 42,
+ MAINNET_RPC_URL: 'https://mainnet.infura.io/',
+ MAINNET_NETWORK_ID: 1,
};
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;
+ },
};
diff --git a/packages/migrations/src/utils/token_info.ts b/packages/migrations/src/utils/token_info.ts
index 7975c2174..200f94896 100644
--- a/packages/migrations/src/utils/token_info.ts
+++ b/packages/migrations/src/utils/token_info.ts
@@ -2,6 +2,20 @@ import { BigNumber, NULL_BYTES } from '@0xproject/utils';
import { ERC20Token, ERC721Token } from '../types';
+export const etherTokenByNetwork: { [networkId: number]: { address: string } } = {
+ 3: {
+ address: '0xc778417e063141139fce010982780140aa0cd5ab',
+ },
+ 4: {
+ address: '0xc778417e063141139fce010982780140aa0cd5ab',
+ },
+ 42: {
+ address: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
+ },
+ 50: {
+ address: '',
+ },
+};
export const erc20TokenInfo: ERC20Token[] = [
{
name: 'Augur Reputation Token',
@@ -42,7 +56,7 @@ export const erc20TokenInfo: ERC20Token[] = [
export const erc721TokenInfo: ERC721Token[] = [
{
- name: 'CryptoKitties',
- symbol: 'CK',
+ name: '0xen ERC721',
+ symbol: '0xen',
},
];