Replies: 6 comments 1 reply
-
No, it’s actually not possible to do this. The contents of the hash are required by any higher-level UI. For example, MetaMask needs to know the validating address and chain ID since it checks both those things before showing the message to the user. If you pass in the hash instead, there would be no way for MetaMask to vet these. I’m not familiar with that EIP, but will look into it shortly to see if I have any guidance. :) My guess is you might have to use the TypedDataEncoder directly though. |
Beta Was this translation helpful? Give feedback.
-
It looks like you just need to use EIP-712 normally. The EIP provides the structure to use, for ethers simply remove the EIP712Domain structure, and include the domain values. It should just work, I think. If I understand the EIP properly. |
Beta Was this translation helpful? Give feedback.
-
I see - the challenge is wanting to have a generalized solution that does not rely on hardcoding the domain for each token being interacted with. It seems like this is a shortcoming of the standard. |
Beta Was this translation helpful? Give feedback.
-
Yeah... The EIP is in draft though, so you should feel free to comment on it. :) There are plenty of comments, but the latest is from April... |
Beta Was this translation helpful? Give feedback.
-
(converting this to a discussion) |
Beta Was this translation helpful? Give feedback.
-
This is a shortcoming of EIP712 IMO... I raised this in Ethereum Magicians but no one replied. 😕 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Using the hashed domain directly would make integration with this standard easier.
https://eips.ethereum.org/EIPS/eip-2612#specification
Beta Was this translation helpful? Give feedback.
All reactions