aboutsummaryrefslogblamecommitdiffstats
path: root/packages/migrations/src/migrate.ts
blob: 76dcbd8474c97004237841cfd4e6deefd9d53f9b (plain) (tree)
























                                                       
#!/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);
});