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
86b0f66 to
9fda0ef
Compare
013d596 to
2b8de19
Compare
pull Bot
pushed a commit
to dmrazzy/core
that referenced
this pull request
May 12, 2026
## Summary This is PR 1 of 4 in the core stack for Predict withdraws over Across. - Adds `TransactionType.predictAcrossWithdraw`. - Treats `isPostQuote` requests as actionable for Across support checks. - Allows source-chain authorization lists only for post-quote Predict withdraw detection, where the original withdraw is not encoded as an Across destination action. - Generalizes transaction-pay refund documentation from Relay-only language to quote-provider language. ## Stack 1. This PR: plumbing to identify Predict Across withdraws 2. MetaMask#8760: quote support 3. MetaMask#8761: submit support 4. MetaMask#8762: gas payment edge cases ## Validation - `yarn workspace @metamask/transaction-pay-controller run jest --no-coverage src/strategy/across/AcrossStrategy.test.ts` - Full stack validation was run on the final stacked branch: - `yarn changelog:validate` - `yarn workspace @metamask/transaction-pay-controller run test` - `yarn workspace @metamask/transaction-controller run test` <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes Across quote eligibility logic to treat `isPostQuote` requests as actionable and to allow EIP-7702 `authorizationList` only for a specific Predict-withdraw post-quote path; misclassification could incorrectly enable/disable Across quoting for some transactions. > > **Overview** > Introduces a new `TransactionType.predictAcrossWithdraw` to tag Predict withdraws that will use Across. > > Updates `AcrossStrategy.supports` to treat `isPostQuote` quote requests as actionable and only accept them when the original transaction is a Predict withdraw, plus adds `hasUnsupportedTransactionAuthorizationList` to block EIP-7702 `authorizationList` usage except for the Predict-withdraw post-quote detection case. Tests were extended to cover post-quote Predict withdraw handling. > > Minor docs/logic tweaks: `isAcrossQuoteRequest` now includes `isPostQuote`, and `refundTo` comments were generalized from Relay-specific wording to quote-provider wording. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit fc6f92e. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
9fda0ef to
d4b3bee
Compare
2b8de19 to
0d353f0
Compare
d4b3bee to
a65c549
Compare
0d353f0 to
131e283
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 batching/gas-limit logic for post-quote Predict withdraws, including forcing/estimating EIP-7702 batch gas limits; mistakes here could cause failed submissions or incorrect gas settings.
Overview
Adds Across submit support for post-quote Predict withdraws by optionally prepending the original transaction as the first batch leg and mapping the bridge leg to
TransactionType.predictAcrossWithdraw.Refactors submission to better handle EIP-7702 batches: forces 7702 submission when needed (e.g., parent
authorizationListor gas-fee-token flows), estimates a combined 7702 batch gas limit viaTransactionController:estimateGasBatchwhen quotes don’t cover the final batch shape, and passesexcludeNativeTokenForFeewhen paying gas with the source token.Moves original transaction gas parsing into shared helper
getOriginalTransactionGas(used by both quote and submit paths) and expands tests to cover these new batch/gas scenarios.Reviewed by Cursor Bugbot for commit 131e283. Bugbot is set up for automated code reviews on this repo. Configure here.