For preparing an Airdop, for example, I want to find all owners of a specific NFT contract at a set date (today is OK, just actual hodlers, not all previous owners).
In doing some digging most APIs seem to provide event listeners, so I would need to have a server out there constantly available and listening.
I can also see you could set up a subgraph on thegraph or other indexer and it would do the listening for you?
What are some other ways to do queries on the chain and filter for owners of a contract? It seems heavy duty to query/filter the whole blockchain.
Ideally I'm looking for JS/typescript code.
related questions and research below, really looking for advice on the best option here :D
covalent allow sql queries to the chain https://www.covalenthq.com/docs/api/#overview
fetch all token transfer events https://web3py.readthedocs.io/en/latest/examples.html#advanced-example-fetching-all-token-transfer-events
does not seem to provide a historical API for this? so i would have to set this up as a subgraph in advance?
has an api for ERC721 token transfer by address but not total owners? this is per wallet.
example scraping etherscan API to gather list of top token holders
python code to iterate and query (heavy) https://github.com/TokenMarketNet/sto/blob/master/sto/ethereum/scanner.py