Repository navigation
feat(transaction-pay-controller): support max quotes in server strategy - #11418
Open
matthewwalsh0 wants to merge 1 commit into
Open
matthewwalsh0 wants to merge 1 commit into
matthewwalsh0 wants to merge 1 commit into
Conversation
This was referenced Nov 11, 2026
matthewwalsh0
force-pushed
the
feat/server-max-quotes
branch
from
November 12, 2026 11:46
da3d83d to
c2e1518
Compare
matthewwalsh0
changed the base branch from
main
to
refactor/shared-max-quote
November 12, 2026 11:46
Use the shared max quote flow in ServerStrategy, so max-amount requests get the gas station re-quote and atomic max promotion like RelayStrategy.
matthewwalsh0
force-pushed
the
feat/server-max-quotes
branch
from
November 12, 2026 12:18
c2e1518 to
22c5019
Compare
matthewwalsh0
marked this pull request as ready for review
November 12, 2026 14:27
matthewwalsh0
enabled auto-merge
November 12, 2026 15:49
This branch was successfully deployed
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
ServerStrategydid not support max-amount quotes. This adopts the shared max flow extracted fromRelayStrategyin #11440, so server max requests behave like Relay's:payStrategies.relay.atomicMaxEnabledis enabled, subsidized routes are quoted atomically, with the transaction's calls re-encoded for the max amount.getServerMaxQuoteDetails(gas limits, first step, gasless, subsidized, target amount), and re-quotes the same provider.maxAmountunsupported reason fromServerStrategy.References
Checklist
Note
Medium Risk
Touches quote request shaping, gas-station re-quoting, and atomic call embedding for server max flows—errors here can mis-price max spends or produce invalid atomic quotes, though behavior mirrors an existing Relay path and is heavily tested.
Overview
ServerStrategy now handles max-amount quote requests by routing them through the shared
getMaxQuotesflow (same pattern as Relay), instead of declining them viaServerUnsupportedReason.MaxAmount.For max requests, server quoting wires in
getServerMaxQuoteDetails(gas limits, first transaction step, gasless/subsidized flags, target amount), usesfetchQuotes/requoteProviderfor probe and reduced-source re-quotes when origin gas must be paid from the source token, and returns[]on max-quote failures. Support checks drop themaxAmountunsupported reason soisMaxAmountrequests are accepted.Call embedding changes: max quotes only embed transaction calls when
isAtomicMaxSupportedis true (atomic exact-output with re-encoded calls); they no longer always skip delegation for max, and max quotes never setsupportsDeferredCallsbecause atomic max requires the provider to execute embedded calls.CHANGELOG and tests cover the new max path (including atomic vs non-atomic server quote bodies) and update unsupported-capability tests from
isMaxAmounttoisDirectMusdMoneyAccount.Reviewed by Cursor Bugbot for commit 22c5019. Bugbot is set up for automated code reviews on this repo. Configure here.