blockful-io / external-resolver

This project aims to scale the Ethereum Name Service (ENS) by consolidating existing patterns and proofs of concept into a unified and production-ready codebase.
MIT License
14 stars 3 forks source link

feat: add contenthash table #228

Closed pikonha closed 3 weeks ago

pikonha commented 1 month ago

contenthash table

All Submissions:

Description

This pull request adds a new contenthash table to decouple content hash storage from the domains table. This change improves the database structure and allows for more flexible management of content hashes.

Key Changes:

  1. Created a new Contenthash entity in packages/gateway/src/entities/index.ts.
  2. Updated the PostgresRepository in packages/gateway/src/repositories/postgres.ts to handle the new Contenthash entity:
    • Added setContentHash method to upsert content hash data.
    • Modified getContentHash method to query the new Contenthash table.
    • Updated getSubdomains method to include content hash data.
  3. Adjusted the content hash handlers in packages/gateway/src/handlers/contenthash.ts to work with the new table structure.

Related Issue

161

Changes

Changes to Core Features: