🪙Tokens
This article shows how to get onchain payout rewards - individually or in a leaderboard format
Projects can decide to show a leaderboard or a user profile on their own website.
To get the affiliate leaderboard for your project use the getPayoutsLeaderboard
method.
import { Fuul } from ('@fuul/sdk');
await Fuul.getPayoutsLeaderboard({ currency_address: '0x12345' });
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.
You can retrieve the tier and the volume information of users by adding them on the fields
parameter as follows:
import { Fuul } from ('@fuul/sdk');
await Fuul.getPayoutsLeaderboard({
currency_address: '0x12345',
fields: 'tier,referred_volume,enduser_volume,enduser_revenue'
});
Last updated