add leaderboard rebuild job#271
Open
barry01-hash wants to merge 14 commits into
Open
Conversation
…plementation-drips Scaffolds the workspaces where backend + oracle work will land: - backend/ Fastify REST API (Node/TS) — package.json, tsconfig, .env.example, stub entry - indexer/ Soroban getEvents indexer — same scaffold - oracle/ council aggregator + data adapters + monitor — same scaffold - db/ shared Postgres migrations dir + schema README - infra/ docker-compose.dev.yml (Postgres + Redis) + README - CONTRIBUTING.md describing the implementation-drips workflow - .gitignore: ignore dist/ for the new TS services No GitHub Actions added. All future work targets the implementation-drips branch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ion issues - scripts/gen_issues.py — generates all 260 issues (context, what-to-build, acceptance criteria, file location, PR-target reminder) with area/priority labels + phase milestones. Idempotent: skips titles that already exist. Modes: --dry-run, --sample N, or full run. - scripts/create-issues.sh — TSV-driven alternative creator. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(db): add idempotent local seed script for development data (Akanimoh12#8)
fix(db): implement typed paginated getMarkets query (Akanimoh12#12)
Implement typed, parameterized data-access function for leaderboard upserts in a simulated/local layer. Changes: - Add backend/package.json with typescript, vitest, @types/node - Add backend/tsconfig.json with strict mode and @/ alias - Add backend/vitest.config.ts for test runner config - Add backend/src/db/leaderboard.ts with: - upsertLeaderboardEntry(address, pointsDelta, outcome) - getLeaderboardEntry(address) helper - clearLeaderboard() test helper - LeaderboardEntry and TransactionResult types - Add backend/src/__tests__/leaderboard.test.ts with 8 tests: - New entry creation - Points accumulation - Win/loss counter increments - Mixed outcomes - Validation (empty address, negative points) All inputs are parameterized (no string interpolation). TypeScript: 0 errors. Tests: 8/8 passing.
Implement typed, parameterized data-access function for paginated bet retrieval by market in the simulated/local layer. Changes: - Add backend/src/db/bets.ts with: - getBetsByMarket(marketId, page, limit) — 0-based pagination - PaginatedBets response type (bets, total, page, limit, totalPages) - Bet interface (address, amount, isYes, claimed) - seedBets() and clearBets() test helpers - Add backend/src/__tests__/bets.test.ts with 10 tests: - First page retrieval - Second page retrieval - Partial last page - Empty result for unseeded market - Limit exceeding total - Out-of-range page - Negative marketId validation - Negative page validation - Zero limit validation - Market isolation All inputs are parameterized (no string interpolation). TypeScript: 0 errors. Tests: 18/18 passing.
Query/get bets by market
…sert-query feat(backend): add upsertLeaderboardEntry query function
|
@barry01-hash Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
Author
|
Please merge |
|
@barry01-hash is attempting to deploy a commit to the akanimoh12's projects Team on Vercel. A member of the Team first needs to authorize it. |
Owner
|
Please read the branch you will make pr to |
Contributor
Author
|
Please merge |
Owner
Make pr to implementation-drips branch not main |
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.
Closes #50