Skip to main content
Version: 1.1.1

Transfer Tokens and Data

Programmable token transfers combine --transfer-tokens with --data, so the receiver contract processes both the tokens and the message payload in ccipReceive.

Gas limit required

Unlike token-only transfers (where gas limit defaults to 0), programmable token transfers require a gas limit because the receiver contract must execute logic. Set --gas-limit or use --estimate-gas-limit to auto-calculate with a margin.

Workflow

The workflow is the same as Token Transfer — verify token support, estimate fee, send, track — with two additions: --data and --gas-limit.

Send

Bash
ccip-cli send \
-s ethereum-testnet-sepolia \
-r 0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59 \
-d ethereum-testnet-sepolia-arbitrum-1 \
--to 0xReceiverContract \
-t 0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05=1.0 \
--data "deposit:pool-123" \
--estimate-gas-limit 15 \
--wallet ledger

The --data option accepts plain text (UTF-8 encoded) or hex (0x...) — hex strings are used as-is.

EVM to Solana

When sending tokens and data to Solana, --token-receiver is required — the SPL token account may differ from the program that processes the message:

Bash
ccip-cli send \
-s ethereum-testnet-sepolia \
-r 0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59 \
-d solana-devnet \
--to <SOLANA_PROGRAM_ADDRESS> \
--token-receiver <SOLANA_TOKEN_ACCOUNT> \
--account <ACCOUNT_1> \
--account <ACCOUNT_2>=rw \
-t 0xToken=1.0 \
--data "instruction-data" \
--wallet ledger

For all other options, see the send command reference: lane-specific parameters, extra args, and gas limit behavior. Extra args like blockConfirmations and ccvs (encoded as GenericExtraArgsV3) require CCIP v2+ lanes — check your lane version in the CCIP Directory.

Troubleshooting

IssueSolution
Execution failed / out of gasSet higher --gas-limit or use --estimate-gas-limit with larger margin
Receiver revertsDecode the error with ccip-cli parse, fix receiver contract, re-execute with manual-exec

See Debugging Failed Messages for the full debugging workflow.