Skip to main content

Usage

Props

NameTypeDescriptionRequiredDefault
contract#jackpotinfoContract information including address and chain details✅
onBuyTicketSuccess
(hash: `0x${string}`, ticketAmount: number) => void
Callback function when ticket purchase succeeds❌
onTicketChangeAmount
(ticketAmount: number) => void
Callback function when ticket amount changes❌
onBuyTicketError
(error: Error) => void
Callback function when ticket purchase fails❌
referrerAddressAddressThe address of the referrer. This address will get 5% of each ticket price❌
recipientAddressAddressThis address will receive the ticket instead of the sender *Only ETH contract support this❌
blocked#blockeddataYou can disable Jackpot functionalities❌
isStablecoinPoolbooleanIf you set this to false, UI will show base token amount and dollar for ticket price❌
isOfficialPoolbooleanIf you set this to false, Information about megapoint will be hide from the UI❌
showSuccessDialogbooleanIf you set this to false, success dialog won’t show after ticket purchase succeeds❌
detailContainerReactNodeThis will be render below ticket price. You can use this prop to add more detail to the widget❌
tokenPricenumberOptional override for token price❌

Official Jackpot

You can easily integrate these official pools using our pre-configured JACKPOT constant:

Type

JackpotInfo

PropertyTypeDescriptionRequired
addressAddressSmart contract address of the jackpot✅
abiAbiContract ABI for interaction✅
chainIdnumberBlockchain network ID✅
namestringDisplay name of the jackpot✅
tokenAddressAddressAddress of the token used✅
tokenImagestringURL/path to token logo✅
pointPerTicketnumberPoints awarded per ticket❌

BlockedData