> ## Documentation Index
> Fetch the complete documentation index at: https://v1.docs.megapot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# useJackpot

> A React hook that fetches and calculates jackpot-related information from a smart contract.

### Usage

```tsx theme={null}
import {
  Jackpot,
  JACKPOT,
  MainnetJackpotName,
} from "@coordinationlabs/megapot-ui-kit";

const {
        isLoading,
        ticketsSold,
        endTime,
        ticketPrice,
        prizeInTokens,
        prizeInUSD,
        ticketPriceInUSD,
        totalTicket,
        error,
    }
= useJackpot({
    contract: JACKPOT[chainId][MainnetJackpotName.USDC] as JackpotInfo,
});

```

### Parameters

| Name | Type | Description |
| - | - | - |
| contract | [JackpotInfo](https://v1.docs.megapot.io/developers/react-ui-kit/jackpot.md#jackpotinfo) | Object containing contract information |
| tokenPrice | number | Optional override for token price |

### Return type

| Property | Type | Description |
| - | - | - |
| isLoading | boolean | Indicates if the data is being loaded |
| ticketsSold | number | Number of tickets sold in the current round |
| endTime | number | Timestamp (in milliseconds) when the current round ends |
| ticketPrice | number | Price of one ticket in token units |
| prizeInTokens | number | Current prize pool size in tokens |
| prizeInUSD | number | Current prize pool size in USD |
| ticketPriceInUSD | number | Price of one ticket in USD |
| totalTicket | number | Maximum number of tickets that can be sold |
| error | any | Error information if any request fails |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.