UI Components
PrizePoolWidget
Displays pot information like Current Pot Size, Total Pot Size in ETH for the current pot.


Usage
Activities
Displays ongoing activities like tickets generated, wallet address, and the timestamp.


Usage
Leaderboard


Usage
Render the Leaderboard component with an optional prop to display the top 3 ranking users.
user: The address of the user.
PastWinners


Usage
Tickets
Normal Tickets

Tickets with pending amount

CurrentTickets


Usage
Render the CurrentTickets component with a required prop to display the tickets that the user holds
user: The address of the user.
PastTickets


Usage
Render the PastTickets component with a required prop to display the past tickets that the user holds
user: The address of the user.
ResultsModal






Use it to check the results of the raffle draw and claim a prize if the user has a winning ticket.
Usage
Configure modal for checking the results of a raffle draw in your react app and also claim the prize.
Parameters
trigger
A react node that will be presented to the user, usually a button or something clickable.
Y
user
Wallet address of the user .
Y
potId
ID of the pot that has drawn the raffle.
Y
openState
This is a state tuple from react's useState, you can use this to programmatically open or close the modal. The modal will use this state when determining if the modal is open or closed.
N
onClaimComplete
Triggered when the prize was claimed successfully.
N
onClaimError
Triggered when the calling the claim function resulted in an error, returns the error and the claim data.
N
onClose
Triggered when the modal was closed. Returns some useful data about the results as well as the step data and the current step.
N
Last updated