💛
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
  • Usage Scenario
  • Functions
  1. SMARTCONTRACTS DESCRIPTION
  2. Roulette

Roulette Bet

RouletteBet is a Solidity smart contract designed for the blockchain-based game of Roulette. It manages individual bets placed by players, tracking various details such as the bet amount, the specific condition or numbers bet on (represented as a bitmap), and the outcome of the bet. This contract is integral to the game's operation, providing functions to set and retrieve bet information, ensuring secure and verified gameplay.

RouletteBet inherits from Ownable and implements the BetInterface, providing a structured approach to managing a roulette bet's lifecycle and data. It encapsulates bet details, including the player's address, the associated game, amounts, and outcomes, with access control enforced through the Ownable contract.

Usage Scenario

In a typical usage scenario, a Roulette game contract will instantiate a RouletteBet for each bet made by a player. The game contract, acting as the owner of the bet contract, will then update the bet details based on game outcomes, such as determining whether the player wins or loses and updating the bet status and result accordingly.

Functions

  • Getters: Functions to retrieve bet information, such as getPlayer(), getGame(), getAmount(), getStatus(), getCreated(), getResult(), getBetInfo(), getRequestId(), getWinNumber(), getBetsCount(), and getBet(index).

  • Setters: Functions to set bet details, restricted to the contract owner (e.g., setPlayer(), setGame(), setAmount(), setStatus(), setRequestId(), setResult(), setWinNumber(), setBets()).

PreviousRouletteNextError Codes

Last updated 1 year ago

📟
📟