Skip to content

Conversation

@github-actions
Copy link

Automatic Release PR

This PR was automatically created after changes were pushed to develop.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

Yannick1712 and others added 2 commits January 30, 2026 15:47
* [DEV-4545] dfxApproval kyc bug

* [DEV-4545] Refactoring
…idging (#3054)

* feat(liquidity): add LayerZero bridge adapter for Ethereum->Citrea bridging

Add support for bridging USDC, USDT, and WBTC from Ethereum to Citrea
using LayerZero OFT (Omnichain Fungible Token) protocol.

- Add LAYERZERO_BRIDGE to LiquidityManagementSystem enum
- Create LayerZeroBridgeAdapter with deposit command
- Add LayerZero OFT adapter ABI (quoteSend, send, approvalRequired)
- Configure OFT adapter addresses for USDC, USDT, WBTC
- Support token approval and fee quoting

* fix(liquidity): improve LayerZero adapter robustness

- Fix validateParams to handle undefined params
- Fix quoteSend return value (returns tuple, not array)
- Improve checkCompletion with better error handling and logging
- Add output amount verification in completion check

* style: fix prettier formatting

* refactor(liquidity): align LayerZero adapter with codebase conventions

- Export LayerZeroBridgeCommands enum (consistent with other adapters)
- Use switch statement in validateParams (consistent with DfxDexAdapter)
- Throw error for unknown commands (consistent with other adapters)

* fix(liquidity): improve LayerZero adapter professionalism

- Throw OrderFailedException for failed Ethereum TX (not just return false)
- Add ETH balance check before bridge execution
- Extract token approval into separate method with proper error handling
- Re-throw OrderFailedException in checkCompletion (don't swallow it)
- Add logging for approval confirmation
- Add detailed error messages for insufficient funds

* refactor(liquidity): align LayerZero adapter with existing bridge patterns

- Remove unnecessary service storage (only store clients, like ArbitrumL2BridgeAdapter)
- Align checkCompletion error handling with EvmL2BridgeAdapter (throw OrderFailedException)
- Simplify validateParams to match EvmL2BridgeAdapter pattern (return true)

* fix(liquidity): prevent double-wrapping OrderFailedException in approval

* chore: refactoring/fixes

---------

Co-authored-by: David May <david.leo.may@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants