aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-compiler/src')
-rw-r--r--packages/sol-compiler/src/compiler.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts
index 1c08cb324..ff3805073 100644
--- a/packages/sol-compiler/src/compiler.ts
+++ b/packages/sol-compiler/src/compiler.ts
@@ -188,6 +188,8 @@ export class Compiler {
? semver.maxSatisfying(_.keys(binPaths), parseSolidityVersionRange(contractSource.source))
: this._solcVersionIfExists;
if (_.isUndefined(versionToInputs[solcVersion])) {
+ // no inputs batched yet for this version.
+ // prepare object to hold this batch.
versionToInputs[solcVersion] = {
standardInput: {
language: 'Solidity',
@@ -197,6 +199,7 @@ export class Compiler {
contractsToCompile: [],
};
}
+ // add input to the right version batch
versionToInputs[solcVersion].standardInput.sources[contractSource.path] = {
content: contractSource.source,
};