doug

Posted on Feb 27, 2022Read on Mirror.xyz

HOW-TO: Snapshot an NFT Collection (ERC721 or 1155) with Moralis

Part of our minting strategy at Turf was to add friendly NFT communities’ holders to our Allow List. In order to do so we needed to get a snapshot of the holders’ wallets.

It’s a common task and I’ve seen several ways of implementing it. This Ruby script is pretty straightforward, and relies on Moralis to do the heavy lifting of identifying owners. Get an API key at Moralis, then run this locally.

You’ll notice a list of hard coded collection names and contract addresses: you’ll want to change those. Find the contract addresses on Etherscan.

Note that this won't work with collections that are directly listed on OpenSea, only custom contracts.

https://gist.github.com/dougpfeffer/692e4c78a7ba9e56108311544a9400f6

NFT