Conversation
* Add USDT0 OFT adapter * Prepare config * Add single active legacy pool to Stage config * Fix USDT0OFT address for Arbitrum Stage config * Remove BSC pool configuration due to no CCTP support * Add BSC Repayer 18 decimals tokens tolerance * Add decimals to tokens config in Repayer * Add more tests * Address comments
… Bsc. (#189) * Add USDT0 OFT adapter * Prepare config * Add single active legacy pool to Stage config * Fix USDT0OFT address for Arbitrum Stage config * Remove BSC pool configuration due to no CCTP support * Add BSC Repayer 18 decimals tokens tolerance * Add decimals to tokens config in Repayer * Add more tests * Address comments * Reinforce scripts, add deploy artifacts * Fix nonce manager in deploy.ts * Fix lint
Deploy Gnosis Aave pool and all contracts on Stage
Closed
- Add cctpV2TokenMessenger/cctpV2MessageTransmitter zero-address args to 3 Repayer deploy calls in test/Repayer.ts (Everclear mock, BSC) - Break long event ABI strings and route arrays in fork test to stay within 120-char eslint max-len limit
# Conflicts: # contracts/Repayer.sol # test/Repayer.ts
- Add require(CCTP_V2_TOKEN_MESSENGER != address(0)) in initiateTransferCCTPV2 for a clear revert on unconfigured chains - Add CCTPV2 config for Avalanche, OP Mainnet, Arbitrum One, Base, Polygon Mainnet, and Unichain (Ethereum was already configured)
…ncer - Add initiateRepay and processRepay tests for CCTP V2 in Repayer - Add zero-address revert test for CCTP V2 in Rebalancer - Deploy V2 mock contracts in Repayer test fixture - Update coverage baseline (lines 99.60%, branches 91.45%)
…test coverage - Expose CCTP_V2_TOKEN_MESSENGER / CCTP_V2_MESSAGE_TRANSMITTER as public for parity with V1 - Add processTransferCCTPV2 helper that guards against an unset V2 transmitter - Cover native-currency, non-USDC, and both zero-address paths for CCTP V2 - Backfill InvalidLength / ZeroAddress branches in setRoute tests
lastperson
previously approved these changes
Apr 17, 2026
Collaborator
lastperson
left a comment
There was a problem hiding this comment.
Minor suggestions.
Well done!
There was a problem hiding this comment.
Pull request overview
This PR adds Circle CCTP V2 as an additional cross-chain bridge provider for USDC transfers, extending the existing CCTP V1-based flows in Repayer and Rebalancer.
Changes:
- Introduces a new
CCTPV2AdapterandICCTPV2interfaces, and extends route/provider enums to includeCCTP_V2. - Refactors shared CCTP receive logic (
processTransferCCTP) to accept a transmitter address so it can be reused by both V1 and V2. - Updates deployment/upgrade scripts, network configuration, and unit + fork tests to cover CCTP V2 initiation and processing.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
contracts/utils/CCTPV2Adapter.sol |
New adapter implementing CCTP V2 initiation + receive processing via shared CCTP helper. |
contracts/interfaces/ICCTPV2.sol |
Adds V2 interfaces for TokenMessengerV2 (subset) and MessageTransmitterV2. |
contracts/utils/CCTPAdapter.sol |
Refactors processTransferCCTP to accept a messageTransmitter address for V1/V2 reuse. |
contracts/interfaces/IRoute.sol |
Extends Provider enum with CCTP_V2. |
contracts/Repayer.sol |
Switches inheritance to CCTPV2Adapter and adds Provider.CCTP_V2 support for initiate/process. |
contracts/Rebalancer.sol |
Switches inheritance to CCTPV2Adapter and adds Provider.CCTP_V2 support for initiate/process. |
contracts/testing/TestCCTPV2.sol |
Adds V2 mock messenger/transmitter used by unit tests. |
contracts/testing/TestRepayer.sol |
Updates constructor passthrough to include new CCTP V2 constructor params. |
contracts/testing/TestRebalancer.sol |
Updates constructor passthrough to include new CCTP V2 constructor params. |
test/Repayer.ts |
Updates fixtures/route expectations and adds unit tests for CCTP V2 initiate/process + zero-address cases. |
test/Rebalancer.ts |
Updates fixtures/route expectations and adds unit tests for CCTP V2 initiate/process + zero-address cases. |
specific-fork-test/ethereum/Repayer.ts |
Adds fork coverage for CCTP V1 and V2 initiation by asserting Circle DepositForBurn events. |
specific-fork-test/ethereum/RepayerUSDT0.ts |
Updates Repayer constructor arg list to include new trailing CCTP V2 params. |
specific-fork-test/ethereum/RepayerGnosisOmnibridge.ts |
Updates Repayer constructor arg list to include new trailing CCTP V2 params. |
specific-fork-test/arbitrum/RepayerUSDT0.ts |
Updates Repayer constructor arg list to include new trailing CCTP V2 params. |
specific-fork-test/polygon/RepayerUSDT0.ts |
Updates Repayer constructor arg list to include new trailing CCTP V2 params. |
specific-fork-test/unichain/RepayerUSDT0.ts |
Updates Repayer constructor arg list to include new trailing CCTP V2 params. |
specific-fork-test/gnosis/RepayerGnosisOmnibridge.ts |
Updates Repayer constructor arg list to include new trailing CCTP V2 params. |
scripts/common.ts |
Adds numeric mapping for CCTP_V2 provider ID for Solidity/TS interop. |
network.config.ts |
Adds CCTPV2 config shape and populates V2 addresses on supported networks. |
scripts/deploy.ts |
Extends deploy flow to pass CCTP V2 messenger/transmitter constructor params. |
scripts/deployRepayer.ts |
Extends Repayer deployment args to include CCTP V2 config (zero-address defaulted). |
scripts/deployStandaloneRepayer.ts |
Extends standalone Repayer deployment args to include CCTP V2 config (zero-address defaulted). |
scripts/upgradeRepayer.ts |
Extends Repayer upgrade deployment args and defaults config.CCTPV2 when missing. |
scripts/upgradeRebalancer.ts |
Extends Rebalancer upgrade deployment args and defaults config.CCTPV2 when missing. |
coverage-baseline.json |
Updates baseline coverage metrics after adding tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mpetrunic
previously approved these changes
Apr 17, 2026
mpetrunic
approved these changes
Apr 17, 2026
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.
Summary
Adds Circle CCTP V2 as a new cross-chain bridge provider for USDC transfers, alongside the existing CCTP V1 integration.
New contracts
ICCTPV2.sol— Interfaces forTokenMessengerV2andMessageTransmitterV2CCTPV2Adapter.sol— Abstract adapter withinitiateTransferCCTPV2(), using standard transfer parameters (maxFee=0,minFinalityThreshold=2000for hard finality)Architecture
CCTPV2AdapterextendsCCTPAdapter, reusingdomainCCTP()mappings and the sharedprocessTransferCCTP()receive logic — V1 and V2 share the samereceiveMessage(bytes,bytes)signature, so the only difference on the receive side is whichMessageTransmitteraddress to callCCTPAdapter.processTransferCCTP()is parameterized to accept amessageTransmitteraddress instead of hardcoding V1'sRebalancerandRepayernow inheritCCTPV2Adapter(instead ofCCTPAdapter), gaining both V1 and V2 supportProvider.CCTP_V2enum variant inIRouteDeployment & config
cctpV2TokenMessengerandcctpV2MessageTransmitter(zero-address safe for chains without V2)network.config.tsTests
initiateRepay, verifyingDepositForBurnevents from Circle's real deployed contracts