Repository navigation
Starter Kit V2 - #38
Merged
Merged
Conversation
…IAny2EVMMessageReceiverV2 interface
…CCVs for Faster Than Finality
* feat(cct): deploy CrossChainToken in CCT examples; align with FinalityCodec CCIP APIs ## Description ### Summary - **CCT token deployment (Examples 06–08):** Replace `FactoryBurnMintERC20` with **`CrossChainToken`** + `BaseERC20.ConstructorParams`, deploying with the broadcaster as pre-mint recipient, CCIP admin, burn/mint admin, and default admin. Register the token admin via **`RegistryModuleOwnerCustom.registerAdminViaGetCCIPAdmin`** (CrossChainToken exposes `getCCIPAdmin()`, not `owner()`). - **CCIP submodule compatibility:** Update starter code and docs to match current **chainlink-ccip** contracts: **`FinalityCodec`**-based **`bytes4`** finality everywhere the old stack used min-block / `blockConfirmations` fields alone. ### Code - **`script/EncodeExtraArgsOffchain.s.sol`:** Encode Generic ExtraArgs V3 with **`requestedFinalityConfig`**; implement `encodeV3Basic` using **`FinalityCodec._encodeBlockDepth`** + **`ExtraArgsCodec._getBasicEncodedExtraArgsV3(gasLimit, finalityConfig)`**. - **`src/BasicMessageReceiverWithCCVs.sol`:** Implement **`getCCVsAndFinalityConfig`** (replaces `getCCVsAndMinBlockDepth`); map stored min block depth to **`FinalityCodec._encodeBlockDepth`** for `allowedFinalityConfig`. - **`script/examples/Example06.s.sol`:** Pool tuning scripts renamed to **`Example06SetPoolAllowedFinalityConfig`** / **`Example06GetPoolAllowedFinalityConfig`**, calling **`TokenPool.getAllowedFinalityConfig` / `setAllowedFinalityConfig`** (replacing removed min-block-confirmation getters/setters). **`SendCCTTokenWithExtraArgsV3*`** contracts unchanged at the call site; they still use `encodeV3Basic`, which now uses the new encoding path. ### Docs - **`book/src/examples`:** Example 06–08 chapters updated for CrossChainToken and `registerAdminViaGetCCIPAdmin`; Example 02 and **`book/src/tools/ccip-sdk-ccip-send.md`** updated for **`getCCVsAndFinalityConfig`** / finality terminology. ### Build - Requires **`FOUNDRY_PROFILE=cct`** for CCT script compilation (unchanged expectation for large pool contracts). ### Breaking / operational notes - Scripts that previously called **`Example06SetPoolMinBlockConfirmations`** must use **`Example06SetPoolAllowedFinalityConfig`** with a **`bytes4`** allowed finality (per **`FinalityCodec`**), not a `uint16`. - **`extraArgs`** bytes for ExtraArgs V3 now follow the current **`ExtraArgsCodec` + `FinalityCodec`** layout; semantic “default finality” for `blockConfirmations == 0` is preserved via encoding, but raw payloads differ from pre-upgrade layouts. * Bumped chainlink-ccip dependency to 2.0-beta commit * docs(book): update Example 01 optional step 2for Executor allowed finality (FinalityCodec) Refresh `book/src/examples/example01-token-transfer-faster-than-finality.md` to match current CCIP contracts: the Executor no longer exposes `getMinBlockConfirmations()`. Replace the old snippet with an optional check of `getAllowedFinalityConfig() -> bytes4` and a `cast call` example, plus short context on `FinalityCodec` and how requested finality relates to `blockConfirmations` (via `FinalityCodec._encodeBlockDepth`). * feat(ccip): expose allowed-finality encoding helper in EncodeExtraArgsOffchain script add encodeAllowedFinalityBlockDepthAndSafeFlag on EncodeExtraArgsOffchain.s.sol as a thin wrapper around FinalityCodec._encodeBlockDepthAndSafeFlag, with NatSpec clarifying use for allowed finality (bytes4), not requested finality in sender ExtraArgsV3. - script: new view helper returning bytes4. - book (example05): document the Forge script helper next to encodeV3Basic. - book/book.toml: drop redundant multilingual = false (mdBook compatibility). * Updated example docs for 03 and 05 - Updated args shape to match CCIP 2.0 in EX05 - Updated description of block confirmations that it is converted to finality config bytes in EX03
|
Thank you for adding a CODEOWNERS file - @andrejrakic. |
* fix: align CCIP v2 examples with pool finality requirements - Use Cancun and correct the lint configuration. - Add Example 06 pool finality configuration and a read-only check of the pool, executor, CCVs, and sample fee quotes. - Update the guides for Sepolia → Amoy, using faucet-issued CCIP-BnM in Examples 01, 03, and 04 while keeping custom token deployment in Examples 06–08. * chore: bump chainlink-ccip to contracts-ccip-v2.0.0, rename FTF to Fast Transfers - Bump lib/chainlink-ccip from contracts-ccip-v2.0.0-beta.1 to contracts-ccip-v2.0.0 (c2c125c); no compile changes needed - Use 'Fast Transfers (FTF)' naming in book docs to match docs.chain.link - Suggest bytes4 hex values for pool allowed finality config (PR review) --------- Co-authored-by: andrejrakic <andrej.rakic@smartcontract.com>
…lict # Conflicts: # README.md
andrejrakic
marked this pull request as ready for review
September 28, 2026 15:41
…advisories
- Bump @chainlink/ccip-sdk ^0.97.0 -> ^1.14.0 (pins axios 1.20.0; fixes Vulnerabilities check)
- Require Node >=24 (SDK 1.x uses explicit resource management syntax)
- ccip-send: extraArgs blockConfirmations -> finality ('finalized' for 0)
- ccip-track: replace removed getMessagesForSender with getMessagesInRange + sender filter; map 'finalized' to default finality
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is still WIP