Skip to main content
Version: 1.10.3

Configuration

RPC Endpoints

All commands require RPC endpoints for the networks involved. The CLI accepts both http[s] and ws[s] URLs.

Where to Get RPCs

ProviderDescription
QuickNodeMulti-chain support with free tier
AlchemyEnterprise-grade with free tier
Chainlist.orgFree public RPCs for EVM networks
InfuraReliable EVM endpoints with free tier
NoderealAptos and EVM support with free tier
Tip: For quick testing, Chainlist.org provides free public RPCs. For production, use Alchemy or Infura for better rate limits.

Providing RPCs

Command line: Use --rpc or --rpcs to specify endpoints directly:

Bash
ccip-cli show 0x123... \
--rpc https://eth-sepolia.example.com \
--rpc https://arb-sepolia.example.com

You can also pass comma-separated values:

Bash
ccip-cli show 0x123... \
--rpcs "https://eth-sepolia.example.com,https://arb-sepolia.example.com"

Environment variables: Export variables prefixed with RPC_. See Environment Variables for details.

Configuration file: Use --rpcs-file to load from a file (default: ./.env):

Bash
ccip-cli show 0x123... --rpcs-file ./my-rpcs.txt

File Format

The parser extracts URLs from any format. Lines can contain prefixes, suffixes, or comments:

https://eth-sepolia.g.alchemy.com/v2/demo
ARB_SEPOLIA_RPC: https://arbitrum-sepolia.drpc.org
RPC_AVALANCHE_TESTNET=https://avalanche-fuji-c-chain-rpc.publicnode.com
https://api.devnet.solana.com # solana devnet
https://api.testnet.aptoslabs.com/v1

The CLI connects to all endpoints in parallel and uses the fastest responding RPC for each network.

Environment Variables

The CLI supports environment variables for configuration. Command-line flags override environment variables.

RPC Configuration

VariableDescriptionExample
RPC_*RPC endpoints (any suffix)RPC_SEPOLIA=https://...

Wallet Configuration

The CLI checks these environment variables in order: PRIVATE_KEY, USER_KEY, OWNER_KEY.

VariableDescription
PRIVATE_KEYPrivate key (EVM: hex, Solana: base58)
USER_KEYAlias for PRIVATE_KEY
OWNER_KEYAlias for PRIVATE_KEY
USER_KEY_PASSWORDPassword for encrypted JSON keystore file or keystore fallback
FOUNDRY_KEYSTORE_PASSWORDPassword for Foundry keystore (takes priority over USER_KEY_PASSWORD)
HARDHAT_KEYSTORE_PASSWORDPassword for Hardhat keystore (takes priority over USER_KEY_PASSWORD)
FOUNDRY_DIROverride Foundry home directory (default: ~/.foundry)

Output Preferences

VariableDescriptionDefault
CCIP_FORMATOutput format (pretty, log, json)pretty
CCIP_VERBOSEEnable debug logging (true/false)false
CCIP_PAGEPagination size for getLogs queries-
CCIP_APICCIP API endpoint URL, or false/no to disable API calls (decentralized mode). true/yes to enable with default URL.Enabled (https://api.ccip.chain.link)

Example .env file:

Bash
# RPC Endpoints
RPC_SEPOLIA=https://eth-sepolia.example.com
RPC_ARB_SEPOLIA=https://arb-sepolia.example.com
RPC_AVALANCHE_FUJI=https://avalanche-fuji.example.com
RPC_SOLANA_DEVNET=https://api.devnet.solana.com
RPC_APTOS_TESTNET=https://api.testnet.aptoslabs.com/v1

# Wallet (for send/manual-exec commands)
USER_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
# Or use a named keystore (pass --wallet foundry:<name> or --wallet hardhat:<name>)
# FOUNDRY_KEYSTORE_PASSWORD=yourFoundryKeystorePassword
# HARDHAT_KEYSTORE_PASSWORD=yourHardhatKeystorePassword # hardhat type requires running from inside a Hardhat project

# Output preferences
CCIP_FORMAT=json
CCIP_VERBOSE=false

Use --rpcs-file to load a different file: ccip-cli show 0x... --rpcs-file ./prod.env

Wallet Configuration

Commands that send transactions require a wallet. The CLI checks these sources in order:

Auto-Detection

If --wallet is omitted, the CLI checks environment variables first (PRIVATE_KEY, USER_KEY, OWNER_KEY in that order), then falls back to scanning your --rpcs-file (default: ./.env):

Bash
# .env file
RPC_SEPOLIA=https://eth-sepolia.example.com
USER_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

# CLI will use USER_KEY automatically
ccip-cli send ethereum-testnet-sepolia 0x... dest --receiver 0x...

--wallet Option

Pass directly or specify a file path:

ChainAccepted Formats
EVMHex private key, path to encrypted JSON keystore, ledger[:index], foundry:<name>, or hardhat:<name>
SolanaBase58 private key, or path to id.json file (default: ~/.config/solana/id.json)
AptosHex private key, or path to text file containing it
SuiHex or base64 private key
TON64-byte hex private key (0x-prefixed), mnemonic phrase (space-separated), path to key file, or ledger[:index]
Canton64-character hex Ed25519 seed (optional; party ID comes from --canton-config)

Foundry Cast Keystore

If you manage keys with Foundry Cast, use foundry:<name>:

Bash
# Import a key into the Foundry keystore (one-time setup)
cast wallet import sender --interactive

# Use it with the CLI
ccip-cli send ... --wallet foundry:sender

Password resolution order:

  1. $FOUNDRY_KEYSTORE_PASSWORD env var
  2. $USER_KEY_PASSWORD env var
  3. Interactive prompt

The keystore directory defaults to ~/.foundry/keystores/ and can be overridden with $FOUNDRY_DIR.

Hardhat Keystore

If you manage keys with Hardhat's built-in keystore, use hardhat:<name>. The CLI runs node_modules/.bin/hardhat keystore get directly, so Hardhat must be installed as a dev dependency in your project:

Bash
# Import a key into the Hardhat keystore (one-time setup)
npx hardhat keystore set sender

# Use it with the CLI (run from inside your Hardhat project)
ccip-cli send ... --wallet hardhat:sender

Password resolution order:

  1. $HARDHAT_KEYSTORE_PASSWORD env var (piped silently to Hardhat)
  2. $USER_KEY_PASSWORD env var (piped silently to Hardhat)
  3. Interactive prompt (ccip-cli prompts, answer is piped to Hardhat)

Ledger Hardware Wallet

Connect a Ledger device:

Bash
ccip-cli send ... --wallet ledger

Use a specific derivation index:

Bash
ccip-cli send ... --wallet ledger:1 # Uses m/44'/60'/1'/0/0 for EVM

Global Options

These options are available on all commands:

OptionAliasTypeDefaultDescription
--rpcs--rpcstring[]-RPC endpoint URLs
--rpcs-file-string./.envFile containing RPC endpoints
--format-fstringprettyOutput format: pretty, log, or json
--verbose-vboolean-Enable debug logging
--page-number-Pagination size for getLogs queries
--api-stringhttps://api.ccip.chain.linkCCIP API endpoint URL. Enabled by default. Pass a URL for a custom endpoint. Use --no-api to disable (decentralized RPC-only mode)
--canton-config-string-Path to Canton config JSON file (required for Canton operations)
--indexer-string[]-CCIP v2 indexer URLs for CCV verifications (used when lane involves Canton)
--help-hboolean-Show help
--version-Vboolean-Show version

Output formats:

FormatUse Case
prettyHuman-readable tables (default)
logConsole output with additional details
jsonMachine-readable, suitable for scripting

Network Identifiers

Networks can be specified by name, chain ID, or CCIP chain selector. The CLI uses chain-selectors for resolution.

Chain FamilyIdentifier FormatExample
AllCCIP chain selector16015286601757825753 (Sepolia)
AllNetwork nameethereum-mainnet, ethereum-testnet-sepolia
EVMNumeric chain ID1 (Ethereum), 11155111 (Sepolia)
SolanaGenesis hash5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d
AptosPrefixed chain IDaptos:1 (mainnet), aptos:2 (testnet)
SuiPrefixed chain IDsui:1
CantonPrefixed chain IDcanton:TestNet, canton:DevNet, canton:MainNet

Canton Configuration

Canton operations require a JSON config file passed via --canton-config <path>. The Canton Ledger API URL is provided through the normal --rpc / --rpcs mechanism (detected by /api/json, /api/ledger, or port 7575).

Config file format:

JSON
{
"party": "sender::1220...",
"ccipParty": "ccip::1220...",
"jwt": "eyJ...",
"edsUrl": "https://eds.example.com",
"transferInstructionUrl": "https://transfer-instruction.example.com",
"externalEdsUrlsByOwner": {
"owner::1220...": "https://external-eds.example.com"
},
"indexerUrl": "https://indexer.example.com",
"chainId": "canton:TestNet",
"senderInstanceId": "ccipsender",
"defaultSendGasLimit": 50000,
"feeTransferFactoryAmount": "1.0",
"ccvs": ["instanceId@party::1220..."],
"packages": {
"perPartyRouter": "ccip-runtime",
"ccipSender": "ccip-sender",
"ccipReceiver": "ccip-receiver"
}
}
FieldRequiredDescription
partyYesUser ledger party for actAs and transaction visibility
ccipPartyYesCCIP operator party (CCIPSender signatory / fee recipient)
jwtYesJSON Web Token for Canton Ledger API authentication
edsUrlYesBase URL for the Explicit Disclosure Service (EDS)
transferInstructionUrlYesBase URL for the Transfer Instruction API
externalEdsUrlsByOwnerNoMap of owner party → external EDS URL
indexerUrlNoCCIP v2 indexer URL for CCV verifications (required for Canton manual execution)
chainIdNoCCIP Canton chain ID (e.g. canton:TestNet); skips auto-detection
senderInstanceIdNoCCIPSender instance id used as router on Canton source (CLI -r overrides)
defaultSendGasLimitNoDefault gas limit for Canton → destination sends
feeTransferFactoryAmountNoTransfer-factory preview amount for fee payments (default: "1.0")
ccvsNoCCV instance addresses for execute disclosures and send defaults
packagesNoDAR package names for ACS template filters

Canton Wallet

On Canton, the party ID comes from config. For external signing, pass a 64-character hex Ed25519 seed via --wallet:

Bash
ccip-cli send canton-testnet ethereum-testnet-sepolia \
--canton-config ./canton-config.json \
--rpc https://ledger.example.com/api/json \
--rpc https://ethereum-sepolia-rpc.example.com \
-r ccipsender \
-w <64-char-ed25519-seed> \
-t link-token=1.0

Without --wallet, the CLI submits transactions directly using the JWT from config.

Shell Completion

Enable tab-completion for commands and options by adding the completion script to your shell profile:

Bash
# bash
ccip-cli completion >> ~/.bashrc

# zsh
ccip-cli completion >> ~/.zshrc

Restart your shell or run source ~/.bashrc (or ~/.zshrc) to activate. Once enabled, press Tab to autocomplete commands, subcommands, and flags.

See Also

  • show - Track cross-chain messages
  • send - Send messages with wallet configuration