ccip
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseChainlink CCIP (Hedera)
Chainlink CCIP(Hedera)
CCT burn-and-mint pattern: deploy a burn-mint token + token pool on each chain, register the token with CCIP, wire remote pools with chain selectors, then paying native fees.
ccipSendtext
BurnMint token + TokenPool (source)
→ Router.ccipSend(destSelector, message)
→ TokenPool lockOrBurn / releaseOrMint (dest)On Hedera you can use a vanilla ERC-20 CCT or an HTS-backed wrapper. CCIP always registers the ERC-20 the pool sees — for HTS that is the wrapper, while users hold the native HTS token.
This skill is cross-chain tokens/messages, not Chainlink Data Feeds.
CCT burn-and-mint 模式: 在每条链上部署燃烧铸造代币 + 代币池,将代币注册至 CCIP,通过 chain selectors 连接远程池,随后调用 并支付原生费用。
ccipSendtext
BurnMint token + TokenPool (source)
→ Router.ccipSend(destSelector, message)
→ TokenPool lockOrBurn / releaseOrMint (dest)在 Hedera 上,你可以使用标准 ERC-20 CCT 或者 HTS 支撑的包装器。CCIP 始终注册池所能识别的 ERC-20 代币——对于 HTS 来说,这个代币就是包装器,而用户持有的是原生 HTS 代币。
本技能涉及跨链代币/消息,不包含 Chainlink Data Feeds 相关内容。
Quick Reference
快速参考
| Piece | Role |
|---|---|
| Router | |
| Chain selector | |
| Token + pool | Burn-mint ERC-20 + |
| Admin registry | |
| Lane config | |
| Fee | Native gas ( |
| Receiver | |
See references/hedera-ccip.md for where to source selectors and registry addresses. See references/examples.md for register / wire / send sketches.
| 组件 | 作用 |
|---|---|
| Router | |
| Chain selector | |
| 代币 + 资金池 | 燃烧铸造 ERC-20 + |
| 管理员注册表 | |
| 通道配置 | 双向调用 |
| 费用 | 原生 gas( |
| 接收方 | |
关于选择器和注册表地址的获取方式,请参阅 references/hedera-ccip.md。关于注册/连接/发送的示例代码,请参阅 references/examples.md。
Critical: Selectors, Not Chain IDs
关键注意事项:使用 selectors,而非链 ID
ccipSendremoteChainSelector29611155111296Do not reuse Axelar GMP names or LayerZero EIDs here.
ccipSendremoteChainSelector29611155111296请勿在此处复用 Axelar GMP 名称或 LayerZero EID。
Critical: Register Then Wire Both Lanes
关键注意事项:先注册,再双向连接通道
Incomplete registry/pool config bricks the token. Per chain:
- Deploy token + pool
- Grant the pool mint/burn roles on the token
- then
registerAdminViaGetCCIPAdmin(token)acceptAdminRole(token) TokenAdminRegistry.setPool(token, pool)- After both chains have token+pool addresses: on each pool (remote selector, remote pool, remote token)
applyChainUpdates
Then send a small test amount and track it on CCIP Explorer.
注册表/资金池配置不完整会导致代币无法使用。每条链的操作步骤如下:
- 部署代币 + 资金池
- 为资金池授予代币的铸造/燃烧权限
- 调用 ,然后调用
registerAdminViaGetCCIPAdmin(token)acceptAdminRole(token) - 调用
TokenAdminRegistry.setPool(token, pool) - 两条链都部署好代币和资金池并获取地址后:在每个资金池上调用 (传入远程 selector、远程资金池地址、远程代币地址)
applyChainUpdates
随后发送小额测试代币,并在 CCIP Explorer 上追踪交易状态。
Critical: Hedera HTS-Backed CCT
关键注意事项:Hedera HTS 支撑的 CCT
Vanilla path: + on Hedera EVM, same as Sepolia.
BurnMintERC20BurnMintTokenPoolHTS-backed path:
- Users hold a native HTS token created via precompile
0x167 - CCIP registers the wrapper (), not the HTS token id/address users see in wallets
HtsBurnMintERC20 - Pool () must associate itself with the native HTS token and approve the wrapper
HtsBurnMintTokenPool - Hedera → remote send needs two approvals: HTS → wrapper, wrapper → Router
- Receiver accounts must associate the native HTS token before inbound mints
- Mint/burn/transfer amounts must fit HTS
int64
Do not mix Axelar or LayerZero token addresses into CCIP env/config.
标准方案:在 Hedera EVM 上部署 + ,与 Sepolia 上的方案一致。
BurnMintERC20BurnMintTokenPoolHTS 支撑方案:
- 用户持有通过预编译合约 创建的原生 HTS 代币
0x167 - CCIP 注册的是包装器(),而非用户在钱包中看到的 HTS 代币 ID/地址
HtsBurnMintERC20 - 资金池()必须与原生 HTS 代币关联,并向包装器授权
HtsBurnMintTokenPool - 从 Hedera 向远程链发送需要两次授权:HTS → 包装器、包装器 → Router
- 接收方账户必须在接收铸造前关联原生 HTS 代币
- 铸造/燃烧/转账的金额必须在 HTS 的范围内
int64
请勿将 Axelar 或 LayerZero 的代币地址混入 CCIP 的环境/配置中。
Send Flow (native fee)
发送流程(原生代币付费)
solidity
Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({
receiver: abi.encode(receiver),
data: "",
tokenAmounts: tokenAmounts, // token is the CCIP-registered ERC-20 / wrapper
feeToken: address(0),
extraArgs: Client._argsToBytes(
Client.EVMExtraArgsV2({ gasLimit: 0, allowOutOfOrderExecution: true })
)
});
uint256 fee = IRouterClient(router).getFee(destinationChainSelector, message);
IERC20(tokenToSend).approve(router, amount);
IRouterClient(router).ccipSend{ value: fee }(destinationChainSelector, message);solidity
Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({
receiver: abi.encode(receiver),
data: "",
tokenAmounts: tokenAmounts, // token is the CCIP-registered ERC-20 / wrapper
feeToken: address(0),
extraArgs: Client._argsToBytes(
Client.EVMExtraArgsV2({ gasLimit: 0, allowOutOfOrderExecution: true })
)
});
uint256 fee = IRouterClient(router).getFee(destinationChainSelector, message);
IERC20(tokenToSend).approve(router, amount);
IRouterClient(router).ccipSend{ value: fee }(destinationChainSelector, message);Checklist
检查清单
- Chain selectors from the CCIP directory (not EVM chain IDs, Axelar names, or LZ EIDs)
- Token admin registered and pool set on both chains
- wired both directions before sending
applyChainUpdates - Native fee attached to (
ccipSend)feeToken = address(0) - HTS path: wrapper registered with CCIP; users hold native HTS; dual approve + associate
- Amounts fit when touching HTS mint/burn
int64 - CCIP token/pool addresses not copied from Axelar/LayerZero configs
- Chain selectors 来自 CCIP 目录(而非 EVM 链 ID、Axelar 名称或 LZ EID)
- 两条链上都完成了代币管理员注册和资金池设置
- 发送前已通过 完成双向连接
applyChainUpdates - 已附带原生代币费用(
ccipSend)feeToken = address(0) - HTS 方案:包装器已注册到 CCIP;用户持有原生 HTS;完成双重授权 + 关联
- 涉及 HTS 铸造/燃烧时,金额在 范围内
int64 - CCIP 代币/资金池地址未从 Axelar/LayerZero 配置中复制
References
参考资料
- references/examples.md — register, wire, send, HTS dual-approve sketches
- references/hedera-ccip.md — selectors vs chain IDs, where to source router/registry
- CCIP directory
- CCIP burn-and-mint CCT
- CCIP Explorer
- references/examples.md —— 注册、连接、发送、HTS 双重授权的示例代码
- references/hedera-ccip.md —— selectors 与链 ID 的区别、Router/注册表地址的获取方式
- CCIP 目录
- CCIP burn-and-mint CCT
- CCIP Explorer