Skip to content

Update EIP712 upgradeable patch file #5690

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

Merged

Conversation

naevern
Copy link
Contributor

@naevern naevern commented May 17, 2025

This PR fixes issue #5607 by updating the misleading comment in the EIP712 contract that incorrectly refers to "immutable values" in the upgradeable version.

As suggested by @Amxx, I've replaced the comment with:

NOTE: The upgradeable version of this contract does not use an immutable cache and recomputes the domain separator each time {_domainSeparatorV4} is called. That is cheaper than accessing a cached version in cold storage.

This change is made in the upgradeable.patch file which is used during the transpilation process to generate the upgradeable contract variants, as recommended by @ernestognw.

Fixes #5607

PR Checklist

  • Tests
  • Documentation
  • Changeset entry (run npx changeset add)

Copy link

changeset-bot bot commented May 17, 2025

⚠️ No Changeset found

Latest commit: 781b73f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@naevern naevern force-pushed the fix/eip712-upgradeable-comment branch from 0dd93d3 to 9b549ca Compare May 17, 2025 01:41
Fix misleading comment in EIP712Upgradeable by updating the comment in the transpilation patch file. The previous comment incorrectly referred to immutable values that don't exist in the upgradeable version.

The patch file has also been cleaned of trailing whitespace.
@naevern naevern force-pushed the fix/eip712-upgradeable-comment branch from 9b549ca to addf18c Compare May 17, 2025 01:49
@naevern naevern changed the title Update EIP712 upgradeable comment in patch file Update EIP712 upgradeable patch file May 17, 2025
@naevern
Copy link
Contributor Author

naevern commented May 17, 2025

@ernestognw I've updated the comments as suggested by @Amxx.
Please take a look at this, if I need to change anything, do let me know. Thanks.

@naevern
Copy link
Contributor Author

naevern commented May 19, 2025

@ericglau @CoveMB @ericnordelo @ernestognw any updates or reviews?

@naevern
Copy link
Contributor Author

naevern commented May 21, 2025

@CoveMB any more changes required? or is this good to go?

Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but requires another review. CC @arr00 @luiz-lvj @gonzaotc

@ernestognw ernestognw requested review from arr00, luiz-lvj and gonzaotc May 22, 2025 18:02
@ernestognw
Copy link
Member

Thanks @naevern!

@ernestognw ernestognw merged commit 8e3ea8b into OpenZeppelin:master May 22, 2025
19 of 20 checks passed
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.

docs: misleading outdated comment at EIP712Upgradeable
4 participants