diff options
Diffstat (limited to 'packages/sol-compiler/src/compiler.ts')
-rw-r--r-- | packages/sol-compiler/src/compiler.ts | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index efee3eb8a..743acacaa 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -195,9 +195,7 @@ export class Compiler { path.basename(contractSource.path, constants.SOLIDITY_FILE_EXTENSION), ); } else { - contractNamesToCompile = this._specifiedContracts.map(specifiedContract => - path.basename(specifiedContract, constants.SOLIDITY_FILE_EXTENSION), - ); + return this._specifiedContracts; } return contractNamesToCompile; } @@ -217,12 +215,9 @@ export class Compiler { for (const contractName of contractNames) { const spyResolver = new SpyResolver(this._resolver); const contractSource = spyResolver.resolve(contractName); - const sourceTreeHashHex = getSourceTreeHash( - spyResolver, - path.join(this._contractsDir, contractSource.path), - ).toString('hex'); + const sourceTreeHashHex = getSourceTreeHash(spyResolver, contractSource.path).toString('hex'); const contractData = { - contractName, + contractName: path.basename(contractName, constants.SOLIDITY_FILE_EXTENSION), currentArtifactIfExists: await getContractArtifactIfExistsAsync(this._artifactsDir, contractName), sourceTreeHashHex: `0x${sourceTreeHashHex}`, }; |