Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Base to Smart Transaction supported chains #30678

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

httpJunkie
Copy link
Contributor

@httpJunkie httpJunkie commented Mar 3, 2025

Description

What is the reason for the change?

Smart Transactions are currently supported on Ethereum Mainnet and BNB Smart Chain, but not on Base. As part of our effort to expand Smart Transactions functionality to more networks, Base needs to be added to the list of supported chains.

What is the improvement/solution?

This PR adds Base to the list of supported chains for Smart Transactions in the extension by:

  • Adding CHAIN_IDS.BASE to ALLOWED_SMART_TRANSACTIONS_CHAIN_IDS_DEVELOPMENT
  • Adding CHAIN_IDS.BASE to ALLOWED_SMART_TRANSACTIONS_CHAIN_IDS_PRODUCTION
  • Updating tests to include Base in the expected supported chains list

These changes allow the extension to recognize Base as a valid network for Smart Transactions, enabling users to benefit from Smart Transactions functionality when interacting with the Base network.

Open in GitHub Codespaces

Related issues

Fixes: TXL-687

Manual testing steps

Since Base isn't supported yet and this PR simply adds Base to list of supported chains, we are not testing Base/STX functionality yet, but ensuring that existing functionality remains intact.

This PR updates the version of @metamask/smart-transactions-controller, confirm that it doesn't break anything. Manual testing included:

  • Verifying STX still works correctly on Ethereum Mainnet (see screenshot image)
  • Checking that network switching between supported networks maintains proper STX state
  • Ensuring STX settings UI correctly displays supported networks
  • Confirming swap transactions with STX enabled complete successfully
  • Ensuring that STX Description in Advanced Settings is correctly updated (see before/after images)

Screenshots/Recordings

ETH2USDC-Swap

Before

after-stx-content

After

after-stx-content

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

…r than listing each network we support in the description.

- add `stxOptInSupportedNetworksDescription` and remove `stxOptInEthereumBnbDescription` from locales (`en` & `en_GB`)

- update references to this description in `ui/helpers/constants/settings.js`

- update references to this description in `ui/pages/settings/advanced-tab/advanced-tab.component.js`
@httpJunkie httpJunkie added the team-transactions Transactions team label Mar 3, 2025
@httpJunkie httpJunkie self-assigned this Mar 3, 2025
Copy link
Contributor

github-actions bot commented Mar 3, 2025

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Mar 3, 2025
@httpJunkie httpJunkie changed the title Feat: Add Base to Smart Transaction supported chains feat: Add Base to Smart Transaction supported chains Mar 3, 2025
@httpJunkie
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@httpJunkie httpJunkie added the release-12.14.0 Issue or pull request that will be included in release 12.14.0 label Mar 3, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [5008e47]
Page Load Metrics (1723 ± 79 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15172105172716579
domContentLoaded15062054169415675
load15192103172316479
domInteractive279837168
backgroundConnect1291332010
firstReactRender1575362412
getState55617178
initialActions01000
loadScripts10931594127113766
setupStore85820189
uiStartup17352433196118991
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 12 Bytes (0.00%)
  • common: 22 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [4508701]
Page Load Metrics (1772 ± 65 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint28220361636451217
domContentLoaded15061987174012761
load15172044177213665
domInteractive257943178
backgroundConnect986332110
firstReactRender1575352211
getState55620178
initialActions01000
loadScripts11151512129812058
setupStore75615136
uiStartup16842326201015072
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 12 Bytes (0.00%)
  • common: 22 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [b1321e7]
Page Load Metrics (1701 ± 88 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14562295171018287
domContentLoaded14472286167118489
load14562295170118388
domInteractive258941178
backgroundConnect1085342211
firstReactRender1572352311
getState55314147
initialActions01000
loadScripts10281842123517584
setupStore8511294
uiStartup16392574192020799
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 12 Bytes (0.00%)
  • common: 22 Bytes (0.00%)

Copy link

socket-security bot commented Mar 5, 2025

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/[email protected]16.1.0 None 0 210 kB metamaskbot

View full report↗︎

@metamaskbot
Copy link
Collaborator

Builds ready [e8eb886]
Page Load Metrics (1719 ± 44 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1537195217209244
domContentLoaded1508189916857938
load1536195517199244
domInteractive23138432412
backgroundConnect11116362713
firstReactRender1678452210
getState55115147
initialActions01000
loadScripts1111148312747335
setupStore85714126
uiStartup17122261197213063
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 59 Bytes (0.00%)
  • ui: 12 Bytes (0.00%)
  • common: 22 Bytes (0.00%)

@httpJunkie httpJunkie requested a review from dan437 March 5, 2025 19:23
@metamaskbot
Copy link
Collaborator

Builds ready [3708d6a]
Page Load Metrics (1823 ± 100 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint154621811829213102
domContentLoaded152621561798208100
load154621771823208100
domInteractive16128442411
backgroundConnect136328147
firstReactRender156930189
getState572212211
initialActions01000
loadScripts11121707135117584
setupStore863242110
uiStartup171524882068246118

@httpJunkie httpJunkie removed the INVALID-PR-TEMPLATE PR's body doesn't match template label Mar 6, 2025
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Mar 7, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [f3305ff]
Page Load Metrics (1882 ± 82 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint16452293187817785
domContentLoaded16362272184017986
load16422289188217182
domInteractive258037178
backgroundConnect10176524120
firstReactRender166332178
getState495212211
initialActions01000
loadScripts12301671138213464
setupStore76316157
uiStartup181329422185256123
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 59 Bytes (0.00%)
  • ui: 12 Bytes (0.00%)
  • common: 5 Bytes (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-12.14.0 Issue or pull request that will be included in release 12.14.0 team-transactions Transactions team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants