From aa27346f93fafa5fdc9fca69c5604caca9278dfd Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Tue, 14 Aug 2018 10:43:31 -0700 Subject: simplify method parameter --- packages/sol-compiler/src/compiler.ts | 10 ++++------ 1 file changed, 4 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 897ace9b6..3b46d7b46 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -216,7 +216,7 @@ export class Compiler { for (const contractPath of input.contractsToCompile) { await this._verifyAndPersistCompilationAsync( - { path: contractPath }, + contractPath, contractData[contractPath].contractName, fullSolcVersion, compiled, @@ -227,19 +227,17 @@ export class Compiler { } } private async _verifyAndPersistCompilationAsync( - contractSource: { path: string }, + contractPath: string, contractName: string, fullSolcVersion: string, compiled: solc.StandardOutput, sourceTreeHashHex: string, currentArtifactIfExists: ContractArtifact | void, ): Promise { - const compiledData = compiled.contracts[contractSource.path][contractName]; + const compiledData = compiled.contracts[contractPath][contractName]; if (_.isUndefined(compiledData)) { throw new Error( - `Contract ${contractName} not found in ${ - contractSource.path - }. Please make sure your contract has the same name as it's file name`, + `Contract ${contractName} not found in ${contractPath}. Please make sure your contract has the same name as it's file name`, ); } if (!_.isUndefined(compiledData.evm)) { -- cgit v1.2.3