Contract: https://etherscan.io/address/0x56942dd93a6778f4331994a1e5b2f59613de1387
Tweet: https://twitter.com/adraffy/status/1653679293418049536
Github: https://github.com/adraffy/nft-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:
mooX.*
X.moo*
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
.
- chonk239.nft-owner.eth on ENS
- 000001.keek.nft-owner.eth on ENS
- 270.moo.moo.moo.moo.nft-owner.eth on ENS
- punk6529.nft-owner.eth on ENS (pre-721 Crypto Punk)
- punk318.nft-owner.eth on ENS (wrapped Punk)
- doodle-2965.nft-owner.eth on ENS (wrapped Doodle)
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.05e0.01e to register (adjustable viasetPublicPrice()
) — was only set to prevent abuse but meme coins are already doing thatI 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: