Skip to content

Add Across Predict withdraw quote support#8760

Open
pedronfigueiredo wants to merge 1 commit into
pnf/predict-withdraw-across-plumbingfrom
pnf/predict-withdraw-across-quotes
Open

Add Across Predict withdraw quote support#8760
pedronfigueiredo wants to merge 1 commit into
pnf/predict-withdraw-across-plumbingfrom
pnf/predict-withdraw-across-quotes

Conversation

@pedronfigueiredo
Copy link
Copy Markdown
Contributor

@pedronfigueiredo pedronfigueiredo commented May 11, 2026

Summary

This is PR 2 of 4 in the core stack for Predict withdraws over Across.

  • Adds Across quote construction for post-quote Predict withdraws.
  • Uses exact-input quotes without destination actions for the post-quote withdraw flow.
  • Preserves provider fees, target totals, and original transaction gas when normalizing quotes.
  • Re-quotes post-quote withdraws after reserving source token for source-chain gas paid with the source token.

Stack

  1. Add Across Predict withdraw plumbing #8759: plumbing to identify Predict Across withdraws
  2. This PR: quote support
  3. Add Across Predict withdraw submit support #8761: submit support
  4. Fix Across Predict withdraw gas payment edges #8762: gas payment edge cases

Validation

  • yarn workspace @metamask/transaction-pay-controller run jest --no-coverage src/strategy/across/across-quotes.test.ts 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

Note

Medium Risk
Changes Across quote construction and gas/fee normalization for post-quote predictWithdraw flows, including new error paths and gas-fee-token re-quoting behavior that could affect quoting correctness and strategy selection.

Overview
Adds Across quote support for post-quote predictWithdraw flows, switching these requests to exactInput, sending no destination actions, and optionally passing refundAddress through to Across.

Extends quote normalization to combine the original (pre-Across) transaction gas/fees into sourceNetwork and gas limits for post-quote requests, and updates gas-station accounting accordingly.

Introduces special-case handling for EIP-7702 authorization lists: allow source-chain authorization lists only for post-quote predictWithdraw quotes with empty Across actions, while continuing to reject authorization lists elsewhere. Also expands the re-quote “reserve source token for gas-fee-token” flow to cover post-quote withdraws, with stricter failures instead of falling back to phase-1 in unsafe cases.

Reviewed by Cursor Bugbot for commit 86b0f66. Bugbot is set up for automated code reviews on this repo. Configure here.

@pedronfigueiredo pedronfigueiredo force-pushed the pnf/predict-withdraw-across-quotes branch from a202a20 to f4feefb Compare May 11, 2026 11:28
@pedronfigueiredo pedronfigueiredo self-assigned this May 11, 2026
@pedronfigueiredo pedronfigueiredo marked this pull request as ready for review May 11, 2026 13:33
@pedronfigueiredo pedronfigueiredo requested review from a team as code owners May 11, 2026 13:33
@pedronfigueiredo pedronfigueiredo force-pushed the pnf/predict-withdraw-across-plumbing branch from a4ae73b to 6077863 Compare May 11, 2026 13:51
@pedronfigueiredo pedronfigueiredo force-pushed the pnf/predict-withdraw-across-quotes branch from f4feefb to 86b0f66 Compare May 11, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant