fn reorder_type(
ty: DynSolType,
struct_defs: &StructDefinitions,
) -> Result<DynSolType>
Expand description
Recursively traverses a DynSolType
and reorders the fields of any
CustomStruct
variants according to the provided StructDefinitions
.
This is necessary because the EIP-712 resolver sorts struct fields alphabetically, but we want to respect the order defined in the Solidity source code.