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

feat: add tick data to Lp output #45

Merged
merged 4 commits into from
Feb 15, 2024
Merged

feat: add tick data to Lp output #45

merged 4 commits into from
Feb 15, 2024

Conversation

ethzoomer
Copy link
Contributor

Adding the amount of liquidity in the ticks surrounding the current tick

@ethzoomer ethzoomer requested a review from stas February 12, 2024 13:27
Copy link
Collaborator

@stas stas left a comment

Choose a reason for hiding this comment

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

Some minor suggestions, otherwise looks great! Would be great if you can merge it with the new deployment address 🙌

return self._price(_pool)
else:
empty_prices: DynArray[Price, MAX_PRICES] = empty(DynArray[Price, MAX_PRICES])
return empty_prices
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can return directly empty(...) here

@@ -999,37 +995,20 @@ def _is_cl_factory(_factory: address) -> (bool):

@external
@view
def prices(_limit: uint256, _offset: uint256) -> DynArray[LpPrice, MAX_POOLS]:
def price(_pool: address, _factory: address) -> DynArray[Price, MAX_PRICES]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd suggest keeping the name prices() as the return value is a list.

@ethzoomer ethzoomer merged commit 1f2638d into v3 Feb 15, 2024
2 checks passed
@stas stas deleted the DAPP-336 branch February 27, 2024 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants