-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support atomic batch transactions (#5306)
## Explanation Support atomic batch transactions via EIP-7702, and ERC-7821. Specifically: - Add `addTransactionBatch` method with `TransactionBatchRequest` and `TransactionBatchResult` types. - Encode multiple transactions into single `execute` call using ERC-7821 ABI. - Automatically upgrade account via `setCode` transaction if needed. - Add `isAtomicBatchSupported` method to identify which chains support atomic batch for a given account. - Add new `batch` `TransactionType`. - Add `batch` utils to encapsulate all batch-related logic. - Add `feature-flags` utils to encapsulate retrieval and fallback of LaunchDarkly configuration. - Currently EIP-7702 chains and contract addresses. - Validate `to` of external transaction is not an internal account unless `transactionType` is `batch`. ## References Fixes [#4096](MetaMask/MetaMask-planning#4096) ## Changelog See `CHANGELOG.md`. ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
- Loading branch information
1 parent
0223bed
commit b9cb503
Showing
21 changed files
with
1,411 additions
and
74 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.