-
Notifications
You must be signed in to change notification settings - Fork 607
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
feat[CL]: add num initialized ticks query #6416
Conversation
devbot help |
Hi! I'm DevBot, a bot that helps with common tasks in the development process. Commands:
|
devbot add changelog feat |
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
|
||
liquidityDepths := []queryproto.TickLiquidityNet{} | ||
|
||
iterationCount := uint64(0) |
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.
Is this still needed?
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.
Yes, iterationCount refers to the user provided literation limit
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.
Ah right, mistook this for the Go-side limit we discussed before
* add num initialized ticks query * update changelog * Generated protofile changes * add max number of initialized ticks to return * Generated protofile changes * remove limit * update query.yml * add go test --------- Co-authored-by: devbot-wizard <[email protected]> Co-authored-by: github-actions <[email protected]> (cherry picked from commit 9f664d7) # Conflicts: # CHANGELOG.md # x/concentrated-liquidity/client/queryproto/query.pb.go
* feat[CL]: add num initialized ticks query (#6416) * add num initialized ticks query * update changelog * Generated protofile changes * add max number of initialized ticks to return * Generated protofile changes * remove limit * update query.yml * add go test --------- Co-authored-by: devbot-wizard <[email protected]> Co-authored-by: github-actions <[email protected]> (cherry picked from commit 9f664d7) # Conflicts: # CHANGELOG.md # x/concentrated-liquidity/client/queryproto/query.pb.go * Generated protofile changes * Update CHANGELOG.md * fix merge conflicts --------- Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Adam Tucker <[email protected]>
Closes: #XXX
What is the purpose of the change
We currently have a LiquidityNetInDirection query, which allows us to provide a start and end tick, traverse this range, and return the liquidity net. The unknown here is how many initialized ticks actually exist in this range.
For purposes of understanding the impact a swap will have on the current sqrt price, it's helpful to request the next X initialized ticks and return their liquidity depths, regaurdless of how many ticks need to be traversed to get to X.
Testing and Verifying
TBD
Documentation and Release Note
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/{module}/README.md
)