diff --git a/package-lock.json b/package-lock.json index 49e126700e9..521ae24566a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "@chainlink/contracts": "1.2.0", "@chainlink/contracts-ccip": "1.4.0", "@chainlink/design-system": "^0.1.50", + "@chainlink/local": "^0.2.1", "@chainlink/solana-sdk": "^0.2.2", "@metamask/detect-provider": "^2.0.0", "@metamask/providers": "^10.2.1", @@ -1344,6 +1345,16 @@ "resolved": "https://registry.npmjs.org/@chainlink/design-system/-/design-system-0.1.50.tgz", "integrity": "sha512-TzrovfNklBKxXcgg4y7OnZa30MdHMHlNHfOJUTADHa10wP/QMh8jHbWbG7SAJMgbqzb5CZNuLcC3KKr8wInzvg==" }, + "node_modules/@chainlink/local": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@chainlink/local/-/local-0.2.1.tgz", + "integrity": "sha512-h3vHWGxPYs0K4P/VJP59EKWSRdf38k0EzwmW7QpCsDFtk61eW6PNudF6Xm8YCDhw3oBe8qHqdS6w+y677Cwslw==", + "license": "MIT", + "dependencies": { + "@chainlink/contracts": "^1.1.1", + "@chainlink/contracts-ccip": "^1.4.0" + } + }, "node_modules/@chainlink/solana-sdk": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@chainlink/solana-sdk/-/solana-sdk-0.2.2.tgz", diff --git a/package.json b/package.json index 677fd9d8397..1b4d596e515 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "@chainlink/contracts": "1.2.0", "@chainlink/contracts-ccip": "1.4.0", "@chainlink/design-system": "^0.1.50", + "@chainlink/local": "^0.2.1", "@chainlink/solana-sdk": "^0.2.2", "@metamask/detect-provider": "^2.0.0", "@metamask/providers": "^10.2.1", diff --git a/public/images/chainlink-local/ccip/remix/cciplocalsimulator-configuration.jpg b/public/images/chainlink-local/ccip/remix/cciplocalsimulator-configuration.jpg new file mode 100644 index 00000000000..6b045f13322 Binary files /dev/null and b/public/images/chainlink-local/ccip/remix/cciplocalsimulator-configuration.jpg differ diff --git a/public/images/chainlink-local/ccip/remix/receivedMessage.jpg b/public/images/chainlink-local/ccip/remix/receivedMessage.jpg new file mode 100644 index 00000000000..d7a0c0d657e Binary files /dev/null and b/public/images/chainlink-local/ccip/remix/receivedMessage.jpg differ diff --git a/public/images/chainlink-local/ccip/remix/sendMessage-estimateGas.jpg b/public/images/chainlink-local/ccip/remix/sendMessage-estimateGas.jpg new file mode 100644 index 00000000000..a9baa6265ee Binary files /dev/null and b/public/images/chainlink-local/ccip/remix/sendMessage-estimateGas.jpg differ diff --git a/public/images/chainlink-local/chainlink-local-fork.jpg b/public/images/chainlink-local/chainlink-local-fork.jpg new file mode 100644 index 00000000000..5ceae2d307f Binary files /dev/null and b/public/images/chainlink-local/chainlink-local-fork.jpg differ diff --git a/public/images/chainlink-local/chainlink-local-no-fork.jpg b/public/images/chainlink-local/chainlink-local-no-fork.jpg new file mode 100644 index 00000000000..92e2acf57f2 Binary files /dev/null and b/public/images/chainlink-local/chainlink-local-no-fork.jpg differ diff --git a/public/samples/CCIP/TestCCIPLocalSimulator.sol b/public/samples/CCIP/TestCCIPLocalSimulator.sol new file mode 100644 index 00000000000..b695cfc82ba --- /dev/null +++ b/public/samples/CCIP/TestCCIPLocalSimulator.sol @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.19; + +// solhint-disable no-unused-import +import {CCIPLocalSimulator} from "@chainlink/local/src/ccip/CCIPLocalSimulator.sol"; diff --git a/src/components/Header/getNavigationProps.ts b/src/components/Header/getNavigationProps.ts index 54766bf8c93..1ea47337cb9 100644 --- a/src/components/Header/getNavigationProps.ts +++ b/src/components/Header/getNavigationProps.ts @@ -77,6 +77,7 @@ const desktopSubProductsNav = [ href: "/chainlink-nodes", icon: nodesLogo.src, }, + { label: "Chainlink Local", href: "/chainlink-local", icon: quickstartLogo.src }, { label: "Quickstarts", href: "/quickstarts", @@ -135,6 +136,12 @@ const docsSections = [ icon: nodesLogo.src, subProducts: getSubProducts(sidebar.nodeOperator), }, + { + label: "Chainlink Local", + href: "/chainlink-local", + icon: quickstartLogo.src, + subProducts: getSubProducts(sidebar.chainlinkLocal), + }, { label: "General", href: "/resources", diff --git a/src/components/LeftSidebar/LeftSidebar.astro b/src/components/LeftSidebar/LeftSidebar.astro index 5e9dc9b8671..d5f81863db5 100644 --- a/src/components/LeftSidebar/LeftSidebar.astro +++ b/src/components/LeftSidebar/LeftSidebar.astro @@ -1,8 +1,9 @@ --- import { Sections } from "~/content/config" -import { SIDEBAR, MENU, SectionContent } from "../../config" +import { SIDEBAR, SectionContent } from "../../config" import { flattenChildren } from "../../scripts/flatten-children" import ActiveIcon from "./ActiveIcon.astro" + export type Props = { currentPage: string section?: Sections @@ -47,6 +48,19 @@ const isCurrentPageMatch = (sectionUrl: string, currentPage: string, highlightAs return false } + +// This function checks if any of the nested pages match the current page +const isAnyPageMatch = (contents: SectionContent[], currentPage: string): boolean => { + return contents.some((content) => { + if (isCurrentPageMatch(content.url, currentPage)) { + return true + } + if (content.children && isAnyPageMatch(content.children, currentPage)) { + return true + } + return false + }) +} ---