🌉
Celer cBridge
  • 👋Welcome to cBridge
  • Introduction
    • Architectural Benefits
    • State Guardian Network
    • SGN and cBridge
      • The SGN as a cBridge node gateway and Service Level Agreement (SLA) arbitrator
      • The SGN as a Shared Liquidity Pool Manager
    • Fungible Token Bridging Models
    • cBridge Security
  • Tutorial
    • Cross-chain Transfer
    • LP Guide
    • SGN V2 Staking Guide
    • SGN V1 Unbonding Guide
    • Smart Contract as LP
    • Aptos Bridging Guide
    • Ape Chain Bridging Guide
    • Flow Cadence Bridging Guide
    • Flow EVM Bridging Guide
  • Developer
    • Circle Cross-chain USDC Transfer Protocol(CCTP)
    • cBridge SDK
    • cBridge Pool-Based Transfer (xLiquidity)
      • Transfer
      • Transfer Refund
    • cBridge Canonical Mapping Transfer (xAsset)
      • Mint
      • Mint Refund
      • Burn
      • Burn Refund
    • cBridge Transfer Web Widget
    • cBridge Aptos Transfer (xAsset Only)
    • Custom Transfer URL Schemes
    • cBridge APIs for Sui
    • Referral Specific Transfer
    • cBridge Limit Parameters
    • API Reference
      • Gateway: GetTransferConfigsForAll
      • Gateway: EstimateAmt
      • Contract: Pool-Based Transfer
      • Gateway: GetTransferStatus
      • Contract: Pool-Based Transfer Refund
      • Gateway: TransferHistory
      • Contract: Mint Canonical Token(OriginalTokenVault)
      • Contract: Mint Canonical Token(OriginalTokenVaultV2)
      • Contract: Mint Canonical Token Transfer Refund
      • Contract: Burn Canonical Token(PeggedTokenBridge)
      • Contract: Burn Canonical Token (PeggedTokenBridgeV2)
      • Contract: Burn Canonical Token Transfer Refund
      • Gateway: MarkRefRelation
      • Contract: TransferAgent Mint Token Submission
      • Contract: TransferAgent Burn Token Submission
      • Contract: Aptos Vault Mint Token Submission
      • Contract: Aptos PegBridge Burn Token Submission
  • NFT Bridge
    • Introduction
    • NFT Bridge Fee
  • List Your Tokens
    • Simple Listing Process
  • Reference
    • FAQ
    • Audit Reports
    • Contract Addresses
Powered by GitBook
On this page
  • Proxy Contracts
  • Quote Fee
  • Bridge by depositForBurn
  • Searching destination transaction status
  1. Developer

Circle Cross-chain USDC Transfer Protocol(CCTP)

PreviousFlow EVM Bridging GuideNextcBridge SDK

Last updated 1 year ago

For Circle Cross-Chain USDC Protocol supported chains, the USDC flow is going through Circle bridge contracts and its attestation service instead of cBridge or peg bridge contracts and SGN.

The following content is an integration tutorial from frontend perspective.

Proxy Contracts

Chain

Address

Ethereum 1

Avalanche 43114

Arbitrum One 42161

Optimism 10

Base 8453

Polygon PoS 137

Also you can get the related contract addressed from cBridge gateway api

Quote Fee

Note that the CCTP quote the fees from the proxy contract instead of the cBridge gateway APIs.

Inputs

amount: Your bridging amount with decimal, for example, 3000000 = 30USDC

dstChid: The destination chain you wanna send, in this case is 43114

Outputs

Output data is an array of fees [fee, txFee, percFe].

fee: total fee, txFee+percFee

txFee: transaction fee

percFee: percentage fee

For this bridging mode, the bridge rate is 1.

Bridge by depositForBurn

Contract Parameters

Field
Des

amount

Bridging amount with decimal

dstChid

Bridging destination chain id

mintRecipient

Receiver address

burnToken

Once this depositForBurn happened on the source chain, you can get the source chain Deposited event.

event Deposited(address sender, bytes32 recipient, uint64 dstChid, uint256 amount, uint256 txFee, uint256 percFee, uint64 nonce);

Searching destination transaction status

Searching the final destination chain status by the gateway API: GetTransferStatus.

The API requires a tracking field transferId for the status quering, here is an example with ether.js.

getTransferId(): string {
      return ethers.utils.solidityKeccak256(
          ["string", "address", "uint64", "uint64"],
          [
            "CircleTransfer", // fixed string
            walletAddress, // wallet address of user
            fromChainId, // source chain Id
            nonce, // can be retrived from the Deposited event
          ],
      );
    }  

API reference

For example, bridging USDC from Ethereum to Avalanch by method.

From the front-end side, lock the USDC to source proxy contract by the method . Circle attestation will bridge the assets to the destination chain in a trustless way. For more details refer to this:

USDC token address in source chain, you can read the token address from this configuration:

https://cbridge-prod2.celer.app/v1/circleUsdcConfig
totalFee
depositForBurn
https://developers.circle.com/stablecoin/docs/cctp-protocol-contract
Gateway: GetTransferStatus
0x6065a982f04f759b7d2d042d2864e569fad84214
0x9744ae566c64B6B6f7F9A4dD50f7496Df6Fef990
0x054B95b60BFFACe948Fa4548DA8eE2e212fb7C0a
0x697aC93c9263346c5Ad0412F9356D5789a3AA687
0x243b40e96c6bF21511E53d85c86F6Ec982f9a879
0xB876cc05c3C3C8ECBA65dAc4CF69CaF871F2e0DD
https://cbridge-prod2.celer.app/v1/circleUsdcConfig
CCPT flow