Add new method to TransactionController to determine whether EIP-7702 is supported for specified chains#7948
Open
jeffsmale90 wants to merge 3 commits intomainfrom
Open
Add new method to TransactionController to determine whether EIP-7702 is supported for specified chains#7948jeffsmale90 wants to merge 3 commits intomainfrom
jeffsmale90 wants to merge 3 commits intomainfrom
Conversation
ff9101e to
6a51335
Compare
3910cac to
02d0ddc
Compare
… is supported for specified chains
… supported chains if omitted
02d0ddc to
0af0fee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
The
TransactionControllerexposes a methodisAtomicBatchSupportedthat determines whether a specified address is upgraded via EIP-7702 for specified chains.This method adds
isEIP7702Supportedto determine whether specified chainIds support EIP-7702. This information can be inferred from the result ofisAtomicBatchSupported, but that method is unnecessarily broad for this purpose.References
This is required for MetaMask/metamask-extension#40152.
Checklist
Note
Low Risk
Adds a new read-only helper method and types with isolated logic and extensive tests; no transaction signing/sending behavior changes.
Overview
Adds a new
TransactionController.isEIP7702SupportedAPI that reports whether specifiedchainIdssupport EIP-7702 (or returns all supported chains whenchainIdsis omitted), using theconfirmations_eip_7702.supportedChainsfeature flag and performing case-insensitive chain ID matching.Exports new request/response types (
IsEIP7702SupportedRequest/IsEIP7702SupportedResult), adds comprehensive unit tests for supported/unsupported/mixed/empty inputs, and documents the addition in the package changelog.Written by Cursor Bugbot for commit 0af0fee. This will update automatically on new commits. Configure here.