diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2017-12-02 03:29:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-02 03:29:27 +0800 |
commit | c291419141b06814c3e6d662998b7eaa6d554528 (patch) | |
tree | 4d85215ecfa9f627c12ca2dd14dc4e4c8ef3f22d /packages/contracts/deploy/src/commands.ts | |
parent | c57190dead41846809effb8823bd4e486ca72512 (diff) | |
parent | 290a96d41f62b38a6d4b332fc716088caf666381 (diff) | |
download | dexon-sol-tools-c291419141b06814c3e6d662998b7eaa6d554528.tar dexon-sol-tools-c291419141b06814c3e6d662998b7eaa6d554528.tar.gz dexon-sol-tools-c291419141b06814c3e6d662998b7eaa6d554528.tar.bz2 dexon-sol-tools-c291419141b06814c3e6d662998b7eaa6d554528.tar.lz dexon-sol-tools-c291419141b06814c3e6d662998b7eaa6d554528.tar.xz dexon-sol-tools-c291419141b06814c3e6d662998b7eaa6d554528.tar.zst dexon-sol-tools-c291419141b06814c3e6d662998b7eaa6d554528.zip |
Merge pull request #247 from 0xProject/feature/addContractsRepo
Add contracts repo
Diffstat (limited to 'packages/contracts/deploy/src/commands.ts')
-rw-r--r-- | packages/contracts/deploy/src/commands.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/contracts/deploy/src/commands.ts b/packages/contracts/deploy/src/commands.ts new file mode 100644 index 000000000..fc421a760 --- /dev/null +++ b/packages/contracts/deploy/src/commands.ts @@ -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); + }, +}; |