Skip to content

feat(transaction-pay-controller): validate Relay quotes#9143

Draft
matthewwalsh0 wants to merge 2 commits into
mainfrom
feat/pay-quote-validation
Draft

feat(transaction-pay-controller): validate Relay quotes#9143
matthewwalsh0 wants to merge 2 commits into
mainfrom
feat/pay-quote-validation

Conversation

@matthewwalsh0

Copy link
Copy Markdown
Member

Explanation

Transaction Pay currently accepts Relay quotes after construction without validating that the resulting execution path is still executable. That can leave clients with quotes that only fail later during submission or transaction simulation.

This PR adds post-quote Relay validation through the existing checkQuoteSupport strategy hook. Relay converts each quote into normalized execution transactions, then generic validation checks source balance, decoded source-token transfers, and execution simulation before quotes are persisted as executable.

The simulation and validation logic is split into generic utilities so other strategies can opt into the same checks when they can provide normalized transaction calls. Sentinel simulation remains the primary path, with single-transaction RPC fallback through debug_traceCall and eth_estimateGas; strategies can request a simulation-only 7702 account mock via mock7702From without knowing the state-override details.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant