Testnet & Mainnet

Testnet & Mainnet Contracts

Megapot offers a testnet contract and a modified mainnet contract. This allows you to easily test your implementations before deploying code.

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 and automatically runs every 24 hours. The modified mainnet contract uses USDC and runs every 10 minutes.

Our modified mainnet 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 liquidity deposits are always open to test the liquidity experience. 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.

0x6f03c7BCaDAdBf5E6F5900DA3d56AdD8FbDac5De

  • Entropy Contract: 0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c

  • 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

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

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

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

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.

0x3368Fc551303aF78543DAA6A7D5Ea978cdB27D0A

  • 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.

0xbEDd4F2beBE9E3E636161E644759f3cbe3d51B95

  • 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

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

Ready to build? Start Here

Last updated