# Badger NFT Subgraph
A subgraph for tracking the ownership of Badger NFTS. This will help us to calculate a users boost and can also be used to visualise the nfts that a specific user owns on the badger app. We should only store NFTS that are relevant to Badger for simplicity and performance reasons.
## Current NFTS

## Example Schema
```
type NFTBalance @entity {
id: ID!
amount: BigInt!
owner: User!
}
type User @entity {
id: ID!
nfts:[NFTBalance]! @derivedFrom(field:"owner")
}
```
## Considerations / Questions
- How should we store the relationship between users and nfts?
- Many Nfts to Many Users (like OpenSea)
- One User to Many NftBalances (like in Example Schema)
- Each nft is equivalent to a certain amount of badger, should this be calculated on the subgraph or left to a seperate contract?
- The seperate contract would be a mapping/dict of nfts to the badger amounts that they represent, with the ability of governance to change each of the levels
- mapping(address => uint) public nftLevels
- Could we generate this data using some on chain registry of NFTS?
- This would help with future nfts that might be added/implemented.
- This would require some extra work but could also be combined with the contract above.
- How will we handle contracts with different event params for NFT transfers?
- We will need seperate handlers for each of these
### Relevant Links
- [Badger Jersey Contract](https://etherscan.io/address/0xe1e546e25A5eD890DFf8b8D005537c0d373497F8)
- [Badger Jersey Contract Minter](https://etherscan.io/address/0x576cD258835C529B54722F84Bb7d4170aA932C64)
- [Meme Badger Nft Contract](https://etherscan.io/address/0xe4605d46Fd0B3f8329d936a8b258D69276cBa264)