Repository navigation
feat(transaction-pay-controller): support Predict withdraw in the server strategy - #10702
Draft
matthewwalsh0 wants to merge 17 commits into
Draft
matthewwalsh0 wants to merge 17 commits into
matthewwalsh0 wants to merge 17 commits into
Conversation
… when the provider cannot execute them Server quote providers either execute the target calls as part of the quote or decline the request outright, so flows whose calls no provider can run were simply unsupported. Request such calls as optional, so providers that cannot execute them still return a funds-only quote flagged with `callsSupported: false`. When that happens the quote is marked `requiresSecondLeg` and the calls are submitted separately on the target chain once the quote settles. Extract the second-leg submission that the Money Account vault deposit already performed into a shared `second-leg` util, reading the settled amount from the settlement transfer logs so the second leg spends what actually landed rather than the quoted amount. `ma-vault-deposit` is now a thin Monad-pinned wrapper that layers on CHOMP race handling, and the relay strategy's recipient resolution moves into the same util so both strategies settle non-atomic funds on the executing account.
… to supportsDeferredCalls and callsDeferred
… submitSecondLeg with CHOMP recovery
…the second leg can be sponsored
…second leg tests Raise the `server-quotes.test.ts` counts and add a `second-leg.test.ts` entry to cover the literals added by the new tests, matching the call sites already suppressed in those files. Drop the `ma-vault-deposit.test.ts` entries, whose violations no longer occur now that the second leg resolves its own execution account.
… into submitSecondLeg and update tests
…ate and tidy second leg tests
…olymarket deposit wallet withdraws
…d realign lint suppressions
…ost-quote gas helpers across strategies
…polymarket deposit wallet withdraws
matthewwalsh0
force-pushed
the
feat/transaction-pay-non-atomic-second-leg
branch
from
October 8, 2026 08:47
acf8b02 to
e912f9f
Compare
This branch has not been 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
The server strategy declined Predict withdraws, so they could only be quoted and submitted through the Relay strategy.
refundTo, and gas estimation and gas fee token lookups use the Safe that holds the source token.useDepositAddress. On submit, the Polymarket relayer unwraps pUSD directly to the provider deposit address, then any leftover or refunded USDC.e is swept back to the deposit wallet. No source network fee is charged, as the relayer pays origin gas.useDepositAddress, and server transaction steps carry an optional provider stepidused to identify the deposit step.References
Stacked on #10501.
Checklist