Skip to main content

Simple Cross-Chain Token Transfers Powered by CCIP

Project description

ccip-terminal Documentation

ccip-terminal is a Python package and CLI for managing cross-chain token transfers using Chainlink CCIP.

The package can be considered a self-custodial bridge; it supports batch transfers, scheduled jobs, CCIP status monitoring, and address book utilities.

For now the package only supports USDC; other currencies will be added later.

This package supports testnet CCIP as well.

Installation

# Install via uv
pip install uv  # Only if not already installed
uv pip install ccip_terminal[all] # For both core and scheduler packages

# By name
uv pip install ccip-terminal # Base library
uv pip install ccip-terminal[scheduler]
uv pip install ccip-terminal[all] #Both base and scheduler 

CLI Usage

uv run python cli.py [COMMAND] [OPTIONS]

Commands

transfer

Send a USDC transfer via Chainlink CCIP.

Options

Option Description
--to Destination wallet address
--dest Destination chain
--amount Amount to send
--source (optional) Source chain (default: ethereum)
--batch-file (optional) Path to batch JSON or CSV file
--account-index (optional) Account index to use
--wait-status (optional) Wait for CCIP Tx to Finalize
--notify-email (optional) Email address to notify
--estimate (optional) A Fee Estimate Value

Examples

Single Transfer:

python cli.py transfer --to 0xabc... --dest arbitrum --amount 10

Batch Transfer:

python cli.py transfer --batch-file ./transfers/batch.json

ccip-status

Check the status of a CCIP message.

Options

Option Description
--message-id CCIP message ID (with 0x)
--dest-chain Destination chain
--wait (optional) Wait for confirmation
--timeout (optional) Max wait time in seconds
--interval (optional) Polling interval in seconds

Example

python cli.py ccip-status --message-id 0xabc... --dest-chain optimism

schedule-transfer

Schedule a recurring transfer using cron.

Options

Option Description
--to Destination wallet address
--amount Amount to send
--dest Destination chain
--source (optional) Source chain
--account-index (optional) Account index
--cron Cron expression

Example

python cli.py schedule-transfer --to 0xabc... --amount 5 --dest optimism --cron "0 9 * * *"

address

Manage a local address book.

Subcommands

  • add → Save a new address
  • list → View saved addresses
  • remove → Delete an address by name

Examples

python cli.py address add --name Alice --address 0xabc...
python cli.py address list
python cli.py address remove --name Alice

Project Structure

ccip_terminal/
├── cli.py
├── ccip_terminal/
│   ├── core.py
│   ├── ccip.py
│   ├── logger.py
│   ├── accounts.py
│   ├── env.py
│   └── ...
├── scheduler/
│   └── ...
├── address_book.json
├── README.md

Environment Variables

Create a .env file and include:

PRIVATE_KEYS=
COINGECKO_API_KEY =
ALCHEMY_API_KEY =
INFURA_API_KEY =
NOTIFY_EMAIL =
ETHERSCAN_API_KEY =
SMTP_SERVER=
SMTP_PORT=587
SMTP_USER=
SMTP_PASSWORD=
NETWORK_TYPE=

INFURA_API_KEY is the only required variable, but ETHERSCAN_API_KEY is also reccomended for accurate gas estimation.

NETWORK_TYPE environment variable expects either "testnet" or "mainnet", and defaults to "mainnet"

License

MIT License

Contact Info

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ccip_terminal-0.1.2.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ccip_terminal-0.1.2-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file ccip_terminal-0.1.2.tar.gz.

File metadata

  • Download URL: ccip_terminal-0.1.2.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ccip_terminal-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8680a803d24f86db1f183fb4d08a8daf4256c002685129ee5d761a8de755fbd8
MD5 4ef8158e6d64c607665658861ca2ac3b
BLAKE2b-256 936d2a0ab12a3b20651add77bf2f304609d064655d101eefca3fcfdd6184c6b8

See more details on using hashes here.

File details

Details for the file ccip_terminal-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ccip_terminal-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 34.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ccip_terminal-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0b176d87ad46f3098cd9ed1b9de6d3bdf5ab6d8d8e1382c0d2d4d0f0cf9cab54
MD5 bc6897505f098688d0977db706d2ced8
BLAKE2b-256 dc48d972b03543e9f5342a1c2e856fc4d06d999bad6db733ce2bf7b108d042df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page