The subgraph can be queried to retrieve important information about MasterChef, pools, pool histories, users, and more. This page will provide examples for common queries.
To try these queries and run your own visit the MasterChef subgraph sandbox .
MasterChef
All time Swipe rewards, total rewards in USD, all time pool count.
Copy {
masterChef(id: "0x267748fe0db99863e1d5448ef5b9442230c24789" ) {
id
bonusMultiplier
bonusEndBlock
swipe
swipePerBlock
totalAllocPoint
poolCount
}
}
Pool
Current Pool balance, all time swipe harvested, harvested Swipe in USD
Copy {
pool(id: 2 ) {
id
pair
balance
entryUSD
exitUSD
swipeHarvested
swipeHarvestedUSD
block
slpBalance
slpAge
slpAgeRemoved
slpDeposited
slpWithdrawn
userCount
}
}
Pool History
Snapshot of a pool state at every block generation time
Copy {
poolHistory(id: "118682" ) {
id
entryUSD
exitUSD
swipeHarvested
swipeHarvestedUSD
block
slpBalance
slpAge
slpAgeRemoved
slpDeposited
slpWithdrawn
userCount
block
}
}
History
Snapshot of the whole MasterChef pools at every event generation time
Copy {
history(id: "0x267748fe0db99863e1d5448ef5b9442230c2478918682" ) {
id
block
slpBalance
slpAge
slpAgeRemoved
slpDeposited
slpWithdrawn
block
}
}
User
User reward status in each pools
Copy {
users(where: { address : "0x1d85ddeb7f73c33802d4e2545ee65a579781e0b6" }) {
id
address
amount
rewardDebt
entryUSD
exitUSD
swipeHarvested
swipeHarvestedUSD
}
}