Skip to content

feat(forge): eip712 cheatcodes + forge cmd (eip712 + bind-json) with solar#10510

Merged
grandizzy merged 50 commits intomasterfrom
feat/eip712-with-solar
Jun 4, 2025
Merged

feat(forge): eip712 cheatcodes + forge cmd (eip712 + bind-json) with solar#10510
grandizzy merged 50 commits intomasterfrom
feat/eip712-with-solar

Conversation

@0xrusowsky
Copy link
Contributor

@0xrusowsky 0xrusowsky commented May 13, 2025

this PR combines 3 smaller PRs which serve several purposes:

motivation:

to-do

  • reimplement eip712 using solar
  • integrate with forge bind-json
  • implement eip712 cheatcodes
  • fix compilers test regression (vyper does not support Prague yet)
  • fix merge conflicts
  • update docs: docs: eip712 book#1526

@0xrusowsky 0xrusowsky changed the title feat(forge): eip712 cheatcodes + forge cmd (eip712 + json-bind) with solar feat(forge): eip712 cheatcodes + forge cmd (eip712 + bind-json) with solar May 29, 2025
@grandizzy grandizzy self-requested a review June 3, 2025 09:03
@grandizzy grandizzy added T-feature Type: feature C-forge Command: forge labels Jun 3, 2025
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

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

lgtm! pending other reviews before merging
cc @DaniPopes

Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

lgtm!

@smol-ninja
Copy link

Looking forward to this feature!

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

lgtm

@grandizzy grandizzy merged commit 365cbb4 into master Jun 4, 2025
22 checks passed
@grandizzy grandizzy deleted the feat/eip712-with-solar branch June 4, 2025 15:14
@github-project-automation github-project-automation bot moved this to Done in Foundry Jun 4, 2025
yash-atreya added a commit to foundry-rs/forge-std that referenced this pull request Jun 11, 2025
Ref foundry-rs/foundry#10510

Add `eip712HashType`, `eip712HashStruct`, and `eip712HashTypedData`
cheatcodes to VmSafe interface

```solidity
function eip712HashType(string calldata typeNameOrDefinition) external pure returns (bytes32 typeHash);
function eip712HashType(string calldata bindingsPath, string calldata typeName) external pure returns (bytes32 typeHash);
function eip712HashStruct(string calldata typeNameOrDefinition, bytes calldata abiEncodedData) external pure returns (bytes32 typeHash);
function eip712HashStruct(string calldata bindingsPath, string calldata typeName, bytes calldata abiEncodedData) external pure returns (bytes32 typeHash);
function eip712HashTypedData(string calldata jsonData) external pure returns (bytes32 digest);
```
aubBrooks919 added a commit to aubBrooks919/forge-std that referenced this pull request Sep 25, 2025
Ref foundry-rs/foundry#10510

Add `eip712HashType`, `eip712HashStruct`, and `eip712HashTypedData`
cheatcodes to VmSafe interface

```solidity
function eip712HashType(string calldata typeNameOrDefinition) external pure returns (bytes32 typeHash);
function eip712HashType(string calldata bindingsPath, string calldata typeName) external pure returns (bytes32 typeHash);
function eip712HashStruct(string calldata typeNameOrDefinition, bytes calldata abiEncodedData) external pure returns (bytes32 typeHash);
function eip712HashStruct(string calldata bindingsPath, string calldata typeName, bytes calldata abiEncodedData) external pure returns (bytes32 typeHash);
function eip712HashTypedData(string calldata jsonData) external pure returns (bytes32 digest);
```
davidLong89 added a commit to davidLong89/forge-std that referenced this pull request Sep 25, 2025
Ref foundry-rs/foundry#10510

Add `eip712HashType`, `eip712HashStruct`, and `eip712HashTypedData`
cheatcodes to VmSafe interface

```solidity
function eip712HashType(string calldata typeNameOrDefinition) external pure returns (bytes32 typeHash);
function eip712HashType(string calldata bindingsPath, string calldata typeName) external pure returns (bytes32 typeHash);
function eip712HashStruct(string calldata typeNameOrDefinition, bytes calldata abiEncodedData) external pure returns (bytes32 typeHash);
function eip712HashStruct(string calldata bindingsPath, string calldata typeName, bytes calldata abiEncodedData) external pure returns (bytes32 typeHash);
function eip712HashTypedData(string calldata jsonData) external pure returns (bytes32 digest);
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-forge Command: forge T-feature Type: feature

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Cheatcode: EIP712 canonical hashing

5 participants