Scorefam’s Whitepaper
  • 👋About Scorefam
  • Scorefam Ecosystem
    • PredictPro
    • X-Predict
    • Lossless Sportsbook
  • FEATURE ADDONS
    • Genius AI Agent (v1.0.0)
  • Rewards
    • ⏺️Scorefam Points
    • 🔥Daily Streak Bonus
    • 🪙Preliminary SFT ($PSFT)
  • AFFILIATE PROGRAM
    • 🧰How it works
    • Become an Icon
  • Token (SFT)
    • 📚Token Utility
    • ⚖️Tokenomics
  • 🔗Website
  • ✖️Twitter
  • 🇸🇴Telegram
  • 🛖GitHub
  • Appendix
    • Developer Integration (PredictPro SDK)
      • 🛫Welcome
      • 🛫Initialization
      • Wallet Connection
      • Fetching Fixtures and Odds
        • Fetch Filtered Fixtures
        • Fetch Odds
        • Fetch Correct Scores
        • Fetch Home, Draw & Away Odds
      • Tournaments
        • Register
        • Current Tournament ID
        • Play Game
        • Get Tournament
      • Rewards
      • Leaderboard
        • Get Leaderboard
        • Get Formatted Leaderboard
      • Operator Revenue Share
      • Example Usage
Powered by GitBook
On this page
Export as PDF
  1. Appendix
  2. Developer Integration (PredictPro SDK)
  3. Leaderboard

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]
  }
]

PreviousLeaderboardNextGet Formatted Leaderboard

Last updated 4 months ago