-
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: router #431
base: main
Are you sure you want to change the base?
refactor: router #431
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.
@notJoon Please add a unit test for swap_multi.gno
, swap_single.gno
and wrap_unwrap.gno
.
Functions that use Pool currently doesn't have tests yet. This is because there's no way to directly access and initialize the pool's state for now.
Can you create mockup data in pool
that you can use for testing purposes in router
? This seems essential tests. Think about a way to complete tests for this please.
Quality Gate passedIssues Measures |
func i256Min(x, y *i256.Int) *i256.Int { | ||
if x.Lt(y) { | ||
return x | ||
} | ||
return y | ||
} | ||
|
||
func i256Max(x, y *i256.Int) *i256.Int { | ||
if x.Gt(y) { | ||
return x | ||
} | ||
return y | ||
} | ||
|
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.
needs to be moved to the common
package. maybe common/math
?
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.
How about we make gnsmath
and gnsutils
in the root folder and put math related files to gnsmath
, util related files to gnsutils
?
Description
Refactor
route
file mainly.Remove
compute_routes
andgno_helper
files_swap
functions and renamed them toswapInner
DrySwapRoute
function and related methodsUpdate
"EXACT_IN"
,"EXACT_OUT"
strings. Additionally replace other hardcoded values with constants_helper_test
file for testing purposeFunctions that use
Pool
currently doesn't have tests yet. This is because there's no way to directly access and initialize the pool's state for now.