diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-04 07:21:17 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-16 04:36:59 +0800 |
commit | 3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd (patch) | |
tree | 15d4c7df95fd96d6aedb712738cd18bfb213b1f1 /packages/migrations/src/migrate.ts | |
parent | 2aa73fc83962d421eae4447108a07a5d952b569d (diff) | |
download | dexon-sol-tools-3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd.tar dexon-sol-tools-3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd.tar.gz dexon-sol-tools-3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd.tar.bz2 dexon-sol-tools-3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd.tar.lz dexon-sol-tools-3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd.tar.xz dexon-sol-tools-3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd.tar.zst dexon-sol-tools-3a7bb97ad1182eb9c718797bda8dca5eb5d7f9cd.zip |
Remove artifacts from migrations package and update contract-wrappers accordingly
Diffstat (limited to 'packages/migrations/src/migrate.ts')
-rw-r--r-- | packages/migrations/src/migrate.ts | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/packages/migrations/src/migrate.ts b/packages/migrations/src/migrate.ts index 338832feb..27f36ba34 100644 --- a/packages/migrations/src/migrate.ts +++ b/packages/migrations/src/migrate.ts @@ -2,43 +2,20 @@ import { devConstants, web3Factory } from '@0xproject/dev-utils'; import { logUtils } from '@0xproject/utils'; import { Provider } from 'ethereum-types'; -import * as yargs from 'yargs'; -import { runV1MigrationsAsync } from './1.0.0/migration'; -import { runV2MigrationsAsync } from './2.0.0/migration'; - -enum ContractVersions { - V1 = '1.0.0', - V2 = '2.0.0', -} -const args = yargs.argv; +import { runMigrationsAsync } from './migration'; (async () => { - const contractsVersion = args.contractsVersion; - const artifactsDir = `artifacts/${contractsVersion}`; let providerConfigs; let provider: Provider; let txDefaults; - switch (contractsVersion) { - case ContractVersions.V1: - providerConfigs = { shouldUseInProcessGanache: false }; - provider = web3Factory.getRpcProvider(providerConfigs); - txDefaults = { - from: devConstants.TESTRPC_FIRST_ADDRESS, - }; - await runV1MigrationsAsync(provider, artifactsDir, txDefaults); - break; - case ContractVersions.V2: - providerConfigs = { shouldUseInProcessGanache: false }; - provider = web3Factory.getRpcProvider(providerConfigs); - txDefaults = { - from: devConstants.TESTRPC_FIRST_ADDRESS, - }; - await runV2MigrationsAsync(provider, artifactsDir, txDefaults); - break; - default: - throw new Error(`Unsupported contract version: ${contractsVersion}`); - } + + providerConfigs = { shouldUseInProcessGanache: false }; + provider = web3Factory.getRpcProvider(providerConfigs); + txDefaults = { + from: devConstants.TESTRPC_FIRST_ADDRESS, + }; + await runMigrationsAsync(provider, txDefaults); process.exit(0); })().catch(err => { logUtils.log(err); |