Skip to main content
Version: Next

Hopr Stake Seasons 6 Subgraph Entities & Sample Queries

Account

FieldTypeDescription
idID!Account address
actualLockedTokenAmountBigInt!Actual locked token amount for the user
airdropLockedTokenAmountBigInt!Amount of airdrop locked tokens that the user has
lastSyncTimestampBigInt!Timestamp of the last syncronization
cumulatedRewardsBigInt!Total amount of rewards the user has earned
claimedRewardsBigInt!Amount of rewards the user has claimed
unclaimedRewardsBigInt!Amount of rewards the user has claimed
boostRateBigInt!Boost rate for the user
appliedBoosts[Boost!]!Applied boosts for the user
ignoredBoosts[Boost!]!Ignored boosts for the user

Boost

FieldTypeDescription
idID!Account address
boostTypeIndexBigInt!Boost type index for the boost
uriString!Url to the metadata of the NFT
boostNumeratorBigInt!Boost numerator for the boost
redeemDeadlineBigInt!Deadline by which the boost must be redeemed

Program

FieldTypeDescription
idID!Account address
availableRewardBigInt!Available reward for the program
totalLockedBigInt!Total amount locked for the program
totalAirdropBigInt!Total airdrop amount for the program
totalCumulatedRewardsBigInt!Total cumulated rewards for the program
totalClaimedRewardsBigInt!Total claimed rewards for the program
totalUnclaimedRewardsBigInt!Total unclaimed rewards for the program
lastSyncTimestampBigInt!Timestamp of the last synchronization for the program
blockedTypeIndexes[BigInt!]!List of blocked type indexes for the program

Sample Queries

Below are some sample queries you can use to gather information from the Stake Season6 subgraph.

You can build your own queries using a GraphQL Explorer and enter your endpoint to limit the data to exactly what you need.

Each entity has a plural version and a singular version. When querying for a single record response (e.g. account), you will need to supply the id for the entity. When querying for a list of responses (e.g. accounts), you may add filters using the 'where' clause.

Staked balance

Description: This query returns balances for available rewards, total claimed and unclaimed for staked tokens.

{
programs {
availableReward
totalClaimedRewards
totalUnclaimedRewards
}
}

Account BoostRate

Description: This query, in descending order returns the first 10 accounts with a boost rate greater than 3000.

{
accounts(
where: { boostRate_gte: "3000" }
first: 10
orderBy: id
orderDirection: desc
) {
id
claimedRewards
boostRate
}
}