Skip to content

Commit 2319634

Browse files
committed
platform: hardhat: add support for CommonJS configuration file
1 parent 9cfa803 commit 2319634

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crytic_compile/platform/hardhat.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,10 @@ def is_supported(target: str, **kwargs: str) -> bool:
216216
if os.path.isfile(os.path.join(target, "foundry.toml")):
217217
return False
218218

219-
return os.path.isfile(os.path.join(target, "hardhat.config.js")) | os.path.isfile(
220-
os.path.join(target, "hardhat.config.ts")
219+
return (
220+
os.path.isfile(os.path.join(target, "hardhat.config.js"))
221+
or os.path.isfile(os.path.join(target, "hardhat.config.ts"))
222+
or os.path.isfile(os.path.join(target, "hardhat.config.cjs"))
221223
)
222224

223225
def is_dependency(self, path: str) -> bool:

0 commit comments

Comments
 (0)