feat: Add Across Gas Station support#8588
Merged
pedronfigueiredo merged 1 commit intomainfrom May 4, 2026
Merged
Conversation
7dc01ae to
72dc7b4
Compare
72dc7b4 to
45f1f77
Compare
OGPoyraz
previously approved these changes
Apr 28, 2026
Member
OGPoyraz
left a comment
There was a problem hiding this comment.
No major comments apart from relocating the utilities 👍
Comment on lines
+1
to
+5
| export { | ||
| getGasStationCostInSourceTokenRaw, | ||
| getGasStationEligibility, | ||
| } from '../gas-station'; | ||
| export type { GasStationEligibility } from '../gas-station'; |
Member
There was a problem hiding this comment.
Should we get rid of this file and use utility file directly when needed?
Member
There was a problem hiding this comment.
Shall we relocate this file under packages/transaction-pay-controller/src/utils?
45f1f77 to
c219b14
Compare
OGPoyraz
approved these changes
May 4, 2026
pull Bot
pushed a commit
to dmrazzy/core
that referenced
this pull request
May 4, 2026
## Explanation Release `955.0.0` with a major version bump for: - **`@metamask/transaction-pay-controller`** `20.2.0` → `21.0.0` ### `@metamask/transaction-pay-controller@21.0.0` **Breaking:** Narrow `AllowedActions` type to use individual action types instead of compound controller action unions (`BridgeControllerActions`, `BridgeStatusControllerActions`, `CurrencyRateControllerActions`, `GasFeeControllerActions`) Other changes: - Add Gas Station support for Across source transactions when native balance is insufficient - Pass explicit `assetId`, `providers`, and `fiat` to `RampsController:getQuotes` and persist the selected ramps quote on `TransactionFiatPayment` ### Dependency updates No packages depend on `@metamask/transaction-pay-controller`, so no dependency range updates were needed. ## References - [MetaMask#8670](MetaMask#8670) — Narrow `AllowedActions` to individual action types (BREAKING) - [MetaMask#8588](MetaMask#8588) — Add Gas Station support for Across source transactions - [MetaMask#8628](MetaMask#8628) — Pass explicit params to `RampsController:getQuotes` and persist `rampsQuote` ## 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 - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > This is primarily a release/versioning PR, but it publishes `@metamask/transaction-pay-controller@21.0.0` which includes a documented **breaking** `AllowedActions` type change that may require consumer updates. > > **Overview** > Bumps the monorepo version to `955.0.0` and releases `@metamask/transaction-pay-controller` from `20.2.0` to `21.0.0`. > > Updates the `transaction-pay-controller` changelog with the `21.0.0` release notes, including a **breaking** narrowing of the `AllowedActions` type, plus Gas Station support for Across source transactions and a ramps quoting fix. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3a003ea. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
Summary
gasFeeTokenwhen submitting Across source transactions that use source-token gas payment.Note
Medium Risk
Changes how Across quotes and submissions handle gas pricing when native balance is insufficient, including a new two-phase re-quote path for max-amount flows; mistakes could lead to unaffordable quotes or incorrect gas token selection.
Overview
Adds Gas Station (gas-fee-token) support to the Across strategy: when the user’s native balance can’t cover
fees.sourceNetwork, Across can now price source-network gas in the source token via a sharedutils/gas-stationhelper and marks quotes withfees.isSourceGasFeeToken.For max-amount Across quotes, introduces a two-phase flow that re-quotes after subtracting the estimated gas-fee-token cost from the input amount, with guarded fallbacks back to the original quote if the adjusted quote is invalid/unaffordable.
During Across submission, passes
gasFeeTokentoTransactionController:addTransaction/addTransactionBatchwhenfees.isSourceGasFeeTokenis set, enabling the source-token gas payment on-chain. Also refactors Relay to import the gas-station helpers fromutils/gas-stationand updates/extends tests accordingly, plus a changelog entry.Reviewed by Cursor Bugbot for commit c219b14. Bugbot is set up for automated code reviews on this repo. Configure here.