API: for Leaderboard, all time Sales Volume per account, and Sort - #92
Open
0xthrpw wants to merge 1 commit into
Open
API: for Leaderboard, all time Sales Volume per account, and Sort#920xthrpw wants to merge 1 commit into
0xthrpw wants to merge 1 commit into
Conversation
Implemented by Gard automated pipeline. Task ID: 110e31d1-b6b6-44be-b09f-fee191737348
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add sales_volume column to leaderboard API and implement sorting by sales volume
Changes
package-lock.jsonservices/api/migrations/seq/0460_add_sales_volume_index.sqlservices/api/src/controllers/leaderboard.tsservices/api/src/routes/__tests__/leaderboard.integration.test.tsservices/api/src/routes/leaderboard.tsservices/api/src/services/__tests__/leaderboard.test.tsservices/api/src/services/leaderboard.tsservices/api/src/types/leaderboard.tsObjectives
Approach
Add sales_volume calculation to the existing leaderboard route by joining with sales data, implementing volume aggregation using PostgreSQL SUM operations, and extending the sortBy parameter to support sales_volume while maintaining backwards compatibility. The implementation will leverage the existing sales table to calculate total ETH volume per address and add this as a new field in the response.
Test Results
Invariants
Automated by Gard | Task ID:
110e31d1-b6b6-44be-b09f-fee191737348