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(multichain): add block explorer format URLs #30085

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ccharly
Copy link
Contributor

@ccharly ccharly commented Feb 4, 2025

Description

The current URLs that we use for non-EVM networks does not scale well. The address will not always be appended at the end of the URL.

Instead, we now use "sort-of" format strings to be able to place the address wherever we want on the URL.

Also, since we're going to use block explorers to also link transactions, we now use an object that holds multiple format URL instead of just having a single one, see:

Open in GitHub Codespaces

Related issues

N/A

Manual testing steps

TODO

Screenshots/Recordings

Before

After

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.

Copy link
Contributor

github-actions bot commented Feb 4, 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.

@ccharly ccharly force-pushed the feat/multichain-block-explorer-format-urls branch from a520dac to 2e7c23b Compare February 4, 2025 10:01
@ccharly ccharly force-pushed the feat/multichain-block-explorer-format-urls branch from 2e7c23b to 67e8cd8 Compare February 4, 2025 10:16
id?: string;
};

export type MultichainProviderConfig = ProviderConfigWithImageUrl & {
nickname: string;
chainId: CaipChainId;
// Variant of block explorer URLs for non-EVM.
blockExplorerFormatUrls?: MultichainBlockExplorerFormatUrls;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Format" vs "Template"?

@metamaskbot
Copy link
Collaborator

Builds ready [67e8cd8]
Page Load Metrics (1761 ± 80 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15502258176316881
domContentLoaded15122222172316579
load15442243176116780
domInteractive22131442914
backgroundConnect9138433316
firstReactRender1678402411
getState46617157
initialActions0442105
loadScripts10841683126514067
setupStore75414126
uiStartup17912541201518589
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 642 Bytes (0.01%)
  • common: 601 Bytes (0.01%)

@ccharly ccharly mentioned this pull request Feb 4, 2025
7 tasks
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.

4 participants