Enscan

Query ENS text-records using SQL

Enscan logo

The Ethereum Name Service (ENS) is the defacto, on-chain Linktree; however, almost none of its data (text-records) can be queried with complex conditions. For example: get bitcoin address of user where the Twitter text-record = "yashkarthik".

Enscan is a program that crawls the ENS contracts and indexes the data into a database. This enables developers to interact with the data using the all powerful SQL. Eg:

  .from('enscan')
  .select("bitcoin")
  .eq("twitter", "yashkarthik")

What's so cool?

  • Use SQL to query and interact with data.
  • Use familiar tools (supabase client, prisma or your fav ORM).
  • Self-hostable (trust, but verify)
  • Uses Supabase for DB, hence very high availability/uptime.
  • Very strong type-safety.

Inspiration

I wanted to build a browser extension that shows you the nfts owned by a Twitter username (inspired from Farcaster / Warpcast), but I realized there was no way to get the Ethereum address from a text-record value (in this case twitter text-record). The idea for Enscan came from this need and I hope this benefits others in the community :)

What will the grant be used for?

  • Covering expenses of running infra and API services so this can be free for the community.
  • Improvements, features, support, development.

What's next?

I've released an mvp of Enscan which has indexed all blocks since 16831815. I'm currently working on optimizations that will allow it to index the entire history since the ETHRegistrarController was deployed (block 9380471). If there's interest, I plan on building a v2 with emphasis on efficiency and portability / self-host-ability.

Feedback / help / issues: Feel free to reach out on twitter, discord, github, farcaster. discord: yashkarthik#3846 twitter: _yashkarthik github: yashkarthik farcaster: yashkarthik

Thanks @gregskril for telling me about Ens Small Grants and writing other indexers. @ everyone who wrote the docs. They were very helpful in understanding ENS itself.

Cheers!