Add contracts to packages, fix most linting errors

This commit is contained in:
Amir Bandeali
2017-11-29 22:02:43 -08:00
parent c57190dead
commit 4b3e038323
104 changed files with 14544 additions and 27 deletions

View File

@@ -0,0 +1,19 @@
import {migrator} from './../migrations/migrate';
import {Compiler} from './compiler';
import {Deployer} from './deployer';
import {CompilerOptions, DeployerOptions} from './utils/types';
export const commands = {
async compileAsync(opts: CompilerOptions): Promise<void> {
const compiler = new Compiler(opts);
await compiler.compileAllAsync();
},
async migrateAsync(opts: DeployerOptions): Promise<void> {
const deployer = new Deployer(opts);
await migrator.runMigrationsAsync(deployer);
},
async deployAsync(contractName: string, args: any[], opts: DeployerOptions): Promise<void> {
const deployer = new Deployer(opts);
await deployer.deployAndSaveAsync(contractName, args);
},
};