Skip to content

Conversation

@alcuadrado
Copy link
Member

The reason this change is needed is because the files generated by TypeChain import @nomicfoundation/hardhat-ethers/types. That means that users need to install that directly, or it won't work with pnpm.

To learn more:

@alcuadrado alcuadrado requested a review from Copilot November 15, 2025 23:41
@alcuadrado alcuadrado added the no docs needed This PR doesn't require links to documentation label Nov 15, 2025
@changeset-bot
Copy link

changeset-bot bot commented Nov 15, 2025

🦋 Changeset detected

Latest commit: ea2eb88

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
hardhat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds @nomicfoundation/hardhat-ethers as a direct dependency to address TypeChain-generated file imports. TypeChain generates files that import @nomicfoundation/hardhat-ethers/types, which requires the package to be explicitly installed for compatibility with strict package managers like pnpm.

Key Changes:

  • Added @nomicfoundation/hardhat-ethers v4.0.2 to devDependencies in the mocha-ethers template
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

hardhat

Total size of the bundle: 235M
Total number of dependencies (including transitive): 47

List of dependencies (sorted by size)
228M	total
35M	@nomicfoundation/edr-linux-x64-musl
35M	@nomicfoundation/edr-linux-x64-gnu
32M	@nomicfoundation/edr-linux-arm64-musl
32M	@nomicfoundation/edr-linux-arm64-gnu
24M	@nomicfoundation/edr-win32-x64-msvc
24M	@nomicfoundation/edr-darwin-x64
20M	@nomicfoundation/edr-darwin-arm64
7.3M	@sentry/core
5.2M	zod
2.7M	micro-eth-signer
1.9M	@noble/curves
1.7M	undici
1.2M	@noble/hashes
1020K	@nomicfoundation/hardhat-utils
864K	@streamparser/json
624K	micro-packed
592K	tsx
548K	@nomicfoundation/hardhat-errors
492K	@scure/bip39
464K	@nomicfoundation/edr
452K	fast-equals
408K	json-stream-stringify
368K	ethereum-cryptography
332K	@streamparser/json-node
320K	enquirer
320K	@nomicfoundation/hardhat-zod-utils
288K	semver
200K	ws
180K	chokidar
176K	get-tsconfig
168K	@scure/base
160K	esbuild
136K	adm-zip
96K	@scure/bip32
92K	chalk
72K	@nomicfoundation/solidity-analyzer
68K	debug
60K	readdirp
56K	rfdc
48K	ansi-colors
44K	resolve.exports
40K	resolve-pkg-maps
36K	p-map
24K	strip-ansi
24K	env-paths
24K	ansi-regex
20K	ms

@alcuadrado alcuadrado merged commit 03d4eac into main Nov 16, 2025
259 checks passed
@alcuadrado alcuadrado deleted the typechain-imports-hardhat-ethers branch November 16, 2025 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no docs needed This PR doesn't require links to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants