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

Allow querying a specified list of locks for a user #214

Closed
arlai-mk opened this issue Jan 7, 2025 · 4 comments
Closed

Allow querying a specified list of locks for a user #214

arlai-mk opened this issue Jan 7, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@arlai-mk
Copy link
Contributor

arlai-mk commented Jan 7, 2025

Vote aggregators, such as Zephyrus, will likely manage a significant number of user locks within the Hydro platform. Currently, retrieving lock information requires using QueryMsg::AllUserLockups, which can be inefficient and time-consuming for aggregators with a large number of locks.

To improve performance and reduce query latency, it could be good to introduce a new query message: QueryMsg::SomeUserLockups (name can be different).

Suggested QueryMsg::SomeUserLockups parameters:

  • address: The user's (or, in the above case, aggregator's smart contract) address.
  • lock_ids: A vector containing the specific lock_ids for which we want to retrieve lock information.
@p-offtermatt p-offtermatt added the enhancement New feature or request label Jan 7, 2025
@p-offtermatt
Copy link
Member

Great idea!

@arlai-mk
Copy link
Contributor Author

Quick question: would you see it as "erroring out" if we try to pass some lock_ids that do not belong to the user, or just silently skip them?

I was thinking of skipping them, but then I thought this could be the responsibility of the frontend / calling smart contract to make sure that only correct IDs are passed?

@p-offtermatt
Copy link
Member

in general, I think it's easiest to skip. The caller will be able to tell which ones are missing by looking at the list of returns

@dusan-maksimovic
Copy link
Contributor

Done through #216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants