feat: added integration test with actual roots + update of OFT deployment [SV-1468]#299
feat: added integration test with actual roots + update of OFT deployment [SV-1468]#299supervaulter wants to merge 6 commits intodevfrom
Conversation
PR Review — feat: SuperBank integration tests + HyperEVM LZ config updates [SV-1468]Overall this PR is well-structured. The LZ config corrections address a real bug (receive configs were using the wrong ULN objects), and the integration tests provide meaningful end-to-end coverage. A few issues worth flagging before merge. Critical / CorrectnessShell script name vs. function called — likely operator error waiting to happen
Also notable: there is no corresponding shell wrapper for Minor IssuesUnused constant in uint32 constant EXECUTOR_CONFIG_TYPE = 1; // defined but never referencedCan be removed, or used if executor configs will ever need updating via this script. No post-execution config verification The script applies
The assert(computedLeaf == expectedLeafHash);
assert(MerkleProof.verify(proof, root, computedLeaf));Failures from Slippage calculation is opaque In two places: decoded.tokenInfo.outputMin - decoded.tokenInfo.outputMin * 1e4 / 1e5 // extra slippage bufferThis applies a 10% extra haircut on top of whatever Odos already computed for Live API dependency not skippable in CI
function setUp() public {
string memory baseRpc = vm.envOr("BASE_RPC_URL", string(""));
if (bytes(baseRpc).length == 0) {
vm.skip(true);
return;
}
...
}This lets developers run the tests intentionally while keeping CI green when the RPC is unavailable. Positive Notes
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
PR Review: feat/integration-test-superbank-sv-1468Overall this is a well-structured PR that fixes a real LZ ULN configuration bug and adds solid integration test coverage. A few issues worth addressing below.
|
| Scenario | Covered |
|---|---|
| Merkle proof correctness (pure, no fork) | ✅ |
| USDC→UP swap with single-leaf tree | ✅ |
| USDC→UP swap with production merkle tree | ✅ |
| ETH→Base bridge + swap (multi-fork) | ✅ |
| Invalid merkle leaf | ✅ |
| Wrong merkle root | ✅ |
| Slippage failure (outputMin not satisfied) | ❌ Not covered |
The live Odos API dependency (points 1/5 in the PR description risk section) is the main CI concern — tests 2 and 3 will flake if the API is unavailable or returns an unexpected executor. These should ideally be gated behind a separate CI job or tagged to only run on-demand.
Summary: The LZ config fix in DeployUpOFT.s.sol is correct and well-documented. The test infrastructure is solid. The main actionable items are: (1) update SuperBankMerkleTreeValidation to match the production 4-leaf Base SwapOdosV2 tree used in the integration test, (2) switch assert() to Forge assertions in _verifyLeaf, and (3) add console2.log of the executor before proof selection for easier debugging.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Code Review — PR #299Overview: Good PR that fixes an important LZ ULN send/receive config bug and adds high-value integration tests. A few reliability and quality concerns worth addressing.
|
| Area | Severity | Item |
|---|---|---|
DeployUpOFT |
Info | Confirm why Base→HL confirmations changed from 15→10 |
DeployUpOFT |
Info | UpdateHyperEVMLZConfig.s.sol not in diff |
MerkleValidation |
Low | Use assertEq/assertTrue instead of assert() |
SwapIntegration |
Medium | Live Odos API calls make CI flaky — consider env-var gating |
SwapIntegration |
Medium | Proof lookup reverts hard-fail CI; use vm.skip instead |
SwapIntegration |
Low | Slippage calculation warrants an explanatory comment |
SwapIntegration |
Low | Long if-else proof tables will need refactoring as tree grows |
SwapIntegration |
Low | Consolidate or clarify duplicate USDC→UP test variants |
Overall the production ULN fix is correct and well-documented, and the integration test coverage is a meaningful addition. The main concern is the CI reliability of the live-API-dependent tests — strongly recommend env-var gating or vm.skip guards before merging to avoid blocking the main branch on Odos API availability.
Follow-up Review: latest commit (2026-03-13) — V2 ApproveAndSwap hooksPrior reviews covered the LZ ULN config fix and initial test suite. This is a focused update on what is new in the latest commit and issues that remain open. Items from prior reviews still not addressed1. assert() in _verifyLeaf (SuperBankMerkleTreeValidation.t.sol:252-257) Raw Solidity
2. Live Odos API calls without skip guards (SuperBankSwapIntegration.t.sol:651)
3. Slippage formula still uncommented (appears 8+ times)
New issues in the latest commit4. V2 hook address constants placed mid-contract
5. Proof helpers still revert on unknown executor
6. Missing post-condition checks in fork-switch setup helpers
7. New V2 hook trees not validated in SuperBankMerkleTreeValidation.t.sol The V2 Summary
The LZ ULN config fix in DeployUpOFT.s.sol remains correct and well-documented. Items 2 and 5 (live API CI reliability + hard reverts on unknown executors) are the highest-value fixes before merge. |
PR Review — SuperBank Integration Tests + HyperEVM LZ Config [SV-1468]I'll focus on issues not already covered by the existing reviews. CorrectnessMerkle tree mismatch between validation and integration tests
But
These are two different generations of the production tree. Executors
If Odos quotes return executor Minor IssuesCumulative
In every new optionalDVNCount: type(uint8).max,
optionalDVNThreshold: 0,
optionalDVNs: new address[](0)
Stale The comment says: But the root actually set in code is Positive Notes
|
…ment [SV-1468]
Note
Medium Risk
Updates LayerZero ULN confirmation parameters for HyperEVM pathways and adds scripts to apply them on-chain; incorrect values or execution could disrupt cross-chain message delivery. New fork-based integration tests depend on live RPC/Odos quoting, which may increase CI flakiness/timeouts.
Overview
Aligns HyperEVM LayerZero ULN confirmation settings by splitting send vs receive configs in
DeployUpOFT.s.soland updating the HyperEVM↔ETH/Base pathways (e.g., HL→ETH/HL→Base send confirmations to1, Base→HL send to10) so each side’s send confirmations match the other side’s receive confirmations.Adds
UpdateHyperEVMLZConfig.s.solplus a runnable shell wrapper to apply these ULN confirmation updates on HyperEVM viaendpoint.setConfig.Introduces new SuperBank integration coverage: a pure
SuperBankMerkleTreeValidationtest that checks production merkle roots/proofs, and a fork-basedSuperBankSwapIntegrationtest that executes hooks against production deployments (live Odos swap quoting, production merkle roots/proofs, and an ETH→Base Across bridge + swap flow using Pigeon relay).Written by Cursor Bugbot for commit b1e914c. This will update automatically on new commits. Configure here.