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
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
[![Node: >=22.0.0](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen)](package.json)
[![pnpm](https://img.shields.io/badge/maintained%20with-pnpm-cc00ff.svg)](https://pnpm.io/)

Progressive examples for [@chainlink/ccip-sdk](https://www.npmjs.com/package/@chainlink/ccip-sdk) (v1.0.0). Testnet only. EVM, Solana, and Aptos.
Progressive examples for [@chainlink/ccip-sdk](https://www.npmjs.com/package/@chainlink/ccip-sdk). Testnet only. EVM, Solana, and Aptos.

> **Disclaimer**
>
> This repository is for education and integration examples. Code is provided "AS IS" without warranty. It has not been audited. Do not use in production without your own review and hardening. See [LICENSE](LICENSE).

## Examples

| Example | Description | Runtime |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
| [01-getting-started](./examples/01-getting-started) | SDK basics: chains, fees, tokens, pools | Node.js |
| [02-evm-simple-bridge](./examples/02-evm-simple-bridge) | EVM-to-EVM bridge; fee token selection (native/LINK); **send:** `chain.sendMessage()` (SDK does approval + send) | Browser |
| [03-multichain-bridge-dapp](./examples/03-multichain-bridge-dapp) | EVM + Solana + Aptos; fee token selection; **send:** `generateUnsignedSendMessage()` then wallet `sendTransaction` (unsigned tx to wallet) | Browser |
| Example | Description | Runtime |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| [01-getting-started](./examples/01-getting-started) | SDK basics: chains, fees, tokens, pools | Node.js |
| [02-evm-simple-bridge](./examples/02-evm-simple-bridge) | EVM-to-EVM bridge; fee token selection (native/LINK); **send:** `chain.sendMessage()` (SDK does approval + send) | Browser |
| [03-multichain-bridge-dapp](./examples/03-multichain-bridge-dapp) | EVM + Solana + Aptos; fee token selection; **send:** `generateUnsignedSendMessage()` then wallet `sendTransaction` (unsigned tx to wallet) | Browser |
| [04-hardhat-ccip](./examples/04-hardhat-ccip) | Hardhat v3 + custom Sender/Receiver contracts; token transfers (TT), arbitrary messaging, programmable token transfers (PTT); SDK-assisted destination gas estimation, fee quoting, extraArgs encoding, manual execution of failed messages | Node.js |

## Prerequisites

Expand Down Expand Up @@ -46,6 +47,10 @@ pnpm dev:02

# 03 – Multichain bridge (dev server http://localhost:5173)
pnpm dev:03

# 04 – Hardhat tasks (compile, test, deploy, send)
pnpm -F 04-hardhat-ccip build
pnpm -F 04-hardhat-ccip test
```

Optional: in 02 or 03, copy `.env.example` to `.env` and set `RPC_<NETWORK_ID>` (e.g. `RPC_ETHEREUM_TESTNET_SEPOLIA`) to use custom RPC endpoints. 03 also supports `VITE_WALLETCONNECT_PROJECT_ID`.
Expand All @@ -57,11 +62,13 @@ ccip-sdk-examples/
├── examples/
│ ├── 01-getting-started/ # Node scripts
│ ├── 02-evm-simple-bridge/ # EVM-only browser app
│ └── 03-multichain-bridge-dapp/ # EVM + Solana + Aptos browser app
│ ├── 03-multichain-bridge-dapp/ # EVM + Solana + Aptos browser app
│ └── 04-hardhat-ccip/ # Hardhat v3 + custom contracts
├── packages/
│ ├── shared-brand/ # Design tokens, logos, brand assets
│ ├── shared-config/ # Networks, tokens, wagmi, constants
│ ├── shared-utils/ # Validation, errors, formatting, message build, hooks
│ └── shared-components/ # Button, Input, Select, Alert, MessageProgress, TransferStatus, ErrorBoundary, tokens.css
│ └── shared-components/ # Button, Input, Select, Alert, MessageProgress, TransferStatus, ErrorBoundary
├── docs/
│ └── LEARNING_PATH.md # Progression and concepts
├── pnpm-workspace.yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/LEARNING_PATH.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Learning Path

Progressive examples for using `@chainlink/ccip-sdk` v1.0.0 (testnet only). Each example adds scope; shared packages provide config, utilities, UI, and brand assets.
Progressive examples for using `@chainlink/ccip-sdk` (testnet only). Each example adds scope; shared packages provide config, utilities, UI, and brand assets.

## Example progression

Expand Down
2 changes: 1 addition & 1 deletion examples/01-getting-started/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 01 - Getting Started with CCIP SDK

> **CCIP SDK** [`@chainlink/ccip-sdk@1.0.0`](https://www.npmjs.com/package/@chainlink/ccip-sdk/v/1.0.0) | **Testnet only** | [CCIP Docs](https://docs.chain.link/ccip) | [CCIP Explorer](https://ccip.chain.link)
> **CCIP SDK** [`@chainlink/ccip-sdk`](https://www.npmjs.com/package/@chainlink/ccip-sdk) | **Testnet only** | [CCIP Docs](https://docs.chain.link/ccip) | [CCIP Explorer](https://ccip.chain.link)

> **Disclaimer**
>
Expand Down
2 changes: 1 addition & 1 deletion examples/02-evm-simple-bridge/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 02-evm-simple-bridge

> **CCIP SDK** [`@chainlink/ccip-sdk@1.0.0`](https://www.npmjs.com/package/@chainlink/ccip-sdk/v/1.0.0) | **Testnet only** | [CCIP Docs](https://docs.chain.link/ccip) | [CCIP Explorer](https://ccip.chain.link)
> **CCIP SDK** [`@chainlink/ccip-sdk`](https://www.npmjs.com/package/@chainlink/ccip-sdk) | **Testnet only** | [CCIP Docs](https://docs.chain.link/ccip) | [CCIP Explorer](https://ccip.chain.link)

> **Disclaimer**
>
Expand Down
2 changes: 1 addition & 1 deletion examples/03-multichain-bridge-dapp/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 03-multichain-bridge-dapp

Browser app: EVM, Solana, and Aptos transfers using [@chainlink/ccip-sdk](https://www.npmjs.com/package/@chainlink/ccip-sdk) (v1.0.0). Testnet only. Same layout and shared packages as 02, with Solana, Aptos, transaction history, pool info, and rate limits.
Browser app: EVM, Solana, and Aptos transfers using [@chainlink/ccip-sdk](https://www.npmjs.com/package/@chainlink/ccip-sdk). Testnet only. Same layout and shared packages as 02, with Solana, Aptos, transaction history, pool info, and rate limits.

**Send flow (difference from 02):** This app does **not** use `chain.sendMessage()`. It uses `chain.generateUnsignedSendMessage()` to build unsigned transaction data, then passes that to the connected wallet (EVM, Solana, or Aptos) for signing and sending via `sendTransaction`. 02 uses `sendMessage()`, which lets the SDK handle approval and send in one call. The unsigned-tx pattern here is required for Solana/Aptos and for explicit control over the sign/send step.

Expand Down
2 changes: 1 addition & 1 deletion examples/04-hardhat-ccip/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 04 - Hardhat v3 + CCIP SDK

> **CCIP SDK** [`@chainlink/ccip-sdk@1.2.0`](https://www.npmjs.com/package/@chainlink/ccip-sdk/v/1.2.0) | **Testnet only** | [CCIP Docs](https://docs.chain.link/ccip) | [CCIP Explorer](https://ccip.chain.link)
> **CCIP SDK** [`@chainlink/ccip-sdk`](https://www.npmjs.com/package/@chainlink/ccip-sdk) | **Testnet only** | [CCIP Docs](https://docs.chain.link/ccip) | [CCIP Explorer](https://ccip.chain.link)

> **Disclaimer**
>
Expand Down
Loading