The HUDDLN XP subgraph allows you to access any XP data submitted by our partners.
The data is also accessible on-chain with smart contract calls, but for a majority of use cases accessing the data through a subgraph is the best option.
Here are some example queries for common use cases:
β
Search for a user's score based on their score type and wallet address:
1
β
Copied!
ββ
The HUDDLN XP subgraph allows you to access any XP data submitted by our partners.
The data is also accessible on-chain with smart contract calls, but for a majority of use cases accessing the data through a subgraph is the best option.
List all actions for a particular project (action includes a name, how many points received for it and a direction. Direction of 0 is increasing, direction of 1 is decreasing):
1
{
2
actions(where: {project: "PROJECT_ID_HERE"}) {
3
id
4
name
5
points
6
direction
7
}
8
}
9
β
Copied!
Find the total score for a user within a particular project, based on their wallet address: