Skip to content

Commit d63f5e0

Browse files
committed
Updated
1 parent 35fd33f commit d63f5e0

2 files changed

Lines changed: 10 additions & 20 deletions

File tree

src/chains/Ethereum/contracts/EthereumContract.ts

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -223,25 +223,15 @@ export class Contract {
223223
// eslint-disable-next-line @typescript-eslint/no-explicit-any
224224
compile(): any {
225225
function findImports(importPath: string) {
226-
if (importPath.startsWith("@openzeppelin")) {
227-
if (importPath.includes("ERC998")) {
228-
return {
229-
contents: fs
230-
.readFileSync(
231-
path.join(process.cwd(), "node_modules", "@openzeppelin/contracts/token/ERC998", importPath.split("/").pop() ?? "")
232-
)
233-
.toString(),
234-
};
235-
} else {
236-
return {
237-
contents: fs
238-
.readFileSync(
239-
path.join(process.cwd(), "node_modules", importPath)
240-
)
241-
.toString(),
242-
};
243-
}
244-
} else {
226+
if (importPath.startsWith("@openzeppelin"))
227+
return {
228+
contents: fs
229+
.readFileSync(
230+
path.join(process.cwd(), "node_modules", importPath)
231+
)
232+
.toString(),
233+
};
234+
else {
245235
return { error: "OPEN ZEPPELIN IMPORT FAILED" };
246236
}
247237
}

src/chains/Ethereum/functions/draftEthereum.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ nftToolbox.initEthereumContract({
88
dir: path.join(__dirname, "Contracts"),
99
standard: "ERC721",
1010
connection: JSON.parse(
11-
readFileSync(path.join(__dirname, "connection.json")).toString()
11+
readFileSync(path.join(__dirname, "..", "..", "..", "connection.json")).toString()
1212
),
1313
});
1414

0 commit comments

Comments
 (0)