-
When using _signTypedData, many steps are performed that can very easily lead to errors creating an invalid signature. Unfortunately, it is very difficult to debug in the current version of _signTypedData. Example: If the version in the domain is specified as int instead of string, this leads to a different DomainSeperator, which results in different hashes. Unfortunately, errors that arise here are difficult to debug, because you can not see intermediate results (e.g. DomainSeperator, typeHash) but only see the final signature. It would be easier (especially for those who use EIP 712 rarely) if either _signTypedData returns more data that can help to debug if necessary, or to have _signTypedData more strict in its parameters. In general, a flexible method allowing signing without prefix would be helpful to generate signatures for non-compliant EIP 712 implementations. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For this purpose you should use the |
Beta Was this translation helpful? Give feedback.
For this purpose you should use the
TypedDataEncoder
directly, which has all the static methods needed to calculate these. :)