aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-08-17 01:36:12 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-08-17 01:42:03 +0800
commitacb3c0d0aa065edf1c71970467d038d52096e865 (patch)
tree889d516d3830b330d1f0f0ca4f34dc0af32c1f94 /packages
parent11231795cd73c24fe1d4e2d5ee826e46271b8a62 (diff)
downloaddexon-0x-contracts-acb3c0d0aa065edf1c71970467d038d52096e865.tar.gz
dexon-0x-contracts-acb3c0d0aa065edf1c71970467d038d52096e865.tar.zst
dexon-0x-contracts-acb3c0d0aa065edf1c71970467d038d52096e865.zip
declare contractData before adding to map
Diffstat (limited to 'packages')
-rw-r--r--packages/sol-compiler/src/compiler.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts
index eb9670b03..bd7f751df 100644
--- a/packages/sol-compiler/src/compiler.ts
+++ b/packages/sol-compiler/src/compiler.ts
@@ -165,16 +165,17 @@ export class Compiler {
for (const contractName of contractNames) {
const contractSource = this._resolver.resolve(contractName);
- contractPathToData[contractSource.path] = {
+ const contractData = {
contractName,
currentArtifactIfExists: await getContractArtifactIfExistsAsync(this._artifactsDir, contractName),
sourceTreeHashHex: `0x${this._getSourceTreeHash(
path.join(this._contractsDir, contractSource.path),
).toString('hex')}`,
};
- if (!this._shouldCompile(contractPathToData[contractSource.path])) {
+ if (!this._shouldCompile(contractData)) {
continue;
}
+ contractPathToData[contractSource.path] = contractData;
const solcVersion = _.isUndefined(this._solcVersionIfExists)
? semver.maxSatisfying(_.keys(binPaths), parseSolidityVersionRange(contractSource.source))
: this._solcVersionIfExists;