CCIP Scripts
June 15, 2026 ยท View on GitHub
This directory contains reference implementation scripts for interacting with the Cross-Chain Interoperability Protocol (CCIP).
๐ฏ This is the main overview and quick reference guide
For detailed documentation: SVM (Solana) | EVM (Ethereum)
Table of Contents
Directory Structure
The scripts are organized by virtual machine type and functionality:
ccip-scripts/
โโโ config/ # Unified configuration for all chains
โโโ evm/ # Ethereum Virtual Machine scripts
โ โโโ router/ # Cross-chain transfers and messaging
โ โโโ token/ # Token operations (drip faucet)
โ โโโ utils/ # EVM utility functions
โโโ svm/ # Solana Virtual Machine scripts
โโโ router/ # Cross-chain transfers and messaging
โโโ token/ # Token delegation and fee preparation
โโโ receiver/ # CCIP message receivers
โโโ utils/ # SVM utility functions
Configuration
The configuration system provides a unified approach for both EVM and SVM chains. All network-specific settings, contract addresses, and chain selectors are centralized in the configuration files.
Key Configuration Elements
- ChainId - Enum identifying supported chains (e.g.,
ETHEREUM_SEPOLIA,SOLANA_DEVNET) - CHAIN_SELECTORS - Official CCIP chain selector values
- EVMChainConfig - Configuration for Ethereum chains
- SVMChainConfig - Configuration for Solana chains
Using the Configuration
// Import configuration elements
import {
ChainId,
getEVMConfig,
getCCIPSVMConfig,
getEVMFeeTokenAddress,
FeeTokenType,
} from "./config";
// Get Ethereum configuration
const evmConfig = getEVMConfig(ChainId.ETHEREUM_SEPOLIA);
console.log("Router address:", evmConfig.routerAddress);
// Get Solana configuration
const svmConfig = getCCIPSVMConfig(ChainId.SOLANA_DEVNET);
console.log("Router program ID:", svmConfig.routerProgramId);
Quick Start
For Solana (SVM) Development
- Setup: Install dependencies and fund wallet with SOL
- CCIP Preparation:
yarn svm:token:wrapโyarn svm:token:delegateโyarn svm:token:check - Send messages:
yarn svm:token-transfer/yarn svm:arbitrary-messaging/yarn svm:data-and-tokens
Cross-chain token (CCT) pool setup moved to ccip-solana-bs58-generator.
For Ethereum (EVM) Development
- Setup: Install dependencies and fund wallet with test ETH
- Get Test Tokens:
yarn evm:token:drip - Send Messages:
yarn evm:transfer/yarn evm:arbitrary-messaging
Script Categories
Solana VM (SVM) Scripts
Router Operations
| Script | Purpose |
|---|---|
yarn svm:fee | Estimate CCIP fees for cross-chain operations |
yarn svm:token-transfer | Transfer tokens between chains |
yarn svm:arbitrary-messaging | Send arbitrary data between chains |
yarn svm:data-and-tokens | Send both data and tokens in one transaction |
Token Operations
| Script | Purpose |
|---|---|
yarn svm:token:wrap | Wrap SOL to wSOL for CCIP fees |
yarn svm:token:delegate | Delegate token authority to CCIP router |
yarn svm:token:check | Verify token delegations and balances |
CCIP Receivers
| Script | Purpose |
|---|---|
yarn svm:receiver:deploy | Deploy a new CCIP receiver program |
yarn svm:receiver:initialize | Initialize receiver for incoming messages |
yarn svm:receiver:get-message | Get latest received message |
yarn svm:receiver:close | Close receiver storage accounts |
๐ For detailed usage, options, and troubleshooting: See SVM Scripts Documentation
Ethereum VM (EVM) Scripts
Router Operations
| Script | Purpose |
|---|---|
yarn evm:transfer | Transfer tokens from Ethereum to another chain |
yarn evm:arbitrary-messaging | Send arbitrary messages through CCIP |
yarn evm:data-and-tokens | Send both data and tokens in single transaction |
yarn evm:check-fee | Estimate CCIP fees without sending transactions |
Token Operations
| Script | Purpose |
|---|---|
yarn evm:token:drip | Get test tokens on supported networks |
๐ For detailed EVM documentation: See EVM Scripts Documentation
Prerequisites
General Requirements
- Node.js v20+ (v23.11.0 recommended)
- Yarn package manager
- Git for cloning repositories
Solana (SVM) Requirements
- Solana CLI tools
- Wallet with SOL on Devnet for testing
- Default keypair at
~/.config/solana/id.json - Optional: Test keypair at
~/.config/solana/keytest.json
Ethereum (EVM) Requirements
- Web3 wallet (MetaMask, etc.)
- Test ETH on supported networks
- Private key configuration for scripts
Installation
# Install all dependencies
yarn install
# Verify TypeScript compilation
yarn type-check
Troubleshooting
Common Issues
Solana (SVM)
- Insufficient Balance: Ensure sufficient SOL for transaction fees
- Permission Errors: Run
yarn svm:token:delegatebefore CCIP transfers - Network Issues: Verify devnet connection and RPC endpoints
Ethereum (EVM)
- Gas Estimation Failures: Increase gas limits during network congestion
- Token Approval Issues: Ensure sufficient token approvals for transfers
- Network Configuration: Verify correct network settings in wallet
Debug Commands
# Increase logging verbosity for SVM scripts
yarn svm:fee -- --log-level DEBUG
# Skip preflight checks for complex transactions
yarn svm:token-transfer -- --skip-preflight
# Use test keypair for isolated testing
yarn svm:token:wrap -- --use-test-keypair
Getting Help
- Detailed Guides: SVM Documentation | EVM Documentation
- Configuration Issues: Check the
config/directory for network settings - Script-Specific Help: Add
--helpflag to any script for usage information
๐ง For comprehensive troubleshooting: See platform-specific documentation linked above