-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENS reverse lookup with lowercase address? #508
Comments
Hmm... Which network are you using? It works for me in both cases (the name hash algorithm lowercases everything, so that shouldn't matter as long as I'm using namehash internally). /home/ricmoo> ethers
homestead> provider.lookupAddress("0xCF83B1C347C558923860Bd19702D80e86ff81177")
'ellis2323.eth'
homestead> provider.lookupAddress("0xcf83b1c347c558923860bd19702d80e86ff81177")
'ellis2323.eth'
homestead> |
I'm using ethers with infura provider. Not sure, it could be related to infura ?
|
Hmmm... I still can't reproduce it. Which version are you using? > ethers.version
'4.0.27'
p = new ethers.providers.InfuraProvider()
> p.lookupAddress("0xCF83B1C347C558923860Bd19702D80e86ff81177").then(console.log)
Promise {
<pending>,
domain:
Domain {
domain: null,
_events:
{ removeListener: [Function: updateExceptionCapture],
newListener: [Function: updateExceptionCapture],
error: [Function: debugDomainError] },
_eventsCount: 3,
_maxListeners: undefined,
members: [] } }
> ellis2323.eth
> p.lookupAddress("0xcf83b1c347c558923860bd19702d80e86ff81177").then(console.log)
Promise {
<pending>,
domain:
Domain {
domain: null,
_events:
{ removeListener: [Function: updateExceptionCapture],
newListener: [Function: updateExceptionCapture],
error: [Function: debugDomainError] },
_eventsCount: 3,
_maxListeners: undefined,
members: [] } }
> ellis2323.eth |
(also, |
version: 4.0.27. I had replayed my unit tests and I cannot reproduce it. |
Found the problem. Initially, I was using this code: https://docs.ens.domains/dapp-developer-guide/resolving-names With: var address = '0x1234...'; But it doesn't work if the address is not the Checksum version. I don't known how to contact them for this documentation. My bad |
Ah yes. Ethers always returns checksum addresses. You could do something like: var address = ethers.utils.getAddress('0x1234...'); Which will checksum it from the beginning, so equality checks should pass. :) |
Best regards, sorry for the trouble |
No worries. Glad it all worked out. :) |
if you reverse 0xcf83b1c347c558923860bd19702d80e86ff81177 it returns Nothing.
if you reverse 0xCF83B1C347C558923860Bd19702D80e86ff81177 it returns ellis2323.eth
not sure if it was related to #269
The current fix is to convert to checksum address.
The text was updated successfully, but these errors were encountered: