⚠️
Important! We’ve moved to V3! This documentation is for V2 only and will be updated in May.
Developer Hub
🔮 For applications
Toolkit
Utils
getFreeBets

Returns the FreeBets list.

Usage

import { getFreeBets } from '@azuro-org/toolkit'
 
const freeBets = await getFreeBets()

Props

{
  chainId: ChainId
  account: Address
  affiliate: Address
}
type ChainId = 
  | 100     // Gnosis
  | 137     // Polygon
  | 80002   // Polygon Amoy
  | 88888   // Chiliz
  | 88882   // Chiliz Spicy
  | 8453    // Base
  | 84532   // Base Sepolia

Return Value

Array<{
  id: number
  owner: Address
  amount: string // raw '10000000'
  minOdds: string // raw '10000000'
  contractId: number
  signature: Hex
  expiresAt: number // unix timestamp in seconds
  campaign: string
  status: RestFreeBetStatus
  contract: {
    id: number
    affiliate: Address
    chainId: string
    freebetContractAddress: Address
    decimals: number
  }
}> | null | undefined
enum FreeBetStatus {
  New = 'New',
  Claimed = 'Claimed',
  Redeemed = 'Redeemed',
  Canceled = 'Canceled',
  Reissued = 'Reissued',
  Withdrawn = 'Withdrawn',
}