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

chore: update exposed db object RewardGuages in x/incentive module #203

Merged
merged 11 commits into from
Oct 17, 2024

Conversation

samricotta
Copy link
Contributor

Part closes: https://github.com/babylonlabs-io/pm/issues/72

Currently some of the objects in the babylon apis are exposed and need to be handled correctly seen in https://github.com/babylonlabs-io/pm/issues/72

This PR handles the exposed objects in x/incentive

Specifically the RewardGuages object.

@samricotta samricotta requested a review from a team as a code owner October 15, 2024 16:33
@samricotta samricotta requested review from gitferry and RafilxTenfen and removed request for a team October 15, 2024 16:33
@samricotta samricotta changed the title chore: update exposed db object RewardGuages in x/incentive module chore: update exposed db object RewardGuages in x/incentive module Oct 15, 2024
@samricotta samricotta marked this pull request as draft October 15, 2024 16:49
Copy link
Contributor

@RafilxTenfen RafilxTenfen left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@RafilxTenfen RafilxTenfen self-requested a review October 15, 2024 16:52
@gitferry gitferry self-requested a review October 16, 2024 01:13
@samricotta samricotta marked this pull request as ready for review October 16, 2024 15:54
Comment on lines +51 to +59
repeated cosmos.base.v1beta1.Coin coins = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
// withdrawn_coins are coins that have been withdrawn by the stakeholder already
repeated cosmos.base.v1beta1.Coin withdrawn_coins = 2 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
Copy link
Contributor

Choose a reason for hiding this comment

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

This Response type is exactly like the RewardGauge should we have two exactly structures just to split from the db used structure? @babylonlabs-io/core-dev

Copy link
Member

Choose a reason for hiding this comment

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

I think this is the case, as the two structs might diverge in the future. If we reuse the same struct now, then it's made difficult if we want to make modifications on API or DB.

Copy link
Contributor

@RafilxTenfen RafilxTenfen left a comment

Choose a reason for hiding this comment

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

LGTM 💯

Copy link
Member

@gitferry gitferry left a comment

Choose a reason for hiding this comment

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

Great work!

@samricotta samricotta merged commit bdf1e52 into main Oct 17, 2024
20 checks passed
@samricotta samricotta deleted the exposed-rw-incentiv branch October 17, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants