πͺTokens
This article shows how to get onchainindividual rewards
Fuul simplifies blockchain data for you. We take complex onchain information, clean it up, and present it in a format that's more readable. Projects then can choose to get the data from Fuul's indexed data, or directly from the subgraph.
Fuul's Indexed Data
Payouts for a specific Address
To get the rewards use the getPayoutsLeaderboard method filtered by user address.
import { Fuul } from ('@fuul/sdk');
await Fuul.getPayoutsLeaderboard({
currency_address: '0x12345',
user_identifier: '0x12345', // the address of the user
user_identifier_type: 'evm_address', // evm_address | solana_address | xrpl_address
from: new Date('2021-01-01'), // Optional
to: new Date('2022-01-01'), // Optional
user_type: 'all', // all, affiliate or end_user
conversions: '1,2,3' // Optional
});currency_address is the address of the currency on the chain that the project is distributing payouts. Remember projects can payout different tokens for different conversions.
A simple response for retrieving this information would be the following:
You can retrieve the tier and the volume information of users by adding them on the fields parameter as follows:
Payouts for a specific address per conversion
To get all payouts for an address use the getUserPayoutsByConversion method.
You can also filter out dates as follows:
Payouts history for a specific address
To get all points history for an address use the getUserPayoutMovements method.
Fuul Subgraphs
Every payout reward has an onchain record on the project's FuulProject contract. This information can be retrieved from any indexer, but using our aggregated subgraphs makes it much easier.
To get the total, claimed and unclaimed rewards for a specific user and Fuul projects, use the following query.
You can also filter out by currency like this:
Last updated