Skip to content

chore: Change blockExplorerLink function to support Tron#1379

Closed
dijanin-brat wants to merge 11 commits intopxrl/tronfrom
dijanin-brat/addTvmSupportBlockExplorer
Closed

chore: Change blockExplorerLink function to support Tron#1379
dijanin-brat wants to merge 11 commits intopxrl/tronfrom
dijanin-brat/addTvmSupportBlockExplorer

Conversation

@dijanin-brat
Copy link
Copy Markdown
Contributor

No description provided.

bmzig and others added 8 commits March 31, 2026 16:56
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
@dijanin-brat dijanin-brat self-assigned this Apr 6, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3d7923743c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils/NetworkUtils.ts
export function chainIsEvm(chainId: number): boolean {
// TODO: Update when additional execution layers beyond EVM and SVM are supported.
return PUBLIC_NETWORKS[chainId]?.family !== ChainFamily.SVM;
return PUBLIC_NETWORKS[chainId]?.family !== ChainFamily.SVM && PUBLIC_NETWORKS[chainId]?.family !== ChainFamily.TVM;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep TVM out of global unsupported-chain paths

Changing chainIsEvm to return false for TVM chains introduces runtime failures in existing call sites that only branch on EVM vs SVM; for example, getWidestPossibleExpectedBlockRange in src/clients/BundleDataClient/utils/PoolRebalanceUtils.ts only handles chainIsEvm and chainIsSvm then assert(false) for anything else. After this change, passing a TRON chain ID now hits that assert and aborts bundle-range computation, whereas it previously followed the EVM path. If TVM isn’t fully supported across those paths yet, this helper change should be scoped or paired with TVM branches in those callers.

Useful? React with 👍 / 👎.

Comment thread src/utils/BlockExplorerUtils.ts Outdated
Comment thread src/utils/BlockExplorerUtils.ts
Comment thread src/utils/NetworkUtils.ts Outdated
Comment on lines +85 to +88
if (txHexNoPrefix.length === 64 && ethers.utils.isHexString(`0x${txHexNoPrefix}`)) {
const txIdForUrl = txHexNoPrefix.toLowerCase();
return `<${constructURL(explorerDomain, ["#", "transaction", txIdForUrl])} | ${shortURLString}>`;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm surprised that this function mixes both /txn and /address in here. For future, we probably want to split that apart - i.e. the top-level function might want to discriminate between txn and address and then farm that out to the right underlying translation based on chainId / chain family.

Base automatically changed from bz/tvmRefactor to pxrl/tron April 7, 2026 12:17
@dijanin-brat dijanin-brat deleted the dijanin-brat/addTvmSupportBlockExplorer branch April 8, 2026 09:07
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.

3 participants