aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-12-17 09:42:27 +0800
committerJacob Evans <jacob@dekz.net>2018-12-17 12:44:24 +0800
commit2a577e04750f9f90f72f763b45232dd9b5a35d93 (patch)
tree5b6837a220835361d7bc92e62c17e81ced6a1dde /packages/migrations/src
parent737d1dc54d72872e24abce5a1dbe1b66d35fa21a (diff)
downloaddexon-sol-tools-2a577e04750f9f90f72f763b45232dd9b5a35d93.tar
dexon-sol-tools-2a577e04750f9f90f72f763b45232dd9b5a35d93.tar.gz
dexon-sol-tools-2a577e04750f9f90f72f763b45232dd9b5a35d93.tar.bz2
dexon-sol-tools-2a577e04750f9f90f72f763b45232dd9b5a35d93.tar.lz
dexon-sol-tools-2a577e04750f9f90f72f763b45232dd9b5a35d93.tar.xz
dexon-sol-tools-2a577e04750f9f90f72f763b45232dd9b5a35d93.tar.zst
dexon-sol-tools-2a577e04750f9f90f72f763b45232dd9b5a35d93.zip
Add Docker image and Snapshot commands
Diffstat (limited to 'packages/migrations/src')
-rw-r--r--packages/migrations/src/migrate_snapshot.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/migrations/src/migrate_snapshot.ts b/packages/migrations/src/migrate_snapshot.ts
new file mode 100644
index 000000000..f9b7751a5
--- /dev/null
+++ b/packages/migrations/src/migrate_snapshot.ts
@@ -0,0 +1,23 @@
+#!/usr/bin/env node
+import { devConstants, web3Factory } from '@0x/dev-utils';
+import { logUtils } from '@0x/utils';
+import { Provider } from 'ethereum-types';
+
+import { runMigrationsAsync } from './migration';
+
+(async () => {
+ let providerConfigs;
+ let provider: Provider;
+ let txDefaults;
+
+ providerConfigs = { shouldUseInProcessGanache: true, ganacheDatabasePath: '0x_ganache_snapshot' };
+ provider = web3Factory.getRpcProvider(providerConfigs);
+ txDefaults = {
+ from: devConstants.TESTRPC_FIRST_ADDRESS,
+ };
+ await runMigrationsAsync(provider, txDefaults);
+ process.exit(0);
+})().catch(err => {
+ logUtils.log(err);
+ process.exit(1);
+});