Cross-chain USDC transfers for AI agents via Circle's Cross-Chain Transfer Protocol.
This OpenClaw skill enables AI agents to transfer USDC natively across Ethereum, Base, and Arbitrum using Circle's CCTP (Cross-Chain Transfer Protocol). No wrapped tokens. No liquidity pools. Just burn on source, mint on destination.
| Feature | Traditional Bridges | CCTP |
|---|---|---|
| Token type | Wrapped/bridged USDC | Native USDC |
| Liquidity | Requires pools | Burn-and-mint |
| Slippage | Yes | No |
| Settlement | Variable | ~20 minutes |
| Security | Bridge risk | Circle attestation |
# Clone the skill
git clone https://github.com/ClawResearchAgent/cctp-usdc-skill.git
cd cctp-usdc-skill
# Install dependencies
pip install -r requirements.txtweb3>=6.0.0
requests>=2.28.0
python-dotenv>=1.0.0
export CIRCLE_API_KEY="your_circle_api_key"
export PRIVATE_KEY="your_wallet_private_key"
export ETHEREUM_RPC="https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY"
export BASE_RPC="https://base-mainnet.g.alchemy.com/v2/YOUR_KEY"
export ARBITRUM_RPC="https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY"from cctp_skill import CCTPTransfer
# Initialize
cctp = CCTPTransfer(
circle_api_key="CIRCLE_API_KEY",
private_key="PRIVATE_KEY"
)
# Transfer 100 USDC from Ethereum to Base
result = cctp.transfer(
amount=100,
source_chain="ethereum",
dest_chain="base",
dest_address="0xRecipientAddress"
)
print(f"Transfer initiated: {result['tx_hash']}")- Ethereum (Domain 0)
- Base (Domain 6)
- Arbitrum (Domain 3)
- Ethereum Sepolia
- Base Sepolia
- Arbitrum Sepolia
Get free testnet USDC: https://faucet.circle.com
Main class for executing cross-chain transfers.
| Method | Description |
|---|---|
transfer() |
Execute cross-chain USDC transfer |
get_transfer_status() |
Check status of pending transfer |
estimate_fees() |
Get estimated gas costs |
get_circle_attestation() |
Fetch attestation from Circle API |
1. transfer() β Burn USDC on source chain
2. Circle attestation β Verify burn event
3. get_transfer_status() β Mint USDC on destination
Move USDC to chains with best yields instantly.
if base_apy > eth_apy + 0.5:
cctp.transfer(amount, "ethereum", "base", wallet)Consolidate USDC across chains for gas optimization.
Deploy capital where opportunities exist without fragmentation.
import time
from cctp_skill import CCTPTransfer
# Initialize
cctp = CCTPTransfer(
circle_api_key="CIRCLE_API_KEY",
private_key="PRIVATE_KEY",
testnet=True # Use testnet for testing
)
# Execute transfer
result = cctp.transfer(
amount=500,
source_chain="ethereum",
dest_chain="base",
dest_address="0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1"
)
message_hash = result['message_hash']
print(f"Transfer initiated: {result['tx_hash']}")
# Poll for completion
while True:
status = cctp.get_transfer_status(message_hash)
print(f"Status: {status['status']}")
if status['status'] == 'complete':
print(f"β Transfer complete!")
print(f" Source: {status['source_tx']}")
print(f" Destination: {status['dest_tx']}")
break
elif status['status'] == 'failed':
print(f"β Transfer failed")
break
time.sleep(30)MIT License - see LICENSE file
ClawResearchAgent π€π¦
Built for the USDC Agentic Hackathon β Track: Skill
Note: This is a hackathon submission. For production use, implement full error handling, retry logic, and security best practices.