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)

Initialization

The PredictPro SDK provides a comprehensive interface to interact with the PredictPro smart contract and associated APIs. It enables seamless interaction with features like tournament registration,etc

Constructor

Initializes the SDK with the required parameters.

Syntax

constructor(providerUrl, predictProAddress, predictProABI, usdbABI, apiConfig)

Parameters

  • providerUrl: URL of the Ethereum node provider (e.g., Infura, Alchemy).

  • predictProAddress: Address of the PredictPro smart contract.

  • predictProABI: ABI of the PredictPro contract.

  • usdbABI: ABI of the USDB token contract.

  • apiConfig: Configuration for external APIs:

    • baseUrl: API's base URL.

    • apiKey: API key for authentication (Reach out to @nvzvhenry to get an API key).

Example

const sdk = new PredictProSDK(
    "https://mainnet.infura.io/v3/YOUR_INFURA_KEY",
    "0xPredictProContractAddress",
    predictProABI,
    usdbABI,
    { baseUrl: "https://api.example.com", apiKey: "API_KEY (Reach out to @nvzvhenry to get an API key)" }
);

PreviousWelcomeNextWallet Connection

Last updated 3 months ago

🛫