Skip to content

Conversation

@marcomariscal
Copy link
Collaborator

Summary

Resolves #88 by adding timestamp field support to subgraph announcements.

Changes

  • ✅ Add required timestamp field to SubgraphAnnouncementEntity type
  • ✅ Update GraphQL query to request timestamp from subgraph
  • ✅ Extend AnnouncementLog interface with optional timestamp field
  • ✅ Update conversion function to handle timestamp conversion to BigInt
  • ✅ Add comprehensive tests for timestamp handling
  • ✅ Use Number.parseInt() for safer numeric conversions
  • ✅ All integration tests pass with real subgraph data

Architecture Decision

  • SubgraphAnnouncementEntity.timestamp is required since subgraphs always provide it
  • AnnouncementLog.timestamp is optional to support both data sources:
    • Subgraph queries: include timestamp
    • Direct blockchain logs: no timestamp available

Test Results

  • ✅ All unit tests pass (8/8)
  • ✅ All integration tests pass against real subgraphs
  • ✅ TypeScript compilation successful
  • ✅ Linting checks pass
  • ✅ Successfully tested with subgraphs containing 934 total announcements

🤖 Generated with Claude Code

Resolves #88 by adding timestamp field support to subgraph announcements.

Changes:
- Add required timestamp field to SubgraphAnnouncementEntity type
- Update GraphQL query to request timestamp from subgraph
- Extend AnnouncementLog interface with optional timestamp field
- Update conversion function to handle timestamp with proper BigInt conversion
- Add comprehensive tests for timestamp handling
- Use Number.parseInt() for safer numeric conversions

Architecture:
- SubgraphAnnouncementEntity.timestamp is required (subgraphs provide it)
- AnnouncementLog.timestamp is optional (supports both subgraph and direct logs)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@marcomariscal marcomariscal temporarily deployed to Testing All Networks July 11, 2025 20:50 — with GitHub Actions Inactive
@marcomariscal marcomariscal temporarily deployed to Testing All Networks July 11, 2025 20:50 — with GitHub Actions Inactive
- Remove extra blank line in test file

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@marcomariscal marcomariscal temporarily deployed to Testing All Networks July 11, 2025 20:51 — with GitHub Actions Inactive
@marcomariscal marcomariscal deployed to Testing All Networks July 11, 2025 20:51 — with GitHub Actions Active
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.

fix: handle the subgraph return type better (currently doesn't include timestamp even tho the subgraph returns it)

2 participants