Get Leaderboard
Fetches the on-chain leaderboard for a specific tournament.
getLeaderboardOnChain
Fetches the on-chain leaderboard for a specific tournament.
Syntax
getLeaderboardOnChain(tournamentID, startIndex, batchSize)
Parameters
tournamentID: ID of the tournament.
startIndex: Starting index of the leaderboard.
batchSize: Number of leaderboard entries to fetch.
Returns
Array: List of players and their statistics.
Example
const leaderboard = await sdk.getLeaderboardOnChain(1, 0, 10);
console.log(leaderboard);
Sample Return
[
{
"player": "0x123...",
"stats": [30, 10, 5000]
},
{
"player": "0x456...",
"stats": [25, 8, 4500]
}
]
Last updated