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

329 handle intermediate states #412

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

totraev
Copy link
Contributor

@totraev totraev commented Nov 29, 2024

No description provided.

@totraev totraev marked this pull request as draft November 29, 2024 16:11
@totraev totraev force-pushed the 329-handle-intermediate-states branch from 32c7fe3 to 38d4806 Compare November 29, 2024 16:21
@totraev totraev force-pushed the 329-handle-intermediate-states branch from 38d4806 to 3d37d2a Compare November 29, 2024 16:37
Comment on lines 66 to 94
export const DELEGATION_STATUSES = {
[DelegationV2StakingState.PENDING]: 0,
[DelegationV2StakingState.INTERMEDIATE_PENDING_VERIFICATION]: 0,
[DelegationV2StakingState.VERIFIED]: 1,
[DelegationV2StakingState.INTERMEDIATE_PENDING_BTC_CONFIRMATION]: 2,
[DelegationV2StakingState.ACTIVE]: 3,

[DelegationV2StakingState.INTERMEDIATE_UNBONDING_SUBMITTED]: 4,
[DelegationV2StakingState.EARLY_UNBONDING]: 5,
[DelegationV2StakingState.EARLY_UNBONDING_WITHDRAWABLE]: 6,
[DelegationV2StakingState.INTERMEDIATE_EARLY_UNBONDING_WITHDRAWAL_SUBMITTED]: 7,
[DelegationV2StakingState.EARLY_UNBONDING_WITHDRAWN]: 8,

[DelegationV2StakingState.EARLY_UNBONDING_SLASHED]: 9,
[DelegationV2StakingState.EARLY_UNBONDING_SLASHING_WITHDRAWABLE]: 10,
[DelegationV2StakingState.INTERMEDIATE_EARLY_UNBONDING_SLASHING_WITHDRAWAL_SUBMITTED]: 11,
[DelegationV2StakingState.EARLY_UNBONDING_SLASHING_WITHDRAWN]: 12,

[DelegationV2StakingState.TIMELOCK_UNBONDING]: 13,
[DelegationV2StakingState.TIMELOCK_WITHDRAWABLE]: 14,
[DelegationV2StakingState.INTERMEDIATE_TIMELOCK_WITHDRAWAL_SUBMITTED]: 15,
[DelegationV2StakingState.TIMELOCK_WITHDRAWN]: 16,

[DelegationV2StakingState.TIMELOCK_SLASHED]: 17,
[DelegationV2StakingState.TIMELOCK_SLASHING_WITHDRAWABLE]: 18,
[DelegationV2StakingState.INTERMEDIATE_TIMELOCK_SLASHING_WITHDRAWAL_SUBMITTED]: 19,
[DelegationV2StakingState.TIMELOCK_SLASHING_WITHDRAWN]: 20,
} as const;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jrwbabylonlab and this

Comment on lines +53 to +54
EARLY_UNBONDING_SLASHED = "EARLY_UNBONDING_SLASHED",
TIMELOCK_SLASHED = "TIMELOCK_SLASHED",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jrwbabylonlab we need discuss this

Copy link
Collaborator

Choose a reason for hiding this comment

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

As discussed, this two can be removed and use the single slashed for both types

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.

LGTM, feel free to merge after remove the unused EARLY_UNBONDING_SLASHED and TIMELOCK_SLASHED

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