-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: dry swap #421
refactor: dry swap #421
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add test cases that Dryswap()
and Swap()
will return same amount ?
…qrtRatio calculations - fix bug of test case in position_modify_test - remove print log
- Changing variable names by applying refactoring rules - Removing paths from error messages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test cases run successful with my env 👍
left some comments, but minor thing (does not affect logic)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I left some minor comments; don't have to apply these now.
Co-authored-by: Lee ByeongJun <[email protected]>
Quality Gate passedIssues Measures |
@notJoon Updated the description of the comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* remove duplicate functions * GSW-1838 refactor: Using the new constructor to protect raw data in sqrtRatio calculations * GSW-1838 refactor: need to lock pool.slot0 to prevent re-entry * refactor: Using clone data to protect original data * refactor: remove unused import * fix: sqrtRatio calculation default value issue * refactor: swap and swap math * refactor: computeSwapStep - edge case test (amount : zero and over liquidity) - EXACT IN / EXACT OUT Case * refactor: Separate pool transfer-related test code * refactor: Rename a receiver function param and liquidity math bug fix - Fix absolute value before checking if delta value is negative to fix handling error issue if negative. - Rename the param in the receiver function from pool to p. * refactor: Changed large numbers to const for readability & removed some comments * refactor: Remove unnecessary function usage * refactor: Fix error messages to make their meaning clear --------- Co-authored-by: 0xTopaz <[email protected]> Co-authored-by: 0xTopaz <[email protected]> Co-authored-by: Blake <[email protected]>
Description
Swap
function