diff options
Diffstat (limited to 'packages/migrations/src/utils')
-rw-r--r-- | packages/migrations/src/utils/constants.ts | 18 | ||||
-rw-r--r-- | packages/migrations/src/utils/provider_factory.ts | 39 | ||||
-rw-r--r-- | packages/migrations/src/utils/token_info.ts | 62 |
3 files changed, 0 insertions, 119 deletions
diff --git a/packages/migrations/src/utils/constants.ts b/packages/migrations/src/utils/constants.ts deleted file mode 100644 index 8b16a0520..000000000 --- a/packages/migrations/src/utils/constants.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { BigNumber } from '@0x/utils'; - -export const constants = { - ASSET_PROXY_OWNER_OWNERS: [ - '0x9df8137872ac09a8fee71d0da5c7539923fb9bf0', - '0xcf34d44db312d188789f43a63d11cf2bebb4da15', - '0x73fd50f2a6beac9cdac9fe87ef68a18edc415831', - ], - ASSET_PROXY_OWNER_TIMELOCK: new BigNumber(0), - ASSET_PROXY_OWNER_CONFIRMATIONS: new BigNumber(1), - ERC20_PROXY_ID: '0xf47261b0', - ERC721_PROXY_ID: '0x02571792', - 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 deleted file mode 100644 index 8017b672a..000000000 --- a/packages/migrations/src/utils/provider_factory.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { LedgerEthereumClient, LedgerSubprovider, RPCSubprovider, Web3ProviderEngine } from '@0x/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 { constants } from './constants'; - -async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumClient> { - const ledgerConnection = await TransportNodeHid.create(); - const ledgerEthClient = new Eth(ledgerConnection); - return ledgerEthClient; -} -export const providerFactory = { - async getKovanLedgerProviderAsync(): Promise<Provider> { - 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(constants.KOVAN_RPC_URL)); - 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 deleted file mode 100644 index 6e0411f60..000000000 --- a/packages/migrations/src/utils/token_info.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { BigNumber, NULL_BYTES } from '@0x/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', - symbol: 'REP', - decimals: new BigNumber(18), - ipfsHash: NULL_BYTES, - swarmHash: NULL_BYTES, - }, - { - name: 'Digix DAO Token', - symbol: 'DGD', - decimals: new BigNumber(18), - ipfsHash: NULL_BYTES, - swarmHash: NULL_BYTES, - }, - { - name: 'Golem Network Token', - symbol: 'GNT', - decimals: new BigNumber(18), - ipfsHash: NULL_BYTES, - swarmHash: NULL_BYTES, - }, - { - name: 'MakerDAO', - symbol: 'MKR', - decimals: new BigNumber(18), - ipfsHash: NULL_BYTES, - swarmHash: NULL_BYTES, - }, - { - name: 'Melon Token', - symbol: 'MLN', - decimals: new BigNumber(18), - ipfsHash: NULL_BYTES, - swarmHash: NULL_BYTES, - }, -]; - -export const erc721TokenInfo: ERC721Token[] = [ - { - name: '0xen ERC721', - symbol: '0xen', - }, -]; |