Add platform activity feed, governance escalation, factory registry, and LP position endpoints - #994
Merged
Chucks1093 merged 4 commits intoSep 28, 2026
Conversation
GET /activity/feed returns the last 20 platform events (investment, settlement, new_listing, fully_funded), reverse-chronological with cursor pagination for older pages. Maps ActivityType enum values onto the public event type strings and caches the uncursored first page for 30s, invalidated from the trade and dividend indexers on new activity.
…org#935) Adds escalationCount/originalDeadline/extendedDeadline/maxEscalations/ escalatedAt to GovernanceProposal, a governance-escalation-indexer service that syncs state from ProposalExtended contract events (with its own EventLog for idempotency) and logs a structured admin alert at max escalations, and GET /governance/proposals/escalating returning escalating proposals with participation rate (vote weight sum / totalVotingWeight). Also registers the new governance, factory, and lp routers in modules/index.ts (all three land in this branch together).
New FactoryDeployedKey model plus factory-indexer.service.ts syncing KeyDeployed contract events into it. GET /factory/keys?creator= lists keys deployed by a wallet in deployment order; GET /factory/keys/:contractAddress returns the factory summary (is_factory_key: true) or falls back to the general RegisteredKey lookup (is_factory_key: false), 404 only when the address isn't a key anywhere. Threads is_factory_key through the existing key summary (getCreatorProfile in creator-profile.service.ts) by checking the factory registry keyed by the profile id.
New LpPosition/LpEventLog models plus lp-indexer.service.ts handling LP_ADDED/LP_CLAIMED/LP_REMOVED events. accrueLpRewards pro-rates a simplified reward pool across active positions by sharePercent, called from trade-indexer.service.ts after each processed trade. GET /lp/positions?wallet= and GET /lp/positions/:lpId are JWT-auth'd and wallet-scoped (404 on any not-owned/not-found lpId, no existence leakage); GET /lp/pool/:keyId is public and returns pool size plus a clearly-labelled simplified APR estimate. Also adds the combined migration for all four issues' schema changes (activity SUPPLY_FULLY_FUNDED enum value, governance escalation fields + GovernanceEscalationEventLog, FactoryDeployedKey, LpPosition/ LpEventLog).
|
@Depo-dev 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! 🚀 |
5 tasks
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
GET /activity/feed— reverse-chronological platform activity feed (investment/settlement/new_listing/fully_funded), cursor pagination, 30s cachedGET /governance/proposals/escalating— governance proposals in quorum escalation with extended deadline, escalation count, participation rateGET /factory/keysandGET /factory/keys/:contractAddress— key factory deployment registry,is_factory_keyflag on key responsesGET /lp/positions,GET /lp/positions/:lpId,GET /lp/pool/:keyId— LP position and rewards APICloses #936, closes #935, closes #983, closes #980
Notes
mainhas a pre-existing issue unrelated to this PR (shadow-DB replay fails from scratch due to earlier migration gaps); schema changes here were validated viadb push+ introspection diff against the hand-written migration SQL.is_factory_keyis threaded through the creator profile key summary; not yet threaded through every key-listing call site.Test plan
tscbuild passes