Hardhat utils: constants zero hash - #8567
Conversation
|
There was a problem hiding this comment.
Pull request overview
Adds a new constants zero-hash util command to the internal hhu built-in plugin, exposing it via both hardhat utils constants zero-hash and the hhu CLI surface, and updates the CLI help snapshots and release notes accordingly.
Changes:
- Added a
constants zero-hashtask that prints the 32-byte zero hash (0x+ 64 zeros). - Added an integrated-task test that runs
hre.tasks.getTask(["utils","constants","zero-hash"])and asserts the printed output. - Updated
hhuCLI help snapshot text and added a changeset for a patch release.
Suggested manual testing:
pnpm buildnode packages/hardhat/dist/src/hhu.js constants zero-hash
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/hardhat/test/internal/cli/hhu.ts | Updates hhu help-output snapshots to list constants zero-hash. |
| packages/hardhat/test/internal/builtin-plugins/hhu/tasks/constants/zero-hash.ts | Adds an integration test for the hardhat utils constants zero-hash path. |
| packages/hardhat/src/internal/builtin-plugins/hhu/tasks/constants/zero-hash.ts | Implements the zero-hash task action that prints the zero hash. |
| packages/hardhat/src/internal/builtin-plugins/hhu/tasks/constants/index.ts | Registers the new zero-hash task in the constants namespace. |
| .changeset/sunny-cloths-search.md | Declares a hardhat patch changeset for the new util. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…tion/hardhat into constants-zero-hash
…icFoundation/hardhat into constants-zero-hash
Related to design doc https://app.notion.com/p/nomicfoundation/Design-doc-Hardhat-utils-36d578cdeaf5808f88f8eabad82feb01 and https://app.notion.com/p/nomicfoundation/36d578cdeaf580cab1ebc113ff7b89db?v=36d578cdeaf581efada5000c7c5683c7
Implements:
pnpm hardhat utils constants zero-hash: 32 bytes = 0x + 64 zeros.