Trading Evm
alsk1992/CloddsBot
Trade tokens on EVM chains - Uniswap V3, 1inch on Ethereum, Arbitrum, Optimism, Base, Polygon
A skill your agent uses when building cross-chain USDC transfers, integrating with Circle's Cross-Chain Transfer Protocol (CCTP V2), or using Circle Gateway for unified balances.
$ npx skills add ccashwell/evm-cortex --skill cctp-bridging -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ccashwell/evm-cortex cctp-bridging --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cctp-bridging .claude/skills/cctp-bridging && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "cctp-bridging" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/cctp-bridging into .claude/skills/cctp-bridging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cctp-bridging", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ccashwell/evm-cortex/tree/main/skills/cctp-bridgingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ccashwell/evm-cortex --skill cctp-bridging -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ccashwell/evm-cortex cctp-bridging --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/cctp-bridging .agents/skills/cctp-bridging && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cctp-bridging" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/cctp-bridging into .agents/skills/cctp-bridging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cctp-bridging", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ccashwell/evm-cortex --skill cctp-bridging -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ccashwell/evm-cortex cctp-bridging --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/cctp-bridging .cursor/skills/cctp-bridging && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cctp-bridging" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/cctp-bridging into .cursor/skills/cctp-bridging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cctp-bridging", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ccashwell/evm-cortex.git --path skills/cctp-bridging--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ccashwell/evm-cortex --skill cctp-bridging -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ccashwell/evm-cortex cctp-bridging --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/cctp-bridging .gemini/skills/cctp-bridging && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cctp-bridging" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/cctp-bridging into .gemini/skills/cctp-bridging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cctp-bridging", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ccashwell/evm-cortex cctp-bridgingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ccashwell/evm-cortex --skill cctp-bridging -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/cctp-bridging .github/skills/cctp-bridging && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cctp-bridging" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/cctp-bridging into .github/skills/cctp-bridging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cctp-bridging", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ccashwell/evm-cortex --skill cctp-bridging -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ccashwell/evm-cortex cctp-bridging --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/cctp-bridging .opencode/skills/cctp-bridging && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cctp-bridging" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/cctp-bridging into .opencode/skills/cctp-bridging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cctp-bridging", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cctp-bridgingA skill your agent uses when building cross-chain USDC transfers, integrating with Circle's Cross-Chain Transfer Protocol (CCTP V2), or using Circle Gateway for unified balances.
Cctp Bridging is an agent skill from ccashwell/evm-cortex. Use when building cross-chain USDC transfers, integrating with Circle's Cross-Chain Transfer Protocol (CCTP V2), or using Circle Gateway for unified balances. Covers the burn-attestation-mint flow, MessageTransmitter and TokenMessenger contracts, domain IDs for all chains, Gateway Wallet/Minter addresses, and Solidity integration patterns.
Its SKILL.md is about 6.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering Smart contracts and Third-party API integration. It works with Circle USDC, Solidity, Arbitrum and Ethereum. The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit f8f3301. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are solidity, typescript and json).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
iris-api-v2.circle.comiris-api-v2-sandbox.circle.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
CIRCLE_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cctp Bridging loads about 6.4k tokens when it runs. Until then it costs about 89 tokens; SKILL.md has 1,195 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 1,195 words, ~6,388 tokens.
.claude/skills/cctp-bridging/SKILL.md (or your agent's skills folder).Cross-Chain Transfer Protocol (CCTP) enables native USDC transfers between chains through a burn-and-mint mechanism:
TokenMessenger.depositForBurn()MessageTransmitter.receiveMessage()This is not a lock-and-unlock bridge. USDC is destroyed on the source chain and recreated on the destination chain. There are no wrapped tokens, no liquidity pools, and no bridge TVL risk. Circle is the sole minter/burner.
CCTP V2 (launched 2025) introduced:
| Chain | Mainnet Address |
|---|---|
| Ethereum | 0xBd3fa81B58Ba92a82136038B25aDec7066af3155 |
| Base | 0x1682Ae6375C4E4A97e4B583BC394c861A46D8962 |
| Arbitrum | 0x19330d10D9Cc8751218eaf51E8885D058642E08A |
| Optimism | 0x2B4069517957735bE00ceE0fadAE88a26365528f |
| Polygon PoS | 0x9daF8c91AEFAE50b9c0E69629D3F6Ca40cA3B3FE |
| Avalanche | 0x6B25532e1060CE10cc3B0A99e5683b91BFDe6982 |
| Chain | Mainnet Address |
|---|---|
| Ethereum | 0x0a992d191DEeC32aFe36203Ad87D7d289a738F81 |
| Base | 0xAD09780d193884d503182aD4F75D113B9B6a7c79 |
| Arbitrum | 0xC30362313FBBA5cf9163F0bb16a0e01f01A896ca |
| Optimism | 0x4D41f22c5a0e5c74090899E5a8Fb597a8842b3e8 |
| Polygon PoS | 0xF3be9355363857F3e001be68856A2f96b4C39Ba9 |
| Avalanche | 0x8186359aF5F57FbB40c6b14A588d2A59C0C29880 |
| Chain | USDC Address |
|---|---|
| Ethereum | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| Base | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| Arbitrum | 0xaf88d065e77c8cC2239327C5EDb3A432268e5831 |
| Optimism | 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85 |
| Polygon PoS | 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359 |
| Avalanche | 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E |
Warning: Bridged USDC variants (USDC.e on Arbitrum/Avalanche/Polygon) are NOT the same as native USDC. CCTP only works with native Circle-issued USDC.
CCTP uses its own domain ID system, distinct from EVM chain IDs.
| Chain | Domain ID | Chain ID |
|---|---|---|
| Ethereum | 0 | 1 |
| Avalanche | 1 | 43114 |
| Optimism | 2 | 10 |
| Arbitrum | 3 | 42161 |
| Noble (Cosmos) | 4 | — |
| Solana | 5 | — |
| Base | 6 | 8453 |
| Polygon PoS | 7 | 137 |
| Sui | 8 | — |
| Unichain | 10 | 130 |
library CCTPDomains {
uint32 internal constant ETHEREUM = 0;
uint32 internal constant AVALANCHE = 1;
uint32 internal constant OPTIMISM = 2;
uint32 internal constant ARBITRUM = 3;
uint32 internal constant NOBLE = 4;
uint32 internal constant SOLANA = 5;
uint32 internal constant BASE = 6;
uint32 internal constant POLYGON = 7;
uint32 internal constant SUI = 8;
uint32 internal constant UNICHAIN = 10;
}interface ITokenMessenger {
/// @notice Deposits and burns tokens for a cross-chain transfer
/// @param amount Amount of tokens to burn (6 decimals for USDC)
/// @param destinationDomain CCTP domain ID of the destination chain
/// @param mintRecipient Address on destination chain (left-padded bytes32)
/// @param burnToken Address of the token to burn on the source chain
/// @return nonce Unique nonce for this message
function depositForBurn(
uint256 amount,
uint32 destinationDomain,
bytes32 mintRecipient,
address burnToken
) external returns (uint64 nonce);
/// @notice Deposits and burns tokens with a caller restriction on the destination
/// @dev Only `destinationCaller` can call receiveMessage for this transfer
/// @param amount Amount of tokens to burn
/// @param destinationDomain CCTP domain ID of the destination chain
/// @param mintRecipient Address on destination chain (left-padded bytes32)
/// @param burnToken Address of the token to burn
/// @param destinationCaller Address permitted to relay on destination (bytes32)
/// @return nonce Unique nonce for this message
function depositForBurnWithCaller(
uint256 amount,
uint32 destinationDomain,
bytes32 mintRecipient,
address burnToken,
bytes32 destinationCaller
) external returns (uint64 nonce);
}interface IMessageTransmitter {
/// @notice Receives a message and triggers mint on the destination chain
/// @param message Raw message bytes from the source chain burn event
/// @param attestation Circle attestation service signature over the message
/// @return success Whether the message was successfully received
function receiveMessage(
bytes calldata message,
bytes calldata attestation
) external returns (bool success);
/// @notice Receives a message that can only be relayed by a specific caller
/// @dev Used with depositForBurnWithCaller for restricted relay
function receiveMessageWithCaller(
bytes calldata message,
bytes calldata attestation
) external returns (bool success);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
interface ITokenMessenger {
function depositForBurn(
uint256 amount,
uint32 destinationDomain,
bytes32 mintRecipient,
address burnToken
) external returns (uint64 nonce);
function depositForBurnWithCaller(
uint256 amount,
uint32 destinationDomain,
bytes32 mintRecipient,
address burnToken,
bytes32 destinationCaller
) external returns (uint64 nonce);
}
/// @title CCTPSender
/// @notice Sends USDC cross-chain via Circle's CCTP V2
/// @dev Wraps TokenMessenger with SafeERC20 and address encoding
contract CCTPSender {
using SafeERC20 for IERC20;
ITokenMessenger public immutable TOKEN_MESSENGER;
IERC20 public immutable USDC;
error ZeroAmount();
error ZeroAddress();
event CCTPBurnInitiated(
uint64 indexed nonce,
uint32 indexed destinationDomain,
address indexed recipient,
uint256 amount
);
constructor(address tokenMessenger_, address usdc_) {
if (tokenMessenger_ == address(0) || usdc_ == address(0)) revert ZeroAddress();
TOKEN_MESSENGER = ITokenMessenger(tokenMessenger_);
USDC = IERC20(usdc_);
}
/// @notice Burns USDC on this chain and triggers a mint on the destination chain
/// @param amount Amount of USDC to send (6 decimals)
/// @param destinationDomain CCTP domain ID of the target chain
/// @param recipient EVM address that will receive USDC on the destination chain
/// @return nonce The message nonce for tracking attestation status
function sendUSDC(
uint256 amount,
uint32 destinationDomain,
address recipient
) external returns (uint64 nonce) {
if (amount == 0) revert ZeroAmount();
if (recipient == address(0)) revert ZeroAddress();
USDC.safeTransferFrom(msg.sender, address(this), amount);
USDC.forceApprove(address(TOKEN_MESSENGER), amount);
bytes32 mintRecipient = _addressToBytes32(recipient);
nonce = TOKEN_MESSENGER.depositForBurn(
amount,
destinationDomain,
mintRecipient,
address(USDC)
);
emit CCTPBurnInitiated(nonce, destinationDomain, recipient, amount);
}
/// @notice Burns USDC with a restricted relayer on the destination chain
/// @dev Only `destinationCaller` can complete the transfer on the other side
/// @param amount Amount of USDC to send (6 decimals)
/// @param destinationDomain CCTP domain ID of the target chain
/// @param recipient EVM address that will receive USDC on the destination chain
/// @param destinationCaller Address allowed to call receiveMessage on destination
/// @return nonce The message nonce for tracking attestation status
function sendUSDCWithCaller(
uint256 amount,
uint32 destinationDomain,
address recipient,
address destinationCaller
) external returns (uint64 nonce) {
if (amount == 0) revert ZeroAmount();
if (recipient == address(0) || destinationCaller == address(0)) revert ZeroAddress();
USDC.safeTransferFrom(msg.sender, address(this), amount);
USDC.forceApprove(address(TOKEN_MESSENGER), amount);
nonce = TOKEN_MESSENGER.depositForBurnWithCaller(
amount,
destinationDomain,
_addressToBytes32(recipient),
address(USDC),
_addressToBytes32(destinationCaller)
);
emit CCTPBurnInitiated(nonce, destinationDomain, recipient, amount);
}
/// @dev Converts an EVM address to a left-padded bytes32 for CCTP
function _addressToBytes32(address addr) internal pure returns (bytes32) {
return bytes32(uint256(uint160(addr)));
}
}The destination side calls MessageTransmitter.receiveMessage() with the attestation obtained from Circle's API. This is typically done by an offchain relayer, but can also be called from a contract:
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
interface IMessageTransmitter {
function receiveMessage(
bytes calldata message,
bytes calldata attestation
) external returns (bool success);
}
/// @title CCTPReceiver
/// @notice Relays attested CCTP messages to complete cross-chain USDC transfers
contract CCTPReceiver {
IMessageTransmitter public immutable MESSAGE_TRANSMITTER;
error ReceiveFailed();
event CCTPMessageRelayed(bytes32 indexed messageHash);
constructor(address messageTransmitter_) {
MESSAGE_TRANSMITTER = IMessageTransmitter(messageTransmitter_);
}
/// @notice Relays an attested CCTP message to mint USDC to the original recipient
/// @param message Raw message bytes emitted during the source chain burn
/// @param attestation Signed attestation from Circle's attestation service
function relay(bytes calldata message, bytes calldata attestation) external {
bool success = MESSAGE_TRANSMITTER.receiveMessage(message, attestation);
if (!success) revert ReceiveFailed();
emit CCTPMessageRelayed(keccak256(message));
}
}After burning USDC on the source chain, poll Circle's attestation API until the attestation is ready.
Mainnet: https://iris-api-v2.circle.com/v2/attestations/{messageHash}
Testnet: https://iris-api-v2-sandbox.circle.com/v2/attestations/{messageHash}The messageHash is the keccak256 of the raw message bytes emitted in the MessageSent event on the source chain:
event MessageSent(bytes message);
// To compute the hash offchain:
// messageHash = keccak256(message)async function waitForAttestation(messageHash: string): Promise<string> {
const endpoint = `https://iris-api-v2.circle.com/v2/attestations/${messageHash}`;
while (true) {
const res = await fetch(endpoint);
const data = await res.json();
if (data.status === "complete") {
return data.attestation;
}
// Poll every 5 seconds; fast finality transfers resolve in ~10-20s
await new Promise((r) => setTimeout(r, 5_000));
}
}{
"attestation": "0x...",
"status": "complete"
}Status values: "pending_confirmations" → "complete". Once complete, the attestation hex string is passed to receiveMessage().
Gateway provides a unified USDC balance across all supported chains with near-instant (<500ms) transfers. Instead of burning and waiting for attestation per transfer, you pre-fund a Gateway Wallet and create burn intents signed with EIP-712.
These addresses are the same on every supported EVM chain:
| Contract | Mainnet | Testnet |
|---|---|---|
| Gateway Wallet | 0x77777777Dcc4d5A8B6E418Fd04D8997ef11000eE | 0x0077777d7EBA4688BDeF3E311b846F25870A19B9 |
| Gateway Minter | 0x2222222d7164433c4C09B0b0D809a9b52C04C205 | 0x0022222ABE238Cc2C7Bb1f21003F0a260052475B |
┌──────────────┐ ┌───────────────┐ ┌─────────────────┐
│ 1. Deposit │────▶│ 2. Burn │────▶│ 3. Mint │
│ USDC to │ │ Intent │ │ on destination │
│ Gateway │ │ (EIP-712 sig) │ │ via Gateway API │
│ Wallet │ │ │ │ │
└──────────────┘ └───────────────┘ └─────────────────┘gatewayMint() on the destination chain with the attestation/// @notice Deposits USDC into the Gateway Wallet to fund the unified balance
/// @dev Simply transfers USDC to the well-known Gateway Wallet address
/// @param amount Amount of USDC to deposit (6 decimals)
function depositToGateway(uint256 amount) external {
USDC.safeTransferFrom(msg.sender, GATEWAY_WALLET, amount);
emit GatewayDeposit(msg.sender, amount);
}bytes32 constant BURN_INTENT_TYPEHASH = keccak256(
"BurnIntent(uint32 sourceDomain,uint32 destinationDomain,address recipient,uint256 amount,uint256 nonce,uint256 deadline)"
);
struct BurnIntent {
uint32 sourceDomain;
uint32 destinationDomain;
address recipient;
uint256 amount;
uint256 nonce;
uint256 deadline;
}| Criteria | CCTP (direct) | Gateway |
|---|---|---|
| Latency | 8–20 seconds (fast finality) | <500ms |
| Pre-funding required | No | Yes (deposit to Gateway Wallet) |
| Unified balance | No (per-chain) | Yes (single balance, any chain) |
| Best for | One-off or infrequent transfers | High-frequency, multi-chain apps |
| Contract complexity | Lower (two calls) | Higher (EIP-712, API integration) |
| Minimum viable integration | 1 contract + relayer | Offchain service + Gateway API |
| Cost | Gas on source + destination | Gas on source + destination + Gateway fee |
Use CCTP when:
Use Gateway when:
CCTP V2 supports attaching arbitrary calldata that executes on the destination chain after USDC is minted. This enables atomic cross-chain operations.
interface ITokenMessengerV2 {
/// @notice Burns tokens and sends a message with a hook to execute on destination
/// @param amount Amount to burn
/// @param destinationDomain Destination CCTP domain
/// @param mintRecipient Recipient on destination
/// @param burnToken Token to burn
/// @param destinationCaller Restricted relayer (bytes32(0) for any)
/// @param maxFee Maximum fee for fast transfer (set 0 for standard)
/// @param hookData Calldata to execute on the destination after mint
/// @return nonce Message nonce
function depositForBurnWithHook(
uint256 amount,
uint32 destinationDomain,
bytes32 mintRecipient,
address burnToken,
bytes32 destinationCaller,
uint256 maxFee,
bytes calldata hookData
) external returns (uint64 nonce);
}// Encode a vault deposit call as hook data
bytes memory hookData = abi.encodeWithSelector(
IVault.deposit.selector,
amount,
recipient
);
// USDC is minted to mintRecipient, then hookData is executed
// mintRecipient should be a contract that approves the vault and calls deposit
tokenMessenger.depositForBurnWithHook(
amount,
CCTPDomains.BASE,
_addressToBytes32(hookReceiver),
address(usdc),
bytes32(0),
0,
hookData
);For applications that need end-to-end CCTP without managing attestation polling manually:
import { BridgeKit } from "@circle-fin/bridge-kit";
const kit = new BridgeKit({ apiKey: process.env.CIRCLE_API_KEY });
const transfer = await kit.bridge({
sourceChain: "ethereum",
destinationChain: "base",
amount: "1000000", // 1 USDC (6 decimals)
recipient: "0x...",
});
// kit.bridge() handles: approve → burn → poll attestation → receiveMessage
console.log(`Transfer complete: ${transfer.destinationTxHash}`);// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
import {Test} from "forge-std/Test.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface ITokenMessenger {
function depositForBurn(
uint256 amount,
uint32 destinationDomain,
bytes32 mintRecipient,
address burnToken
) external returns (uint64 nonce);
}
contract CCTPForkTest is Test {
ITokenMessenger constant MESSENGER =
ITokenMessenger(0xBd3fa81B58Ba92a82136038B25aDec7066af3155);
IERC20 constant USDC =
IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
address sender = makeAddr("sender");
function setUp() public {
vm.createSelectFork("mainnet");
deal(address(USDC), sender, 1000e6);
}
function test_depositForBurn_toBase() public {
vm.startPrank(sender);
USDC.approve(address(MESSENGER), 100e6);
bytes32 recipient = bytes32(uint256(uint160(sender)));
uint64 nonce = MESSENGER.depositForBurn(
100e6,
6, // Base domain
recipient,
address(USDC)
);
assertGt(nonce, 0, "nonce should be non-zero");
assertEq(USDC.balanceOf(sender), 900e6, "100 USDC should be burned");
vm.stopPrank();
}
function test_depositForBurn_revertsOnZeroAmount() public {
vm.startPrank(sender);
USDC.approve(address(MESSENGER), 0);
vm.expectRevert();
MESSENGER.depositForBurn(
0,
6,
bytes32(uint256(uint160(sender))),
address(USDC)
);
vm.stopPrank();
}
function test_depositForBurn_revertsWithoutApproval() public {
vm.prank(sender);
vm.expectRevert();
MESSENGER.depositForBurn(
100e6,
6,
bytes32(uint256(uint160(sender))),
address(USDC)
);
}
}contract CCTPSenderTest is Test {
CCTPSender sender;
address mockMessenger;
address mockUSDC;
function setUp() public {
mockMessenger = makeAddr("messenger");
mockUSDC = makeAddr("usdc");
sender = new CCTPSender(mockMessenger, mockUSDC);
}
function test_constructor_setsImmutables() public view {
assertEq(address(sender.TOKEN_MESSENGER()), mockMessenger);
assertEq(address(sender.USDC()), mockUSDC);
}
function test_sendUSDC_revertsOnZeroAmount() public {
vm.expectRevert(CCTPSender.ZeroAmount.selector);
sender.sendUSDC(0, 6, makeAddr("recipient"));
}
function test_sendUSDC_revertsOnZeroRecipient() public {
vm.expectRevert(CCTPSender.ZeroAddress.selector);
sender.sendUSDC(100e6, 6, address(0));
}
}depositForBurnWithCaller — When your protocol has a dedicated relayer, restrict who can call receiveMessage on the destination to prevent front-running.bytes32(uint256(uint160(addr))). Incorrect encoding burns USDC to an unrecoverable address.TokenMinter.burnLimitsPerMessage(token) before initiating large transfers.nonReentrant. The hook executes in the same transaction as the mint.nonce returned by depositForBurn for reconciliation and attestation lookups.Check onchain before large transfers:
interface ITokenMinter {
function burnLimitsPerMessage(address token) external view returns (uint256);
}
// Ethereum mainnet TokenMinter
ITokenMinter minter = ITokenMinter(0xc4922d64a24675E16e1586e3e3Aa56C06fABe907);
uint256 limit = minter.burnLimitsPerMessage(USDC_ADDRESS);Typical mainnet limits (subject to Circle governance):
SafeERC20.forceApprove() used for USDC approval to TokenMessengerburnLimitsPerMessage for large transfersdepositForBurnWithCaller used when a dedicated relayer existsreceiveMessage call wrapped with error handlinggatewayMint attestation verified before relying on destination mintnonReentrant protectionmintRecipient set to the hook receiver contract (not the end user)depositForBurn succeeds on mainnet statesendUSDC and relay functions© ccashwell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/cctp-bridging of ccashwell/evm-cortex.
Open the folder on GitHubat commit f8f3301
Cctp Bridging next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cctp Bridging this skillccashwell/evm-cortex | 131 | — | ~6.4k | Automated safety check: Pass | MIT | |
| Trading Evmalsk1992/CloddsBot | 2.9k | — | ~1.9k | Automated safety check: Pass | MIT | |
| Use Usdccirclefin/skills | 155 | — | ~2.4k | Automated safety check: Notes | Apache-2.0 | |
| Ethskillsaustintgriffith/ethskills | 295 | — | ~3k | Automated safety check: Pass | None | |
| AlchemyBankrBot/skills | 1.2k | — | ~3.5k | Automated safety check: Pass | MIT | |
| Okx Dex Bridgenirholas/three.ws | 228 | — | ~4k | Automated safety check: Pass | MIT |
alsk1992/CloddsBot
Trade tokens on EVM chains - Uniswap V3, 1inch on Ethereum, Arbitrum, Optimism, Base, Polygon
circlefin/skills
USDC is Circle's stablecoin deployed across multiple blockchain ecosystems including EVM chains (Ethereum, Base, Arbitrum, Polygon, Arc) and Solana.
austintgriffith/ethskills
A skill your agent uses when a request involves Ethereum, the EVM, or blockchain systems.
BankrBot/skills
Blockchain API access via Alchemy. An agent skill from BankrBot/skills.
nirholas/three.ws
A skill your agent uses to bridge tokens, cross-chain swap/transfer, move assets between chains, get cross-chain quotes, compare bridge fees, find the cheapest/fastest route, build bridge calldata…
Auditware/radar
Use radar for smart contract security analysis, AST generation, and detection template development.
ccashwell/evm-cortex
A skill your agent uses when preparing for a security audit, performing reconnaissance on a new codebase, or creating a protocol overview.
ccashwell/evm-cortex
A skill your agent uses when integrating with Aave V3 for lending, borrowing, flash loans, or building on top of Aave markets.
ccashwell/evm-cortex
Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.
ccashwell/evm-cortex
A skill your agent uses when running a local Ethereum node with Anvil.
ccashwell/evm-cortex
A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.
ccashwell/evm-cortex
A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.
Works with
Categories
A skill your agent uses when building cross-chain USDC transfers, integrating with Circle's Cross-Chain Transfer Protocol (CCTP V2), or using Circle Gateway for unified balances. Cctp Bridging is an agent skill from ccashwell/evm-cortex. Use when building cross-chain USDC transfers, integrating with Circle's Cross-Chain Transfer Protocol (CCTP V2), or using Circle Gateway for unified balances.
Cctp Bridging fits situations like: building cross-chain USDC transfers; integrating with Circles Cross-Chain Transfer Protocol (CCTP V2); using Circle Gateway for unified balances.
Run `npx skills add ccashwell/evm-cortex --skill cctp-bridging -a claude-code`. Or copy the skill folder (skills/cctp-bridging in ccashwell/evm-cortex) into .claude/skills/cctp-bridging in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ccashwell/evm-cortex --skill cctp-bridging -a codex`. Or copy the skill folder (skills/cctp-bridging in ccashwell/evm-cortex) into .agents/skills/cctp-bridging in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccashwell/evm-cortex --skill cctp-bridging -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cctp-bridging, .gemini/skills/cctp-bridging, .github/skills/cctp-bridging and .opencode/skills/cctp-bridging in your project.
Going by SKILL.md and its folder, Cctp Bridging needs credentials named CIRCLE_API_KEY.
SKILL.md names 2 domains. In commands or code: iris-api-v2.circle.com and iris-api-v2-sandbox.circle.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Cctp Bridging is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 6.4k tokens (SKILL.md is roughly 26k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cctp Bridging: Trading Evm (alsk1992/CloddsBot, 2.9k stars), Use Usdc (circlefin/skills, 155 stars), Ethskills (austintgriffith/ethskills, 295 stars) and Alchemy (BankrBot/skills, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ccashwell (a GitHub user) maintains it in ccashwell/evm-cortex, which has 131 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on September 30, 2026.
Source: ccashwell/evm-cortex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.