aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src/utils/compiler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-compiler/src/utils/compiler.ts')
-rw-r--r--packages/sol-compiler/src/utils/compiler.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/sol-compiler/src/utils/compiler.ts b/packages/sol-compiler/src/utils/compiler.ts
index c75f76dac..dffd07b1d 100644
--- a/packages/sol-compiler/src/utils/compiler.ts
+++ b/packages/sol-compiler/src/utils/compiler.ts
@@ -26,7 +26,10 @@ export async function getContractArtifactIfExistsAsync(
contractName: string,
): Promise<ContractArtifact | void> {
let contractArtifact;
- const currentArtifactPath = `${artifactsDir}/${contractName}.json`;
+ const currentArtifactPath = `${artifactsDir}/${path.basename(
+ contractName,
+ constants.SOLIDITY_FILE_EXTENSION,
+ )}.json`;
try {
const opts = {
encoding: 'utf8',