Aller directement au menu principal

Chainlink CCIP Cross-Chain Token Deployment on Core


This guide walks you through deploying cross-chain tokens using Chainlink CCIP on the Core (Testnet or Mainnet). It adapts the official Chainlink Hardhat tutorial for Core-specific configurations.

Based on: Chainlink CCIP EVM Tutorial (Burn & Mint from EOA)

Chainlink CCIP (Cross-Chain Interoperability Protocol) enables secure token and data transfers across different blockchains using a unified interface.

Key Features

  • Secure cross-chain messaging and token transfers
  • Programmable token logic
  • Decentralized infrastructure via Chainlink nodes
  • Built-in rate limiting and failover protections

Read more about CCIP →

Core Blockchain CCIP Network Details

Use the tabs below to toggle between Testnet and Mainnet configurations:

ParameterValue
Chain NameCore Testnet
Chain ID1114
Chain Selector4264732132125536123
Router0xded0EE188Fe8F1706D9049e29C82081A5ebEcb2F
RMN Proxy0xF39a1260F4E3345D810e1b8aA569200e1D27A998
Token Admin Registry0x2c99403fDB26F654c410D81264033faE289fa7Ea
Registry Module Owner0xfaE626f209B036B03D18d4f16ad3D599f90AF22c
RPC URLhttps://rpc.test2.btcs.network

Fee Tokens

TokenAddress
LINK0x6C475841d1D7871940E93579E5DBaE01634e17aA
WCORE0x7Ce54aE289e480cbDfd32e531F75947CFA3d1aC3d
tCORE2Native Gas Token
note

Refer to the CCIP Directory for Core for latest data.

Project Configuration for Core Blockchain

To integrate Core Testnet/Mainnet with the official Chainlink Hardhat setup, follow these steps:

Prerequisites

  • Node.js: Version 18 or higher
  • Git: For cloning the repository

1. Clone and Setup

git clone https://github.com/smartcontractkit/smart-contract-examples.git
cd smart-contract-examples/ccip/cct/hardhat

2. Install Dependencies

npm install
npm run compile

3. Environment Variables Setup

Set an encryption password for your environment variables:

npx env-enc set-pw

Set up a .env.enc file with the necessary variables for Core Testnet. Use the following command to add the variables:

npx env-enc set

Required Environment Variables:

 CORETESTNET_RPC_URL= "https://rpc.test2.btcs.network"
PRIVATE_KEY= Your wallet private key
CORESCAN_TESTNET_API_KEY= CoreScan API key for contract verification
info

Security Note: Never commit your .env.enc file or private keys to version control.

4. config.json

Update your ccip/cct/hardhat/config/config.json to include Core network configurations:

"coreTestnet2": {
"chainId": 1114,
"chainSelector": "4264732132125536123",
"router": "0xded0EE188Fe8F1706D9049e29C82081A5ebEcb2F",
"rmnProxy": "0xF39a1260F4E3345D810e1b8aA569200e1D27A998",
"tokenAdminRegistry": "0x2c99403fDB26F654c410D81264033faE289fa7Ea",
"registryModuleOwnerCustom": "0xfaE626f209B036B03D18d4f16ad3D599f90AF22c",
"link": "0x6C475841d1D7871940E93579E5DBaE01634e17aA",
"confirmations": 1,
"nativeCurrencySymbol": "CORE",
"chainType": "evm"
}

For Core Mainnet, add a similar configuration with the appropriate mainnet values.

5. network.ts

Update your config/network.ts file with the following Core network configurations:

5.1 Network Configurations

Add these entries alongside the existing network configurations:

Core Testnet Configuration:

[EVMChains.coreTestnet2]: {
...configData.coreTestnet2,
url: process.env.CORE_TESTNET2_RPC_URL || "https://rpc.test2.btcs.network",
chainType: "evm" as const,
gasPrice: undefined,
nonce: undefined,
accounts,
},

Core Mainnet Configuration:

[EVMChains.coreMainnet]: {
...configData.coreMainnet,
url: process.env.CORE_MAINNET_RPC_URL || "https://rpc.coredao.org",
chainType: "evm" as const,
gasPrice: undefined,
nonce: undefined,
accounts,
},

5.2 Etherscan API Keys

Add CoreScan API key support for contract verification:

[EVMChains.coreTestnet2]: process.env.CORESCAN_TESTNET_API_KEY || "UNSET",
[EVMChains.coreMainnet]: process.env.CORESCAN_MAINNET_API_KEY || "UNSET",

5.3 Custom Chain Configuration

Add Core network configurations to your custom chains array:

{
network: EVMChains.coreTestnet2,
chainId: configData.coreTestnet2.chainId,
urls: {
apiURL: "https://api.test2.btcs.network/api",
browserURL: "https://scan.test2.btcs.network/",
},
},
{
network: EVMChains.coreMainnet,
chainId: configData.coreMainnet.chainId,
urls: {
apiURL: "https://openapi.coredao.org/api",
browserURL: "https://scan.coredao.org",
},
},
info

Note: All these configurations should be added to your existing config/network.ts file alongside the other supported networks.

6. types.ts

Add the Core chain identifiers to your existing EVMChains enum. Simply append these two entries to the existing enum:

export enum EVMChains {
avalancheFuji = "avalancheFuji",
arbitrumSepolia = "arbitrumSepolia",
sepolia = "sepolia",
baseSepolia = "baseSepolia",
polygonAmoy = "polygonAmoy",
// Add these Core network entries:
coreTestnet2 = "coreTestnet2",
coreMainnet = "coreMainnet"
}
info

Note: Just append coreTestnet2 and coreMainnet to your existing EVMChains enum. No need to modify the existing entries.

Deployment

Once all configurations are updated:

  1. Follow the official Chainlink CCIP tutorial.
  2. Use coreTestnet2 or coreMainnet as your selected network when deploying tokens.
  3. Be sure to fund your LINK and native token balances.

You're now ready to build and deploy cross-chain tokens on the Core Blockchain using Chainlink CCIP.

Resources