-
Notifications
You must be signed in to change notification settings - Fork 619
[SDK] Accept pre-signed authorizations for 7702 account transactions #8038
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] Accept pre-signed authorizations for 7702 account transactions #8038
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 617ffb3 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 |
WalkthroughAdds a changeset marking a patch for "thirdweb". Updates createSessionKey to accept and forward transaction overrides. Modifies the EIP-7702 minimal account flow to prefer provided authorizations, validate delegated address, compute/sign an authorization when missing, and pass authorizationList only when present. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor D as DApp
participant MA as MinimalAccount (EIP-7702)
participant TX as First Tx
participant C as Chain/Node
participant Sig as Signer
D->>MA: init execute([...txs], options)
MA->>TX: read authorizationList[0], nonce, sponsorGas
alt Authorization provided
MA->>MA: validate auth.address == delegatedContract
alt Address mismatch
MA-->>D: throw Error("Authorization address mismatch")
else Valid
MA->>D: proceed using provided authorization
end
else No authorization
MA->>C: check is 7702 delegated?
alt Already delegated
MA->>D: proceed without authorization
else Not delegated
MA->>C: getNonce (if not in tx)
MA->>Sig: signAuthorization(nonce, delegatedContract, sponsorGas)
Sig-->>MA: authorization
MA->>D: proceed with authorizationList = [authorization]
end
end
sequenceDiagram
autonumber
participant App as Caller
participant SDK as createSessionKey
participant Core as createSessionWithSig
App->>SDK: createSessionKey(options{overrides?})
SDK->>Core: createSessionWithSig(..., overrides=options.overrides)
Core-->>App: result
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (2)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
✨ Finishing touches
🧪 Generate unit tests
Comment |
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. This stack of pull requests is managed by Graphite. Learn more about stacking. |
fe56bb1 to
10fcce1
Compare
size-limit report 📦
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8038 +/- ##
==========================================
- Coverage 56.64% 56.63% -0.02%
==========================================
Files 904 904
Lines 58694 58707 +13
Branches 4163 4166 +3
==========================================
- Hits 33247 33246 -1
- Misses 25342 25355 +13
- Partials 105 106 +1
🚀 New features to boost your workflow:
|
10fcce1 to
617ffb3
Compare

PR-Codex overview
This PR focuses on accepting pre-signed authorizations for
ERC7702account transactions, enhancing thecreateSessionKeyfunction, and improving the handling of authorizations in theminimal-accountlogic.Detailed summary
createSessionKeyto acceptWithOverrides<CreateSessionKeyOptions>instead ofCreateSessionKeyOptions.minimal-account.ts.Summary by CodeRabbit
New Features
Bug Fixes