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

✨ Improve EIP7702Proxy and add LibEIP7702 #1355

Merged
merged 15 commits into from
Feb 18, 2025
Merged

Conversation

Vectorized
Copy link
Owner

@Vectorized Vectorized commented Feb 17, 2025

Description

LibEIP7702 makes it neater to work with the proxy.

Principles:

  • Try to preserve the upper 96 bits. Just in case some weird delegation saved some values in there.
  • Use transient storage to pass the request. Technically, we can just use regular storage, without much overhead, cuz it's warm. But I am worried about the super edge case where someone actually use the upper 96 bits. Also it's cheaper for the case of direct delegation (no via EIP7702Proxy).

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Ran forge fmt?
  • Ran forge test?

Pull requests with an incomplete checklist will be thrown out.

@Vectorized Vectorized requested a review from atarpara February 17, 2025 18:12
@Vectorized Vectorized force-pushed the 7702-proxy-improvements branch from 6e1d74f to ff206f1 Compare February 17, 2025 19:45
Copy link

github-actions bot commented Feb 17, 2025

Gas Snapshot Comparison Report

Generated at commit : 8aaf8aa, Compared to commit : 29b5dbe

Contract Name Test Name Main Gas PR Gas Diff
EIP7702ProxyTest testEIP7702Proxy() 31850 - -
test__codesize() 6590 - -

@Vectorized
Copy link
Owner Author

Should we add some kind of identifier to the proxy?

@Vectorized
Copy link
Owner Author

Marinating for the next 6 hours, then merging. @atarpara

Copy link
Collaborator

@atarpara atarpara left a comment

Choose a reason for hiding this comment

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

LGTM.

@atarpara
Copy link
Collaborator

Should we add some kind of identifier to the proxy?

We can use proxy codehash as a identifier.

@Vectorized Vectorized merged commit fe8ca07 into main Feb 18, 2025
13 checks passed
@Vectorized Vectorized deleted the 7702-proxy-improvements branch February 18, 2025 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants