Closed kespinola closed 2 years ago
May eventually want to have a historical record stored of the floor price to support the price change UI the new profile designs have but not necessary for this pass
https://github.com/holaplex/indexer/pull/681
completes collected collections.
Database Table
New table to track how many NFTs a person owns from a collection.
Trigger to recompute counts for the previous and current owner based on INSERTS or UPDATES to current_metadata_owners
For both the previous and the current owner lookup the collection associated to the metadata and count how many other NFTs the user owns that are also apart of the collection. Write in the nfts_owned column on collections owners for the previous and current owner.
Query to find how many NFTs a wallet owns that belong to the same collection as the one they just received or lost ownership of.
** Double check which of these is a metadata address and which is a mint address
The postgres hook is on current_metdata_owners