Official implementation of Circle's Cross-Chain Transfer Protocol (CCTP) smart contracts for Starknet.
Cross-Chain Transfer Protocol (CCTP) is a permissionless on-chain utility that facilitates the transfer of USDC between blockchain networks. This repository contains the official Starknet implementation of CCTP smart contracts, enabling secure and efficient cross-chain USDC transfers between Starknet and other supported blockchains.
- Native Cross-Chain Transfers: Burn USDC on the source chain and mint native USDC on the destination chain
- Permissionless: Anyone can transfer USDC cross-chain using CCTP
- Attestation-Based Security: Leverages Circle's attestation service for secure message verification
- Composable: Integrate cross-chain USDC transfers directly into your smart contracts
- Cairo Implementation: Built using Cairo, Starknet's native smart contract language
CCTP on Starknet consists of two main contracts:
- Handles cross-chain message transmission and verification
- Manages attestation validation and message replay prevention
- Ensures message authenticity through signature verification
- Manages USDC burning on source chains and minting on destination chains
- Controls token pairs between local and remote domains
- Enforces burn limits and transfer controls
- Install toolchain and dependencies
./setup.sh
# Build all contracts
scarb build --workspace
# Build with release profile
yarn release# Run contract tests
snforge test
# Run end-to-end tests
yarn test:e2e-
Start local Starknet network
yarn start-network
-
Deploy contracts
yarn deploy
-
Run tests
yarn test -
Stop network
yarn stop-network
Check out the examples directory for practical demonstrations of CCTP usage:
# Bridge from Starknet to EVM
npm run bridge-v2 strk2evm -- --amount 100 --fastBurn true
# Bridge from EVM to Starknet
npm run bridge-v2 evm2strk -- --amount 100starknet-cctp/
├── packages/
│ ├── components/ # Reusable Cairo components
│ ├── interfaces/ # Contract interfaces
│ ├── message/ # Message construction and parsing utilities
│ ├── message_transmitter/ # Message Transmitter contract
│ ├── token_messenger_minter/ # Token Messenger Minter contract
│ └── utils/ # Shared utilities
├── scripts/ # Deployment and management scripts
├── examples/ # Usage examples
├── e2e/ # End-to-end tests
└── tests/ # Unit tests
Security is our top priority. If you discover a security vulnerability, please follow our Security Policy.
This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.