aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-08-16 03:50:20 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-08-16 04:10:49 +0800
commit7c96fa45f85906a9ba4d09b8aaa4759e7d55286f (patch)
tree2bfc5f2a05d553edcfdf8343bbffcb1bdf592090 /packages/sol-compiler/src
parentad9a7d72ced3898d7ba2922433bc666980f81b4e (diff)
downloaddexon-sol-tools-7c96fa45f85906a9ba4d09b8aaa4759e7d55286f.tar
dexon-sol-tools-7c96fa45f85906a9ba4d09b8aaa4759e7d55286f.tar.gz
dexon-sol-tools-7c96fa45f85906a9ba4d09b8aaa4759e7d55286f.tar.bz2
dexon-sol-tools-7c96fa45f85906a9ba4d09b8aaa4759e7d55286f.tar.lz
dexon-sol-tools-7c96fa45f85906a9ba4d09b8aaa4759e7d55286f.tar.xz
dexon-sol-tools-7c96fa45f85906a9ba4d09b8aaa4759e7d55286f.tar.zst
dexon-sol-tools-7c96fa45f85906a9ba4d09b8aaa4759e7d55286f.zip
comments
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,
};