Skip to content
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

Exit Pool #93

Merged
merged 15 commits into from
Sep 21, 2023
Merged

Exit Pool #93

merged 15 commits into from
Sep 21, 2023

Conversation

johngrantuk
Copy link
Member

No description provided.

@johngrantuk johngrantuk changed the base branch from join to refactor-common-pools September 19, 2023 15:23
return {
minAmountsOut: Array(tokens.length).fill(0n),
tokenOutIndex: tokens.findIndex(
(t) => t.address === input.tokenOut.toLowerCase(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would try to move sanitizing of input outside of the individual implementations. This isn't something we want to remember to do at this level, imo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pointer, added isSameAddress to Token implementation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, but it'd be nicer if sanitize happened before it ever got to weightedExit, so we don't even need to worry about this.

Base automatically changed from refactor-common-pools to join September 20, 2023 08:15
Copy link
Collaborator

@danielmkm danielmkm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks really good. Clean and easy to read.

@johngrantuk johngrantuk marked this pull request as ready for review September 20, 2023 09:24
@johngrantuk johngrantuk changed the title WIP: Exit Pool Exit Pool Sep 20, 2023
@danielmkm
Copy link
Collaborator

Did a small refactor to show how we can create an intermediate layer to move some of the duplicate logic that will be in all exit types to a higher level. #96

@johngrantuk johngrantuk merged commit f8ede7c into join Sep 21, 2023
3 of 4 checks passed
@johngrantuk johngrantuk deleted the exit branch September 21, 2023 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants