Standalone Integration
Last updated
Last updated
All of these examples are built from the Megapot demo app. Feel free to fork the repo and use it as a starting point for your own project. Or just for a reference implementation.
Every site is different, but these are the main considerations for building your own UI.
Jackpot Info, Countdown, Ticket Purchase, Claim Winnings & Last Jackpot Results
Jackpot Total
Countdown to next drawing
Form to select the number of tickets to buy
Verifying the user has enough ERC-20 tokens to buy tickets
Your user has approved spending of their ERC-20 tokens on your contract
Submitting and confirming the transaction
Liquidity Pool
If you intend to allow users to deposit liquidity to the jackpot you will need to:
Create a form to allow users to deposit liquidity, edit position in range, or add more liquidity
Verify the user has approved spending of their ERC-20 tokens on your contract
Submitting and confirming the transaction
If you plan to provide all liquidity, you can do this through the contract directly.
History
Display a users ticket purchase history
Display a jackpot history