Skip to content

Commit 480193d

Browse files
authored
Consolidate CCIP tools documentation and remove obsolete JavaScript SDK (#3479)
Unified SDK/CLI pages, replaced EVM-specific offchain tutorials with universal page, added redirects for backward compatibility, and updated robots.txt for cross-site SEO.
1 parent c67009d commit 480193d

24 files changed

+170
-2962
lines changed

public/llms.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,4 @@ This document offers simple, clean, and comprehensive resources for developers t
170170
## Tools
171171
- [Chainlink Local Development Environment](https://docs.chain.link/chainlink-local): Set up a local Chainlink node environment.
172172
- [Chainlink Functions Toolkit (NPM)](https://www.npmjs.com/package/@chainlink/functions-toolkit): NPM package for working with Chainlink Functions.
173-
- [Chainlink CCIP JavaScript SDK (GitHub)](https://github.com/smartcontractkit/ccip-javascript-sdk): SDK for building applications with CCIP.
173+
- [CCIP Tools (GitHub)](https://github.com/smartcontractkit/ccip-tools-ts): TypeScript SDK and CLI for interacting with CCIP.

public/robots.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
User-agent: *
22
Allow: /
33
Disallow:
4-
Sitemap: https://docs.chain.link/sitemap-index.xml
4+
Sitemap: https://docs.chain.link/sitemap-index.xml
5+
Sitemap: https://docs.chain.link/ccip/tools/sitemap.xml

src/config/sidebar/__tests__/__snapshots__/ccip-dynamic.test.ts.snap

Lines changed: 6 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s
349349
"title": "Acquire Test Tokens",
350350
"url": "ccip/test-tokens",
351351
},
352+
{
353+
"title": "Offchain",
354+
"url": "ccip/tutorials/offchain",
355+
},
352356
{
353357
"chainTypes": [
354358
"evm",
@@ -377,59 +381,6 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s
377381
"title": "Using the Token Manager",
378382
"url": "ccip/tutorials/evm/token-manager",
379383
},
380-
{
381-
"chainTypes": [
382-
"evm",
383-
],
384-
"title": "Using the CCIP JavaScript SDK",
385-
"url": "ccip/ccip-javascript-sdk",
386-
},
387-
{
388-
"chainTypes": [
389-
"evm",
390-
],
391-
"children": [
392-
{
393-
"chainTypes": [
394-
"evm",
395-
],
396-
"title": "Transfer Tokens between EOAs",
397-
"url": "ccip/tutorials/evm/offchain/transfer-tokens-from-eoa",
398-
},
399-
{
400-
"chainTypes": [
401-
"evm",
402-
],
403-
"title": "Checking CCIP Message Status",
404-
"url": "ccip/tutorials/evm/offchain/get-status-offchain",
405-
},
406-
{
407-
"chainTypes": [
408-
"evm",
409-
],
410-
"children": [
411-
{
412-
"chainTypes": [
413-
"evm",
414-
],
415-
"title": "Transfer Tokens between EOAs",
416-
"url": "ccip/tutorials/evm/offchain/ccip-tools/transfer-tokens-from-eoa",
417-
},
418-
{
419-
"chainTypes": [
420-
"evm",
421-
],
422-
"title": "Checking CCIP Message Status",
423-
"url": "ccip/tutorials/evm/offchain/ccip-tools/get-status-offchain",
424-
},
425-
],
426-
"title": "Using CCIP CLI",
427-
"url": "ccip/tutorials/evm/offchain/ccip-tools",
428-
},
429-
],
430-
"title": "Offchain",
431-
"url": "ccip/tutorials/evm/offchain",
432-
},
433384
{
434385
"chainTypes": [
435386
"evm",
@@ -1233,15 +1184,8 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s
12331184
"url": "ccip/api-reference/aptos",
12341185
},
12351186
{
1236-
"chainTypes": [
1237-
"evm",
1238-
],
1239-
"title": "SDK",
1240-
"url": "ccip/tools-resources/sdk",
1241-
},
1242-
{
1243-
"title": "CLI",
1244-
"url": "ccip/tools-resources/cli",
1187+
"title": "CCIP SDK & CLI",
1188+
"url": "ccip/tools-resources/ccip-tools",
12451189
},
12461190
{
12471191
"title": "Cross-chain Examples",

src/config/sidebar/__tests__/ccip-dynamic.test.ts

Lines changed: 13 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -329,39 +329,38 @@ describe("CCIP Sidebar Configuration", () => {
329329

330330
if (toolsSection) {
331331
const itemTitles = toolsSection.contents.map((item) => item.title)
332-
expect(itemTitles).toContain("CLI")
333-
expect(itemTitles).toContain("SDK")
332+
expect(itemTitles).toContain("CCIP SDK & CLI")
334333
expect(itemTitles).toContain("Token Manager")
335334
}
336335
})
337336
})
338337

339338
describe("Regression Prevention", () => {
340-
it("should maintain CLI redirect (formerly Tools)", () => {
341-
// Verify that CLI item exists with correct URL
342-
const findCLI = (items: SectionContent[]): SectionContent | null => {
339+
it("should maintain CCIP SDK & CLI sidebar item", () => {
340+
// Verify that CCIP SDK & CLI item exists with correct URL
341+
const findCCIPTools = (items: SectionContent[]): SectionContent | null => {
343342
for (const item of items) {
344-
if (item.title === "CLI") {
343+
if (item.title === "CCIP SDK & CLI") {
345344
return item
346345
}
347346
if (item.children) {
348-
const found = findCLI(item.children)
347+
const found = findCCIPTools(item.children)
349348
if (found) return found
350349
}
351350
}
352351
return null
353352
}
354353

355-
let cliItem: SectionContent | null = null
354+
let ccipToolsItem: SectionContent | null = null
356355
for (const section of CCIP_SIDEBAR_CONTENT) {
357-
cliItem = findCLI(section.contents)
358-
if (cliItem) break
356+
ccipToolsItem = findCCIPTools(section.contents)
357+
if (ccipToolsItem) break
359358
}
360359

361-
expect(cliItem).toBeDefined()
362-
expect(cliItem?.url).toBe("ccip/tools-resources/cli")
363-
// CLI should be universal (no chainTypes restriction)
364-
expect(cliItem?.chainTypes).toBeUndefined()
360+
expect(ccipToolsItem).toBeDefined()
361+
expect(ccipToolsItem?.url).toBe("ccip/tools-resources/ccip-tools")
362+
// CCIP SDK & CLI should be universal (no chainTypes restriction)
363+
expect(ccipToolsItem?.chainTypes).toBeUndefined()
365364
})
366365

367366
it("should maintain HyperEVM as EVM-specific content", () => {
@@ -390,31 +389,6 @@ describe("CCIP Sidebar Configuration", () => {
390389
}
391390
})
392391

393-
it("should maintain SDK as EVM-only", () => {
394-
const findSDK = (items: SectionContent[]): SectionContent | null => {
395-
for (const item of items) {
396-
if (item.title === "SDK") {
397-
return item
398-
}
399-
if (item.children) {
400-
const found = findSDK(item.children)
401-
if (found) return found
402-
}
403-
}
404-
return null
405-
}
406-
407-
let sdkItem: SectionContent | null = null
408-
for (const section of CCIP_SIDEBAR_CONTENT) {
409-
sdkItem = findSDK(section.contents)
410-
if (sdkItem) break
411-
}
412-
413-
expect(sdkItem).toBeDefined()
414-
expect(sdkItem?.chainTypes).toBeDefined()
415-
expect(sdkItem?.chainTypes).toEqual(["evm"])
416-
})
417-
418392
it("should maintain Token Manager as EVM-only", () => {
419393
const findTokenManager = (items: SectionContent[]): SectionContent | null => {
420394
for (const item of items) {

src/config/sidebar/ccip-dynamic.ts

Lines changed: 7 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,11 @@ export const CCIP_SIDEBAR_CONTENT: SectionEntry[] = [
329329
url: "ccip/test-tokens",
330330
// Universal
331331
},
332+
{
333+
title: "Offchain",
334+
url: "ccip/tutorials/offchain",
335+
// Universal - supports all chain families
336+
},
332337
{
333338
title: "Transfer Tokens",
334339
url: "ccip/tutorials/evm/transfer-tokens-from-contract",
@@ -349,50 +354,6 @@ export const CCIP_SIDEBAR_CONTENT: SectionEntry[] = [
349354
url: "ccip/tutorials/evm/token-manager",
350355
chainTypes: ["evm"],
351356
},
352-
{
353-
title: "Using the CCIP JavaScript SDK",
354-
url: "ccip/ccip-javascript-sdk",
355-
chainTypes: ["evm"],
356-
},
357-
{
358-
title: "Offchain",
359-
url: "ccip/tutorials/evm/offchain",
360-
chainTypes: ["evm"],
361-
children: [
362-
{
363-
title: "Transfer Tokens between EOAs",
364-
url: "ccip/tutorials/evm/offchain/transfer-tokens-from-eoa",
365-
chainTypes: ["evm"],
366-
},
367-
{
368-
title: "Checking CCIP Message Status",
369-
url: "ccip/tutorials/evm/offchain/get-status-offchain",
370-
chainTypes: ["evm"],
371-
},
372-
{
373-
title: "Using CCIP CLI",
374-
url: "ccip/tutorials/evm/offchain/ccip-tools",
375-
chainTypes: ["evm"],
376-
children: [
377-
{
378-
title: "Transfer Tokens between EOAs",
379-
url: "ccip/tutorials/evm/offchain/ccip-tools/transfer-tokens-from-eoa",
380-
chainTypes: ["evm"],
381-
},
382-
{
383-
title: "Checking CCIP Message Status",
384-
url: "ccip/tutorials/evm/offchain/ccip-tools/get-status-offchain",
385-
chainTypes: ["evm"],
386-
},
387-
// {
388-
// title: "Get Supported Tokens",
389-
// url: "ccip/tutorials/evm/offchain/ccip-tools/get-supported-tokens",
390-
// chainTypes: ["evm"],
391-
// },
392-
],
393-
},
394-
],
395-
},
396357
{
397358
title: "Cross-Chain Token (CCT)",
398359
url: "ccip/tutorials/evm/cross-chain-tokens",
@@ -729,13 +690,8 @@ export const CCIP_SIDEBAR_CONTENT: SectionEntry[] = [
729690
],
730691
},
731692
{
732-
title: "SDK",
733-
url: "ccip/tools-resources/sdk",
734-
chainTypes: ["evm"],
735-
},
736-
{
737-
title: "CLI",
738-
url: "ccip/tools-resources/cli",
693+
title: "CCIP SDK & CLI",
694+
url: "ccip/tools-resources/ccip-tools",
739695
// Universal
740696
},
741697
{

0 commit comments

Comments
 (0)