-
Notifications
You must be signed in to change notification settings - Fork 558
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
Update ERC-7739: Update ERC-7739 #687
Conversation
✅ All reviewers have approved. |
The commit 61fa022 (as a parent of 0ca8d24) contains errors. |
Co-authored-by: Francisco Giordano <fg@frang.io>
Co-authored-by: Francisco Giordano <fg@frang.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All Reviewers Have Approved; Performing Automatic Merge...
No backwards compatibility issues. | ||
### Detection of previous draft | ||
|
||
In an earlier draft, we have designated a `supportsNestedTypedDataSign()` function for support detection, which returns `bytes4(0xd620c85a)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add something like:
"To ensure false negative detections, it is RECOMMENDED that dApps use supportsNestedTypedDataSign()
as a fallback detection method in addition to the one described earlier in the spec."
to ensure dApps consider using supportsNestedTypedDataSign()
and not just ignore it
|
||
For future extendability, `supportsNestedTypedDataSign` is defined to return a bytes32 as the first word of its returned data. For bytecode compactness and to leave space for bit packing, only the leftmost 4 bytes are set to the function selector of `supportsNestedTypedDataSign`. | ||
When the `contents` structure contains nested types, EIP-712 lexicographical sorting can result in the `contentsName` not being positioned exactly at the start of the `contentsType`. As such, we need the explicit mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the rationale behind these two modes but I feel the ERC should provide a general guideline for when to use each other. So far I've found the main benefit of using implicit mode when possible is that it reduces the calldata costs. If that's the case, I'd suggest to include it in this section
When the `contents` structure contains nested types, EIP-712 lexicographical sorting can result in the `contentsName` not being positioned exactly at the start of the `contentsType`. As such, we need the explicit mode. | |
When the `contents` structure contains nested types, EIP-712 lexicographical sorting can result in the `contentsName` not being positioned exactly at the start of the `contentsType`. As such, we need the explicit mode. | |
Signing UIs may use implicit mode whenever possible to reduce the calldata size. Although the `explicit` mode works as a generalized approach. |
When opening a pull request to submit a new EIP, please use the suggested template: https://github.com/ethereum/EIPs/blob/master/eip-template.md
We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met: