diff options
author | Leonid <logvinov.leon@gmail.com> | 2018-01-19 20:43:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-19 20:43:32 +0800 |
commit | e1af25c8a6fa96c665d63fff2033d7611b023db2 (patch) | |
tree | 5769ca73d50c497e46e6c6c927700ae0fa00bec9 /packages/deployer/src/commands.ts | |
parent | 9ccf63b44afe1ae6ccc2b9298ee35697d6be9e30 (diff) | |
parent | 6091f818da7cddcb4a22a573f7726ba9b76b398e (diff) | |
download | dexon-0x-contracts-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar.gz dexon-0x-contracts-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar.zst dexon-0x-contracts-e1af25c8a6fa96c665d63fff2033d7611b023db2.zip |
Merge pull request #323 from 0xProject/feature/separate-deployer
Move deployer to a separate package
Diffstat (limited to 'packages/deployer/src/commands.ts')
-rw-r--r-- | packages/deployer/src/commands.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/deployer/src/commands.ts b/packages/deployer/src/commands.ts new file mode 100644 index 000000000..2acef8e8f --- /dev/null +++ b/packages/deployer/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); + }, +}; |