NFTResolver: On-chain Wildcard NFT Owner-tracking Resolver


I call this contract NFTResolver.

It provides an open registry (label → contract) eg. "moo"Good Morning Cafe

Once moo is registered, it accepts the following formats, including 0-padding:

  1. mooX.*
  2. X.moo*
  3. moo-X.*

The name’s address(60) resolves to the NFT owner, the avatar is set to the NFT, the name is the primary ENS of the owner, the url is the metadata, the description is the NFT name.

I’ve currently registered: chonk, moo, keek, cozy, cc, azuki, bayc, punk, doodle, nfs.

It is not bound to nft-owner.eth. I simply set NFTResolver as the resolver. Any name that sets NFTResolver as their resolver gains these features. Additionally, you can pair this with a matching label, so if azuki.eth sets their resolver to NFTResolver, then X.azuki.eth will also work.

More information:

  • Works with any ERC-721 contract

  • The same contract can be registered under multiple labels

  • Labels cannot start with [0-9] or end with [0-9-]

  • Labels currently cost 0.05e 0.01e to register (adjustable via setPublicPrice()) — was only set to prevent abuse but meme coins are already doing that :slight_smile: I considered making it so the owner of X.eth could set contract for label X or using owner() from EIP-173.

  • It is an on-chain wildcard resolver — it doesn’t throw OffchainLookup(...)

  • It currently has zero-cost admin registrations and admin overwrite power, but I can seal that ability via lockAdminRegistration(), making it trustless.

  • The contract has a bunch of helper functions too, like holdersFor(label,token) which follows wrappers from the base contract:


Really cool - thank you for sharing!

This is very neat! I’ve hoped someone would implement something like this since we deployed wildcard resolution.

We need to get you a better domain for it, though. Any ideas @validator.eth?