Usage
Props
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| contract | #jackpotinfo | 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 | #blockeddata | 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
| Property | Type | Description | Required |
|---|---|---|---|
| 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 | ❌ |
