-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add swap router and modify trade minimum amount calculation This commit introduces the swap router module that provides the functionality to generate call parameters for a trade. It also modifies the `minimum_amount_out` method in `trade.rs` by adding an optional `amount_out` argument. This allows us to either use a given amount or calculate the output amount based on the current trade. The changes to the function is also reflected in all relevant test cases. The package version is updated to 0.23.0. * Refactor test cases to use a common test utility module Refactored the test cases across various modules to use a newly introduced common test utility module. This change reduces code duplication and simplifies the tests. The common test utility module centralizes the definition of frequently used entities such as tokens and pools.
- Loading branch information
Showing
15 changed files
with
466 additions
and
329 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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.