Skip to content

fix: pin hardhat-deploy to 2.0.24 in Hardhat template - #450

Open
rin-st wants to merge 1 commit into
mainfrom
pin-hardhat-deploy
Open

rin-st wants to merge 1 commit into
mainfrom
pin-hardhat-deploy

Conversation

@rin-st

@rin-st rin-st commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary

New Hardhat projects can't deploy. yarn deploy fails with:

Error HHE202: Plugin "hardhat-deploy" has a peer dependency "@rocketh/node" with expected version "^0.22.4" but the installed version is "0.19.22".

The Hardhat template allows hardhat-deploy@^2.0.6. Generated projects have no lockfile, so they get the newest 2.x, which is 2.3.0 today. hardhat-deploy raises the rocketh version it needs even in patch releases (2.0.25 already needs rocketh 0.20), while the template installs rocketh 0.19. 2.0.24 is the newest hardhat-deploy that works with it, so this PR pins that exact version.

How to test

yarn build
yarn cli ../test-hardhat -s hardhat
cd ../test-hardhat
yarn chain        # first terminal
yarn deploy       # second terminal: fails on main, works on this branch
yarn hardhat:test # fails on main, works on this branch

Checked locally on this branch:

  • a Hardhat project: hardhat:test, chain + deploy, hardhat:lint, next:lint, next:check-types pass;
  • -s hardhat -e scaffold-eth/se-2-challenges:challenge-tokenization: hardhat:test and chain + deploy pass.

Notes

  • Why this goes straight into create-eth, and why the version differs from scaffold-eth-2. Usually a change is made in scaffold-eth-2 first, then backmerged here and released. This time scaffold-eth-2 itself is not broken: its lockfile keeps hardhat-deploy at 2.0.30, and its rocketh packages are newer (updated in Deps update: hardhat 3.18, rocketh 0.23, TypeScript 6, ESLint 10, nextjs minors scaffold-eth-2#1326). That update has not reached main here: the backmerge that carries it (backmerge 14-10-26 #448) goes into the migration branch (Merge create-eth into this repository scaffold-eth-2#1338) instead, as planned in [WIP] Merge create-eth into this repository scaffold-eth-2#1336. So for now the two templates need different hardhat-deploy versions:

    • main here (rocketh 0.19): 2.0.24, this PR;
    • the migration branch (rocketh 0.23): ~2.0.30, already pinned there.

    When this PR is merged into the migration branch, the conflict on this line is resolved to ~2.0.30, and the versions match again.

  • Speedrun Ethereum challenges pinned to create-eth@2.0.23 can't deploy their contracts locally either. yarn deploy fails with HHE202 (checked with challenge-tokenization). A new release does not reach them: once this PR is released as 2.0.24, the challenges need their pin bumped to it.

🤖 Generated with Claude Code

hardhat-deploy >=2.0.25 needs rocketh >=0.20, template installs 0.19. Lockfile-less projects got 2.3.0 and yarn deploy failed with HHE202.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@technophile-04 technophile-04 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks Rinat! Checked the peer deps on npm: 2.0.24 is the last one that takes rocketh 0.19 (2.0.25 already wants 0.20), so the exact pin makes sense. One heads-up: #448 still has "hardhat-deploy": "^2.0.30", which resolves to 2.4.0 and would hit the same HHE202. It should probably be ~2.0.30 like the migration branch. After this is released we'll bump the challenges to create-eth@2.0.24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants