Skip to content

feat(backend): Implement event indexing service for pool creation #69

Description

@rafamiziara

Overview

Create shared event indexing service to parse PoolCreated events and store pool data in Firestore.

Tasks

  • Create services/eventIndexer.ts with shared pool indexing logic
  • Implement parsePoolCreatedEvent() to extract pool data from events
  • Implement storePoolInFirestore() with idempotency checks
  • Create utils/blockchain.ts with ethers.js helpers
  • Implement getTransactionReceipt(), getLatestBlockNumber()
  • Add error handling for RPC failures

Acceptance Criteria

  • Service successfully parses PoolCreated events
  • Idempotent storage prevents duplicate pools
  • Handles all supported chains (Polygon Amoy, localhost)
  • Comprehensive error handling for blockchain interactions

Related Documentation

  • See docs/POOL_CREATION_ARCHITECTURE.md Phase 4
  • See docs/POOL_CREATION_TASKS.md Tasks 3, 6

Labels: comp: backend, type: feature

Milestone: Sprint 3: Pool Creation

Part of Epic: #35

Metadata

Metadata

Assignees

Labels

comp: backendIssues for the Firebase Cloud Functions in packages/backendtype: featureNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions