Merged
Conversation
viatrix
previously approved these changes
Apr 6, 2026
mpetrunic
previously approved these changes
Apr 7, 2026
There was a problem hiding this comment.
Pull request overview
Adds USDT0 bridging support to the Repayer via a new LayerZero OFT-based adapter, including unit tests and fork tests, and updates deployment/upgrade scripts to pass the new configuration parameter.
Changes:
- Introduce
USDT0Adapter+IOFT/ILayerZerointerfaces and addProvider.USDT0routing inRepayer. - Refactor Stargate endpoint ID mapping into a shared
LayerZeroHelperused by multiple adapters. - Add unit + fork tests and extend deployment/upgrade scripts/config to include
USDT0OFT.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| contracts/Repayer.sol | Adds USDT0Adapter inheritance and dispatch for Provider.USDT0. |
| contracts/utils/USDT0Adapter.sol | New adapter to send USDT0 via LayerZero OFT. |
| contracts/utils/LayerZeroHelper.sol | Centralizes LayerZero endpoint-id mapping. |
| contracts/utils/StargateAdapter.sol | Switches to LayerZeroHelper mapping for dstEid. |
| contracts/interfaces/IOFT.sol | New minimal OFT interface used by USDT0 adapter/tests. |
| contracts/interfaces/ILayerZero.sol | New shared structs for LayerZero/OFT operations. |
| contracts/interfaces/IStargate.sol | Reuses LayerZero structs via import instead of redefining. |
| contracts/interfaces/IRoute.sol | Extends Provider enum with USDT0. |
| contracts/testing/TestUSDT0OFT.sol | Adds test token + OFT adapter/native mocks for unit tests. |
| contracts/testing/TestRepayer.sol | Updates constructor args to include usdt0Oft. |
| test/Repayer.ts | Updates constructor arg count, renames endpoint getter, adds USDT0 unit tests. |
| specific-fork-test/ethereum/RepayerUSDT0.ts | New Ethereum fork test for USDT→USDT0 OFT flow. |
| specific-fork-test/unichain/RepayerUSDT0.ts | New Unichain fork test for USDT0 bridging. |
| specific-fork-test/arbitrum/RepayerUSDT0.ts | New (skipped) Arbitrum fork test for USDT0 bridging. |
| specific-fork-test/polygon/RepayerUSDT0.ts | New (skipped) Polygon fork test for USDT0 bridging. |
| specific-fork-test/gnosis/RepayerGnosisOmnibridge.ts | Updates Repayer constructor arg list (adds ZERO_ADDRESS). |
| specific-fork-test/ethereum/RepayerGnosisOmnibridge.ts | Updates Repayer constructor arg list (adds ZERO_ADDRESS). |
| specific-fork-test/ethereum/Repayer.ts | Updates Repayer constructor arg list (adds ZERO_ADDRESS). |
| scripts/deploy.ts | Passes USDT0OFT into Repayer deploy args and defaults to ZERO_ADDRESS. |
| scripts/deployRepayer.ts | Passes USDT0OFT into Repayer deploy args and defaults to ZERO_ADDRESS. |
| scripts/deployStandaloneRepayer.ts | Passes USDT0OFT into Repayer deploy args and defaults to ZERO_ADDRESS. |
| scripts/upgradeRepayer.ts | Passes USDT0OFT into Repayer upgrade args and defaults to ZERO_ADDRESS. |
| scripts/common.ts | Adds ProviderSolidity.USDT0 mapping. |
| network.config.ts | Adds USDT0OFT addresses per-network. |
| package.json | Adds fork-test scripts for Arbitrum/Polygon/Unichain. |
| .env.example | Adds fork-test env vars for USDT/USDT0 holders. |
| coverage-baseline.json | Updates stored coverage baseline values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mpetrunic
approved these changes
Apr 7, 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.
Closes: #174