diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-20 01:02:50 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-12-20 01:02:50 +0800 |
commit | 06bd5a9b038c40d102db2cc8095bc08d79a547a8 (patch) | |
tree | 52508b9885b13321c80d0b2dd5a6ade9f9a11d63 /packages/contracts/deploy/cli.ts | |
parent | e38c7ff0760c766b92a7d19261a3a6f480adf567 (diff) | |
parent | 1316a2dd2a8971771f750d8a7f457212daad520b (diff) | |
download | dexon-sol-tools-06bd5a9b038c40d102db2cc8095bc08d79a547a8.tar dexon-sol-tools-06bd5a9b038c40d102db2cc8095bc08d79a547a8.tar.gz dexon-sol-tools-06bd5a9b038c40d102db2cc8095bc08d79a547a8.tar.bz2 dexon-sol-tools-06bd5a9b038c40d102db2cc8095bc08d79a547a8.tar.lz dexon-sol-tools-06bd5a9b038c40d102db2cc8095bc08d79a547a8.tar.xz dexon-sol-tools-06bd5a9b038c40d102db2cc8095bc08d79a547a8.tar.zst dexon-sol-tools-06bd5a9b038c40d102db2cc8095bc08d79a547a8.zip |
Merge branch 'development' into refactor/website
* development:
Introduce an identityCommandBuilder
Define types for methodID
Define types for ethereumjs-abi
Install types for yargs
Fix comments
Fix linter issues
Fix linter error
Rename SubscriptionOpts to BlockRange
Diffstat (limited to 'packages/contracts/deploy/cli.ts')
-rw-r--r-- | packages/contracts/deploy/cli.ts | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/contracts/deploy/cli.ts b/packages/contracts/deploy/cli.ts index 423523e21..b02849826 100644 --- a/packages/contracts/deploy/cli.ts +++ b/packages/contracts/deploy/cli.ts @@ -23,12 +23,12 @@ const DEFAULT_GAS_PRICE = ((10 ** 9) * 2).toString(); * Compiles all contracts with options passed in through CLI. * @param argv Instance of process.argv provided by yargs. */ -async function onCompileCommand(args: CliOptions): Promise<void> { +async function onCompileCommand(argv: CliOptions): Promise<void> { const opts: CompilerOptions = { - contractsDir: args.contractsDir, - networkId: args.networkId, - optimizerEnabled: args.shouldOptimize ? 1 : 0, - artifactsDir: args.artifactsDir, + contractsDir: argv.contractsDir, + networkId: argv.networkId, + optimizerEnabled: argv.shouldOptimize ? 1 : 0, + artifactsDir: argv.artifactsDir, }; await commands.compileAsync(opts); } @@ -113,6 +113,7 @@ function deployCommandBuilder(yargsInstance: any) { } (() => { + const identityCommandBuilder = _.identity; return yargs .option('contracts-dir', { type: 'string', @@ -150,11 +151,11 @@ function deployCommandBuilder(yargsInstance: any) { }) .command('compile', 'compile contracts', - _.noop, + identityCommandBuilder, onCompileCommand) .command('migrate', 'compile and deploy contracts using migration scripts', - _.noop, + identityCommandBuilder, onMigrateCommand) .command('deploy', 'deploy a single contract with provided arguments', |