Using this repo, you can take a snapshot of all the holders of a given NFT collection. This is frequently used ahead of airdropping NFT rewards.
After downloading the repo locally, you can make adjustments to you
index.ts file as needed:
demowith your Alchemy API Key
alchemySettingswith the Chain you're using.
ethereumon thirdweb SDK initialization with the Chain you're using. (Example:
- Replace the
ercconst with either
erc721, depending on your needs.
- Replace contractAddress, network and tokenId (in case of erc1155) with the contract address to take a snapshot of.
- Run with
npx ts-node index.ts
Underlined variables from the repo below are where you make updates (as needed):
If you are getting an error or the output isn’t generating properly, don’t hesitate to reach out to us in Discord.