-
Notifications
You must be signed in to change notification settings - Fork 131
feat(l1,l2): allow eip 7702 on generic transactions #5460
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
Conversation
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.
Pull request overview
This PR enables EIP-7702 transactions to be sent through GenericTransaction, providing support for setting EOA code delegation in the Ethereum client.
Key changes:
- Added
authorization_listfield toOverridesstruct for passing EIP-7702 authorization tuples - Implemented
TryFrom<GenericTransaction>forEIP7702Transactionto convert generic transactions into typed EIP-7702 transactions - Updated transaction handling logic to recognize and process EIP-7702 as a supported transaction type
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
crates/networking/rpc/clients/eth/mod.rs |
Added AuthorizationTupleEntry import and authorization_list field to Overrides struct |
crates/l2/sdk/src/sdk.rs |
Added EIP-7702 transaction handling in send_generic_transaction and build_generic_tx, plus improved error messaging |
crates/common/types/transaction.rs |
Added MissingToField error variant and TryFrom implementation for converting GenericTransaction to EIP7702Transaction |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Lines of code reportTotal lines added: Detailed view |
Co-authored-by: Pablo Deymonnaz <[email protected]>
crates/common/types/transaction.rs
Outdated
| #[error("Missing fee token address")] | ||
| MissingFeeToken, | ||
| #[error("Missing To field")] | ||
| MissingToField, |
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.
Would it be better to have a MissingField(String) error specifying wich field is missing in the string param?
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.
Agree! Done here b9978b5
Motivation
We want to be able to send EIP 7702 transactions through
GenericTransactionDescription
authorization_listtoOverridesTryFromforGenericTransaction->EIP7702Transaction