ensdomains / ens

Implementations for ENS core functionality: The registry, registrars, and public resolvers.
https://ens.domains/
BSD 2-Clause "Simplified" License
1.16k stars 512 forks source link

What's the possible min and max length of ens names #386

Open TimDaub opened 2 years ago

TimDaub commented 2 years ago

For a .eth name, given the current contracts on the Ethereum main network: What is the minimal possible amount of characters permitted and what is the maximum number? Also: Will these two values remain constant over time? On-chain, are they mutable? In the code: where are they checked for?

ca98am79 commented 2 years ago

I believe the only limit is that the name must be greater than or equal to 3 characters: https://github.com/ensdomains/ethregistrar/blob/master/contracts/ETHRegistrarController.sol#L58

Someone recently registered an .eth name with 10,000 characters: https://twitter.com/fuqeth/status/1456800064295391233

TimDaub commented 2 years ago

ok thanks @ca98am79. Maybe another related question: Do you know where I could quickly get ahold of a list of of all ens names; or rather: Where I could find out which character lengths are most commonly used as ens names, e.g. "Most users use a length between 5 - 20 chars" ?

FifthRooter commented 2 years ago

@TimDaub I don't think there's a convenient dashboard that allows you to filter the names the way you want, but you can use https://etherscan.io/enslookup to find all of the registered names. With a simple js/python script you can fetch this data and parse it to get the answers you're looking for :)