Refer Tickets
Anyone can be a Megapot partner! We make it easy to sell tickets to the Megapot jackpot from your site. You can earn 10% of every ticket purchase your users make. Claimable immediately through the contract. By simply adding your wallet address as the referrer in ticket purchases from your site you can begin earning immediately.
How to Refer Tickets
Megapot's contract is designed for you to be able to refer tickets to the jackpot from your site. This is done by adding your wallet address as the referrer
parameter to the ticket purchase function.
Let's take a look at the purchaseTickets function:
referrer
: Your wallet address. Triggers the contract to pay you 10% of the ticket price for each ticket purchased.value
: The number of tickets to purchase, in szabo (6 decimals). 1_000_000 szabo = 1 ticket.recipient
: The address of the recipient of the tickets. This is the wallet of the person purchasing the tickets.
As you can see, it is very simple to refer tickets. Just set yourself as the referrer
parameter.
Example
Let's say you want to refer 10 tickets to the jackpot. You would set the referrer
parameter to your wallet address and the value
parameter to 10 tickets.
Claiming Referral Fees
This will withdraw the referral fees to your wallet address directly from the contract. You can call this function as often as you want.
Viewing Referral Fees
This will return the amount of referral fees you have earned in szabo. A number of 1_000_000 = $1 USDC
UI Kit React/Next.js Implementation
Here is a sample implementation of the refer tickets functionality in a React/Next.js application using the Megapot UI Kit.
Last updated