From a01cc7aa877cb063803b94240d5e3661e2274067 Mon Sep 17 00:00:00 2001 From: Grace Fletcher Date: Thu, 29 May 2025 09:57:02 -0700 Subject: [PATCH 1/9] switch to static content for supported networks --- .../overview/supported-networks.mdx | 353 +++++++++++++++++- 1 file changed, 352 insertions(+), 1 deletion(-) diff --git a/src/content/chainlink-automation/overview/supported-networks.mdx b/src/content/chainlink-automation/overview/supported-networks.mdx index 878ef06457f..796162d8a11 100644 --- a/src/content/chainlink-automation/overview/supported-networks.mdx +++ b/src/content/chainlink-automation/overview/supported-networks.mdx @@ -18,6 +18,7 @@ import { NetworkIcons } from "@features/chainlink-automation/components/index.ts import ResourcesCallout from "@features/resources/callouts/ResourcesCallout.astro" import CcipCommon from "@features/ccip/CcipCommon.astro" import ChainlinkAutomation from "@features/chainlink-automation/common/ChainlinkAutomation.astro" +import { Address, Aside, CopyText } from "@components" @@ -53,4 +54,354 @@ To use Chainlink Automation on certain networks, you may need to conduct token t - **Gas Ceiling Multiplier** (`gasCeilingMultiplier`): Establishes a ceiling for the maximum price based on the onchain fast gas feed. - **Minimum Upkeep Spend (LINK)**: The minimum amount of LINK an upkeep must spend over its lifetime. If the lifetime (or total) upkeep spend is below this amount, then at cancellation this amount will be held back. - +## Arbitrum + +### Arbitrum One + +| Item | Value | +| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 50 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 2,000 | +| Gas Ceiling Multiplier | 5 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +### Arbitrum Sepolia + +| Item | Value | +| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 50 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 2,000 | +| Gas Ceiling Multiplier | 5 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +## Avalanche + +### Avalanche Mainnet + +| Item | Value | +| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 40 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 2 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +### Avalanche Fuji Testnet + +| Item | Value | +| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 40 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 2 | +| Minimum Upkeep Spend (LINK) | 0.0 | + +## Base + +### Base Mainnet + +| Item | Value | +| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 50 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 2,000 | +| Gas Ceiling Multiplier | 5 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +### Base Sepolia Testnet + +| Item | Value | +| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 50 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 1,000 | +| Gas Ceiling Multiplier | 2 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +## BNB Chain + +### BNB Chain Mainnet + +| Item | Value | +| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 30 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 3 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +### BNB Chain Testnet + +| Item | Value | +| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 30 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 3 | +| Minimum Upkeep Spend (LINK) | 0.0 | + +## Ethereum + +### Ethereum Mainnet + +| Item | Value | +| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 20 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 2,000 | +| Gas Ceiling Multiplier | 2 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +### Ethereum Sepolia Testnet + +| Item | Value | +| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 20 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 2,000 | +| Gas Ceiling Multiplier | 3 | +| Minimum Upkeep Spend (LINK) | 0.0 | + +## Fantom + +### Fantom Mainnet + +| Item | Value | +| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 50 | +| Block Count per Turn | 50 | +| Maximum Check Data Size | Not Applicable | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 3,500,000 | +| Maximum Perform Data Size | Not Applicable | +| Gas Ceiling Multiplier | 4 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +### Fantom Testnet + +| Item | Value | +| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 50 | +| Block Count per Turn | 200 | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 3,500,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 2 | +| Minimum Upkeep Spend (LINK) | 0.0 | + +## Gnosis + +### Gnosis Mainnet + +| Item | Value | +| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 100 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 3 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +### Gnosis Chiado Testnet + +| Item | Value | +| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 30 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 3 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +## OP + +### OP Mainnet + +| Item | Value | +| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 50 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 1,000 | +| Gas Ceiling Multiplier | 5 | +| Minimum Upkeep Spend (LINK) | 0.02 | + +### OP Sepolia Testnet + +| Item | Value | +| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 50 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 2,000 | +| Gas Ceiling Multiplier | 5 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +## Polygon + +### Polygon Mainnet + +| Item | Value | +| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 70 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 3 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +### Polygon Amoy Testnet + +| Item | Value | +| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 30 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 3 | +| Minimum Upkeep Spend (LINK) | 0.1 | + +## Polygon zkEVM + +### Polygon zkEVM Mainnet + +| Item | Value | +| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 56 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 2 | +| Minimum Upkeep Spend (LINK) | 0.0004 | + +### Polygon zkEVM Cardona Testnet + +| Item | Value | +| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 50 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 2 | +| Minimum Upkeep Spend (LINK) | 0.0004 | + +## Scroll + +### Scroll Mainnet + +| Item | Value | +| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 56 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 2 | +| Minimum Upkeep Spend (LINK) | 0.0004 | + +### Scroll Sepolia Testnet + +| Item | Value | +| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Registry Address |
| +| Registrar Address |
| +| Payment Premium % | 50 | +| Block Count per Turn | Not Applicable | +| Maximum Check Data Size | 5,000 | +| Check Gas Limit | 10,000,000 | +| Perform Gas Limit | 5,000,000 | +| Maximum Perform Data Size | 5,000 | +| Gas Ceiling Multiplier | 2 | +| Minimum Upkeep Spend (LINK) | 0.1 | From 969df1892dc55d9ab3eaa0b2f5e8800d3bcc11e9 Mon Sep 17 00:00:00 2001 From: Grace Fletcher Date: Fri, 30 May 2025 08:06:47 -0700 Subject: [PATCH 2/9] update lane status funtionality --- src/assets/icons/external-button-link.svg | 3 + src/assets/icons/plus.svg | 3 + src/components/CCIP/Chain/Chain.astro | 13 +++- src/components/CCIP/Tables/ChainTable.tsx | 85 ++++++++++------------- 4 files changed, 56 insertions(+), 48 deletions(-) create mode 100644 src/assets/icons/external-button-link.svg create mode 100644 src/assets/icons/plus.svg diff --git a/src/assets/icons/external-button-link.svg b/src/assets/icons/external-button-link.svg new file mode 100644 index 00000000000..d2500a01efe --- /dev/null +++ b/src/assets/icons/external-button-link.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/assets/icons/plus.svg b/src/assets/icons/plus.svg new file mode 100644 index 00000000000..53b4fe4ff2e --- /dev/null +++ b/src/assets/icons/plus.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/CCIP/Chain/Chain.astro b/src/components/CCIP/Chain/Chain.astro index 7d421e23d16..2e611958c5a 100644 --- a/src/components/CCIP/Chain/Chain.astro +++ b/src/components/CCIP/Chain/Chain.astro @@ -79,7 +79,18 @@ const searchLanes = getSearchLanes({ environment })

Tokens ({allTokens.length})

- Add my token + { + network.name !== "Solana" && network.name !== "Solana Devnet" && ( + + Add + Add my token + + ) + }
diff --git a/src/components/CCIP/Tables/ChainTable.tsx b/src/components/CCIP/Tables/ChainTable.tsx index 492295373ac..09a0bde15e2 100644 --- a/src/components/CCIP/Tables/ChainTable.tsx +++ b/src/components/CCIP/Tables/ChainTable.tsx @@ -7,7 +7,7 @@ import { getExplorerAddressUrl } from "~/features/utils/index.ts" import { drawerContentStore } from "../Drawer/drawerStore.ts" import LaneDrawer from "../Drawer/LaneDrawer.tsx" import { Environment, Version, LaneFilter } from "~/config/data/ccip/types.ts" -import { getLane, getOperationalState } from "~/config/data/ccip/data.ts" +import { getLane } from "~/config/data/ccip/data.ts" import { ExplorerInfo, SupportedChain, ChainType } from "~/config/types.ts" import { clsx } from "~/lib/clsx/clsx.ts" import SeeMore from "../SeeMore/SeeMore.tsx" @@ -38,14 +38,12 @@ interface TableProps { explorer: ExplorerInfo } -const BEFORE_SEE_MORE = 12 // Number of networks to show before the "See more" button, 7 rows +const BEFORE_SEE_MORE = 12 function ChainTable({ lanes, explorer, sourceNetwork, environment }: TableProps) { const [inOutbound, setInOutbound] = useState(LaneFilter.Outbound) const [search, setSearch] = useState("") const [seeMore, setSeeMore] = useState(lanes.length <= BEFORE_SEE_MORE) - const [statuses, setStatuses] = useState>({}) - const [loadingStatuses, setLoadingStatuses] = useState(true) useEffect(() => { if (search.length > 0) { @@ -53,20 +51,19 @@ function ChainTable({ lanes, explorer, sourceNetwork, environment }: TableProps) } }, [search]) - useEffect(() => { - const fetchOperationalState = async (network) => { - if (network) { - const result = await getOperationalState(network) - setStatuses(result) - setLoadingStatuses(false) - } - } - fetchOperationalState(sourceNetwork.key) - }, [sourceNetwork]) - return ( <> -
+
setInOutbound(key as LaneFilter)} /> - +
- - @@ -150,7 +158,10 @@ function ChainTable({ lanes, explorer, sourceNetwork, environment }: TableProps) {network.name} - - ))} From 3162298af1f08418807b83553404addd27b56f86 Mon Sep 17 00:00:00 2001 From: Grace Fletcher Date: Fri, 30 May 2025 08:15:47 -0700 Subject: [PATCH 3/9] Revert "switch to static content for supported networks" This reverts commit a01cc7aa877cb063803b94240d5e3661e2274067. --- .../overview/supported-networks.mdx | 353 +----------------- 1 file changed, 1 insertion(+), 352 deletions(-) diff --git a/src/content/chainlink-automation/overview/supported-networks.mdx b/src/content/chainlink-automation/overview/supported-networks.mdx index 796162d8a11..878ef06457f 100644 --- a/src/content/chainlink-automation/overview/supported-networks.mdx +++ b/src/content/chainlink-automation/overview/supported-networks.mdx @@ -18,7 +18,6 @@ import { NetworkIcons } from "@features/chainlink-automation/components/index.ts import ResourcesCallout from "@features/resources/callouts/ResourcesCallout.astro" import CcipCommon from "@features/ccip/CcipCommon.astro" import ChainlinkAutomation from "@features/chainlink-automation/common/ChainlinkAutomation.astro" -import { Address, Aside, CopyText } from "@components" @@ -54,354 +53,4 @@ To use Chainlink Automation on certain networks, you may need to conduct token t - **Gas Ceiling Multiplier** (`gasCeilingMultiplier`): Establishes a ceiling for the maximum price based on the onchain fast gas feed. - **Minimum Upkeep Spend (LINK)**: The minimum amount of LINK an upkeep must spend over its lifetime. If the lifetime (or total) upkeep spend is below this amount, then at cancellation this amount will be held back. -## Arbitrum - -### Arbitrum One - -| Item | Value | -| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 50 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 2,000 | -| Gas Ceiling Multiplier | 5 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -### Arbitrum Sepolia - -| Item | Value | -| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 50 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 2,000 | -| Gas Ceiling Multiplier | 5 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -## Avalanche - -### Avalanche Mainnet - -| Item | Value | -| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 40 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 2 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -### Avalanche Fuji Testnet - -| Item | Value | -| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 40 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 2 | -| Minimum Upkeep Spend (LINK) | 0.0 | - -## Base - -### Base Mainnet - -| Item | Value | -| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 50 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 2,000 | -| Gas Ceiling Multiplier | 5 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -### Base Sepolia Testnet - -| Item | Value | -| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 50 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 1,000 | -| Gas Ceiling Multiplier | 2 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -## BNB Chain - -### BNB Chain Mainnet - -| Item | Value | -| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 30 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 3 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -### BNB Chain Testnet - -| Item | Value | -| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 30 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 3 | -| Minimum Upkeep Spend (LINK) | 0.0 | - -## Ethereum - -### Ethereum Mainnet - -| Item | Value | -| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 20 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 2,000 | -| Gas Ceiling Multiplier | 2 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -### Ethereum Sepolia Testnet - -| Item | Value | -| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 20 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 2,000 | -| Gas Ceiling Multiplier | 3 | -| Minimum Upkeep Spend (LINK) | 0.0 | - -## Fantom - -### Fantom Mainnet - -| Item | Value | -| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 50 | -| Block Count per Turn | 50 | -| Maximum Check Data Size | Not Applicable | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 3,500,000 | -| Maximum Perform Data Size | Not Applicable | -| Gas Ceiling Multiplier | 4 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -### Fantom Testnet - -| Item | Value | -| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 50 | -| Block Count per Turn | 200 | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 3,500,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 2 | -| Minimum Upkeep Spend (LINK) | 0.0 | - -## Gnosis - -### Gnosis Mainnet - -| Item | Value | -| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 100 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 3 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -### Gnosis Chiado Testnet - -| Item | Value | -| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 30 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 3 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -## OP - -### OP Mainnet - -| Item | Value | -| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 50 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 1,000 | -| Gas Ceiling Multiplier | 5 | -| Minimum Upkeep Spend (LINK) | 0.02 | - -### OP Sepolia Testnet - -| Item | Value | -| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 50 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 2,000 | -| Gas Ceiling Multiplier | 5 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -## Polygon - -### Polygon Mainnet - -| Item | Value | -| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 70 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 3 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -### Polygon Amoy Testnet - -| Item | Value | -| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 30 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 3 | -| Minimum Upkeep Spend (LINK) | 0.1 | - -## Polygon zkEVM - -### Polygon zkEVM Mainnet - -| Item | Value | -| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 56 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 2 | -| Minimum Upkeep Spend (LINK) | 0.0004 | - -### Polygon zkEVM Cardona Testnet - -| Item | Value | -| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 50 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 2 | -| Minimum Upkeep Spend (LINK) | 0.0004 | - -## Scroll - -### Scroll Mainnet - -| Item | Value | -| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 56 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 2 | -| Minimum Upkeep Spend (LINK) | 0.0004 | - -### Scroll Sepolia Testnet - -| Item | Value | -| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Registry Address |
| -| Registrar Address |
| -| Payment Premium % | 50 | -| Block Count per Turn | Not Applicable | -| Maximum Check Data Size | 5,000 | -| Check Gas Limit | 10,000,000 | -| Perform Gas Limit | 5,000,000 | -| Maximum Perform Data Size | 5,000 | -| Gas Ceiling Multiplier | 2 | -| Minimum Upkeep Spend (LINK) | 0.1 | + From 58c184342002e6dd9cdbd26deb3643f6636c53c0 Mon Sep 17 00:00:00 2001 From: Grace Fletcher Date: Fri, 30 May 2025 08:35:40 -0700 Subject: [PATCH 4/9] update svg file location --- {src => public}/assets/icons/external-button-link.svg | 0 {src => public}/assets/icons/plus.svg | 0 src/components/CCIP/Chain/Chain.astro | 2 +- src/components/CCIP/Tables/ChainTable.tsx | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename {src => public}/assets/icons/external-button-link.svg (100%) rename {src => public}/assets/icons/plus.svg (100%) diff --git a/src/assets/icons/external-button-link.svg b/public/assets/icons/external-button-link.svg similarity index 100% rename from src/assets/icons/external-button-link.svg rename to public/assets/icons/external-button-link.svg diff --git a/src/assets/icons/plus.svg b/public/assets/icons/plus.svg similarity index 100% rename from src/assets/icons/plus.svg rename to public/assets/icons/plus.svg diff --git a/src/components/CCIP/Chain/Chain.astro b/src/components/CCIP/Chain/Chain.astro index 2e611958c5a..b5057526208 100644 --- a/src/components/CCIP/Chain/Chain.astro +++ b/src/components/CCIP/Chain/Chain.astro @@ -83,7 +83,7 @@ const searchLanes = getSearchLanes({ environment }) network.name !== "Solana" && network.name !== "Solana Devnet" && ( Add diff --git a/src/components/CCIP/Tables/ChainTable.tsx b/src/components/CCIP/Tables/ChainTable.tsx index 09a0bde15e2..efb422c2958 100644 --- a/src/components/CCIP/Tables/ChainTable.tsx +++ b/src/components/CCIP/Tables/ChainTable.tsx @@ -88,7 +88,7 @@ function ChainTable({ lanes, explorer, sourceNetwork, environment }: TableProps) rel="noopener noreferrer" > External link From 63fa5c1a10b7050712a4a1895e6edf86b395cbb7 Mon Sep 17 00:00:00 2001 From: gfletcher-cll Date: Fri, 30 May 2025 08:48:44 -0700 Subject: [PATCH 5/9] Update Chain.astro --- src/components/CCIP/Chain/Chain.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CCIP/Chain/Chain.astro b/src/components/CCIP/Chain/Chain.astro index b5057526208..0e6bf432e6a 100644 --- a/src/components/CCIP/Chain/Chain.astro +++ b/src/components/CCIP/Chain/Chain.astro @@ -83,7 +83,7 @@ const searchLanes = getSearchLanes({ environment }) network.name !== "Solana" && network.name !== "Solana Devnet" && ( Add From 82dd1dbe16f8f3776e6153e430745297acf50543 Mon Sep 17 00:00:00 2001 From: gfletcher-cll Date: Fri, 30 May 2025 08:49:21 -0700 Subject: [PATCH 6/9] Update ChainTable.tsx --- src/components/CCIP/Tables/ChainTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CCIP/Tables/ChainTable.tsx b/src/components/CCIP/Tables/ChainTable.tsx index efb422c2958..e7ed77b4605 100644 --- a/src/components/CCIP/Tables/ChainTable.tsx +++ b/src/components/CCIP/Tables/ChainTable.tsx @@ -88,7 +88,7 @@ function ChainTable({ lanes, explorer, sourceNetwork, environment }: TableProps) rel="noopener noreferrer" > External link From 2c5ecc27b6f255b65192c8b16c64435703dab65c Mon Sep 17 00:00:00 2001 From: aelmanaa Date: Mon, 2 Jun 2025 12:46:31 +0100 Subject: [PATCH 7/9] update --- src/components/CCIP/Chain/Chain.astro | 5 +- src/components/CCIP/Chain/ChainTokenGrid.tsx | 18 +- src/components/CCIP/ChainHero/ChainHero.tsx | 42 +-- src/components/CCIP/Tables/ChainTable.tsx | 1 - src/config/data/ccip/data.ts | 24 +- src/features/utils/index.ts | 2 +- src/pages/api/ccip/lane-statuses.ts | 318 ------------------ .../directory/mainnet/chain/[...chain].astro | 4 +- 8 files changed, 26 insertions(+), 388 deletions(-) delete mode 100644 src/pages/api/ccip/lane-statuses.ts diff --git a/src/components/CCIP/Chain/Chain.astro b/src/components/CCIP/Chain/Chain.astro index 0e6bf432e6a..f4f5ec766ac 100644 --- a/src/components/CCIP/Chain/Chain.astro +++ b/src/components/CCIP/Chain/Chain.astro @@ -3,6 +3,7 @@ import CcipLayout from "~/layouts/CcipLayout.astro" import { getEntry, render } from "astro:content" import { Environment, + Network, getAllNetworkLanes, getAllNetworks, getSearchLanes, @@ -16,7 +17,7 @@ import ChainTokenGrid from "./ChainTokenGrid" interface Props { environment: Environment - network: any + network: Network } const { environment, network } = Astro.props as Props @@ -80,7 +81,7 @@ const searchLanes = getSearchLanes({ environment }) ))} diff --git a/src/components/CCIP/Tables/ChainTable.tsx b/src/components/CCIP/Tables/ChainTable.tsx index e7ed77b4605..6c959b638a6 100644 --- a/src/components/CCIP/Tables/ChainTable.tsx +++ b/src/components/CCIP/Tables/ChainTable.tsx @@ -9,7 +9,6 @@ import LaneDrawer from "../Drawer/LaneDrawer.tsx" import { Environment, Version, LaneFilter } from "~/config/data/ccip/types.ts" import { getLane } from "~/config/data/ccip/data.ts" import { ExplorerInfo, SupportedChain, ChainType } from "~/config/types.ts" -import { clsx } from "~/lib/clsx/clsx.ts" import SeeMore from "../SeeMore/SeeMore.tsx" import { Tooltip } from "~/features/common/Tooltip/Tooltip.tsx" diff --git a/src/config/data/ccip/data.ts b/src/config/data/ccip/data.ts index f52c5d29527..efd6eab4dcd 100644 --- a/src/config/data/ccip/data.ts +++ b/src/config/data/ccip/data.ts @@ -21,6 +21,8 @@ import { getTitle, getChainTypeAndFamily, supportedChainToChainInRdd, + getTokenIconUrl, + getNativeCurrency, } from "@features/utils/index.ts" // For mainnet @@ -409,6 +411,8 @@ export const getAllNetworks = ({ filter }: { filter: Environment }): Network[] = const router = chains[chain].router if (!explorer) throw Error(`Explorer not found for ${supportedChain}`) const routerExplorerUrl = getExplorerAddressUrl(explorer)(router.address) + const nativeToken = getNativeCurrency(supportedChain) + if (!nativeToken) throw Error(`Native token not found for ${supportedChain}`) // Determine chain type based on chain name const { chainType } = getChainTypeAndFamily(supportedChain) @@ -428,11 +432,14 @@ export const getAllNetworks = ({ filter }: { filter: Environment }): Network[] = routerExplorerUrl, chainSelector: chains[chain].chainSelector, nativeToken: { - name: chains[chain]?.nativeToken?.name || "", - symbol: chains[chain]?.nativeToken?.symbol || "", - logo: chains[chain]?.nativeToken?.logo || "", + name: nativeToken.name, + symbol: nativeToken.symbol, + logo: getTokenIconUrl(nativeToken.symbol), }, - feeTokens: chains[chain].feeTokens, + feeTokens: chains[chain].feeTokens?.map((tokenName: string) => ({ + name: tokenName, + logo: getTokenIconUrl(tokenName), + })), armProxy: chains[chain].armProxy, feeQuoter: chainType === "solana" ? chains[chain]?.feeQuoter : undefined, rmnPermeable: chains[chain]?.rmnPermeable, @@ -667,12 +674,3 @@ export function getSearchLanes({ environment }: { environment: Environment }) { return 0 }) } - -export async function getOperationalState(chain: string) { - const url = `/api/ccip/lane-statuses?sourceNetworkId=${chain}` - const response = await fetch(url) - if (response.status !== 200) { - return {} - } - return response.json() -} diff --git a/src/features/utils/index.ts b/src/features/utils/index.ts index e3ee0e61116..85652327c5d 100644 --- a/src/features/utils/index.ts +++ b/src/features/utils/index.ts @@ -133,7 +133,7 @@ const transformTokenName = (token: string): string => { } export const getTokenIconUrl = (token: string) => { - if (!token) return + if (!token) return "" return `https://d2f70xi62kby8n.cloudfront.net/tokens/${transformTokenName(token)}.webp?auto=compress%2Cformat` } diff --git a/src/pages/api/ccip/lane-statuses.ts b/src/pages/api/ccip/lane-statuses.ts deleted file mode 100644 index 50bd6cc888c..00000000000 --- a/src/pages/api/ccip/lane-statuses.ts +++ /dev/null @@ -1,318 +0,0 @@ -import type { APIRoute } from "astro" -import { client } from "@graphql/graphqlClient.ts" -import { - LaneStatusesFilteredDocument, - LaneStatusesFilteredQuery, - LaneStatusesFilteredQueryVariables, -} from "@graphql/generated.ts" -import { - commonHeaders, - getEnvironmentAndConfig, - resolveChainOrThrow, - checkIfChainIsCursed, - withTimeout, - structuredLog, - LogLevel, -} from "./utils.ts" -import { ChainType, SupportedChain } from "@config/index.ts" -import { getProviderForChain } from "@config/web3Providers.ts" -import { Environment, getSelectorEntry, LaneStatus } from "@config/data/ccip/index.ts" -import { getChainId, getChainTypeAndFamily } from "@features/utils/index.ts" - -export const prerender = false -const timeoutCurseCheck = 10000 - -export const GET: APIRoute = async ({ request }) => { - try { - const url = new URL(request.url) - const sourceNetworkId = url.searchParams.get("sourceNetworkId") - const requestId = request.headers.get("x-request-id") || "unknown" - - structuredLog(LogLevel.INFO, { - message: "Fetching lane statuses", - requestId, - sourceNetworkId, - }) - - // Validate required parameters - if (!sourceNetworkId) { - return new Response( - JSON.stringify({ - errorType: "MissingParameters", - errorMessage: "Missing required parameters: sourceNetworkId is required.", - }), - { status: 400, headers: commonHeaders } - ) - } - - // Determine the environment and load the configuration - const envConfig = getEnvironmentAndConfig(sourceNetworkId) - if (!envConfig) { - structuredLog(LogLevel.ERROR, { - message: "Invalid source network ID", - requestId, - sourceNetworkId, - }) - return new Response( - JSON.stringify({ - errorType: "InvalidNetwork", - errorMessage: `Invalid source network ID: ${sourceNetworkId}`, - }), - { status: 400, headers: commonHeaders } - ) - } - - const { environment, chainsConfig, sourceRouterAddress, destinationNetworkIds } = envConfig - - // Resolve the source chain - let sourceChain: SupportedChain - let sourceChainAtlas: string - let sourceChainType: ChainType - try { - sourceChain = resolveChainOrThrow(sourceNetworkId) - const { chainType } = getChainTypeAndFamily(sourceChain) - sourceChainType = chainType - const sourceChainId = getChainId(sourceChain) - sourceChainAtlas = sourceChainId ? getSelectorEntry(sourceChainId, chainType)?.name || "" : "" - } catch (error) { - structuredLog(LogLevel.ERROR, { - message: "Error resolving source chain", - requestId, - sourceNetworkId, - error: error instanceof Error ? error.message : String(error), - }) - return new Response( - JSON.stringify({ - errorType: "InvalidNetwork", - errorMessage: error.message, - }), - { status: 500, headers: commonHeaders } - ) - } - - // Check if the source chain is cursed - let isSourceChainCursed = false - if (sourceChainType === "evm") { - try { - const sourceProvider = getProviderForChain(sourceChain) - isSourceChainCursed = await withTimeout( - checkIfChainIsCursed(sourceProvider, sourceChain, sourceRouterAddress), - timeoutCurseCheck, - `Timeout while checking if source chain ${sourceChain} is cursed` - ) - } catch (error) { - structuredLog(LogLevel.ERROR, { - message: "Error checking if source chain is cursed", - requestId, - sourceChain, - error: error instanceof Error ? error.message : String(error), - }) - // Continue execution instead of returning 500 - } - } - - const statuses: Record = {} - const failedCurseChecks: string[] = [] - - if (isSourceChainCursed) { - destinationNetworkIds.forEach((id) => { - statuses[id] = LaneStatus.CURSED - }) - return new Response(JSON.stringify(statuses), { - status: 200, - headers: { - ...commonHeaders, - "Cache-Control": "s-max-age=300, stale-while-revalidate", - "CDN-Cache-Control": "max-age=300", - "Vercel-CDN-Cache-Control": "max-age=300", - }, - }) - } - - const validDestinationNetworkIds: string[] = [] - const destinationChecks: Promise[] = [] - - const atlasNameToIdMap: Record = {} - - for (const id of destinationNetworkIds) { - const destinationCheck = async () => { - try { - const destinationChain = resolveChainOrThrow(id) - const { chainType: destinationChainType } = getChainTypeAndFamily(destinationChain) - const destinationChainId = getChainId(destinationChain) - const destinationChainAtlas = destinationChainId - ? getSelectorEntry(destinationChainId, destinationChainType)?.name || "" - : "" - - atlasNameToIdMap[destinationChainAtlas] = id - - // Attempt to get the provider and check if the chain is cursed - if (destinationChainType === "evm") { - try { - const provider = getProviderForChain(destinationChain) - const destinationRouterAddress = chainsConfig[id].router.address - - const isDestinationCursed = await withTimeout( - checkIfChainIsCursed(provider, destinationChain, destinationRouterAddress), - timeoutCurseCheck, - `Timeout while checking if destination chain ${destinationChain} is cursed` - ) - - if (isDestinationCursed) { - statuses[id] = LaneStatus.CURSED - } else { - validDestinationNetworkIds.push(destinationChainAtlas) // Push if no curse detected - } - } catch (innerError) { - console.error( - `Error during provider resolution or curse check for destination network ID ${id}:`, - innerError - ) - failedCurseChecks.push(id) // Track failed curse checks - validDestinationNetworkIds.push(destinationChainAtlas) // Push if curse check fails - } - } - } catch (outerError) { - console.error(`Error resolving destination chain or mapping to atlas for network ID ${id}:`, outerError) - } - } - - destinationChecks.push(destinationCheck()) - } - - await Promise.all(destinationChecks) - - if (validDestinationNetworkIds.length === 0) { - return new Response(JSON.stringify(statuses), { - status: 200, - headers: { - ...commonHeaders, - "Cache-Control": "s-max-age=300, stale-while-revalidate", - "CDN-Cache-Control": "max-age=300", - "Vercel-CDN-Cache-Control": "max-age=300", - }, - }) - } - const variables: LaneStatusesFilteredQueryVariables = { - sourceRouterAddress: sourceRouterAddress.toLowerCase(), - sourceNetworkId: sourceChainAtlas, - destinationNetworkIds: validDestinationNetworkIds, - } - - const response = await client.query({ - query: LaneStatusesFilteredDocument, - variables, - }) - - const graphqlReturnedNetworkNames = response.data.allCcipAllLaneStatuses?.nodes.map((node) => node.destNetworkName) - const missingFromGraphQL = validDestinationNetworkIds.filter( - (network) => !graphqlReturnedNetworkNames?.includes(network) - ) - - if (failedCurseChecks.length > 0) { - structuredLog(LogLevel.WARN, { - message: "Curse check failed for destination chains", - requestId, - failedChains: failedCurseChecks, - }) - } - - if (missingFromGraphQL.length > 0) { - structuredLog(LogLevel.WARN, { - message: "Destination chains missing from GraphQL response", - requestId, - missingChains: missingFromGraphQL, - }) - - // Add missing networks as OPERATIONAL by default - missingFromGraphQL.forEach((network) => { - const networkId = atlasNameToIdMap[network] - if (networkId) { - statuses[networkId] = LaneStatus.OPERATIONAL - } - }) - } - - if (response.data.allCcipAllLaneStatuses?.nodes.length) { - for (const node of response.data.allCcipAllLaneStatuses.nodes) { - let status = LaneStatus.OPERATIONAL - - if (node.successRate === 0) { - const newStatus = environment === Environment.Testnet ? LaneStatus.MAINTENANCE : LaneStatus.DEGRADED - status = newStatus - structuredLog(LogLevel.WARN, { - message: "Lane status changed due to zero success rate", - requestId, - lane: { - source: sourceChainAtlas, - destination: node.destNetworkName || "unknown", - status: newStatus, - successRate: node.successRate, - }, - }) - } - - if (node.destNetworkName) { - const destNetworkId = atlasNameToIdMap[node.destNetworkName] - if (destNetworkId) { - statuses[destNetworkId] = status - } else { - structuredLog(LogLevel.ERROR, { - message: "Could not find destination network ID for network name", - requestId, - destNetworkName: node.destNetworkName, - }) - } - } else { - structuredLog(LogLevel.ERROR, { - message: "No destination network name found for lane", - requestId, - node, - }) - } - } - return new Response(JSON.stringify(statuses), { - status: 200, - headers: { - ...commonHeaders, - "Cache-Control": "s-max-age=300, stale-while-revalidate", - "CDN-Cache-Control": "max-age=300", - "Vercel-CDN-Cache-Control": "max-age=300", - }, - }) - } else { - structuredLog(LogLevel.WARN, { - message: "No lane statuses found", - requestId, - sourceNetworkId, - destinationNetworkIds, - }) - destinationNetworkIds.forEach((id) => { - statuses[id] = LaneStatus.OPERATIONAL - }) - - return new Response(JSON.stringify(statuses), { - status: 200, - headers: { - ...commonHeaders, - "Cache-Control": "s-max-age=300, stale-while-revalidate", - "CDN-Cache-Control": "max-age=300", - "Vercel-CDN-Cache-Control": "max-age=300", - }, - }) - } - } catch (error) { - structuredLog(LogLevel.ERROR, { - message: "Error fetching lane statuses", - requestId: request.headers.get("x-request-id") || "unknown", - error: error instanceof Error ? error.message : String(error), - }) - return new Response( - JSON.stringify({ - errorType: "ServerError", - errorMessage: "Failed to fetch lane statuses", - }), - { status: 500, headers: commonHeaders } - ) - } -} diff --git a/src/pages/ccip/directory/mainnet/chain/[...chain].astro b/src/pages/ccip/directory/mainnet/chain/[...chain].astro index dbbca92d434..461c1c2f3ab 100644 --- a/src/pages/ccip/directory/mainnet/chain/[...chain].astro +++ b/src/pages/ccip/directory/mainnet/chain/[...chain].astro @@ -1,6 +1,6 @@ --- import Chain from "~/components/CCIP/Chain/Chain.astro" -import { Environment, getAllNetworks } from "~/config/data/ccip" +import { Environment, getAllNetworks, Network } from "~/config/data/ccip" export async function getStaticPaths() { const networks = getAllNetworks({ filter: Environment.Mainnet }) @@ -10,7 +10,7 @@ export async function getStaticPaths() { return { params: { chain }, props: { - network: networks.find((network) => network.chain === chain), + network: networks.find((network) => network.chain === chain) as Network, environment: Environment.Mainnet, }, } From 653d6d5d9b8051a9579a3278e5bf0edd88ebedfc Mon Sep 17 00:00:00 2001 From: aelmanaa Date: Mon, 2 Jun 2025 13:01:07 +0100 Subject: [PATCH 8/9] responsive design --- src/components/CCIP/Tables/ChainTable.tsx | 23 +++------ src/components/CCIP/Tables/Table.css | 61 +++++++++++++++++++++++ 2 files changed, 68 insertions(+), 16 deletions(-) diff --git a/src/components/CCIP/Tables/ChainTable.tsx b/src/components/CCIP/Tables/ChainTable.tsx index 6c959b638a6..c6a7cf871ff 100644 --- a/src/components/CCIP/Tables/ChainTable.tsx +++ b/src/components/CCIP/Tables/ChainTable.tsx @@ -52,17 +52,7 @@ function ChainTable({ lanes, explorer, sourceNetwork, environment }: TableProps) return ( <> -
+
setInOutbound(key as LaneFilter)} /> -
-
+
+
External link View lane status diff --git a/src/components/CCIP/Tables/Table.css b/src/components/CCIP/Tables/Table.css index cfac6cd8533..e0c6734178d 100644 --- a/src/components/CCIP/Tables/Table.css +++ b/src/components/CCIP/Tables/Table.css @@ -192,3 +192,64 @@ display: inline-block !important; vertical-align: middle !important; } + +/* ChainTable specific filter layout */ +.ccip-table__filters--chain { + flex-wrap: nowrap; +} + +.ccip-table__filters__actions { + display: flex; + align-items: center; + gap: var(--space-3x); + flex-shrink: 0; +} + +.ccip-table__filters__search-container { + max-width: 150px; + flex-shrink: 0; +} + +.ccip-table__filters__external-button { + white-space: nowrap; + display: flex; + align-items: center; + gap: var(--space-2x); +} + +.ccip-table__filters__external-icon { + width: 1em; + height: 1em; +} + +/* Responsive behavior for ChainTable */ +@media (max-width: 768px) { + .ccip-table__filters--chain { + flex-direction: column; + align-items: stretch; + gap: var(--space-3x); + } + + .ccip-table__filters__actions { + justify-content: space-between; + width: 100%; + } + + .ccip-table__filters__search-container { + min-width: 0; + max-width: none; + flex: 1; + } +} + +@media (max-width: 480px) { + .ccip-table__filters__actions { + flex-direction: column; + gap: var(--space-3x); + } + + .ccip-table__filters__external-button { + width: 100%; + justify-content: center; + } +} From 11f4ef12bde597ef8df8f952c6059486d8c93af3 Mon Sep 17 00:00:00 2001 From: aelmanaa Date: Mon, 2 Jun 2025 13:09:36 +0100 Subject: [PATCH 9/9] responsive design --- .../DocsNavigationDesktop/DocsNavigationDesktop.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/DocsNavigation/DocsNavigationDesktop/DocsNavigationDesktop.tsx b/src/components/DocsNavigation/DocsNavigationDesktop/DocsNavigationDesktop.tsx index 6d4a2482118..ac24d6ab91a 100644 --- a/src/components/DocsNavigation/DocsNavigationDesktop/DocsNavigationDesktop.tsx +++ b/src/components/DocsNavigation/DocsNavigationDesktop/DocsNavigationDesktop.tsx @@ -44,6 +44,7 @@ function DocsNavigationDesktop({
{inOutbound === LaneFilter.Outbound ? "Destination" : "Source"} network + {inOutbound === LaneFilter.Outbound ? ( <> OnRamp address @@ -95,13 +109,8 @@ function ChainTable({ lanes, explorer, sourceNetwork, environment }: TableProps) )} @@ -109,7 +118,6 @@ function ChainTable({ lanes, explorer, sourceNetwork, environment }: TableProps) "OffRamp address" )} Status
+
- {loadingStatuses ? ( - "Loading..." - ) : ( - - {statuses[network.key]?.toLocaleLowerCase() && ( - Cursed - )} - {statuses[network.key]?.toLocaleLowerCase() || "Status unavailable"} - - )} -