diff options
Diffstat (limited to 'packages/migrations/src/migrate.ts')
-rw-r--r-- | packages/migrations/src/migrate.ts | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/packages/migrations/src/migrate.ts b/packages/migrations/src/migrate.ts index 76dcbd847..b00ba698f 100644 --- a/packages/migrations/src/migrate.ts +++ b/packages/migrations/src/migrate.ts @@ -1,24 +1,21 @@ #!/usr/bin/env node -import { Deployer } from '@0xproject/deployer'; -import { devConstants } from '@0xproject/dev-utils'; +import { devConstants, web3Factory } from '@0xproject/dev-utils'; +import { Provider } from '@0xproject/types'; import { logUtils } from '@0xproject/utils'; import * as path from 'path'; import { runMigrationsAsync } from './migration'; (async () => { - const deployerOpts = { - jsonrpcUrl: 'http://localhost:8545', - artifactsDir: path.resolve('src', 'artifacts'), - networkId: 50, - defaults: { - gas: devConstants.GAS_ESTIMATE, - }, + const txDefaults = { + from: devConstants.TESTRPC_FIRST_ADDRESS, }; - - const deployer = new Deployer(deployerOpts); - - await runMigrationsAsync(deployer); + const providerConfigs = { shouldUseInProcessGanache: false }; + const web3 = web3Factory.create(providerConfigs); + const provider = web3.currentProvider; + const artifactsDir = 'artifacts/1.0.0'; + await runMigrationsAsync(provider, artifactsDir, txDefaults); + process.exit(0); })().catch(err => { logUtils.log(err); process.exit(1); |