PRDT
  • Introduction
  • Getting started
    • Creating your wallet using Thirdweb
    • PRDT Legacy: How to open a position
      • How it works
    • PRDT Classic / Pro: How to top up balance and open a position
  • Smart contracts
    • Legacy Version - How to interact with the smart contracts
    • Legacy version - User accessible functions
    • How to claim directly from the contract
    • Classic Rules
    • PRO V4 Rules
      • Multipliers and Bet sizes
      • Wagering System and Withdrawal Policy
  • Loyalty Center, Chests & Coin-Flip
  • PRDT Legacy, Classic & Pro Fees
  • Referral sytem
  • Roadmap
  • Anti-Bot Security Measures
  • Security & Audit
  • Social media links
  • FAQ & Help
  • Hiring
  • Tutorials
Powered by GitBook
On this page
  1. Smart contracts

Legacy version - User accessible functions

PreviousLegacy Version - How to interact with the smart contractsNextHow to claim directly from the contract

Last updated 23 days ago

All user functions require an id to access a certain prediction. The IDs are as follows for all blockchains: ID 0: BTC ID 1: ETH Min position size: Polygon: 5 Matic

Function Name

Description and Parameters

claim

Allows users to claim their earnings from a specific contract. The user is required to enter the prediction contract id and an array of the claimable rounds. All of the rounds entered must be claimable, otherwise the transaction will revert.

  • predictionIds: uint256[] (ids are given above)

  • rounds: uint256[]

Example call: claim([0], [4, 9, 153])

claimable

Allows users to check if a round of a specific prediction contract is won and claimable.

  • predictionId: uint256 (ids are given above)

  • epoch: uint256 (round number to check)

  • userAddress: address

Example call: claimable(0, 1000, address)

refundable

Allows users to check if a round of a specific prediction contract is canceled and refundable.

  • predictionId: uint256 (ids are given above)

  • epoch: uint256 (round number to check)

  • userAddress: address

Example call: refundable(0, 1000, address)

currentEpoch

Allows user to get the current round number.

Example call: currentEpoch ()

timestamps

Allows user to check the start, lock and closing timestamp of a given round. Example call: timestamps(roundnumber)