diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-07 19:37:21 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-07 19:37:21 +0800 |
commit | 0f1589a43f610a79f46fa4c3412670b546b032af (patch) | |
tree | 433e54f31c04e210c8c8d1bd236b9ce3865fd8a4 /packages/deployer | |
parent | 27262c4e5690e79ac19976012c0b82e86644dbdc (diff) | |
download | dexon-sol-tools-0f1589a43f610a79f46fa4c3412670b546b032af.tar dexon-sol-tools-0f1589a43f610a79f46fa4c3412670b546b032af.tar.gz dexon-sol-tools-0f1589a43f610a79f46fa4c3412670b546b032af.tar.bz2 dexon-sol-tools-0f1589a43f610a79f46fa4c3412670b546b032af.tar.lz dexon-sol-tools-0f1589a43f610a79f46fa4c3412670b546b032af.tar.xz dexon-sol-tools-0f1589a43f610a79f46fa4c3412670b546b032af.tar.zst dexon-sol-tools-0f1589a43f610a79f46fa4c3412670b546b032af.zip |
Define a separator const
Diffstat (limited to 'packages/deployer')
-rw-r--r-- | packages/deployer/src/cli.ts | 7 | ||||
-rw-r--r-- | packages/deployer/src/compiler.ts | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/packages/deployer/src/cli.ts b/packages/deployer/src/cli.ts index b06168e31..5df9f9963 100644 --- a/packages/deployer/src/cli.ts +++ b/packages/deployer/src/cli.ts @@ -19,6 +19,7 @@ const DEFAULT_NETWORK_ID = 50; const DEFAULT_JSONRPC_URL = 'http://localhost:8545'; const DEFAULT_GAS_PRICE = (10 ** 9 * 2).toString(); const DEFAULT_CONTRACTS_LIST = '*'; +const SEPARATOR = ','; /** * Compiles all contracts with options passed in through CLI. @@ -28,7 +29,7 @@ async function onCompileCommandAsync(argv: CliOptions): Promise<void> { const opts: CompilerOptions = { contractsDir: argv.contractsDir, artifactsDir: argv.artifactsDir, - contracts: argv.contracts === '*' ? argv.contracts : argv.contracts.split(','), + contracts: argv.contracts === DEFAULT_CONTRACTS_LIST ? DEFAULT_CONTRACTS_LIST : argv.contracts.split(SEPARATOR), }; await commands.compileAsync(opts); } @@ -44,7 +45,7 @@ async function onDeployCommandAsync(argv: CliOptions): Promise<void> { const compilerOpts: CompilerOptions = { contractsDir: argv.contractsDir, artifactsDir: argv.artifactsDir, - contracts: argv.contracts === '*' ? argv.contracts : argv.contracts.split(','), + contracts: argv.contracts === DEFAULT_CONTRACTS_LIST ? DEFAULT_CONTRACTS_LIST : argv.contracts.split(SEPARATOR), }; await commands.compileAsync(compilerOpts); @@ -59,7 +60,7 @@ async function onDeployCommandAsync(argv: CliOptions): Promise<void> { defaults, }; const deployerArgsString = argv.args as string; - const deployerArgs = deployerArgsString.split(','); + const deployerArgs = deployerArgsString.split(SEPARATOR); await commands.deployAsync(argv.contract as string, deployerArgs, deployerOpts); } /** diff --git a/packages/deployer/src/compiler.ts b/packages/deployer/src/compiler.ts index 673bc3186..85449ac8d 100644 --- a/packages/deployer/src/compiler.ts +++ b/packages/deployer/src/compiler.ts @@ -53,7 +53,7 @@ const DEFAULT_COMPILER_SETTINGS: solc.CompilerSettings = { }, outputSelection: { '*': { - '*': ['abi', 'evm.bytecode.object'], + [ALL_CONTRACTS_IDENTIFIER]: ['abi', 'evm.bytecode.object'], }, }, }; |