💛
BETFIN DOCS
ABOUT BETFIN
ABOUT BETFIN
  • ⭐INTRO
  • 🎯TERMS & CONDITIONS OVERVIEW
  • 📗FAQ OVERVIEW
  • TOKENOMY
    • 🪙BET Token
      • 💛Buy BET token
    • 📊BET initial distribution
      • 📊Team Pool
      • 📊Partners Pool
      • 📊Airdrop Pool
      • 📊Affiliate Pool
      • 📊Bonus Pool
    • 💹Vesting & Unlock plan
    • 🔏Liquidity and lockups
      • Community lockup
      • Team.finance lockups
    • 📗Tokenomy FAQ
  • BETFIN GOVERNANCE
    • 📄Betfin Contract Addresses
      • 👀Verify contracts
    • 🏩Betfin governance
      • ⚙️Timelock Principle
      • ⚙️Multisignature (multisig) Principle
    • 👁️‍🗨️Internal Wallets & External Contracts
    • 📗General FAQ
  • SMARTCONTRACTS DESCRIPTION
    • 🌍Contracts Overview
    • 🤖Core
      • 🤖Partner
      • 🤖Tariff
    • 🤖Conservative Staking
      • 🤖Conservative Staking Pool
    • 🤖Dynamic Staking
      • 🤖Dynamic Staking Pool
    • 🤖Pass Contract
      • 🤖Affiliate Member
    • 🤖Affiliate Contract
      • 🤖Affiliate Fund
    • 🖥️Game Interface
    • 🖥️Bet Interface
    • 📟Predict Contract
      • 📟Predict Game
    • 📟Roulette
      • 📟Roulette Bet
    • 🐞Error Codes
  • AUDITS & BUG BOUNTY
    • ☢️Betfin security audits
    • 🔰Bug Bounty
    • 👷Report an Issue
  • For Developers
    • 💻Web Template
    • 📑Smart Contract Template
Powered by GitBook
On this page
  • Key Components
  • Functions
  1. SMARTCONTRACTS DESCRIPTION

Predict Contract

The Predict.sol contract is one of Betfin Games that facilitates prediction games. It is designed to work with other contracts, including PredictGame for individual prediction games and ConservativeStaking for staking mechanisms. This documentation outlines the key functionalities and components of the Predict contract.

Key Components

State Variables

  • core: An immutable reference to the Core contract, central to the ecosystem.

  • staking: An immutable reference to the ConservativeStaking contract, for staking functionalities.

  • games: An address[] private array holding addresses of all prediction game contracts.

Events

  • GameCreated(address indexed game): Emitted when a new prediction game contract is created.

  • GameDeactivated(address indexed game): Emitted when a prediction game contract is deactivated.

  • GameActivated(address indexed game): Emitted when a prediction game contract is activated.

  • placeBet (internal): Transfers the bet amount to the game contract and calls placeBet on the specified PredictGame. This is used by the public placeBet function after validations.

Functions

  • addGame: Creates a new PredictGame contract with specified parameters, activates it, and emits GameCreated. It performs several checks to ensure valid parameters.

  • deactivate: Deactivates a specified prediction game contract by calling its deactivate function and emits GameDeactivated.

  • activate: Activates a specified prediction game contract by calling its activate function and emits GameActivated.

  • placeBet: Places a bet on a specified prediction game. It transfers the bet amount (minus a fee) to the game contract and calls placeBet on the specified PredictGame.

PreviousBet InterfaceNextPredict Game

Last updated 6 months ago

📟