1

Just like major NFT Market places like opensea , foundation , rarible , x2y2.io have been extracting all the collections and their NFT's which are available in etherscan.io. I am seeking ways on how this is being implemented , I dont find collection retrieval in etherscan.io dev docs. Can anyone help me with this ?

Regards!

1 Answer 1

0

Etherscan is simply an online web2 interface that allows users to clearly see block data transaction by transaction. In order to extract all the data for NFTs created, you'll need to create a crawler that finds ERC721 contracts on the blockchain.

The process looks something like this:

  1. Dictate your fromBlock and toBlock range
  2. Create a web3 instance of the each contract in the block range
  3. Call supportsInterface method on the contract to check if it exists, using ERC721 ID (0x80ac58cd)
  4. If it does, record whichever metrics you are looking for.

This will return you all tx's which have an ERC721 signature (note that this obviously won't return you the sacred content of each NFT, rather just things like the contract location and token address). Once you have these, you can get more specific datas by using things like this, provided by OpenSea, for retrieving collections etc...

3
  • OP should also check against the NFT 1155 type by doing a check against the ERC 1155 Interface ID 0xd9b67a26
    – Potion
    Dec 6, 2022 at 22:27
  • @Potion thats correct :)
    – immaxkent
    Dec 6, 2022 at 23:03
  • Thanks for the help ! have any docs on it step by step about the execution ? @XaEK
    – ksd030687d
    Dec 7, 2022 at 5:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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