Skip to content

Commit 60acb7a

Browse files
authored
feat: add EIP-712 cheatcodes (#686)
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); ```
1 parent ee93fdc commit 60acb7a

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

src/Vm.sol

Lines changed: 53 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/Vm.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ contract VmTest is Test {
1313
}
1414

1515
function test_VmSafeInterfaceId() public pure {
16-
assertEq(type(VmSafe).interfaceId, bytes4(0x4d98a4ca), "VmSafe");
16+
assertEq(type(VmSafe).interfaceId, bytes4(0x1b0ca4fb), "VmSafe");
1717
}
1818
}

0 commit comments

Comments
 (0)