Skip to content

A simple Python script to retrieve owners/holders of a whole NFT collection on ETH (OpenSea/Others)

License

Notifications You must be signed in to change notification settings

DrTexx/dump-opensea

 
 

Repository files navigation

Dump-OpenSea

 ██████████   █████  █████ ██████   ██████ ███████████                     
░░███░░░░███ ░░███  ░░███ ░░██████ ██████ ░░███░░░░░███                    
 ░███   ░░███ ░███   ░███  ░███░█████░███  ░███    ░███                    
 ░███    ░███ ░███   ░███  ░███░░███ ░███  ░██████████                     
 ░███    ░███ ░███   ░███  ░███ ░░░  ░███  ░███░░░░░░                      
 ░███    ███  ░███   ░███  ░███      ░███  ░███                            
 ██████████   ░░████████   █████     █████ █████                           
░░░░░░░░░░     ░░░░░░░░   ░░░░░     ░░░░░ ░░░░░                            
                                                                           
                                                                           
                                                                           
    ███████                                   █████████                    
  ███░░░░░███                                ███░░░░░███                   
 ███     ░░███ ████████   ██████  ████████  ░███    ░░░   ██████   ██████  
░███      ░███░░███░░███ ███░░███░░███░░███ ░░█████████  ███░░███ ░░░░░███ 
░███      ░███ ░███ ░███░███████  ░███ ░███  ░░░░░░░░███░███████   ███████ 
░░███     ███  ░███ ░███░███░░░   ░███ ░███  ███    ░███░███░░░   ███░░███ 
 ░░░███████░   ░███████ ░░██████  ████ █████░░█████████ ░░██████ ░░████████
   ░░░░░░░     ░███░░░   ░░░░░░  ░░░░ ░░░░░  ░░░░░░░░░   ░░░░░░   ░░░░░░░░ 
               ░███                                                        
               █████                                                       
              ░░░░░                      - BROUGHT TO YOU BY DOS PUNKS DAO
                                         - REIMAGINED BY DENVERS.ETH                            

Basic Information

Dump OpenSea (aka DOS) is a tool for taking snapshots of NFT collections.

What is a snapshot?

A snapshot is a recording all of the current owners/holders of a collection and the quantity held by each owner.

Only OpenSea Collections?

Despite the name, DOS can snapshot non-OpenSea collections.

For non-OpenSea collection snapshots, make sure to select the 1 - Token ID JSON option or use the -t/--token-id-json flag.

Other Marketplaces?

Support for other marketplaces is planned for the future, follow @DrTexx or watch this repository for updates.

How

See Usage.

Why

Snapshots are particularly useful for distributing suprise rewards to owners/holders, such as airdrops.

Who

DOS is useful for anyone who

  • Works on an NFT project
  • Performs on-chain analysis/research
  • Wants to use a pretty CLI
  • Wishes to learn about Web3 APIs

Installation

Linux (Typical)

git clone https://github.com/DrTexx/dump-opensea.git  # STEP 1
cd dump-opensea                                       # STEP 2
pip install -r requirements.txt -U                    # STEP 3

Usage

If any required flags are missing you can fill them in once the script starts

Parameter Required Description Where To Find
-c/--contract yes Contract address of Collection Use Etherscan to check contract address for an NFT transaction
-k/--apikey yes Moralis API Key Get from Moralis Admin (FREE)
-s/--slug no OpenSea collection slug End of URL on OpenSea collection page (e.g. https://opensea.io/collection/dos-punks)
-j/--token-id-json no Filepath to Token ID JSON Type the filepath to your Token ID JSON file
-e/--exception-traces no Enable exception stacktraces (advanced) -
-h/--help no Display help text -
-f/--filter no Filter owners by minimum tokens held -
-o/--opensea-api-key no OpenSea API Key Get from OpenSea API Key Request Page

Usage Examples

Running with User Input

python dump-opensea.py
  • Fill the inputs with your data
  • Unsure where to get something? Check Usage above.

Running with Flags

  • Type python dump-opensea.py -h to get the available flags

OpenSea Example

python dump-opensea.py -c 0x495f947276749Ce646f68AC8c248420045cb7b5e -k <MORALIS_API_KEY> -s bofanimals -o <OPENSEA_API_KEY>

Import JSON Example

python dump-opensea.py -c 0x495f947276749Ce646f68AC8c248420045cb7b5e -k <MORALIS_API_KEY> -t bofanimals_token_ids.json

Results

  • JSON file will be written inside the ./snapshots directory.
{
  "<wallet_address_1>": "<number_of_tokens_held_1>",
  "<wallet_address_2>": "<number_of_tokens_held_2>",
  "<wallet_address_3>": "<number_of_tokens_held_3>",
  // etc...
}

Credits

Created by GBE for the DOS PUNKS DAO to thank @maxcapacity and @greencrosslive for all their effort in buidling such a strong #DOSLIFE.

Developed by DOS Punks DAO for the NFT Community.

Reimagined by denvers.eth 🌱

This software is distributed under the 🅭🅯🄏🄎 Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0)

About

A simple Python script to retrieve owners/holders of a whole NFT collection on ETH (OpenSea/Others)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%