aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/src/cli.ts
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-02-16 02:20:03 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-02-16 02:20:03 +0800
commit060b02eaed2c7e2946286897b79ccfe828efc95d (patch)
tree09c7e9fab9f1120e1aec28c2d0ad8d00a8aa9671 /packages/deployer/src/cli.ts
parent003e5da00df49bc192112e7368e4478731fea82f (diff)
downloaddexon-sol-tools-060b02eaed2c7e2946286897b79ccfe828efc95d.tar
dexon-sol-tools-060b02eaed2c7e2946286897b79ccfe828efc95d.tar.gz
dexon-sol-tools-060b02eaed2c7e2946286897b79ccfe828efc95d.tar.bz2
dexon-sol-tools-060b02eaed2c7e2946286897b79ccfe828efc95d.tar.lz
dexon-sol-tools-060b02eaed2c7e2946286897b79ccfe828efc95d.tar.xz
dexon-sol-tools-060b02eaed2c7e2946286897b79ccfe828efc95d.tar.zst
dexon-sol-tools-060b02eaed2c7e2946286897b79ccfe828efc95d.zip
Rename variables
Diffstat (limited to 'packages/deployer/src/cli.ts')
-rw-r--r--packages/deployer/src/cli.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/deployer/src/cli.ts b/packages/deployer/src/cli.ts
index bc1ec8421..3c6d042c0 100644
--- a/packages/deployer/src/cli.ts
+++ b/packages/deployer/src/cli.ts
@@ -14,7 +14,7 @@ const DEFAULT_ARTIFACTS_DIR = path.resolve('artifacts');
const DEFAULT_NETWORK_ID = 50;
const DEFAULT_JSONRPC_PORT = 8545;
const DEFAULT_GAS_PRICE = (10 ** 9 * 2).toString();
-const DEFAULT_COMPILE_CONTRACTS = '*';
+const DEFAULT_CONTRACTS_LIST = '*';
/**
* Compiles all contracts with options passed in through CLI.
@@ -26,7 +26,7 @@ async function onCompileCommand(argv: CliOptions): Promise<void> {
networkId: argv.networkId,
optimizerEnabled: argv.shouldOptimize ? 1 : 0,
artifactsDir: argv.artifactsDir,
- contractsToCompile: generateContractsToCompileSet(argv.contracts),
+ specifiedContracts: getContractsSetFromList(argv.contracts),
};
await commands.compileAsync(opts);
}
@@ -45,7 +45,7 @@ async function onMigrateCommand(argv: CliOptions): Promise<void> {
networkId,
optimizerEnabled: argv.shouldOptimize ? 1 : 0,
artifactsDir: argv.artifactsDir,
- contractsToCompile: generateContractsToCompileSet(argv.contracts),
+ specifiedContracts: getContractsSetFromList(argv.contracts),
};
await commands.compileAsync(compilerOpts);
@@ -75,7 +75,7 @@ async function onDeployCommand(argv: CliOptions): Promise<void> {
networkId,
optimizerEnabled: argv.shouldOptimize ? 1 : 0,
artifactsDir: argv.artifactsDir,
- contractsToCompile: generateContractsToCompileSet(argv.contracts),
+ specifiedContracts: getContractsSetFromList(argv.contracts),
};
await commands.compileAsync(compilerOpts);
@@ -97,13 +97,13 @@ async function onDeployCommand(argv: CliOptions): Promise<void> {
* Creates a set of contracts to compile.
* @param contracts Comma separated list of contracts to compile
*/
-function generateContractsToCompileSet(contracts: string): Set<string> {
- const contractsToCompile = new Set();
+function getContractsSetFromList(contracts: string): Set<string> {
+ const specifiedContracts = new Set();
const contractsArray = contracts.split(',');
_.forEach(contractsArray, contractName => {
- contractsToCompile.add(contractName);
+ specifiedContracts.add(contractName);
});
- return contractsToCompile;
+ return specifiedContracts;
}
/**
* Provides extra required options for deploy command.
@@ -162,7 +162,7 @@ function deployCommandBuilder(yargsInstance: any) {
})
.option('contracts', {
type: 'string',
- default: DEFAULT_COMPILE_CONTRACTS,
+ default: DEFAULT_CONTRACTS_LIST,
description: 'comma separated list of contracts to compile',
})
.command('compile', 'compile contracts', identityCommandBuilder, onCompileCommand)