Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add route encoding to path and update dependencies Added a new utility function to encode routes to paths. This is useful when making swaps and trades on Uniswap's routes. Updated several dependencies to their latest versions, including the uniswap-sdk-core. Also created relevant tests for the new utility. * Add Quoter module A new module named Quoter has been introduced. This module provides functionality for determining on-chain method name and parameters for the appropriate function within QuoterV2. It has been integrated into the prelude for easier access throughout the codebase. * Add unit tests for trade input in quoter.rs Unit tests are added to verify the functionality of trade input in quoter.rs file. It covers both the single and multi-hop scenarios of exact input and output. It also tests different square root price limits and use of quoter version 2. All of these tests ensure that interaction with the Uniswap protocol works correctly. * Refactor code to use references instead of cloning The code has been refactored to pass routes and trade parameters by reference instead of cloning. This change helps improve efficiency by avoiding unnecessary data duplication. The changes touch on the `encode_route_to_path` function, the `quote_call_parameters` function and related tests, ensuring that each function and method now receives a reference to a route or trade, instead of a cloned object.
- Loading branch information