Add Across Predict withdraw submit support#8761
Open
pedronfigueiredo wants to merge 1 commit into
Open
Conversation
4735d17 to
0e2bce3
Compare
This was referenced May 11, 2026
f4feefb to
86b0f66
Compare
0e2bce3 to
013d596
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.
Summary
This is PR 3 of 4 in the core stack for Predict withdraws over Across.
TransactionType.predictAcrossWithdrawfor the Across deposit leg.Stack
Validation
yarn workspace @metamask/transaction-pay-controller run jest --no-coverage src/strategy/across/across-submit.test.ts src/strategy/across/across-quotes.test.ts src/strategy/across/AcrossStrategy.test.tsyarn changelog:validateyarn workspace @metamask/transaction-pay-controller run testyarn workspace @metamask/transaction-controller run testNote
Medium Risk
Changes Across submission logic for post-quote flows, including conditional EIP-7702 batch handling and new gas-limit estimation paths, which can affect transaction construction and fee behavior.
Overview
Adds Across submit-time support for post-quote Predict withdraw flows by optionally prepending the original transaction to the submitted batch and using
TransactionType.predictAcrossWithdrawfor the Across leg.Refactors Across submit to more aggressively choose EIP-7702 batch submission (e.g., when the parent has an
authorizationListor when source gas is paid in-token) and to estimate the final 7702 batch gas limit viaTransactionController:estimateGasBatchwhen the submit batch shape differs from what was quoted.Also centralizes original-transaction gas parsing into
getOriginalTransactionGas(used by both quote and submit), and ensures gas-fee-token submits passgasFeeTokenplusexcludeNativeTokenForFee. Tests are expanded to cover these new post-quote/7702 edge cases, and the changelog is updated.Reviewed by Cursor Bugbot for commit 013d596. Bugbot is set up for automated code reviews on this repo. Configure here.