Skip to content

fix: require hardhat-zod-utils 3.0.9 in hardhat and hardhat-ledger - #8843

Merged
schaable merged 2 commits into
NomicFoundation:mainfrom
aelmanaa:fix/hardhat-ledger-zod-utils-floor
Nov 13, 2026
Merged

schaable merged 2 commits into
NomicFoundation:mainfrom
aelmanaa:fix/hardhat-ledger-zod-utils-floor

Conversation

@aelmanaa

Copy link
Copy Markdown
Contributor
  • Because this PR includes a bug fix, relevant tests have been included.

Closes #8790

The follow-up to #8791, now that @nomicfoundation/hardhat-zod-utils 3.0.9 is out.

3.0.9 requires @nomicfoundation/hardhat-utils 5.1.1 (#8791), whose hexStringToBytes no longer decodes "0x" as a zero byte (#8765). hardhat and hardhat-ledger still accepted hardhat-zod-utils ^3.0.5, so a lockfile holding 3.0.8 kept the old rpcData parsing through a hardhat upgrade. Local accounts then signed data: "0x" as calldata 0x00, and personal_sign/eth_sign of "0x" as the message 0x00 (repro in #8790).

Changes

  • packages/hardhat and packages/hardhat-ledger: @nomicfoundation/hardhat-zod-utils workspace:^3.0.5 → workspace:^3.0.9.
  • pnpm-lock.yaml: the two specifiers.
  • Patch changesets for hardhat and @nomicfoundation/hardhat-ledger.

In the signing paths, request data reaches hexStringToBytes only through hardhat-zod-utils; the direct call in local-accounts.ts parses private keys. So this PR leaves the hardhat-utils ranges of both packages as they are.

Tests

No new tests: this only changes version ranges, and the parsing is covered by the tests added in #8791. scripts/check-dependencies.ts passes; the local-accounts tests (62) and the hardhat-ledger tests (56) pass.

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 05ef08c

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

This PR includes changesets to release 2 packages
Name Type
@nomicfoundation/hardhat-ledger Patch
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

@kanej kanej added no docs needed This PR doesn't require links to documentation and removed status:triaging labels Nov 13, 2026
aelmanaa and others added 2 commits November 13, 2026 16:42
hardhat-zod-utils 3.0.9 requires hardhat-utils 5.1.1 (NomicFoundation#8791), whose
hexStringToBytes no longer decodes "0x" as a zero byte (NomicFoundation#8765). Both
packages still accepted 3.0.5, so a lockfile holding 3.0.8 kept the old
parsing through a hardhat upgrade.

Part of NomicFoundation#8790.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schaable
schaable force-pushed the fix/hardhat-ledger-zod-utils-floor branch from 7f90256 to 05ef08c Compare November 13, 2026 17:08

@schaable schaable left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for following up on this!

I pushed a few changes to your branch:

  • Rebased it on the latest main.
  • Bumped hardhat's @nomicfoundation/hardhat-utils range to ^5.1.1. Your change already covers local accounts through hardhat-zod-utils, but hardhat also calls hexStringToBytes directly, so it needs to require the fixed version too.
  • Shortened the hardhat changeset to one line.

Looks good to me now.

@schaable
schaable enabled auto-merge November 13, 2026 17:14
@schaable
schaable added this pull request to the merge queue Nov 13, 2026
Merged via the queue into NomicFoundation:main with commit 0e96c9f Nov 13, 2026
246 of 247 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 13, 2026
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 no peer bump needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hardhat-zod-utils and hardhat-verify still accept hardhat-utils before 5.1.1, which decodes "0x" as a zero byte

3 participants