diff options
author | F. Eugene Aumson <gene@aumson.org> | 2018-08-30 21:54:10 +0800 |
---|---|---|
committer | F. Eugene Aumson <gene@aumson.org> | 2018-08-30 22:43:43 +0800 |
commit | 6273339f7c588f31f6c664a6aa3b58e2b94b9051 (patch) | |
tree | 46d6cf66f64fa07ddaa5fc640965f07e637ef9ac | |
parent | 29f2ae605edadedbd150cc6df7aafffdef6a48a3 (diff) | |
download | dexon-sol-tools-6273339f7c588f31f6c664a6aa3b58e2b94b9051.tar.gz dexon-sol-tools-6273339f7c588f31f6c664a6aa3b58e2b94b9051.tar.zst dexon-sol-tools-6273339f7c588f31f6c664a6aa3b58e2b94b9051.zip |
add named references for returned objects
-rw-r--r-- | packages/sol-compiler/src/compiler.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index d2977c691..3b0bd90f9 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -170,17 +170,20 @@ export class Compiler { * that version. */ public async getCompilerOutputsAsync(): Promise<StandardOutput[]> { - return this._compileContractsAsync(this._getContractNamesToCompile(), false); + const promisedOutputs = this._compileContractsAsync(this._getContractNamesToCompile(), false); + return promisedOutputs; } private _getContractNamesToCompile(): string[] { + let contractNamesToCompile; if (this._specifiedContracts === ALL_CONTRACTS_IDENTIFIER) { const allContracts = this._nameResolver.getAll(); - return _.map(allContracts, contractSource => + contractNamesToCompile = _.map(allContracts, contractSource => path.basename(contractSource.path, constants.SOLIDITY_FILE_EXTENSION), ); } else { - return this._specifiedContracts; + contractNamesToCompile = this._specifiedContracts; } + return contractNamesToCompile; } /** * Compiles contracts, and, if `shouldPersist` is true, saves artifacts to artifactsDir. |