💰
Megapot
  • Overview
    • About Megapot
    • How to play
    • How to provide liquidity
    • How to refer users
    • Earn as a liquidity provider
    • About the Team
    • Megapoints
  • Deep dive
    • Components
    • System Diagram
    • Smart Contract
    • Provably Fair
  • Developers
    • Start Here
    • React UI Kit (Beta)
      • MegapotProvider
      • Jackpot
      • useJackpot
    • Standalone Integration
      • Getting Started
      • Contract Functions
      • Jackpot Page
      • LP Deposit Page
      • History Page
    • Custom ERC-20 Jackpot
  • Developer Reference
    • Testnet & Mainnet
    • Contract Overview & Functions
    • Megapot API
    • Megapot Examples
      • Refer Tickets
      • Gifting Tickets
    • Brand Kit
  • Appendix
    • VIP Program
    • FAQ
    • About Megapot
  • Terms of Service
  • Privacy Policy
  • Responsible Gaming
Powered by GitBook
On this page
  • Testnet & Mainnet Contracts
  • Testnet
  • Testnet Contract (Base Sepolia)
  • Mainnet
  • TEST Contract (Base Mainnet)
  • PROD Contract (Base Mainnet)
  • Running the Jackpot Manually
  • Contract Overview
  1. Developer Reference

Testnet & Mainnet

PreviousCustom ERC-20 JackpotNextContract Overview & Functions

Last updated 16 hours ago

Testnet & Mainnet Contracts

Megapot runs multiple testing contracts for you to build on and test with. We have a testnet contract and a mainnet contract that is different than our main contract. This allows you to easily test your implementations before deploying code.

We offer both a test contract on testnet and mainnet which you are free to use when testing. The only difference between them, aside from the network, is the testnet contract uses a mock USDC token (MPUSDC) which you can freely mint for testing purposes.

Our Mainnet testnet contract allows you to test in a more realistic environment before deploying to mainnet. It does use real USDC, has a small amount of liquidity, and can be used for testing liquidity addition, edits, withdrawals, etc. Along with real USDC ticket purchases. This contract does not run automatically, but you are able to manually run the jackpot for testing purposes.

Testnet

Testnet Contract (Base Sepolia)

Rapidly develop on testnet. This contract allows you to test your app features without real costs. You can mint the test token (MPUSDC) as often as you need.

  • Entropy Contract: 0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c

  • Token Address: (MPUSDC)

  • Ticket Price: 1_000_000 1 MPUSDC

  • Minimum LP Deposit: 100_000_000 100 MPUSDC

  • Lottery Fee: 1500 15%

  • Referral Fee: 1000 10%

  • Round Duration: 10 minutes

Minting MPUSDC

To mint 100_000 MPUSDC, input 100_000_000_000 in the amount field, with the to field set to your wallet address.

To approve 100_000 MPUSDC, input 100_000_000_000 in the amount field, with the spender field set to the testnet jackpot contract address 0x6f03c7BCaDAdBf5E6F5900DA3d56AdD8FbDac5De.

Mainnet

TEST Contract (Base Mainnet)

This is a test contract we have running on mainnet. This is useful for testing your application against a mainnet environment, without having to wait 1 day for results. With this contract you can test and run jackpots every 10 minutes.

  • Entropy Contract: 0x6E7D74FA7d5c90FEF9F0512987605a6d546181Bb

  • Ticket Price: 1_000_000 1 USDC

  • Minimum LP Deposit: 1_000_000 1 USDC

  • Lottery Fee: 3000 30%

  • Referral Fee: 1000 10%

  • Round Duration: 10 minutes

PROD Contract (Base Mainnet)

This is our mainnet jackpot, the live megapot.io jackpot. Your application should utilize only this contract when live in production.

  • Entropy Contract: 0x6E7D74FA7d5c90FEF9F0512987605a6d546181Bb

  • Ticket Price: 1_000_000 1 USDC

  • Lottery Fee: 3000 30%

  • Referral Fee: 1000 10%

  • Round Duration: 1 day

Running the Jackpot Manually

To run the jackpot manually, you can call the runJackpot function on the jackpot contract.

payableAmount

  • Fee paid to the entropy contract to generate the random number for determining the winner.

  • Note: You can get the current value of the fee by calling the getJackpotFee function on the jackpot contract and convert to ETH units.

  • Mainnet: 0.000005000000000001

  • Testnet: 0.000015000000000001

userRandomNumber

  • Enter any 32 byte value.

  • Example: 0x55fb29339a98ca25bedb7b5aa225041f669ca1407e926a95ce4a9b080ac66907

  • Note: reusing this is fine, Pyth generates randomness, this seed further maximizes randomness

  • You can generate your own with Web3.utils.randomHex(32) or openssl rand -hex 32. Prefix with 0x

Contract Overview

Our Base Sepolia testnet contract uses a mock USDC token for testing purposes. You can mint MPUSDC to your wallet by calling the function on the MPUSDC contract.

Be sure to approve the testnet contract to spend your MPUSDC on the contract. You can access the function and set the spender to the testnet jackpot contract address above.

Token Address: (USDC)

Token Address: (USDC)

Refer to our page for more information on the contracts and their functions.

Ready to build?

0x6f03c7BCaDAdBf5E6F5900DA3d56AdD8FbDac5De
0xA4253E7C13525287C56550b8708100f93E60509f
mint
approve
0x3368Fc551303aF78543DAA6A7D5Ea978cdB27D0A
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
0xbEDd4F2beBE9E3E636161E644759f3cbe3d51B95
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Contract Overview
Start Here