Skip to content

Commit 0ac03b2

Browse files
committed
Migrate Solana CCT tutorials to bs58-generator, Hardhat, and ccip-cli
1 parent 86f6308 commit 0ac03b2

8 files changed

Lines changed: 7059 additions & 4332 deletions

src/content/ccip/llms-full.txt

Lines changed: 864 additions & 755 deletions
Large diffs are not rendered by default.

src/content/ccip/tutorials/svm/cross-chain-tokens/direct-mint-authority.mdx

Lines changed: 1306 additions & 757 deletions
Large diffs are not rendered by default.

src/content/ccip/tutorials/svm/cross-chain-tokens/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
description: "Master cross-chain SPL token, Token-2022 development on Solana with Chainlink CCIP. Step-by-step tutorials from basic setup to production-ready multisig governance."
88
excerpt: "CCT, Solana, SVM, cross-chain tokens, CCIP, SPL Token Program, Token-2022, tutorials, cross-chain interoperability, blockchain development"
99
datePublished: "2025-08-13T00:53:46Z"
10-
lastModified: "2025-08-13T00:53:46Z"
10+
lastModified: "2026-06-15T00:53:46Z"
1111
estimatedTime: "10 minutes"
1212
difficulty: "advanced"
1313
---

src/content/ccip/tutorials/svm/cross-chain-tokens/lock-release-multisig.mdx

Lines changed: 1749 additions & 883 deletions
Large diffs are not rendered by default.

src/content/ccip/tutorials/svm/cross-chain-tokens/production-multisig-tutorial.mdx

Lines changed: 1501 additions & 975 deletions
Large diffs are not rendered by default.

src/content/ccip/tutorials/svm/cross-chain-tokens/spl-token-multisig-tutorial.mdx

Lines changed: 1453 additions & 807 deletions
Large diffs are not rendered by default.

src/features/ccip/SvmCrossChainTokenPrerequisites.mdx

Lines changed: 87 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,101 +2,141 @@ import { Aside } from "@components"
22

33
## Prerequisites
44

5-
This tutorial requires setting up two different repositories in separate terminal windows. Follow the setup instructions for both environments before proceeding.
5+
This tutorial uses a **two-terminal workflow** across two repositories. Install the system tools below, clone both repos, then complete environment setup before starting Phase 1.
66

7-
### Development Environment Requirements
7+
### System Requirements
88

9-
**System Requirements:**
10-
11-
- **Anchor and Solana CLI Tools**: Install following the [installation guide](https://www.anchor-lang.com/docs/installation). Requires Rust to be installed.
12-
- **Node.js v20 or higher**: Use the [nvm package](https://www.npmjs.com/package/nvm) to install and manage versions. Verify with `node -v`
13-
- **Yarn**: For dependency management
9+
- **Node.js v22 or higher**: Verify with `node -v` ([nvm](https://www.npmjs.com/package/nvm) recommended)
10+
- **pnpm**: Required for the BS58 generator (`npm install -g pnpm`)
11+
- **Solana CLI**: [Installation guide](https://docs.solana.com/cli/install-solana-cli-tools) (includes `spl-token`)
1412
- **Git**: For cloning repositories
13+
- **CCIP CLI**: For cross-chain transfer testing in the final phase
1514

16-
### Terminal 1: Solana Starter Kit Setup
17-
18-
**Clone and setup the Solana Starter Kit:**
15+
Install the [CCIP CLI](https://github.com/smartcontractkit/ccip-tools-ts) globally:
1916

2017
```bash
21-
git clone https://github.com/smartcontractkit/solana-starter-kit.git && cd solana-starter-kit
18+
npm install -g @chainlink/ccip-cli
19+
ccip-cli --help
2220
```
2321

24-
**Install dependencies:**
22+
See the [CCIP CLI documentation](https://docs.chain.link/ccip/tools/cli/) for RPC and wallet configuration.
2523

26-
```bash
27-
yarn install
28-
```
24+
### Tutorial Workflow
2925

30-
**Configure your Solana environment:**
26+
| Terminal | Repository | Purpose | Commands |
27+
| -------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | --------------- |
28+
| **Terminal 1** | [CCIP Solana BS58 Generator](https://github.com/smartcontractkit/ccip-solana-bs58-generator) | Solana setup and configuration | `pnpm bs58` |
29+
| **Terminal 2** | [Smart Contract Examples (Hardhat)](https://github.com/smartcontractkit/smart-contract-examples/tree/main/ccip/cct/hardhat) | EVM deploy and configuration | `npx hardhat` |
30+
| **Either** | Global `@chainlink/ccip-cli` | Cross-chain transfer testing (final) | `ccip-cli send` |
3131

32-
```bash
33-
# Set Solana CLI to use devnet
34-
solana config set --url https://api.devnet.solana.com
32+
### Terminal 1: CCIP Solana BS58 Generator
3533

36-
# Set your keypair (create one if needed)
37-
solana config set --keypair ~/.config/solana/id.json
34+
**Clone and install** (skip `git clone` if you already have the repo):
3835

39-
# If you do not have a keypair, create one:
40-
solana-keygen new --outfile ~/.config/solana/id.json
36+
```bash
37+
git clone https://github.com/smartcontractkit/ccip-solana-bs58-generator.git
38+
cd ccip-solana-bs58-generator
39+
pnpm install
4140
```
4241

43-
**Fund your Solana wallet:**
42+
**Configure Solana CLI for devnet:**
43+
44+
First, check whether your environment is already set up:
4445

4546
```bash
46-
# Get your wallet address
47+
solana config get
4748
solana address
48-
49-
# Request SOL from the devnet faucet
50-
solana airdrop 2
49+
solana balance
5150
```
5251

53-
**Verify your setup:**
52+
If the RPC URL is already `https://api.devnet.solana.com`, your keypair path is correct, and you have sufficient SOL, skip to [Terminal 2 setup](#terminal-2-smart-contract-examples-hardhat) below.
53+
54+
Otherwise, run only the steps you need:
5455

5556
```bash
56-
# Check your SOL balance
57-
solana balance
57+
# Set devnet (skip if config get already shows devnet)
58+
solana config set --url https://api.devnet.solana.com
5859

59-
# Verify you are on devnet
60-
solana config get
60+
# Point to your keypair (skip if config get already shows the path you want)
61+
solana config set --keypair ~/.config/solana/id.json
62+
63+
# Create a keypair only if the file does not exist yet
64+
solana-keygen new --outfile ~/.config/solana/id.json
65+
66+
# Fund your wallet if balance is low
67+
solana airdrop 2
68+
solana balance
6169
```
6270

63-
### Terminal 2: Smart Contract Examples Setup
71+
<Aside type="note" title="Direct Execution">
72+
Append `--execute` to **mutating** `pnpm bs58` commands in Terminal 1 so your local wallet signs and sends
73+
transactions. **Read-only** commands (`get-state`, `get-chain-config`, `derive-accounts`) omit `--execute`. See the
74+
[CCIP Solana BS58 Generator
75+
README](https://github.com/smartcontractkit/ccip-solana-bs58-generator/blob/main/README.md) for command syntax.
76+
</Aside>
77+
78+
### Terminal 2: Smart Contract Examples (Hardhat)
6479

65-
**Clone the repository and navigate to the Hardhat project:**
80+
**Clone, install, and compile** (skip `git clone` if you already have the repo):
6681

6782
```bash
6883
git clone https://github.com/smartcontractkit/smart-contract-examples.git
6984
cd smart-contract-examples/ccip/cct/hardhat
70-
```
71-
72-
**Install and compile dependencies:**
73-
74-
```bash
7585
npm install
7686
npm run compile
7787
```
7888

7989
**Set up encrypted environment variables:**
8090

8191
```bash
82-
# Set encryption password
92+
# Required at the start of each session
8393
npx env-enc set-pw
8494

85-
# Configure environment variables
95+
# Verify existing variables (skip npx env-enc set if all required vars are already configured)
96+
npx env-enc view
97+
98+
# Add or update variables only if missing
8699
npx env-enc set
87100
```
88101

89-
**Required environment variables for Ethereum Sepolia:**
102+
**Required variables for Ethereum Sepolia:**
90103

91104
- `ETHEREUM_SEPOLIA_RPC_URL`: RPC endpoint from [Alchemy](https://www.alchemy.com/) or [Infura](https://www.infura.io/)
92105
- `PRIVATE_KEY`: Your testnet wallet private key ([MetaMask export guide](https://support.metamask.io/managing-my-wallet/secret-recovery-phrase-and-private-keys/how-to-export-an-accounts-private-key/))
93106
- `ETHERSCAN_API_KEY`: API key from [Etherscan](https://docs.etherscan.io/getting-started/viewing-api-usage-statistics)
94107

95-
**Fund your wallet:**
108+
**Fund your EVM wallet:**
109+
110+
- Acquire **ETH** on Ethereum Sepolia for transaction gas and CCIP fees ([Chainlink faucet](https://faucets.chain.link/) or [Google Cloud Faucet](https://cloud.google.com/application/web3/faucet/ethereum/sepolia))
111+
- **LINK** is optional — use `--fee-token LINK` on EVM → Solana sends if you prefer paying CCIP fees in LINK
112+
113+
### Cross-Chain Transfers (CCIP CLI)
114+
115+
The final tutorial phase uses globally installed `ccip-cli` (not the BS58 generator):
116+
117+
- **Solana → EVM**: Run from Terminal 1 with `--wallet ~/.config/solana/id.json`
118+
- **EVM → Solana**: Run from Terminal 2 (Hardhat directory). Prefer `--wallet hardhat:<name>` ([Hardhat keystore](https://hardhat.org/docs/plugins/hardhat-keystore)) so the signing key stays encrypted. Hardhat tasks load env-enc automatically; `ccip-cli` does not. As an alternative, view the same key with `npx env-enc view` and export `PRIVATE_KEY` manually for the send command.
119+
120+
**RPC endpoints** (required for source and destination chains). You can provide them any of these ways — see [CCIP CLI configuration](https://docs.chain.link/ccip/tools/cli/configuration):
121+
122+
- **Command line:** pass `--rpc` on each command (repeat for multiple networks), or `--rpcs` with comma-separated URLs
123+
- **Environment variables:** export `RPC_*` variables (e.g., `RPC_SEPOLIA`, `RPC_SOLANA_DEVNET`) or the tutorial's `SOLANA_DEVNET_RPC` and `ETHEREUM_SEPOLIA_RPC_URL` exports
124+
- **File:** create a `.env` file in the directory where you run `ccip-cli` (default `--rpcs-file`, one URL per line)
125+
126+
See the tutorial's **Configure CCIP CLI** section for the recommended `--rpc` examples.
127+
128+
### Environment Variables
129+
130+
Variables use prefixes to prevent confusion across repositories and tools:
96131

97-
- Acquire LINK and ETH on Ethereum Sepolia using [Chainlink faucets](https://faucets.chain.link/)
132+
| Prefix | Usage | Examples |
133+
| ------------ | ----------------------- | ------------------------------------------------------------------------- |
134+
| `ETH_*` | Ethereum addresses | `ETH_TOKEN_ADDRESS`, `ETH_POOL_ADDRESS` |
135+
| `SOL_*` | Solana addresses | `SOL_TOKEN_MINT`, `SOL_POOL_ADDRESS`, `SOL_WALLET_ADDRESS` |
136+
| `SOL_CCIP_*` | Solana CCIP program IDs | `SOL_CCIP_POOL_PROGRAM`, `SOL_CCIP_ROUTER`, `SOL_CCIP_FEE_QUOTER_PROGRAM` |
98137

99138
<Aside type="note" title="Two-Terminal Workflow">
100-
Keep both terminal windows open throughout the tutorial. You will switch between the Solana Starter Kit (Terminal 1)
101-
and Hardhat project (Terminal 2) as you progress through the phases.
139+
Keep both terminal windows open throughout the tutorial. Switch between the CCIP Solana BS58 Generator (Terminal 1)
140+
and the Hardhat project (Terminal 2) as each phase indicates. Cross-chain transfer commands use `ccip-cli` from the
141+
terminal that matches the source chain.
102142
</Aside>

0 commit comments

Comments
 (0)