Skip to content

feat: Add Across Gas Station support#8588

Open
pedronfigueiredo wants to merge 1 commit intomainfrom
pnf/gasless-across
Open

feat: Add Across Gas Station support#8588
pedronfigueiredo wants to merge 1 commit intomainfrom
pnf/gasless-across

Conversation

@pedronfigueiredo
Copy link
Copy Markdown
Contributor

@pedronfigueiredo pedronfigueiredo commented Apr 27, 2026

Summary

  • Add a shared Gas Station helper and keep Relay using it via the existing relay helper path.
  • Let Across quote source-network fees in the source token when native balance is insufficient and Gas Station is eligible.
  • Re-quote max-amount Across flows after reserving source token for gas-fee-token payment.
  • Pass gasFeeToken when submitting Across source transactions that use source-token gas payment.

Note

Medium Risk
Changes how Across quotes compute and represent source-network fees when native balance is low, and alters submission options by adding gasFeeToken, which could affect transaction affordability and execution on EIP-7702 chains.

Overview
Adds a shared gas-station helper (and has Relay re-export it) to price gas in the source token via TransactionController:getGasFeeTokens when the chain is eligible.

Updates Across quoting to (1) switch fees.sourceNetwork to gas-fee-token pricing when native balance is insufficient and gas station can price the source token, and (2) for max-amount requests, perform a second quote after subtracting the reserved gas amount from the source amount with safe fallbacks to the original quote.

Updates Across submission to pass gasFeeToken (source token address) to both addTransaction and addTransactionBatch when fees.isSourceGasFeeToken is set, with expanded tests covering the new behaviors.

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

@pedronfigueiredo pedronfigueiredo marked this pull request as ready for review April 27, 2026 12:57
@pedronfigueiredo pedronfigueiredo requested review from a team as code owners April 27, 2026 12:57
@pedronfigueiredo pedronfigueiredo changed the title Add Across Gas Station support feat: Add Across Gas Station support Apr 27, 2026
@pedronfigueiredo pedronfigueiredo self-assigned this Apr 27, 2026
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