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: granular delegation states #135

Merged
merged 7 commits into from
Nov 25, 2024
Merged

feat: granular delegation states #135

merged 7 commits into from
Nov 25, 2024

Conversation

gusin13
Copy link
Contributor

@gusin13 gusin13 commented Nov 24, 2024

This PR makes some changes in v2 delegations endpoint

  • consumes indexer states (state, sub state) and converts to flattened state
  • expose inception time

@gusin13 gusin13 marked this pull request as ready for review November 24, 2024 17:04
StakingOutputIdx uint32 `bson:"staking_output_idx"`
UnbondingTime uint32 `bson:"unbonding_time"`
UnbondingTx string `bson:"unbonding_tx"`
State indexertypes.DelegationState `bson:"state"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

@gusin13 I thought you were planning to store a list of the states this delegation has gone through? Or are you planning to address that in a separate PR later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep that will be separate task
babylonlabs-io/babylon-staking-indexer#70

btw although after above ticket is done full list will be available in indexer db, but api won't access or return to fe? or do you think we should return this info to fe?

// Slashed states
StateTimelockSlashed DelegationState = "TIMELOCK_SLASHED"
StateEarlyUnbondingSlashed DelegationState = "EARLY_UNBONDING_SLASHED"
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

fyi @totraev the states that API will return

Copy link
Collaborator

@jrwbabylonlab jrwbabylonlab left a comment

Choose a reason for hiding this comment

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

Amazing!

@gusin13 gusin13 merged commit ac145a0 into main Nov 25, 2024
11 checks passed
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.

2 participants