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

[Feature]: add GetEpochInfo to get Epoch Info by identifier #22041

Closed
Narangde opened this issue Oct 2, 2024 · 5 comments · Fixed by #22068
Closed

[Feature]: add GetEpochInfo to get Epoch Info by identifier #22041

Narangde opened this issue Oct 2, 2024 · 5 comments · Fixed by #22068

Comments

@Narangde
Copy link

Narangde commented Oct 2, 2024

Summary

There is no getter of epoch info in epochs module.
As implemented in Osmosis, request to add GetEpochInfo to get epoch by identifier in epochs module.

Problem Definition

No getter in epochs module

Proposed Feature

Add implementation of GetEpochInfo to get epoch info by identifier in epochs module.

@julienrbrt
Copy link
Member

Hey, you can use collections for that: epochsKeeper.EpochInfo.Get(ctx, id)

@julienrbrt
Copy link
Member

The Osmosis implementation doesn't use the latest feature of the SDK for state management (collections)

@Narangde
Copy link
Author

Narangde commented Oct 3, 2024

@julienrbrt Right, we can use simply epochsKeeper.EpochInfo.Get(ctx, id).

However, �when using the epochs module in another module, this getter is probably needed to get the epoch info. What do you think?

@julienrbrt
Copy link
Member

However, �when using the epochs module in another module, this getter is probably needed to get the epoch info. What do you think?

Right, this is expected with collections. ref #20905.

@julienrbrt
Copy link
Member

Feel free to open a PR to do a simple wrap in the meantime 👍🏾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🥳 Done
Development

Successfully merging a pull request may close this issue.

2 participants