Skip to content

feat: implement event sourcing architecture - #234

Merged
rohan911438 merged 3 commits into
Stellar-Prex:mainfrom
Godsmiracle001:feature/issue-220-event-sourcing
Jul 25, 2026
Merged

feat: implement event sourcing architecture#234
rohan911438 merged 3 commits into
Stellar-Prex:mainfrom
Godsmiracle001:feature/issue-220-event-sourcing

Conversation

@Godsmiracle001

Copy link
Copy Markdown
Contributor

Replaces scattered logging with a centralized event sourcing architecture capable of reconstructing market state.

Closes #220

});

await event.save();
logger.debug(`Appended event ${eventType} for market ${marketId} (seq: ${sequenceNumber})`);

return event;
} catch (error) {
logger.error(`Failed to append event ${eventType} for market ${marketId}:`, error);
await eventSourcingService.appendEvent(marketId, 'TRADE_EXECUTED', { amount }, trade.userWalletAddress);

// Update current prices based on latest trades
const pricePayload = {};
Comment thread backend/src/services/eventSourcingService.js Fixed
Comment thread backend/src/services/eventSourcingService.js Fixed
Comment thread backend/src/services/contractEventIndexer.js Fixed
@rohan911438
rohan911438 merged commit 80ad048 into Stellar-Prex:main Jul 25, 2026
5 of 10 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.

Design Protocol-Wide Event Sourcing System

3 participants