Skip to content

Commit

Permalink
Check for exact path segment for inheritedFunctions sources (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
Corantin committed Dec 4, 2023
1 parent e5ed622 commit 53e2082
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hardhat/deploy/99_generateTsAbis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function getInheritedFunctions(sources: Record<string, any>, contractName: strin
const inheritedFunctions = {} as Record<string, any>;

for (const sourceContractName of actualSources) {
const sourcePath = Object.keys(sources).find(key => key.includes(sourceContractName));
const sourcePath = Object.keys(sources).find(key => key.includes(`/${sourceContractName}`));
if (sourcePath) {
const sourceName = sourcePath?.split("/").pop()?.split(".sol")[0];
const { abi } = JSON.parse(fs.readFileSync(`${ARTIFACTS_DIR}/${sourcePath}/${sourceName}.json`).toString());
Expand Down

0 comments on commit 53e2082

Please sign in to comment.