Skip to content

feat: return and sort leaderboard by vp_value #1037

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Aug 6, 2025

Toward https://github.com/snapshot-labs/workflow/issues/625
Depends on snapshot-labs/snapshot-sequencer#571

This PR will:

  • return vp value for votes and leaderboard
  • allow sorting the leaderboard by vp value

@wa0x6e wa0x6e requested a review from Copilot August 6, 2025 20:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds VP (voting power) value functionality to the leaderboard system, allowing users to view and sort leaderboard entries by their voting power value.

  • Adds vp_value field to Vote and vpValue field to Leaderboard GraphQL types
  • Includes vp_value as a sortable field in leaderboard operations
  • Updates SQL query to select and return the vp_value column

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/graphql/schema.gql Adds vp_value field to Vote type and vpValue field to Leaderboard type, removes trailing commas from ProposalWhere input
src/graphql/operations/leaderboards.ts Adds vp_value to ORDER_FIELDS array and includes it in the SQL SELECT query

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.

1 participant