aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/migrate.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-05-08 20:52:00 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-05-10 23:46:57 +0800
commitf9d80adaeeec827a8c2c81507d68d11e2681dcf3 (patch)
treeb96fe5155073829c2c234428d2f5a7cc09c25733 /packages/migrations/src/migrate.ts
parent422e5a19d4dc0461bdaecd9133bb8f19ac99baa6 (diff)
downloaddexon-sol-tools-f9d80adaeeec827a8c2c81507d68d11e2681dcf3.tar
dexon-sol-tools-f9d80adaeeec827a8c2c81507d68d11e2681dcf3.tar.gz
dexon-sol-tools-f9d80adaeeec827a8c2c81507d68d11e2681dcf3.tar.bz2
dexon-sol-tools-f9d80adaeeec827a8c2c81507d68d11e2681dcf3.tar.lz
dexon-sol-tools-f9d80adaeeec827a8c2c81507d68d11e2681dcf3.tar.xz
dexon-sol-tools-f9d80adaeeec827a8c2c81507d68d11e2681dcf3.tar.zst
dexon-sol-tools-f9d80adaeeec827a8c2c81507d68d11e2681dcf3.zip
Remove deployer from 0x.js and migrations
Diffstat (limited to 'packages/migrations/src/migrate.ts')
-rw-r--r--packages/migrations/src/migrate.ts22
1 files changed, 10 insertions, 12 deletions
diff --git a/packages/migrations/src/migrate.ts b/packages/migrations/src/migrate.ts
index 014c4b1fe..ab5a7bb0b 100644
--- a/packages/migrations/src/migrate.ts
+++ b/packages/migrations/src/migrate.ts
@@ -1,24 +1,22 @@
#!/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('artifacts', '1.0.0'),
- networkId: 50,
- defaults: {
- gas: devConstants.GAS_ESTIMATE,
- },
+ const defaults = {
+ 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, defaults);
+ process.exit(0);
})().catch(err => {
logUtils.log(err);
process.exit(1);