Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Routing #58
Routing #58
Changes from 15 commits
b6f8d3b
d5dc31a
2ca710a
664d2c2
8b687b8
1717039
2549c3a
e1c46fd
8aae01b
5823d2f
7e25390
607ea3b
cf82527
9ebc9d5
54a48e5
01a5db0
31cbfe5
d50f18d
4b010ff
7c6675b
aa148b3
1586c0d
06961bf
528f15d
0ac638a
1844d70
86039e4
90f3f35
50372c7
64f4645
e92b023
8283fb6
7aacd94
f2a3dd8
4792d1c
903d5fa
f1c4746
4b7d019
f555329
9c11de4
b2fdb51
963c360
eb801c7
86fd91a
22c0879
3a4c36d
e86036b
2236812
456d0c8
9e5e418
5ceaadf
20224d7
d02049b
ff206ec
09b2e23
b51f0ea
b625d74
d1d66ec
e2ae6d3
7094a75
9ee5768
f14c6f0
7545fa3
a92da59
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
ugh i dislike that this is from
n
to1
notn-1
to0
... but I see the issue.I guess it could be
for (uint256 i = params.path.length-1; i < params.path.length; i--) {
but thats also ugly so i guess theres no good way 😂
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.
dude yah, I actually searched all Uniswap for
i--
to see how ppl deal with this type of thing. And I found ANOTHER POC v4 router that Pote wrote ages ago and he did the same thing bahaThere 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.
I feel like this is typical for for loops iterating backwards through the path though.. like doesn't seem too weird to me. Is there a reason we force it to be backwards though? I guess compatibility with how other routers work but there is no reason we couldn't just encode the path the other way also