You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
debugSymbols lacks struct definitions, so Hardhat's EIP-712 cheatcodes fail under slang #813
Hardhat builds the EIP-712 type table for the vm.eip712HashType / vm.eip712HashStruct cheatcodes by walking the solc AST in each build info for StructDefinition nodes (collectEip712CanonicalTypes in packages/hardhat/src/internal/builtin-plugins/solidity-test/eip712/). slang emits its own AST format, so the walker finds no structs and every lookup fails:
Error: vm.eip712HashStruct: 'Permit' not defined in `eip712CanonicalTypes`
On aave-v4 this fails 149 of its 1559 Solidity tests under slang (solx #786's prerelease cc66c013); solc and solx 0.1.8 pass all 1559. Every failure is this error, and no other repo in the Hardhat benchmark suite uses the cheatcodes.
The table needs, per struct: its name, the source and contract (or file level) it is declared in, and its members in order, each with its name and a resolved type: elementary types as written (address payable as address), enums as uint8, user-defined value types as their underlying type, contracts and interfaces as address, other structs as a reference that can be followed, arrays with their base and length, and mappings and function types marked as such (Hardhat drops any struct that contains one, and the structs that depend on it). A structs list in debugSymbols, next to contracts, would carry that; Hardhat's collector then reads it for compilerType: "slang" build infos.
Activity