5

On testnet, there is currently a registrar running for first-in-first-served (FIFS) .test domains, which can be directly claimed for 30 days, and the auction registrar for .eth domains, which require a 7-day public auction to claim a domain.

Is it possible to get a list of all active auctions on .eth domains from the ENS?

5

You can do this by subscribing to the AuctionStarted event. Set a filter to iterate over all blocks in the past week for efficiency:

ethRegistrar.AuctionStarted(
    {},
    {fromBlock: web3.eth.getBlockNumber('latest') - (60 * 60 * 24 * 7) / 14, toBlock: 'latest'},
    function(err, result) {
        console.log(result.args.hash + " expires " + result.args.auctionExpiryDate);
    });

Returned values are the sha3 hashes of the names under auction, so you'll need a dictionary of preimages if you want to figure out what they are in plaintext.

| improve this answer | |
  • Can you point me to some documentation on monitoring historical events in this manner? I have only ever seen web3.eth.filter.. Also, your link points to 'master' rather than a specific commit. Thanks – Thomas Clowes Mar 24 '17 at 9:46
  • 1
    This is just event filtering as described in the web3 docs. – Nick Johnson Mar 24 '17 at 12:45
3

See here at etherscan https://etherscan.io/ens?filter=auctionskn

use "FILTER BY" to show other infos

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.