aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-08-17 01:57:31 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-08-17 01:57:31 +0800
commita59f18927dc8f59bb69d7dff9d0e5cd7e148129b (patch)
tree7af9001ed174b6cc228b1522fb52ad2ac72b0d07 /packages/sol-compiler
parenta607a61bde1677833a04765b8691184c49b04213 (diff)
downloaddexon-0x-contracts-a59f18927dc8f59bb69d7dff9d0e5cd7e148129b.tar
dexon-0x-contracts-a59f18927dc8f59bb69d7dff9d0e5cd7e148129b.tar.gz
dexon-0x-contracts-a59f18927dc8f59bb69d7dff9d0e5cd7e148129b.tar.bz2
dexon-0x-contracts-a59f18927dc8f59bb69d7dff9d0e5cd7e148129b.tar.lz
dexon-0x-contracts-a59f18927dc8f59bb69d7dff9d0e5cd7e148129b.tar.xz
dexon-0x-contracts-a59f18927dc8f59bb69d7dff9d0e5cd7e148129b.tar.zst
dexon-0x-contracts-a59f18927dc8f59bb69d7dff9d0e5cd7e148129b.zip
flatten out interface to verifyAndPersist* method
Diffstat (limited to 'packages/sol-compiler')
-rw-r--r--packages/sol-compiler/src/compiler.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts
index bb870e0cf..296411b76 100644
--- a/packages/sol-compiler/src/compiler.ts
+++ b/packages/sol-compiler/src/compiler.ts
@@ -213,7 +213,9 @@ export class Compiler {
for (const contractPath of input.contractsToCompile) {
await this._verifyAndPersistCompiledContractAsync(
contractPath,
- contractPathToData[contractPath],
+ contractPathToData[contractPath].currentArtifactIfExists,
+ contractPathToData[contractPath].sourceTreeHashHex,
+ contractPathToData[contractPath].contractName,
fullSolcVersion,
compilerOutput,
);
@@ -233,14 +235,12 @@ export class Compiler {
}
private async _verifyAndPersistCompiledContractAsync(
contractPath: string,
- contractMetadata: ContractData,
+ currentArtifactIfExists: ContractArtifact | void,
+ sourceTreeHashHex: string,
+ contractName: string,
fullSolcVersion: string,
compilerOutput: solc.StandardOutput,
): Promise<void> {
- const contractName = contractMetadata.contractName;
- const sourceTreeHashHex = contractMetadata.sourceTreeHashHex;
- const currentArtifactIfExists = contractMetadata.currentArtifactIfExists;
-
const compiledData = compilerOutput.contracts[contractPath][contractName];
if (_.isUndefined(compiledData)) {
throw new Error(