Jackpot
The Jackpot component is a React component designed to facilitate the purchase of tickets for a jackpot.
Usage
Props
contract
Contract information including address and chain details
✅
onBuyTicketSuccess
Callback function when ticket purchase succeeds
❌
onTicketChangeAmount
Callback function when ticket amount changes
❌
onBuyTicketError
Callback function when ticket purchase fails
❌
referrerAddress
Address
The address of the referrer. This address will get 5% of each ticket price
❌
recipientAddress
Address
This address will receive the ticket instead of the sender *Only ETH contract support this
❌
blocked
You can disable Jackpot functionalities
❌
isStablecoinPool
boolean
If you set this to false, UI will show base token amount and dollar for ticket price
❌
isOfficialPool
boolean
If you set this to false, Information about megapoint will be hide from the UI
❌
showSuccessDialog
boolean
If you set this to false, success dialog won't show after ticket purchase succeeds
❌
detailContainer
ReactNode
This will be render below ticket price. You can use this prop to add more detail to the widget
❌
tokenPrice
number
Optional override for token price
❌
Official Jackpot
You can easily integrate these official pools using our pre-configured JACKPOT constant:
Type
JackpotInfo
address
Address
Smart contract address of the jackpot
✅
abi
Abi
Contract ABI for interaction
✅
chainId
number
Blockchain network ID
✅
name
string
Display name of the jackpot
✅
tokenAddress
Address
Address of the token used
✅
tokenImage
string
URL/path to token logo
✅
pointPerTicket
number
Points awarded per ticket
❌
BlockedData
blocked
boolean
Yes
When set to true, disables action button
blockTitle
string
No
Custom button text to display to users when purchases are blocked
blockMessage
string
No
show detail blocked message to users
Last updated