Skip to content
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

Merged
merged 16 commits into from
Oct 28, 2024

Conversation

Vectorized
Copy link
Contributor

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:

  • The PR edits only existing draft PRs.
  • The build passes.
  • Your GitHub username or email address is listed in the 'author' header of all affected PRs, inside .
  • If matching on email address, the email address is the one publicly listed on your GitHub profile.

@eip-review-bot
Copy link
Collaborator

eip-review-bot commented Oct 26, 2024

✅ All reviewers have approved.

@eip-review-bot eip-review-bot changed the title Update ERC-7739 Update ERC-7739: Update ERC-7739 Oct 26, 2024
Copy link

The commit 61fa022 (as a parent of 0ca8d24) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot added the w-ci label Oct 26, 2024
@github-actions github-actions bot removed the w-ci label Oct 26, 2024
ERCS/erc-7739.md Outdated Show resolved Hide resolved
ERCS/erc-7739.md Outdated Show resolved Hide resolved
Vectorized and others added 3 commits October 28, 2024 01:16
Co-authored-by: Francisco Giordano <fg@frang.io>
Co-authored-by: Francisco Giordano <fg@frang.io>
@Vectorized Vectorized marked this pull request as ready for review October 27, 2024 17:27
@eip-review-bot eip-review-bot enabled auto-merge (squash) October 28, 2024 05:23
Copy link
Collaborator

@eip-review-bot eip-review-bot left a 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...

@eip-review-bot eip-review-bot merged commit 324e0b7 into ethereum:master Oct 28, 2024
9 of 10 checks passed
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)`.
Copy link
Contributor

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.
Copy link
Contributor

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

Suggested change
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.

@jxom jxom mentioned this pull request Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants