aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src/compiler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-compiler/src/compiler.ts')
-rw-r--r--packages/sol-compiler/src/compiler.ts13
1 files changed, 6 insertions, 7 deletions
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts
index b5cdf9865..29ddfffaa 100644
--- a/packages/sol-compiler/src/compiler.ts
+++ b/packages/sol-compiler/src/compiler.ts
@@ -24,12 +24,11 @@ import { compilerOptionsSchema } from './schemas/compiler_options_schema';
import { binPaths } from './solc/bin_paths';
import {
addHexPrefixToContractBytecode,
- compileDocker,
- compileSolcJS,
+ compileDockerAsync,
+ compileSolcJSAsync,
createDirIfDoesNotExistAsync,
getContractArtifactIfExistsAsync,
getDependencyNameToPackagePath,
- getSolcJSAsync,
getSourcesWithDependencies,
getSourceTreeHash,
makeContractPathsRelative,
@@ -276,10 +275,10 @@ export class Compiler {
const versionCommandOutput = execSync(dockerCommand).toString();
const versionCommandOutputParts = versionCommandOutput.split(' ');
fullSolcVersion = versionCommandOutputParts[versionCommandOutputParts.length - 1].trim();
- compilerOutput = compileDocker(solcVersion, input.standardInput);
+ compilerOutput = await compileDockerAsync(solcVersion, input.standardInput);
} else {
fullSolcVersion = binPaths[solcVersion];
- compilerOutput = compileSolcJS(solcVersion, input.standardInput);
+ compilerOutput = await compileSolcJSAsync(solcVersion, input.standardInput);
}
compilerOutput.sources = makeContractPathsRelative(
compilerOutput.sources,
@@ -295,8 +294,6 @@ export class Compiler {
printCompilationErrorsAndWarnings(compilerOutput.errors);
}
- compilerOutputs.push(compilerOutput);
-
for (const contractPath of input.contractsToCompile) {
const contractName = contractPathToData[contractPath].contractName;
@@ -320,6 +317,8 @@ export class Compiler {
);
}
}
+
+ compilerOutputs.push(compilerOutput);
}
return compilerOutputs;