-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(refactor): Refactor and improve documentation (#40)
* Update package versions and reorganize imports The 'uniswap-v3-sdk' version has been updated to 0.25.0, along with other dependencies like 'base64' and 'ruint'. The code has also been revised to use 'alloy_primitives' for 'hex' and 'uint' imports, to bring some consistency to the modular imports. Changes have also been made on how 'pool' features are imported in 'entities/mod.rs'. * Add benchmarks to README A section for performance benchmarks has been added to the README file. It includes a detailed table showing the time taken and reference time for different functions, which can be expanded for viewing. * Refactor pool, route and position entities code Removed dependence on mutable self in methods for Pool, Route, and Position objects. Price-deriving methods in the Pool object were simplified to always calculate price instead of storing it. Also, the Debug and PartialEq trait implementations were relocated to follow Rust idioms. * Add features section to documentation A "Features" section has been added to the initial comments in the lib.rs file. This section outlines several important functionalities of the Rust Uniswap V3 SDK, such as its usage of alloy-rs types, the reimplementation of math libraries, the unit tests, benchmarks and extended capabilities for additional Uniswap V3 related functionalities. * Add doctest for `compute_pool_address` The function compute_pool_address now includes comprehensive usage examples directly in its documentation. This provides clear, practical guidance for developers on how to use the function. The related tests that were previously in a separate module have been removed as they are now redundant.
- Loading branch information
Showing
11 changed files
with
151 additions
and
137 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.