Skip to main content
This example will guide you through displaying the jackpot’s size, ticket price, odds of winning and a countdown to the next drawing along with a section for claiming winnings and the last jackpot results. This references our Jackpot Demo Integration Github Repo. You can find the code for the demo integration here or view the live demo here.

Jackpot Page

This is the entry point for the jackpot page.

Jackpot Component

  • This component will display the jackpot’s size, ticket price, odds of winning and a countdown to the next drawing.
  • This component will also display a form to purchase tickets.

Buy Tickets

This component will display the current jackpot’s size.

Countdown

This component will display a countdown to the next drawing.

Current Jackpot

This component will display the current jackpot’s size.

Last Jackpot

This component will display the last jackpot’s results.

Ticket Price

This component will display the current ticket price.

Winning Odds

This component will display the odds of winning.

Withdraw Winnings

This component will display the form to withdraw winnings.

API Route

This API route will fetch the past jackpot results from the contract using BaseScan’s API.