Skip to content

Support EIP-712 cheatcodes in Solidity Test#260

Merged
kanej merged 7 commits into
mainfrom
EIP-712-cheatcodes-hh
May 20, 2026
Merged

Support EIP-712 cheatcodes in Solidity Test#260
kanej merged 7 commits into
mainfrom
EIP-712-cheatcodes-hh

Conversation

Copilot AI review requested due to automatic review settings May 5, 2026 15:22
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hardhat-website Ready Ready Preview, Comment May 20, 2026 7:22pm

Request Review

Copy link
Copy Markdown
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

Adds documentation for newly supported EIP-712 hashing cheatcodes in Hardhat Solidity tests, including the required test.solidity.eip712Types configuration and a dedicated guide for collecting/using EIP-712 struct types.

Changes:

  • Document new test.solidity.eip712Types configuration and link it to the relevant cheatcodes and guide.
  • Add new cheatcode reference pages for eip712HashType, eip712HashStruct, and eip712HashTypedData, plus a new “EIP-712 type hashing” testing guide.
  • Remove EIP-712 items from the “unsupported cheatcodes” list and bump @nomicfoundation/hardhat-errors (and lockfile updates).

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/content/docs/docs/reference/configuration.mdx Documents the new test.solidity.eip712Types config block and links to cheatcodes/guide.
src/content/docs/docs/reference/cheatcodes/Utilities/eip712-hash-typed-data.mdx Adds reference docs for hashing full EIP-712 typed-data JSON payloads.
src/content/docs/docs/reference/cheatcodes/Utilities/eip712-hash-type.mdx Adds reference docs for hashing canonical EIP-712 type strings (by name or definition).
src/content/docs/docs/reference/cheatcodes/Utilities/eip712-hash-struct.mdx Adds reference docs for hashing EIP-712 structs by registered type name + ABI-encoded value.
src/content/docs/docs/reference/cheatcodes/unsupported-cheatcodes.mdx Removes EIP-712 cheatcodes from the “unsupported” list.
src/content/docs/docs/guides/testing/eip712-types.mdx Adds a new guide explaining configuration and usage patterns for EIP-712 hashing in Solidity tests.
package.json Bumps @nomicfoundation/hardhat-errors dependency.
pnpm-lock.yaml Updates lockfile for the dependency bump (including transitive updates).
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

'"Mail":[{"name":"from","type":"Person"},{"name":"to","type":"Person"},{"name":"contents","type":"string"}],'
'"Person":[{"name":"wallet","type":"address"},{"name":"name","type":"string"}]'
'},'
'"primaryType":"Mail",'
Copy link
Copy Markdown
Contributor Author

@ChristopherDedominici ChristopherDedominici May 5, 2026

Choose a reason for hiding this comment

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

True, they are not valid, but the idea was to simplify the reading by using shorter fake addresses

Comment thread src/content/docs/docs/guides/testing/eip712-types.mdx
Comment thread src/content/docs/docs/guides/testing/eip712-types.mdx
Copy link
Copy Markdown
Member

@kanej kanej left a comment

Choose a reason for hiding this comment

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

I did a run through manually of the guide. LGTM!

@kanej kanej added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 711f058 May 20, 2026
3 checks passed
@kanej kanej deleted the EIP-712-cheatcodes-hh branch May 20, 2026 19:36
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.

3 participants