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.
[X] Have you followed the guidelines in our Contributing document?
[X] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
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:
Created a new Contenthash entity in packages/gateway/src/entities/index.ts.
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.
Adjusted the content hash handlers in packages/gateway/src/handlers/contenthash.ts to work with the new table structure.
Related Issue
161
Changes
[ ] New feature implementation
[ ] Bug fix
[X] Code refactoring
[ ] Documentation update
[ ] Other (please specify)
Changes to Core Features:
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[X] Have you written new tests for your core changes, as applicable?
[X] Have you successfully run tests with your changes locally?
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:
Contenthash
entity inpackages/gateway/src/entities/index.ts
.packages/gateway/src/repositories/postgres.ts
to handle the newContenthash
entity:setContentHash
method to upsert content hash data.getContentHash
method to query the newContenthash
table.getSubdomains
method to include content hash data.packages/gateway/src/handlers/contenthash.ts
to work with the new table structure.Related Issue
161
Changes
Changes to Core Features: