aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/migrate.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-09 16:14:25 +0800
committerFabio Berger <me@fabioberger.com>2018-04-09 16:14:25 +0800
commit919b327fc534e3c2dc6330130cee690f0fa39fea (patch)
treefd58793bcd44f0c50e143f8f07c359e444ec34ee /packages/migrations/src/migrate.ts
parente05b55d4a5698d3e936e7164ed69d9417d12cd12 (diff)
downloaddexon-sol-tools-919b327fc534e3c2dc6330130cee690f0fa39fea.tar
dexon-sol-tools-919b327fc534e3c2dc6330130cee690f0fa39fea.tar.gz
dexon-sol-tools-919b327fc534e3c2dc6330130cee690f0fa39fea.tar.bz2
dexon-sol-tools-919b327fc534e3c2dc6330130cee690f0fa39fea.tar.lz
dexon-sol-tools-919b327fc534e3c2dc6330130cee690f0fa39fea.tar.xz
dexon-sol-tools-919b327fc534e3c2dc6330130cee690f0fa39fea.tar.zst
dexon-sol-tools-919b327fc534e3c2dc6330130cee690f0fa39fea.zip
Move migrations into separate monorepo subpackage and hook it up to 0x.js and contracts
Diffstat (limited to 'packages/migrations/src/migrate.ts')
-rw-r--r--packages/migrations/src/migrate.ts25
1 files changed, 25 insertions, 0 deletions
diff --git a/packages/migrations/src/migrate.ts b/packages/migrations/src/migrate.ts
new file mode 100644
index 000000000..76dcbd847
--- /dev/null
+++ b/packages/migrations/src/migrate.ts
@@ -0,0 +1,25 @@
+#!/usr/bin/env node
+import { Deployer } from '@0xproject/deployer';
+import { devConstants } from '@0xproject/dev-utils';
+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 deployer = new Deployer(deployerOpts);
+
+ await runMigrationsAsync(deployer);
+})().catch(err => {
+ logUtils.log(err);
+ process.exit(1);
+});