This commit is contained in:
F. Eugene Aumson 2018-08-15 12:50:20 -07:00
parent ad9a7d72ce
commit 7c96fa45f8

View File

@ -188,6 +188,8 @@ export class Compiler {
? semver.maxSatisfying(_.keys(binPaths), parseSolidityVersionRange(contractSource.source)) ? semver.maxSatisfying(_.keys(binPaths), parseSolidityVersionRange(contractSource.source))
: this._solcVersionIfExists; : this._solcVersionIfExists;
if (_.isUndefined(versionToInputs[solcVersion])) { if (_.isUndefined(versionToInputs[solcVersion])) {
// no inputs batched yet for this version.
// prepare object to hold this batch.
versionToInputs[solcVersion] = { versionToInputs[solcVersion] = {
standardInput: { standardInput: {
language: 'Solidity', language: 'Solidity',
@ -197,6 +199,7 @@ export class Compiler {
contractsToCompile: [], contractsToCompile: [],
}; };
} }
// add input to the right version batch
versionToInputs[solcVersion].standardInput.sources[contractSource.path] = { versionToInputs[solcVersion].standardInput.sources[contractSource.path] = {
content: contractSource.source, content: contractSource.source,
}; };