From a59f18927dc8f59bb69d7dff9d0e5cd7e148129b Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Thu, 16 Aug 2018 10:57:31 -0700 Subject: flatten out interface to verifyAndPersist* method --- packages/sol-compiler/src/compiler.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'packages/sol-compiler/src') 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 { - const contractName = contractMetadata.contractName; - const sourceTreeHashHex = contractMetadata.sourceTreeHashHex; - const currentArtifactIfExists = contractMetadata.currentArtifactIfExists; - const compiledData = compilerOutput.contracts[contractPath][contractName]; if (_.isUndefined(compiledData)) { throw new Error( -- cgit