Skip to content

Commit

Permalink
NameWrapper Implementation
Browse files Browse the repository at this point in the history
* feat: implement namewrapper, index to deploy block

* feat: checkpoints with schema import

* docs: tidy readme

* docs: update some comments

* fix: correctly materialize wrappedOwnerId on NameUnwrapped

* fix: hex to bytes to fix decoded name

* fix: disable future startBlock

* fix: remove extra readme notes after rebase

* chore: tidy up comments, docs, imports

* chore: tidy up comments in subname-helpers

* chore: update comment documentation via pr notes

* chore: update comment for checkpoints.ts
  • Loading branch information
shrugs authored Jan 9, 2025
1 parent b8750d0 commit 9d1b508
Show file tree
Hide file tree
Showing 14 changed files with 666 additions and 40 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,24 @@ estimated backfill time @ 50rps = 24-36 hours on M1 Macbook (~10x speedup)
- (possible) continued backwards compatibility with subgraph
- support indexing subset of data, i.e. only domains under parent node

### todo
### known bugs

- [ ] implement nameWrapper
- [ ] there's an account `0x` in the database, which is definitely a bug
- add a check at callsite to throw the event that causes this
- [ ] root domain is not `is_migrated`, definitely should be after new registry is created

#### next up

- [ ] confirm all the schema relations are configured correctly
- [ ] integrate rainbow tables for label healing
- load the tabel dump into pglite & query synchronously to match existing behavior
- load the table dump into pglite (or just postgres) & query synchronously to match existing behavior
- https://github.com/graphprotocol/ens-rainbow
- [ ] subgraph graphql implementation within ponder
- [ ] implement subgraph-style pagination api
- [ ] support the well-known queries in `GRAPHQL.md`
- [ ] support collection queries as well, to power `snapshot-eq`
- [ ] CI/CD with indexing?
- more recent endlbock for gut checks
- with speedy indexing CI/CD might be likely up to some recent blockheight
- can load a subgraph snapshot and pass indexer state using snapshot-eq tool as well as api-eq for ensjs test suite
- [ ] better understand reverse resolution & how that pertains to L2 primary names and impacts the future schema, etc

### notes
Expand Down
2 changes: 2 additions & 0 deletions docs/V2.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ the 'empty' domains should be handled more accurately, depending on how importan

various resources use both null and zeroAddress to indicate emptiness, this is horrible and creates numerous checks like [this](https://github.com/ensdomains/ensjs/blob/main/packages/ensjs/src/functions/subgraph/getNamesForAddress.ts#L255) where they check for `!== NULL && !== zeroAddress`

wrappedOwnerId should not be materialized onto domain, should just be resolved through wrappedDomain.owner

### ens indexing plugin

l2 ens deployments are very similar — write plugin to make configuring source addresses easy and pass node that domains in these handlers are implicitly parented to (assuming that l2 deployments make nodes against the ROOT_NODE i.e. every name is basically a 2LD)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"typecheck": "tsc"
},
"dependencies": {
"@ensdomains/ensjs": "^4.0.2",
"hono": "^4.6.14",
"ponder": "^0.8.17",
"viem": "^2.21.57"
Expand Down
Loading

0 comments on commit 9d1b508

Please sign in to comment.