aboutsummaryrefslogblamecommitdiffstats
path: root/packages/migrations/src/migrate.ts
blob: b00ba698f18e5d24ef063dbdad6693c2cfc2ca71 (plain) (tree)
1
2
3
4
5
6
7
8
9
                   

                                                                 





                                                 
                        
                                                 
      



                                                                 
                                                                 
                    



                      
#!/usr/bin/env node
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 txDefaults = {
        from: devConstants.TESTRPC_FIRST_ADDRESS,
    };
    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);
});