From 1f080e4dcc0e0ca582ef4fd7f113d3ad0b8965f2 Mon Sep 17 00:00:00 2001 From: aelmanaa Date: Wed, 11 Nov 2026 16:50:23 +0000 Subject: [PATCH 1/2] fix: require hardhat-zod-utils 3.0.9 in hardhat and hardhat-ledger hardhat-zod-utils 3.0.9 requires hardhat-utils 5.1.1 (#8791), whose hexStringToBytes no longer decodes "0x" as a zero byte (#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 #8790. Co-Authored-By: Claude Opus 5.5 --- .changeset/hardhat-ledger-zod-utils-floor.md | 5 +++++ .changeset/hardhat-zod-utils-floor.md | 5 +++++ packages/hardhat-ledger/package.json | 2 +- packages/hardhat/package.json | 2 +- pnpm-lock.yaml | 4 ++-- 5 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 .changeset/hardhat-ledger-zod-utils-floor.md create mode 100644 .changeset/hardhat-zod-utils-floor.md diff --git a/.changeset/hardhat-ledger-zod-utils-floor.md b/.changeset/hardhat-ledger-zod-utils-floor.md new file mode 100644 index 00000000000..75d905d2caf --- /dev/null +++ b/.changeset/hardhat-ledger-zod-utils-floor.md @@ -0,0 +1,5 @@ +--- +"@nomicfoundation/hardhat-ledger": patch +--- + +Fixed `data: "0x"` being parsed as one zero byte when an older `@nomicfoundation/hardhat-zod-utils` was installed, by requiring 3.0.9 or later ([#8790](https://github.com/NomicFoundation/hardhat/issues/8790)). diff --git a/.changeset/hardhat-zod-utils-floor.md b/.changeset/hardhat-zod-utils-floor.md new file mode 100644 index 00000000000..21bfe08a7ab --- /dev/null +++ b/.changeset/hardhat-zod-utils-floor.md @@ -0,0 +1,5 @@ +--- +"hardhat": patch +--- + +Fixed local accounts signing `data: "0x"` as calldata `0x00`, and `personal_sign` or `eth_sign` of `"0x"` as the one-byte message `0x00`, when an older `@nomicfoundation/hardhat-zod-utils` was installed, by requiring 3.0.9 or later ([#8790](https://github.com/NomicFoundation/hardhat/issues/8790)). diff --git a/packages/hardhat-ledger/package.json b/packages/hardhat-ledger/package.json index 3c5193a8556..e64d7a5c949 100644 --- a/packages/hardhat-ledger/package.json +++ b/packages/hardhat-ledger/package.json @@ -66,7 +66,7 @@ "@ledgerhq/types-live": "^6.85.0", "@nomicfoundation/hardhat-errors": "workspace:^3.0.15", "@nomicfoundation/hardhat-utils": "workspace:^5.0.0", - "@nomicfoundation/hardhat-zod-utils": "workspace:^3.0.5", + "@nomicfoundation/hardhat-zod-utils": "workspace:^3.0.9", "micro-eth-signer": "^0.14.0", "node-gyp": "^12.1.0", "zod": "^3.23.8" diff --git a/packages/hardhat/package.json b/packages/hardhat/package.json index 6ff65b869d3..2a8c18ac69f 100644 --- a/packages/hardhat/package.json +++ b/packages/hardhat/package.json @@ -99,7 +99,7 @@ "@nomicfoundation/hardhat-errors": "workspace:^3.1.3", "@nomicfoundation/hardhat-utils": "workspace:^5.1.0", "@nomicfoundation/hardhat-vendored": "workspace:^3.0.4", - "@nomicfoundation/hardhat-zod-utils": "workspace:^3.0.5", + "@nomicfoundation/hardhat-zod-utils": "workspace:^3.0.9", "@nomicfoundation/solidity-analyzer": "^0.1.1", "@sentry/core": "^9.4.0", "adm-zip": "^0.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e40becacf64..a9af820f130 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -341,7 +341,7 @@ importers: specifier: workspace:^3.0.4 version: link:../hardhat-vendored '@nomicfoundation/hardhat-zod-utils': - specifier: workspace:^3.0.5 + specifier: workspace:^3.0.9 version: link:../hardhat-zod-utils '@nomicfoundation/solidity-analyzer': specifier: ^0.1.1 @@ -917,7 +917,7 @@ importers: specifier: workspace:^5.0.0 version: link:../hardhat-utils '@nomicfoundation/hardhat-zod-utils': - specifier: workspace:^3.0.5 + specifier: workspace:^3.0.9 version: link:../hardhat-zod-utils micro-eth-signer: specifier: ^0.14.0 From 05ef08ce428f2264a09a9ddbfea13cfa8d28039b Mon Sep 17 00:00:00 2001 From: Luis Schaab Date: Fri, 13 Nov 2026 17:08:49 +0000 Subject: [PATCH 2/2] fix: require hardhat-utils 5.1.1 in hardhat --- .changeset/hardhat-zod-utils-floor.md | 2 +- packages/hardhat/package.json | 2 +- pnpm-lock.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/hardhat-zod-utils-floor.md b/.changeset/hardhat-zod-utils-floor.md index 21bfe08a7ab..f36f44feafd 100644 --- a/.changeset/hardhat-zod-utils-floor.md +++ b/.changeset/hardhat-zod-utils-floor.md @@ -2,4 +2,4 @@ "hardhat": patch --- -Fixed local accounts signing `data: "0x"` as calldata `0x00`, and `personal_sign` or `eth_sign` of `"0x"` as the one-byte message `0x00`, when an older `@nomicfoundation/hardhat-zod-utils` was installed, by requiring 3.0.9 or later ([#8790](https://github.com/NomicFoundation/hardhat/issues/8790)). +Fixed local accounts signing `"0x"` data and messages as the byte `0x00` when an older `@nomicfoundation/hardhat-zod-utils` was installed ([#8790](https://github.com/NomicFoundation/hardhat/issues/8790)). diff --git a/packages/hardhat/package.json b/packages/hardhat/package.json index 2a8c18ac69f..0fae935dd85 100644 --- a/packages/hardhat/package.json +++ b/packages/hardhat/package.json @@ -97,7 +97,7 @@ "dependencies": { "@nomicfoundation/edr": "0.25.1", "@nomicfoundation/hardhat-errors": "workspace:^3.1.3", - "@nomicfoundation/hardhat-utils": "workspace:^5.1.0", + "@nomicfoundation/hardhat-utils": "workspace:^5.1.1", "@nomicfoundation/hardhat-vendored": "workspace:^3.0.4", "@nomicfoundation/hardhat-zod-utils": "workspace:^3.0.9", "@nomicfoundation/solidity-analyzer": "^0.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a9af820f130..97718a1674e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -335,7 +335,7 @@ importers: specifier: workspace:^3.1.3 version: link:../hardhat-errors '@nomicfoundation/hardhat-utils': - specifier: workspace:^5.1.0 + specifier: workspace:^5.1.1 version: link:../hardhat-utils '@nomicfoundation/hardhat-vendored': specifier: workspace:^3.0.4