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

CCIP Supported network page: add chain id #2032

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
import type { ChainConfig } from "@config/data/ccip/types"
import { loadReferenceData, Environment, Version } from "@config/data/ccip/"
import { Address, CopyText, Accordion } from "@components"
import { Tooltip } from "@features/common/Tooltip"
import {
getTitle,
getChainId,
getExplorer,
getExplorerAddressUrl,
getNativeCurrency,
Expand All @@ -24,6 +26,8 @@ const { router, chainSelector, feeTokens } = chainConfig
const sourceChainKey = directoryToSupportedChain(sourceChainRefId)
const sourceChainTitle = getTitle(sourceChainKey)
if (!sourceChainTitle) throw Error(`Title not found for chain ${sourceChainKey}`)
const sourceChainId = getChainId(sourceChainKey)
if (!sourceChainId) throw Error(`Chain id not found for chain ${sourceChainKey}`)
const sourceChainIcon = getChainIcon(sourceChainKey)
if (!sourceChainIcon) throw Error(`Icon not found for chain ${sourceChainKey}`)
const explorerUrl = getExplorer(sourceChainKey)
Expand Down Expand Up @@ -83,9 +87,21 @@ const sortedLaneEntries = Object.entries(laneReferenceData).sort(
<td><Address contractUrl={routerExplorerUrl} /></td>
</tr>
<tr>
<td>Chain selector</td>
<td><Tooltip tip="CCIP Blockchain identifier" label="Chain selector" style={{ marginTop: "0" }} client:load /></td
>
<td><CopyText text={chainSelector} code /></td>
</tr>
<tr>
<td
><Tooltip
tip="Unique numeric blockchain identifier - Chain identifier (chainID) was introduced in EIP-155 to protect against replay attacks."
label="Chain id"
style={{ marginTop: "0" }}
client:load
/></td
>
<td><CopyText text={sourceChainId.toString()} code /></td>
</tr>
<tr>
<td>Fee tokens</td>
<td>
Expand Down