provider.getResolver() doesn't work with long names #3161
Replies: 5 comments 1 reply
-
The current specification for ENS names specifies that the nameprep normalization standard should be used, which limits each component to 63 bytes (after Unicode normalization). There is currently an overhaul being taken by the ENS team to expand the specifcation, which will expand the character set (nameprep forbids many UTF-8 characters that are popular today) and relax length requirements. You can follow along for more details on the forum. :) |
Beta Was this translation helpful? Give feedback.
-
Arguable! The spec says:
It certainly wasn't my intention to limit names to 63 characters via nameprep. :) |
Beta Was this translation helpful? Give feedback.
-
There's no maximum label length - so that check should simply be omitted. We're not planning to introduce a length limit with the new normalisation function. |
Beta Was this translation helpful? Give feedback.
-
By the way, for future readers, here is the link to the part of the IDNA specification that limits lengths to 63 or fewer characters: RFC-5891 Section4.2.4. But this limit will be lifted in v5.7 of ethers. |
Beta Was this translation helpful? Give feedback.
-
The new ENS specification has been adopted in v5.7.0. Try it out and let me know if you still have any problems. :) |
Beta Was this translation helpful? Give feedback.
-
Ethers Version
5.6.9
Search Terms
getResolver
Describe the Problem
If a long name is given to provider.getResolver, e.g.
provider.getResolver("6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.eth")
, the function will returnnull
. This address however does have a resolver set as can be seen here: https://alpha.ens.domains/profile/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.eth/details?from=%2Fprofile%2F6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.eth.Tried on playground.ethers.org
Code Snippet
provider.getResolver("6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.eth")
Contract ABI
No response
Errors
No response
Environment
Ethereum (mainnet/ropsten/rinkeby/goerli), Browser (Chrome, Safari, etc)
Environment (Other)
No response
Beta Was this translation helpful? Give feedback.
All reactions