diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-18 22:12:56 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-18 22:12:56 +0800 |
commit | b20f34adb7726c4389012c2373bacc7e1b05b620 (patch) | |
tree | e0297b96e45f080fd786ea5773c133ddfb908e71 /packages/deployer/src/commands.ts | |
parent | 63d0d810b1ab7710102fce99b66f5a7f55162611 (diff) | |
download | dexon-sol-tools-b20f34adb7726c4389012c2373bacc7e1b05b620.tar dexon-sol-tools-b20f34adb7726c4389012c2373bacc7e1b05b620.tar.gz dexon-sol-tools-b20f34adb7726c4389012c2373bacc7e1b05b620.tar.bz2 dexon-sol-tools-b20f34adb7726c4389012c2373bacc7e1b05b620.tar.lz dexon-sol-tools-b20f34adb7726c4389012c2373bacc7e1b05b620.tar.xz dexon-sol-tools-b20f34adb7726c4389012c2373bacc7e1b05b620.tar.zst dexon-sol-tools-b20f34adb7726c4389012c2373bacc7e1b05b620.zip |
Change file layout
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); + }, +}; |