ENS resolver
See original GitHub issueHi, I use ENS resolver and lookup method of ethers.js.
Actually it works well for sample from documentation such as ("registrar.firefly.eth" & "0x6fC21092DA55B392b045eD78F4732bff3C580e2c")
or ("ricmoose.eth" & "0x8ba1f109551bD432803012645Ac136ddd64DBA72")
.
however when i try different ENS like "ethereum.eth"
it give me the address "0x8443379cBaF7A68B2Cc1626Df9e4Cb47d525A0e4"
and then when i try this address for lookup method, null is returned. It doesnot give "ethereum.eth"
function AddressToENS () {
var address = $('#checkAddress2').val();
if ($('#checkAddress2').val() != "") {
try {
ethers.utils.getAddress(address);
provider.lookupAddress(address).then(function(address) {
console.log("Name: " + address);
if (address == null) {
$("#result2").html("No record for this address")
} else $("#result2").html(address);
});
} catch (error) {
$("#result2").html("Invalid address");
return;
}
} else {
$("#result2").html("Empty address");
}
}
function ENStoAddress () {
var address = $('#checkAddress3').val();
if ($('#checkAddress3').val() != "") {
provider.resolveName(address).then(function(address) {
console.log("Address: " + address);
if (address == null) {
$("#result3").html("No record for this ENS")
} else $("#result3").html(address);
});
} else {
$("#result3").html("Empty address");
}
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:13 (7 by maintainers)
Top Results From Across the Web
PublicResolver - ENS Documentation
PublicResolver implements a general-purpose ENS resolver that is suitable for most standard ENS use-cases. The public resolver permits updates to ENS ...
Read more >Noob ENS question: what is the "Resolver"? : r/ethereum
The Resolver is the smart contract that acts as the translator of yourname.eth to some address. By default it is set to 0x0000...0000...
Read more >How to Set Up ENS Resolver - Ethereum Name Service
Point your ENS name to your Ethereum (ETH) address to make it easier to request ... This video will show you how to...
Read more >A collection of resolvers for ENS domains - GitHub
A collection of resolvers for ENS domains. Contribute to ensdomains/resolvers development by creating an account on GitHub.
Read more >Introduction to the Ethereum Name Service | by Chris Remus
Any contract that implements the relevant standards may act as a resolver in ENS. General-purpose resolver implementations are offered for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Keep in mind that reverse records are opt-in and a name owner must configure it separately. I have configured my ens names and their reverse records, but many people do. It configure reverse records.
In these cases, lookupAddress doesn’t work, which is what I suspect you are seeing.
You can reach out to particular name owners and ask that the configure their reverse-records, but otherwise there is not much you can do. The owner didn’t opt-in for a reverse record… 😒
Make sense?
It works now @ricmoo thank you very much for all