Skip to content

Implement Metadata Extraction Stage #178

@Haydart

Description

@Haydart

Task 004: Implement Metadata Extraction Stage

Description

Create TrendMetadataExtractionStage that reuses existing TokenMetadataStage logic to parse TokenLaunchEvent into SimplifiedMemecoin model.

Acceptance Criteria

  • Create TrendMetadataExtractionStage in src/domain/processor/stages/
  • Extend BaseStage
  • Reuse existing TokenMetadataStage logic for image download and Base64 encoding
  • Parse TokenLaunchEvent fields into SimplifiedMemecoin model
  • Validate required fields: token_address, name, symbol, description, image
  • Early termination if validation fails (set context.should_continue_processing = False)
  • Store SimplifiedMemecoin in context.results["memecoin_entry"]
  • Proper error handling with descriptive termination_reason

Technical Details

  • Location: src/domain/processor/stages/trend_metadata_extraction_stage.py
  • Input: TokenLaunchEvent from context
  • Output: SimplifiedMemecoin in context.results["memecoin_entry"]
  • Reuse: Image download and Base64 encoding from existing metadata stage
  • Note: No CLIP embeddings or vector DB operations

Effort Estimate

  • Size: S
  • Hours: 3-4
  • Parallel: true (only depends on Task 001 models)

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic:trendsTrend Detection System EpictaskImplementation task

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions