Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions src/config/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,10 @@ export const SIDEBAR: Partial<Record<Sections, SectionEntry[]>> = {
title: "Selecting Quality Data Feeds",
url: "data-feeds/selecting-data-feeds",
},
{
title: "Deprecating Feeds",
url: "data-feeds/deprecating-feeds",
},
],
},
{
Expand Down Expand Up @@ -895,6 +899,10 @@ export const SIDEBAR: Partial<Record<Sections, SectionEntry[]>> = {
title: "Market Hours",
url: "data-streams/market-hours",
},
{
title: "Deprecating Streams",
url: "data-streams/deprecating-streams",
},
],
},
{
Expand Down
11 changes: 11 additions & 0 deletions src/content/data-streams/deprecating-streams.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Deprecation of Chainlink Data Streams"
section: dataStreams
metadata:
description: "Deprecation of Chainlink Data Streams"
date: Last Modified
---

import StreamsPage from "@features/streams/components/StreamsPage.astro"

<StreamsPage ecosystem="deprecating" />
9 changes: 6 additions & 3 deletions src/features/data/api/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ import EleventyFetch from "@11ty/eleventy-fetch"
import { ChainMetadata, mergeWithMVRFeeds } from "./index.ts"
import { Chain, POR_MVR_FEEDS_URL } from "../chains.ts"

export const getServerSideChainMetadata = async (chains: Chain[]): Promise<Record<string, ChainMetadata>> => {
export const getServerSideChainMetadata = async (
chains: Chain[],
skipCache = false
): Promise<Record<string, ChainMetadata>> => {
const cache = {}

for (const chain of chains) {
const requests = chain.networks.map((nw) =>
nw?.rddUrl
? EleventyFetch(nw?.rddUrl, {
duration: "1d", // save for 1 day
duration: skipCache ? "0s" : "1d", // No cache if skipCache is true
type: "json", // we'll parse JSON for you
}).then((metadata) => ({
...nw,
Expand All @@ -26,7 +29,7 @@ export const getServerSideChainMetadata = async (chains: Chain[]): Promise<Recor

try {
const mvrFeeds = await EleventyFetch(POR_MVR_FEEDS_URL, {
duration: "1d",
duration: skipCache ? "0s" : "1d",
type: "json",
})

Expand Down
93 changes: 75 additions & 18 deletions src/features/feeds/components/FeedList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @jsxImportSource preact */
import { useEffect, useState, useRef, useMemo } from "preact/hooks"
import { MainnetTable, TestnetTable, StreamsNetworkAddressesTable } from "./Tables.tsx"
import { MainnetTable, TestnetTable, StreamsNetworkAddressesTable, StreamsTHead, StreamsTr } from "./Tables.tsx"
import feedList from "./FeedList.module.css"
import tableStyles from "./Tables.module.css"
import { clsx } from "~/lib/clsx/clsx.ts"
Expand Down Expand Up @@ -744,6 +744,54 @@ export const FeedList = ({
dataFeedType === "streamsExRate" ||
dataFeedType === "streamsBacked"
) {
// For deprecating streams, show a consolidated table across all networks
if (isDeprecating) {
const allDeprecatingStreams: any[] = []

// Check both chainMetadata and initialCache for deprecating streams
const networksToCheck =
chainMetadata.processedData?.networks ||
(initialCache && initialCache.deprecated ? (initialCache.deprecated as any).networks : [])

networksToCheck.forEach((network: any) => {
network.metadata?.forEach((item: any) => {
// Only include items that are actual streams (have verifier contract type and feedId)
// and have a shutdown date
if (item.contractType === "verifier" && item.feedId && item.docs?.shutdownDate) {
allDeprecatingStreams.push({
...item,
networkName: network.name,
})
}
})
})

return (
<>
{chainMetadata.loading && !chainMetadata.processedData && !initialCache && <p>Loading...</p>}
{chainMetadata.error && <p>There was an error loading the streams...</p>}

{allDeprecatingStreams.length > 0 ? (
<SectionWrapper title="Deprecating Streams" depth={2}>
<div className={feedList.tableWrapper}>
<table className={clsx(tableStyles.table)}>
<StreamsTHead />
<tbody>
{allDeprecatingStreams.map((stream, index) => (
<StreamsTr key={`${stream.feedId}-${index}`} metadata={stream} isMainnet={true} />
))}
</tbody>
</table>
</div>
</SectionWrapper>
) : (
!chainMetadata.loading && <p>No deprecating streams found at this time.</p>
)}
</>
)
}

// Regular streams view (non-deprecating)
const mainnetFeeds: ChainNetwork[] = []
const testnetFeeds: ChainNetwork[] = []

Expand All @@ -759,20 +807,24 @@ export const FeedList = ({

return (
<>
{allowNetworkTableExpansion ? (
<div style={{ marginBottom: "var(--space-2x)" }}>
<StreamsNetworkAddressesTable
allowExpansion={allowNetworkTableExpansion}
defaultExpanded={defaultNetworkTableExpanded}
/>
</div>
) : (
<SectionWrapper title="Streams Verifier Network Addresses" depth={2}>
<StreamsNetworkAddressesTable
allowExpansion={allowNetworkTableExpansion}
defaultExpanded={defaultNetworkTableExpanded}
/>
</SectionWrapper>
{!isDeprecating && (
<>
{allowNetworkTableExpansion ? (
<div style={{ marginBottom: "var(--space-2x)" }}>
<StreamsNetworkAddressesTable
allowExpansion={allowNetworkTableExpansion}
defaultExpanded={defaultNetworkTableExpanded}
/>
</div>
) : (
<SectionWrapper title="Streams Verifier Network Addresses" depth={2}>
<StreamsNetworkAddressesTable
allowExpansion={allowNetworkTableExpansion}
defaultExpanded={defaultNetworkTableExpanded}
/>
</SectionWrapper>
)}
</>
)}

<SectionWrapper
Expand Down Expand Up @@ -1057,7 +1109,8 @@ export const FeedList = ({
.filter((network: any) => {
let foundDeprecated = false
network.metadata?.forEach((feed: any) => {
if (feed.feedCategory === "deprecating") {
// Only include actual feeds (not streams) with deprecating status
if (feed.feedCategory === "deprecating" && !(feed.contractType === "verifier" && feed.feedId)) {
foundDeprecated = true
}
})
Expand All @@ -1083,7 +1136,10 @@ export const FeedList = ({
}
network={{
...network,
metadata: network.metadata.filter((feed: any) => feed.feedCategory === "deprecating"),
metadata: network.metadata.filter(
(feed: any) =>
feed.feedCategory === "deprecating" && !(feed.contractType === "verifier" && feed.feedId)
),
}}
showExtraDetails={showExtraDetails}
showOnlySVR={showOnlySVR}
Expand All @@ -1108,7 +1164,8 @@ export const FeedList = ({
if (isDeprecating) {
let foundDeprecated = false
network.metadata?.forEach((feed: any) => {
if (feed.feedCategory === "deprecating") {
// Only include actual feeds (not streams) with deprecating status
if (feed.feedCategory === "deprecating" && !(feed.contractType === "verifier" && feed.feedId)) {
foundDeprecated = true
}
})
Expand Down
4 changes: 3 additions & 1 deletion src/features/feeds/components/FeedPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import { FeedDataItem, monitoredFeeds } from "~/features/data"

const { initialNetwork, ecosystem, dataFeedType, allowNetworkTableExpansion, defaultNetworkTableExpanded } = Astro.props

const initialCache = await getServerSideChainMetadata([...CHAINS, ...ALL_CHAINS])
// Skip cache for deprecating page to always fetch fresh data
const isDeprecating = ecosystem === "deprecating"
const initialCache = await getServerSideChainMetadata([...CHAINS, ...ALL_CHAINS], isDeprecating)
const feedItems: FeedDataItem[] = monitoredFeeds.mainnet
---

Expand Down
Loading
Loading