-
Notifications
You must be signed in to change notification settings - Fork 29
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(sdk): amm #217
refactor(sdk): amm #217
Conversation
d8616d8
to
76cff7d
Compare
a4c3b4f
to
9ecb291
Compare
ae6eb07
to
a3fa721
Compare
8ee1308
to
537e196
Compare
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.
Overall looks much cleaner, thanks! Will be great to eventually migrate other functionality to this structure too. Will approve once all tests are refactored.
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.
All tests passing, nice!
This PR aims to simplify the SDK's AMM API to be more self-documenting and obvious.
The previous API had some awkwardness around static methods / when state would get refreshed, etc. It required reading the pool from the chain just to initialize (vs. being able to just construct a pool with uninitialized state)
This refactor makes it so everything is a method and tries to separate querying metadata about the pool and the actual pool's state.