-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
Problem
Challenge completion is currently tracked using browser-based caching rather than being linked to user wallets. This approach was implemented because we lacked proper indexing for individual mint data, forcing us to cache NFT information locally in the browser.
Issues with current implementation:
- Challenge progress is tied to browser sessions, not user identity
- Data is lost when users switch browsers or clear cache
- No persistent record of user achievements across devices
Solution
Our new internal indexer and API has the following endpoints:
"endpoints": {
"/": "API information",
"/collection": "List all collections with mint counts",
"/collection/:id": "Get collection details with pagination",
"/mints": "Get timeseries mint data for all collections",
"/mints/:id": "Get timeseries mint data for specific collection",
"/totals": "Get cumulative total data for all collections",
"/totals/:id": "Get cumulative total data for specific collection",
"/user/:id": "Get user mint history",
"/stats": "Database statistics"
}
This means that we could replace browser cache with wallet-based API calls like this:
- Call
https://index.blueshift.gg/user/:id(where:idis the wallet address connected to the dashboard). - Read through all NFTs minted by the user with associated collection data and cross-reference it with existing collection present in the
challenge.tsfile.
Similarly we could update the challenge completion statistics on top of each challenge to not call an RPC everytime but just get the data from https://index.blueshift.gg/stats.
Metadata
Metadata
Assignees
Labels
No labels