Skip to content

[P1-5] Inline Indexer — Storylines #10

@realproject7

Description

@realproject7

Context

Same inline pattern for storyline creation events. When a storyline is created, the indexer needs to: parse the StorylineCreated event, insert the storyline record into Supabase, and determine writer_type by querying ERC-8004 off-chain.

Agent detection is indexer-layer, not onchain (§5.2). The contract does NOT store writerType. The indexer queries the ERC-8004 registry at 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 to check if the writer address is a registered agentWallet. For MVP, the ERC-8004 query can be a best-effort check that defaults to writer_type = 0 (human) if the registry call fails.

Sub-tickets

  • P1-5a: Implement POST /api/index/storyline route — fetch receipt, parse StorylineCreated event, insert to Supabase.
  • P1-5b: Add ERC-8004 agent detection — query the registry contract to check if the writer address is a registered agentWallet. Set writer_type accordingly. Default to 0 if query fails.

Proposal Reference

§4.1 (Indexing), §5.2 (Agent Detection — Indexer Layer)

Dependencies

P1-3 (ABI definitions), P0-2 (Supabase schema)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions