aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/migrate_snapshot.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/migrations/src/migrate_snapshot.ts')
-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);
+});