-
Notifications
You must be signed in to change notification settings - Fork 497
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
[SDK] Update implementation addr extraction logic #6093
Conversation
🦋 Changeset detectedLatest commit: 08cc489 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
size-limit report 📦
|
@@ -54,5 +54,10 @@ export function extractMinimalProxyImplementationAddress( | |||
return `0x${implementationAddress}`; | |||
} | |||
|
|||
if (bytecode.startsWith("0xef0100")) { |
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.
niceee
packages/thirdweb/src/utils/bytecode/extractMinimalProxyImplementationAddress.ts
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6093 +/- ##
==========================================
+ Coverage 56.90% 56.92% +0.02%
==========================================
Files 1155 1155
Lines 63916 63920 +4
Branches 5193 5195 +2
==========================================
+ Hits 36369 36388 +19
+ Misses 26821 26804 -17
- Partials 726 728 +2
*This pull request uses carry forward flags. Click here to find out more.
|
TOOL-3258 <!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces a patch related to EIP-7702 in the `thirdweb` package, specifically enhancing the functionality to extract minimal proxy implementation addresses from bytecode. ### Detailed summary - Added a check for EIP-7702 compliance in the `extractMinimalProxyImplementationAddress.ts` file. - Implemented logic to extract the implementation address from bytecode if it meets the specified conditions (length of 48 and starts with "0xef0100"). > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
27b35ec
to
62f2cd9
Compare
TOOL-3258 <!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces support for EIP-7702 by adding functionality to extract the implementation address from a specific bytecode pattern. It includes a new utility function and a corresponding test case. ### Detailed summary - Added EIP-7702 support in `extractMinimalProxyImplementationAddress.ts` to extract the implementation address from bytecode. - Implemented a check for bytecode length and prefix. - Added a test case in `extractMinimalProxyImplementationAddress.test.ts` to validate the new functionality. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
7c4bf4a
to
08cc489
Compare
TOOL-3258
PR-Codex overview
This PR introduces support for extracting implementation addresses from bytecode that conforms to the EIP-7702 specification. It adds a new utility function and a corresponding test to ensure the functionality works as expected.
Detailed summary
extractMinimalProxyImplementationAddress.ts
to handle EIP-7702 delegation designator.0xef0100
.extractMinimalProxyImplementationAddress.test.ts
to verify correct extraction of address from EIP-7702 bytecode.