pancake-frontend icon indicating copy to clipboard operation
pancake-frontend copied to clipboard

feat: Universal Router Integration

Open chef-ryan opened this issue 3 months ago • 2 comments


PR-Codex overview

This PR focuses on enhancing the universal-router-sdk by introducing new features related to trade configurations, routing commands, and various utility functions. It also refines the command structure for swaps and adds support for v4 features.

Detailed summary

  • Added RoutePlanner class for managing routing commands.
  • Introduced SwapCommandBuilder for building swap commands.
  • Enhanced PancakeSwapTrade to utilize the new swap command structure.
  • Implemented support for v4 swaps and multi-hop paths.
  • Added utility functions for encoding permits and pool keys.
  • Updated trade context parsing to handle new swap structures.
  • Refined command types and constants for better clarity and usage.
  • Added new interfaces for v4 types and parameters.

The following files were skipped due to too many changes: packages/universal-router-sdk/src/abis/UniversalRouter.ts, packages/universal-router-sdk/test/trade.test.ts, packages/universal-router-sdk/test/__snapshots__/trade.test.ts.snap

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

chef-ryan avatar Oct 29 '24 07:10 chef-ryan