-
Notifications
You must be signed in to change notification settings - Fork 21.5k
Implemented EIP191/712 in clef #17789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The last update also reformatted the code with |
|
Heh, we usually rebase instead of mega-merge :) |
|
Just rebased now :) |
|
I've modified the |
|
Travis finally succeeded. Will merge this later tonight, when I have some time to sit down some more with it and extensively test after the merge |
|
Hey @holiman, many thanks for rebasing to the new wallet API :)
I originally implemented it like that because I thought it helped with the pretty printing functionality. Hooray, happy to see Travis passing! Just for the record, is there a known issue with AppVeyor? Afaik, all PRs fail there. |
Yup, there is. |
func (typedData *TypedData) EncodeData(primaryType string, data map[string]interface{}, depth int) (hexutil.Bytes, error) {
...
// Verify extra data
if len(typedData.Types[primaryType]) < len(data) {
return nil, errors.New("there is extra data provided in the message")
}
...In the case where a message contains extra fields beyond what the type itself defines, I did some research on this:
So, I am curious whether this check follows the EIP-712 documentation or if |
This PR implements EIP-191 and EIP-712.
Additions
ecRecovermethod in the clef APIContent Types
This fully respects the EIP-191 specs.
0x000x010x020x45Notes
clef, there will be no work done to retrofit the implementation ongethandeth_signwill be deprecatedTODO
data/typed(EIP712)data/typedtext/validatortext/validator