Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Update DPoS endpoints #7673

Closed
Tracked by #7622
shuse2 opened this issue Oct 19, 2022 · 0 comments
Closed
Tracked by #7622

Update DPoS endpoints #7673

shuse2 opened this issue Oct 19, 2022 · 0 comments
Assignees
Milestone

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Oct 19, 2022

Description

  • getGovernanceTokenID
    Obtain from module config
    Res
{
  tokenID: 'hex string'
}
  • getValidatorsByStake
    Obtain from eligibleDelegateStore and delegateStore

Req

{
limit?: number, 
}

Res

{
  validators: [{
      address: lisk32,
      name: string;
	totalVotesReceived: bigint;
	selfVotes: bigint;
	lastGeneratedHeight: number;
	isBanned: boolean;
	pomHeights: number[];
	consecutiveMissedBlocks: number;
  }]
}
  • getLockedRewards

Req

{
  address: lisk32 
  tokenID: 'hex string',
}

Res

{
  reward: 'number string',
}
  • getLockedVotedAmount

Req

{
  address: lisk32 
}

Res

{
  amount: 'number string',
}

Ref: https://github.com/LiskHQ/lips/blob/main/proposals/lip-0057.md#getlockedvotedamount

Acceptance Criteria

  • All endpoints are covered by unit tests

Additional Information

For getClaimableRewards and getLockedRewards the definitions are in proposed LIP

@shuse2 shuse2 added this to the Sprint 81 milestone Oct 24, 2022
@shuse2 shuse2 marked this as a duplicate of #7716 Nov 2, 2022
@shuse2 shuse2 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2022
@shuse2 shuse2 removed this from the Sprint 81 milestone Nov 2, 2022
@shuse2 shuse2 reopened this Nov 2, 2022
@shuse2 shuse2 added this to the Sprint 81 milestone Nov 2, 2022
@shuse2 shuse2 self-assigned this Nov 3, 2022
shuse2 added a commit that referenced this issue Nov 7, 2022
### What was the problem?

This PR resolves #7673 

### How was it solved?

- Update TokenIDDPoS to GovernanceTokenID to be consistent with
endpoint.
- Fix GenvernanceTokenID to be default to first native token
- Add metadata for new endpoints and missing endpoints
- Add endpoints defined in the issue

### How was it tested?

- Add tests for the new endpoints
@shuse2 shuse2 closed this as completed Nov 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant