Skip to content

Implemented community poll indexer and results REST API - #1204

Merged
Chucks1093 merged 7 commits into
accesslayerorg:mainfrom
DioChuks:feat/communitypoll-indexer
Oct 22, 2026
Merged

Chucks1093 merged 7 commits into
accesslayerorg:mainfrom
DioChuks:feat/communitypoll-indexer

Conversation

@DioChuks

Copy link
Copy Markdown
Contributor

Summary

Implemented community poll indexing and the REST read API.

Existing coverage: the repository had governance proposal/vote indexing and a poll-weight estimate endpoint, but neither handled the requested PollCreated, PollVoteCast, and PollClosed events or returned poll tallies and recorded wallet votes.

Changes made:

  • Added key_polls and poll_votes Prisma models and a migration: community-poll.prisma, migration.sql.
  • Added poll event indexing and pipeline dispatch, with replay-safe writes and key-scoped cache invalidation: key-poll-indexer.service.ts.
  • Added the polls list, poll detail, and wallet vote-status endpoints. Responses include expiry/status, vote counts, weight tallies, per-option results, and the wallet’s recorded option and weight: key-polls.routes.ts, key-polls.service.ts.
  • Set poll response caches to 30 seconds, including the existing weight endpoint, and documented the routes in api-endpoints.md.

Validation: Prisma schema validation and client generation passed; pnpm build and ESLint passed; targeted Jest tests passed (5 suites, 28 tests); git diff --check passed. The migration is added but has not been applied to a database.

Closes #1135

Testing

  • pnpm lint
  • pnpm build
  • pnpm exec prisma generate when schema or generated types changed

Checklist

  • Linked issue or backlog item
  • No secrets or live credentials added
  • Docs updated if setup or env changed
  • Change is scoped to one problem

@drips-wave

drips-wave Bot commented Oct 22, 2026

Copy link
Copy Markdown

@DioChuks 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! 🚀

Learn more about application limits

@Chucks1093
Chucks1093 merged commit 1d5fa6f into accesslayerorg:main Oct 22, 2026
2 checks passed
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.

Implement community poll indexer and results REST API

2 participants