CCIP v2.0.0 USDCSourcePoolDataCodec API Reference
USDCSourcePoolDataCodec defines version tags embedded in sourcePoolData for USDC transfers.
These tags determine how the destination pool interprets and processes incoming transfers, enabling different routing and execution behaviors.
The first 4 bytes of sourcePoolData encode the version tag used to select the correct decoding and execution logic.
This library provides reusable helper functions and is not deployed as a standalone application-facing contract.
Usage Boundary
You do not call this library directly.
- USDC pool implementations use these tags to encode routing behavior into
sourcePoolData. - Destination-side contracts read these tags to determine how to process incoming transfers.
- You are responsible for ensuring that
sourcePoolDatais encoded with the correct version tag.
Contract
libraries/USDCSourcePoolDataCodec.sol
Import
import {USDCSourcePoolDataCodec} from "chainlink-ccip/libraries/USDCSourcePoolDataCodec.sol";
Constants
Version tags used to identify routing behavior in sourcePoolData.
(Refer to source for exact tag values.)
Errors
No new custom errors declared.
Notes
sourcePoolDatais an encoded payload attached to token transfers for destination-side processing.- The first 4 bytes of
sourcePoolDatamust match a supported version tag. - Version tags allow different pool implementations to interpret the same data differently.
- Unknown or invalid version tags may cause decoding or execution to revert.
Usage context
Used by:
USDCTokenPoolProxy- USDC pool implementations
- Routing logic that interprets
sourcePoolData