dethcrypto / dethcrypto/TypeChain

Incompatible with hardhat-exposed

Open
#691 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.8k
Forks
376
PR merge metrics
No merged PRs in 30d

Description

The TypeChain Hardhat plugin seems incompatible with [hardhat-exposed](https://github.com/frangio/hardhat-exposed). Using the instructions here I could reproduce the issue: https://github.com/frangio/hardhat-exposed/issues/9#issuecomment-1124249292

The stack trace points to TypeChain code so you may have a better idea of what's happening.

The relevant context is that hardhat-exposed writes contracts to a separate directory (by default `./contracts-exposed`), and compiles those using Hardhat.

```
Error: EEXIST: file already exists, mkdir 'hardhat-waffle-template/contracts-exposed/Test.sol'
at Object.mkdirSync (node:fs:1334:3)
at mkdirpNativeSync (hardhat-waffle-template/node_modules/typechain/node_modules/mkdirp/lib/mkdirp-native.js:29:10)
at mkdirpSync (hardhat-waffle-template/node_modules/typechain/node_modules/mkdirp/index.js:21:7)
at hardhat-waffle-template/node_modules/typechain/src/typechain/io.ts:19:5
at Array.forEach ()
at processOutput (hardhat-waffle-template/node_modules/typechain/src/typechain/io.ts:17:13)
at runTypeChain (hardhat-waffle-template/node_modules/typechain/src/typechain/runTypeChain.ts:53:4)
at async SimpleTaskDefinition.action (hardhat-waffle-template/node_modules/@typechain/hardhat/src/index.ts:83:20)
at async Environment._runTaskDefinition (hardhat-waffle-template/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at async Environment.run (hardhat-waffle-template/node_modules/hardhat/src/internal/core/runtime-environment.ts:129:14) {
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.