ETH Price: $2,928.94 (-2.66%)

Contract

0x76e694873DeB519819736b77dD5364C4353f4795
 

Overview

ETH Balance

0.01 ETH

ETH Value

$29.29 (@ $2,928.94/ETH)

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Pool Claim Winni...148531342025-02-02 17:08:03360 days ago1738516083IN
0x76e69487...4353f4795
0 ETH0.000000550.001547
Pool Purchase Ti...148526842025-02-02 16:53:03360 days ago1738515183IN
0x76e69487...4353f4795
0 ETH0.00000040.00141191
Set Round State ...148526542025-02-02 16:52:03360 days ago1738515123IN
0x76e69487...4353f4795
0 ETH0.00000020.00141395
Purchase Tickets148519332025-02-02 16:28:01360 days ago1738513681IN
0x76e69487...4353f4795
0 ETH0.000000060.0002186
Purchase Tickets139954512025-01-13 20:38:37380 days ago1736800717IN
0x76e69487...4353f4795
0 ETH0.000000110.00031613
Pool Claim Winni...139459942025-01-12 17:10:03381 days ago1736701803IN
0x76e69487...4353f4795
0 ETH0.000000690.00111807
Pool Purchase Ti...139455442025-01-12 16:55:03381 days ago1736700903IN
0x76e69487...4353f4795
0 ETH0.000003430.00109608
Set Round State ...139455142025-01-12 16:54:03381 days ago1736700843IN
0x76e69487...4353f4795
0 ETH0.000004250.00109628
Purchase Tickets137810352025-01-08 21:31:25385 days ago1736371885IN
0x76e69487...4353f4795
0 ETH0.000001790.00110687
Purchase Tickets137778872025-01-08 19:46:29385 days ago1736365589IN
0x76e69487...4353f4795
0 ETH0.00000160.00107505
Purchase Tickets136511292025-01-05 21:21:13388 days ago1736112073IN
0x76e69487...4353f4795
0 ETH0.000000670.00340543
Pool Claim Winni...136436242025-01-05 17:11:03388 days ago1736097063IN
0x76e69487...4353f4795
0 ETH0.0000010.00525266
Pool Purchase Ti...136431742025-01-05 16:56:03388 days ago1736096163IN
0x76e69487...4353f4795
0 ETH0.000001060.00535813
Set Round State ...136431442025-01-05 16:55:03388 days ago1736096103IN
0x76e69487...4353f4795
0 ETH0.000000290.00537449
Purchase Tickets135033542025-01-02 11:15:23392 days ago1735816523IN
0x76e69487...4353f4795
0 ETH0.000000670.00406505
Purchase Tickets134998412025-01-02 9:18:17392 days ago1735809497IN
0x76e69487...4353f4795
0 ETH0.00000060.00405551
Purchase Tickets134571492025-01-01 9:35:13393 days ago1735724113IN
0x76e69487...4353f4795
0 ETH0.000000240.00295766
Purchase Tickets134571472025-01-01 9:35:09393 days ago1735724109IN
0x76e69487...4353f4795
0 ETH0.000000240.00296515
Purchase Tickets134313092024-12-31 19:13:53393 days ago1735672433IN
0x76e69487...4353f4795
0 ETH0.000000220.00146903
Purchase Tickets134254962024-12-31 16:00:07393 days ago1735660807IN
0x76e69487...4353f4795
0 ETH0.000017920.00102562
Purchase Tickets134132002024-12-31 9:10:15394 days ago1735636215IN
0x76e69487...4353f4795
0 ETH0.000002510.00115388
Purchase Tickets134129692024-12-31 9:02:33394 days ago1735635753IN
0x76e69487...4353f4795
0 ETH0.00000270.0001512
Purchase Tickets134127472024-12-31 8:55:09394 days ago1735635309IN
0x76e69487...4353f4795
0 ETH0.000003680.00113708
Purchase Tickets134127462024-12-31 8:55:07394 days ago1735635307IN
0x76e69487...4353f4795
0 ETH0.000003290.00113716
Purchase Tickets134120022024-12-31 8:30:19394 days ago1735633819IN
0x76e69487...4353f4795
0 ETH0.000005610.00106225
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MegaPoolBlastMega

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT

/** MegaPoolBlastMega.sol */

pragma solidity 0.8.24;
import "./blast-l2-kit/src/IBlast.sol";
import "./blast-l2-kit/src/IBlastPoints.sol";
import "./megapot/IMegapotBlast.sol";

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @title MegaPoolBlastMega contract
 * @author megapool.party
 */
/// @custom:security-contact [email protected]
contract MegaPoolBlastMega is Ownable {
    /**
     * @notice Megapot contract address
     * @dev The address of the Megapot contract
     */
    address public megapotContractAddress;

    /**
     * @notice Referrer address
     * @dev The address of the referrer
     */
    address private referrerAddress;

    /**
     * @notice Blast gas yield contract address
     * @dev The address of the Blast gas yield contract
     */
    address public blastGasYieldContract;

    /**
     * @notice Blast points contract address
     * @dev The address of the Blast points contract
     */
    address public blastPointsContract;

    /**
     * @notice Blast governor address
     * @dev The address of the Blast governor
     */
    address private blastGovernor;

    /**
     * @notice Player struct
     * @dev The player information for each player
     * @dev ticketsPurchased: The number of total tickets purchased by the player
     * @dev winningsClaimable: The number of winnings claimable by the player
     * @dev isActive: Whether the player is active
     */
    struct Player {
        uint256 ticketsPurchased;
        uint256 winningsClaimable;
        bool isActive;
    }

    /**
     * @notice Mapping of player address to player information
     * @dev The player information for each player
     */
    mapping(address => Player) public players;

    /**
     * @notice Array of active player addresses
     * @dev The addresses of active players
     */
    address[] private activePlayerAddresses;

    /**
     * @notice Mapping of player address to tickets purchased in current round
     * @dev The number of tickets purchased by a player in the current round
     */
    mapping(address => uint256) public playerTicketsCurrentRound;

    /**
     * @notice Total tickets purchased in current round
     * @dev The total number of tickets purchased in the current round
     */
    uint256 public totalTicketsCurrentRound;

    // POOL VARIABLES

    /**
     * @notice Round ID
     * @dev The current round ID
     */
    uint256 public roundId;

    /**
     * @notice Ticket price
     * @dev The price of a ticket in wei
     */
    uint256 public ticketPrice;

    /**
     * @notice Pool fee percentage in basis points
     * @dev The pool fee percentage in basis points
     */
    uint256 public poolFeePercentageBps;

    /**
     * @notice Pool state
     * @dev Open: Pool is open for purchases
     * @dev Closed: Pool is closed
     */
    uint256 public poolState;

    /**
     * @notice Round state
     * @dev Open: Round is open for purchases
     * @dev Pending: Round is pending (pool purchased tickets)
     * @dev Drawing: Round is drawing (results are being calculated)
     */
    uint256 public roundState;

    /**
     * @notice Blast token
     * @dev The Blast token contract
     */
    IERC20 public immutable blastToken;

    /**
     * @notice Enum for pool state (Circuit Breaker)
     * @dev Open: Pool is open for purchases
     * @dev Closed: Pool is closed
     */
    enum PoolState {
        Open,
        Closed
    }

    /**
     * @notice Enum for round state
     * @dev Open: Round is open for purchases
     * @dev Pending: Round is pending (pool purchased tickets)
     * @dev Drawing: Round is drawing (results are being calculated)
     */
    enum RoundState {
        Open,
        Pending,
        Drawing
    }

    //
    //
    //
    // EVENTS
    //
    //
    //

    /**
     * @notice Event for when a player purchases tickets
     * @dev Emitted when a player purchases tickets
     * @param player The address of the player
     * @param ticketsPurchased The number of tickets purchased
     * @param roundId The ID of the round
     */
    event TicketsPurchased(
        address indexed player,
        uint256 indexed ticketsPurchased,
        uint256 indexed roundId
    );

    /**
     * @notice Event for when pool purchases tickets
     * @dev Emitted when pool purchases tickets
     * @param roundId The ID of the round
     * @param totalTicketsPurchased The number of tickets purchased
     * @param totalCost The total cost of the tickets purchased
     */
    event PoolTicketsPurchased(
        uint256 indexed roundId,
        uint256 indexed totalTicketsPurchased,
        uint256 indexed totalCost
    );

    /**
     * @notice Event for when a player claims winnings
     * @dev Emitted when a player claims winnings
     * @param player The address of the player
     * @param amountClaimed The amount of winnings claimed
     */
    event PlayerWinningsClaimed(
        address indexed player,
        uint256 indexed amountClaimed
    );

    /**
     * @notice Event for when contract claims winnings
     * @dev Emitted when contract claims winnings
     * @param amountClaimed The amount of winnings claimed
     * @param roundId The ID of the round
     */
    event PoolWinningsClaimed(
        uint256 indexed amountClaimed,
        uint256 indexed roundId
    );

    /**
     * @notice Event for when winnings are distributed
     * @dev Emitted when winnings are distributed
     * @param roundId The ID of the round
     * @param winningsDistributed The amount of winnings distributed
     * @param poolFee The amount of pool fee
     */
    event WinningsDistributed(
        uint256 indexed roundId,
        uint256 indexed winningsDistributed,
        uint256 indexed poolFee
    );

    /**
     * @notice Event for when a new round is started
     * @dev Emitted when a new round is started
     * @param roundId The ID of the round
     */
    event NewRoundStarted(uint256 indexed roundId);

    /**
     * @notice Event for when a round stat is set Pending
     * @dev Emitted when a round stat is set Pending
     * @param roundId The ID of the round
     */
    event RoundPending(uint256 indexed roundId);

    /**
     * @notice Event for when a round stat is set Drawing
     * @dev Emitted when a round stat is set Drawing
     * @param roundId The ID of the round
     */
    event RoundDrawing(uint256 indexed roundId);

    /**
     * @notice Event for when a round results are set
     * @dev Emitted when a round results are set
     * @param roundId The ID of the round
     * @param totalTicketsPurchased The number of tickets purchased
     * @param totalWinningsClaimable The total winnings claimable
     * @param isPoolWinner Whether the pool is the winner
     */
    event RoundResults(
        uint256 indexed roundId,
        uint256 totalTicketsPurchased,
        uint256 indexed totalWinningsClaimable,
        bool indexed isPoolWinner
    );

    /**
     * @notice Event for when ticket price is updated
     * @dev Emitted when ticket price is updated
     * @param roundId The ID of the round
     * @param ticketPrice The price of a ticket in wei
     */
    event TicketPriceUpdated(
        uint256 indexed roundId,
        uint256 indexed ticketPrice
    );

    /**
     * @notice Event for when referrer address is updated
     * @dev Emitted when referrer address is updated
     * @param roundId The ID of the round
     * @param referrerAddress The address of the referrer
     */
    event ReferrerAddressUpdated(
        uint256 indexed roundId,
        address indexed referrerAddress
    );

    /**
     * @notice Event for when Megapot contract address is updated
     * @dev Emitted when Megapot contract address is updated
     * @param megapotContractAddress The address of the Megapot contract
     */
    event MegapotContractAddressUpdated(address indexed megapotContractAddress);

    /**
     * @notice Event for when pool fee percentage is updated
     * @dev Emitted when pool fee percentage is updated
     * @param roundId The ID of the round
     * @param poolFeePercentageBps The pool fee percentage in basis points
     */
    event PoolFeePercentageUpdated(
        uint256 indexed roundId,
        uint256 indexed poolFeePercentageBps
    );

    /**
     * @notice Event for when pool state is updated
     * @dev Emitted when pool state is updated
     * @param poolState The state of the pool
     */
    event PoolClosed(uint256 indexed poolState);

    /**
     * @notice Event for when emergency withdraw is called
     * @dev Emitted when emergency withdraw is called
     * @param receiver The address of the receiver
     * @param amount The amount of tokens withdrawn
     */
    event EmergencyWithdraw(address indexed receiver, uint256 indexed amount);

    /**
     * @notice Event for when blast gas yield contract is updated
     * @dev Emitted when blast gas yield contract is updated
     * @param blastGasYieldContract The address of the blast gas yield contract
     */
    event BlastGasYieldContractUpdated(address blastGasYieldContract);

    /**
     * @notice Event for when blast points contract is updated
     * @dev Emitted when blast points contract is updated
     * @param blastPointsContract The address of the blast points contract
     */
    event BlastPointsContractUpdated(address blastPointsContract);

    /**
     * @notice Event for when blast governor is updated
     * @dev Emitted when blast governor is updated
     * @param blastGovernor The address of the blast governor
     */
    event BlastGovernorUpdated(address blastGovernor);

    //
    //
    // CONSTRUCTOR
    //
    //
    //
    constructor(
        address _deployerAddress,
        address _referrerAddress,
        address _megapotContractAddress,
        address _blastTokenAddress,
        address _blastGasYieldContract,
        address _blastPointsContract,
        address _governorAddress
    )
        payable
        // We pass in the owner address to the Ownable contract
        Ownable(_deployerAddress)
    {
        blastGasYieldContract = _blastGasYieldContract;
        blastPointsContract = _blastPointsContract;
        blastGovernor = _governorAddress;

        referrerAddress = _referrerAddress;

        players[referrerAddress].isActive = false;
        players[referrerAddress].ticketsPurchased = 0;
        players[referrerAddress].winningsClaimable = 0;

        megapotContractAddress = _megapotContractAddress;

        poolFeePercentageBps = 500;
        ticketPrice = 100 * 10 ** 18;
        roundId = 1;
        roundState = uint256(RoundState.Open);
        poolState = uint256(PoolState.Open);

        blastToken = IERC20(_blastTokenAddress);

        // Emit events for initial round setup
        emit TicketPriceUpdated(roundId, ticketPrice);
        emit PoolFeePercentageUpdated(roundId, poolFeePercentageBps);
        emit ReferrerAddressUpdated(roundId, referrerAddress);
        emit NewRoundStarted(roundId);
        emit MegapotContractAddressUpdated(megapotContractAddress);
        // Configure the contract for automatic yield and claimable gas on Blast
        IBlast(blastGasYieldContract).configureClaimableYield();
        IBlast(blastGasYieldContract).configureClaimableGas();
        IBlast(blastGasYieldContract).configureGovernor(blastGovernor);

        // // configure Points Operator
        IBlastPoints(blastPointsContract).configurePointsOperator(
            blastGovernor
        );
    }

    //
    //
    //
    // MODIFIERS
    //
    //
    //

    /**
     * @notice Modifier to check if pool is open
     * @dev Only callable when pool is open
     */
    modifier onlyOpenPool() {
        require(
            poolState == uint256(PoolState.Open),
            "MegaPoolBlast: Pool is not open"
        );
        _;
    }

    /**
     * @notice Modifier to check if round is open
     * @dev Only callable when round is open
     */
    modifier onlyOpenRound() {
        require(
            roundState == uint256(RoundState.Open),
            "MegaPoolBlast: Round is not open"
        );
        _;
    }

    /**
     * @notice Modifier to check if round is pending
     * @dev Only callable when round is pending
     */
    modifier onlyPendingRound() {
        require(
            roundState == uint256(RoundState.Pending),
            "MegaPoolBlast: Round is not pending"
        );
        _;
    }

    /**
     * @notice Modifier to check if round is drawing
     * @dev Only callable when round is drawing
     */
    modifier onlyDrawingRound() {
        require(
            roundState == uint256(RoundState.Drawing),
            "MegaPoolBlast: Round is not drawing"
        );
        _;
    }

    /**
     * @notice Modifier to check if tickets have been purchased
     * @dev Only callable when tickets have been purchased
     */
    modifier onlyIfTicketsPurchased() {
        require(
            totalTicketsCurrentRound > 0,
            "MegaPoolBlast: No tickets purchased"
        );
        _;
    }

    //
    //
    //
    // PLAYER FUNCTIONS
    //
    //
    //

    /**
     * @notice Purchase tickets
     * @dev Only callable by the owner when round is open
     * @param _ticketCount The number of tickets to purchase
     * @param _blastAmount The amount of Blast tokens to use for the purchase
     */
    function purchaseTickets(
        uint256 _ticketCount,
        uint256 _blastAmount
    ) external payable onlyOpenPool onlyOpenRound {
        require(
            _ticketCount > 0,
            "MegaPoolBlast: Ticket count must be greater than 0"
        );

        require(
            _blastAmount == ticketPrice * _ticketCount,
            "MegaPoolBlast: Incorrect amount of funds sent"
        );

        require(
            blastToken.transferFrom(msg.sender, address(this), _blastAmount),
            "ERC20: transfer failed"
        );

        Player storage player = players[msg.sender];
        // Add player to active user addresses if not already in there
        if (!player.isActive) {
            activePlayerAddresses.push(msg.sender);
        }
        player.isActive = true;
        player.ticketsPurchased += _ticketCount;
        playerTicketsCurrentRound[msg.sender] += _ticketCount;
        totalTicketsCurrentRound += _ticketCount;

        // Emit event for ticket purchase
        emit TicketsPurchased(msg.sender, _ticketCount, roundId);
    }

    //
    //
    //
    // POOL FUNCTIONS
    //
    //
    //

    /**
     * @notice Pool purchase tickets
     * @dev Only callable by the owner when round is pending
     * @return bool
     */
    function poolPurchaseTickets()
        external
        payable
        onlyOwner
        onlyPendingRound
        returns (bool)
    {
        require(
            roundState == uint256(RoundState.Pending),
            "MegaPoolBlast: Round is not pending"
        );

        uint256 totalCost = totalTicketsCurrentRound * ticketPrice;

        require(
            blastToken.balanceOf(address(this)) >= totalCost,
            "MegaPoolBlast: Insufficient contract balance"
        );
        IMegapotBlast megapot = IMegapotBlast(megapotContractAddress);
        bool success = blastToken.approve(megapotContractAddress, totalCost);
        require(success, "MegaPoolBlast: Blast token approval failed");

        uint256 allowance = blastToken.allowance(
            address(this),
            megapotContractAddress
        );
        require(
            allowance >= totalCost,
            "MegaPoolBlast: Token allowance too low"
        );

        megapot.purchaseTickets(referrerAddress, totalCost);

        // Update round state to Drawing
        roundState = uint256(RoundState.Drawing);
        emit RoundDrawing(roundId);

        // Emit event for successful ticket purchase
        emit PoolTicketsPurchased(roundId, totalTicketsCurrentRound, totalCost);

        return true;
    }

    /**
     * @notice Pool claim winnings
     * @dev Only callable by the owner when round is drawing
     */
    function poolClaimWinnings() external onlyOwner onlyDrawingRound {
        IMegapotBlast megapot = IMegapotBlast(megapotContractAddress);
        IMegapotBlast.User memory userInfo = megapot.usersInfo(address(this));
        uint256 totalWinnings = userInfo.winningsClaimable;

        uint256 activePlayerAddressesLength = activePlayerAddresses.length;

        bool isPoolWinner = totalWinnings > 0;

        if (isPoolWinner) {
            // Get contract balance
            uint256 contractBalanceBeforeClaim = blastToken.balanceOf(
                address(this)
            );

            megapot.withdrawWinnings();
            uint256 contractBalanceAfterClaim = blastToken.balanceOf(
                address(this)
            );
            uint256 claimedWinnings = contractBalanceAfterClaim -
                contractBalanceBeforeClaim;
            require(
                totalWinnings == claimedWinnings,
                "MegaPoolBlast: Winnings claimed do not match"
            );

            // Emit event for winnings claimed
            emit PoolWinningsClaimed(claimedWinnings, roundId);

            // Calculate the pool fee
            uint256 poolFee = (claimedWinnings * poolFeePercentageBps) / 10000;
            uint256 winningsToDistribute = claimedWinnings - poolFee;

            // Add referrer winningsClaimable
            Player storage referrer = players[referrerAddress];

            referrer.winningsClaimable += poolFee;

            // Distribute winnings to players
            for (uint256 i = 0; i < activePlayerAddressesLength; ) {
                address playerAddress = activePlayerAddresses[i];
                uint256 playerTickets = playerTicketsCurrentRound[
                    playerAddress
                ];

                // Calculate player's share of winnings
                uint256 playerWinnings = (winningsToDistribute *
                    playerTickets) / totalTicketsCurrentRound;

                // Update player's claimableWinnings
                players[playerAddress].winningsClaimable += playerWinnings;
                unchecked {
                    ++i;
                }
            }

            // Emit event for winnings distribution
            emit WinningsDistributed(roundId, winningsToDistribute, poolFee);
        }
        emit RoundResults(
            roundId,
            totalTicketsCurrentRound,
            totalWinnings,
            isPoolWinner
        );

        // Reset totalTicketsCurrentRound
        totalTicketsCurrentRound = 0;

        // Reset player's isActive to false
        for (uint256 i = 0; i < activePlayerAddressesLength; ) {
            address playerAddress = activePlayerAddresses[i];
            players[playerAddress].isActive = false;
            delete playerTicketsCurrentRound[playerAddress];
            unchecked {
                ++i;
            }
        }

        // Empty activePlayerAddresses
        delete activePlayerAddresses;

        // Reset round state
        roundState = uint256(RoundState.Open);

        // Start new round
        ++roundId;

        // Emit event for new round started
        emit NewRoundStarted(roundId);
    }

    /**
     * @notice Allows a player to claim their winnings
     * @dev Transfers the claimable winnings to the player and resets their winningsClaimable to 0
     */
    function claimWinnings() external {
        Player storage player = players[msg.sender];
        uint256 winningsToTransfer = player.winningsClaimable;
        require(winningsToTransfer > 0, "No winnings to claim");

        // Reset winningsClaimable before transfer to prevent reentrancy
        player.winningsClaimable = 0;

        // Transfer winnings to the player
        bool success = blastToken.transfer(msg.sender, winningsToTransfer);
        require(success, "ERC20: transfer failed");

        emit PlayerWinningsClaimed(msg.sender, winningsToTransfer);
    }

    //
    //
    //
    // POOL STATE OPERATIONS VARIABLE UPDATE FUNCTIONS
    //
    //
    //
    /**
     * @notice Set the address of the Megapot contract
     * @dev Only callable by the owner. Updates the megapot contract address and emits an event.
     * @param _addr The address of the new Megapot contract
     */
    function setMegapotContractAddress(address _addr) external onlyOwner {
        megapotContractAddress = _addr;
        emit MegapotContractAddressUpdated(megapotContractAddress);
    }

    /**
     * @notice Set the referrer address
     * @dev Only callable by the owner. Updates the referrer address and emits an event.
     * @param _referrerAddress The address of the new referrer
     */
    function setReferrerAddress(address _referrerAddress) external onlyOwner {
        referrerAddress = _referrerAddress;
        emit ReferrerAddressUpdated(roundId, referrerAddress);
    }

    /**
     * @notice Set the address of the Blast gas yield contract
     * @dev Only callable by the owner. Updates the gas yield contract address and emits an event.
     * @param _addr The address of the new Blast gas yield contract
     */
    function setBlastGasYieldContract(address _addr) external onlyOwner {
        blastGasYieldContract = _addr;
        emit BlastGasYieldContractUpdated(blastGasYieldContract);
    }

    /**
     * @notice Set the address of the Blast points contract
     * @dev Only callable by the owner. Updates the points contract address and emits an event.
     * @param _addr The address of the new Blast points contract
     */
    function setBlastPointsContract(address _addr) external onlyOwner {
        blastPointsContract = _addr;
        emit BlastPointsContractUpdated(blastPointsContract);
    }

    /**
     * @notice Set the address of the Blast governor
     * @dev Only callable by the owner. Updates the governor address and emits an event.
     * @param _addr The address of the new Blast governor
     */
    function setBlastGovernor(address _addr) external onlyOwner {
        blastGovernor = _addr;
        emit BlastGovernorUpdated(blastGovernor);
    }

    //
    //
    // POOL STATE VARIABLE UPDATE FUNCTIONS
    //
    //
    /**
     * @notice Set the price of a ticket
     * @dev Only callable by the owner. Updates the ticket price and emits an event.
     * @param _ticketPrice The new price of a ticket in wei
     */
    function setTicketPrice(uint256 _ticketPrice) external onlyOwner {
        ticketPrice = _ticketPrice;
        emit TicketPriceUpdated(roundId, ticketPrice);
    }

    /**
     * @notice Set the pool fee percentage in basis points
     * @dev Only callable by the owner. Updates the pool fee percentage and emits an event.
     * @param _poolFeePercentageBps The new pool fee percentage in basis points
     */
    function setPoolFeePercentageBps(
        uint256 _poolFeePercentageBps
    ) external onlyOwner {
        poolFeePercentageBps = _poolFeePercentageBps;
        emit PoolFeePercentageUpdated(roundId, poolFeePercentageBps);
    }

    //
    //
    //
    // PLAYER(s) / ROUND(s) FUNCTIONS
    //
    //
    //
    /**
     * @notice Returns the count of active players in the current round
     * @dev Retrieves the length of the activePlayerAddresses array
     * @return The number of active players in the current round
     */
    function getActivePlayersCount() external view returns (uint256) {
        return activePlayerAddresses.length;
    }

    /**
     * @notice Get the number of tickets a player has in a current round
     * @dev Retrieves the number of tickets purchased by a specific player in the current round
     * @param _player The address of the player
     * @return The number of tickets purchased by the player in the current round
     */
    function getPlayerTicketsCurrentRound(
        address _player
    ) external view returns (uint256) {
        return playerTicketsCurrentRound[_player];
    }

    //
    //
    //
    // POOL & ROUND STATE FUNCTIONS
    //
    //
    //

    /**
     * @notice Set the pool state to closed
     * @dev Only callable by the owner. Updates the pool state and emits an event.
     */
    function setPoolStateClosed() external onlyOwner {
        poolState = uint256(PoolState.Closed);

        emit PoolClosed(poolState);
    }

    /**
     * @notice Set the round state to pending
     * @dev Only callable by the owner. Updates the round state and emits an event.
     */
    function setRoundStatePending()
        external
        onlyOwner
        onlyOpenRound
        onlyIfTicketsPurchased
    {
        roundState = uint256(RoundState.Pending);

        // Emit RoundPending event
        emit RoundPending(roundId);
    }

    //
    //
    //
    // BLAST FUNCTIONS
    //
    //
    //

    // /**
    //  * @notice Configure the Blast gas yield governor
    //  * @dev Only callable by the owner
    //  * @param _governor The address of the Blast gas yield governor
    //  */
    // function configureBlastGasYieldGovernor(
    //     address _governor
    // ) external onlyOwner {
    //     IBlast(blastGasYieldContract).configureGovernor(_governor);
    // }

    // /**
    //  * @notice Configure the Blast points operator
    //  * @dev Only callable by the owner
    //  * @param _operator The address of the Blast points operator
    //  */
    // function configureBlastPointsOperator(
    //     address _operator
    // ) external onlyOwner {
    //     IBlastPoints(blastPointsContract).configurePointsOperator(_operator);
    // }

    // /**
    //  * @notice Claim a specific amount of Blast gas yield
    //  * @dev Only callable by the owner
    //  * @param _recipient The address to send the yield to
    //  * @param _amount The amount of yield to claim
    //  */
    // function claimYield(
    //     address _recipient,
    //     uint256 _amount
    // ) external onlyOwner {
    //     IBlast(blastGasYieldContract).claimYield(
    //         address(this),
    //         _recipient,
    //         _amount
    //     );
    // }

    // /**
    //  * @notice Claim all Blast gas yield
    //  * @dev Only callable by the owner. If you'd like to maximize the amount of gas fees, then you can use claimMaxGas to guarantee a 100% claim rate. Only gas fees that have fully matured (30 days) will be claimed. Any remaining fees after calling this function will remain in the Blast Gas contract for you to claim later.
    //  * @param _recipient The address to send the yield to
    //  */
    // function claimAllYield(address _recipient) external onlyOwner {
    //     IBlast(blastGasYieldContract).claimAllYield(address(this), _recipient);
    // }

    // /**
    //  * @notice Claim the maximum amount of Blast gas yield
    //  * @dev Only callable by the owner. If you’d like to maximize the amount of gas fees, then you can use claimMaxGas to guarantee a 100% claim rate. Only gas fees that have fully matured (30 days) will be claimed. Any remaining fees after calling this function will remain in the Blast Gas contract for you to claim later.
    //  * @param _recipient The address to send the yield to
    //  */
    // function claimMaxGas(address _recipient) external onlyOwner {
    //     IBlast(blastGasYieldContract).claimMaxGas(address(this), _recipient);
    // }

    // /**
    //  * @notice Claim all Blast gas yield
    //  * @dev Only callable by the owner. If you'd like to maximize the amount of gas fees, then you can use claimMaxGas to guarantee a 100% claim rate. Only gas fees that have fully matured (30 days) will be claimed. Any remaining fees after calling this function will remain in the Blast Gas contract for you to claim later.
    //  * @param _recipient The address to send the yield to
    //  */
    // function claimAllGas(address _recipient) external onlyOwner {
    //     IBlast(blastGasYieldContract).claimAllGas(address(this), _recipient);
    // }

    // /**
    //  * @notice Claim gas at a minimum claim rate
    //  * @dev Only callable by the owner. Allows you to claim the maximum amount of gas fees while guaranteeing a specific claim rate. If you're comfortable with an 80% claim rate, that translates to 8000 bip. Calling this function with a 100% min claim rate is the same as calling claimMaxGas.
    //  * @param _recipient The address to send the yield to
    //  * @param _claimRateBips The minimum claim rate in bip
    //  */
    // function claimGasAtMinClaimRate(
    //     address _recipient,
    //     uint256 _claimRateBips
    // ) external onlyOwner {
    //     IBlast(blastGasYieldContract).claimGasAtMinClaimRate(
    //         address(this),
    //         _recipient,
    //         _claimRateBips
    //     );
    // }

    // /**
    //  * @notice Read the claimable gas yield
    //  * @dev Only callable by the owner. Retrieves the claimable gas yield for the contract
    //  * @return The claimable gas yield in wei
    //  */
    // function readClaimableGas() external view returns (uint256) {
    //     (, uint256 etherBalance, , ) = IBlast(blastGasYieldContract)
    //         .readGasParams(address(this));
    //     return etherBalance;
    // }

    fallback() external payable {}

    receive() external payable {}
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.24;

enum YieldMode {
    AUTOMATIC,
    VOID,
    CLAIMABLE
}

enum GasMode {
    VOID,
    CLAIMABLE
}

interface IBlast {
    // configure
    function configureContract(
        address contractAddress,
        YieldMode _yield,
        GasMode gasMode,
        address governor
    ) external;

    function configure(
        YieldMode _yield,
        GasMode gasMode,
        address governor
    ) external;

    // base configuration options
    function configureClaimableYield() external;

    function configureClaimableYieldOnBehalf(address contractAddress) external;

    function configureAutomaticYield() external;

    function configureAutomaticYieldOnBehalf(address contractAddress) external;

    function configureVoidYield() external;

    function configureVoidYieldOnBehalf(address contractAddress) external;

    function configureClaimableGas() external;

    function configureClaimableGasOnBehalf(address contractAddress) external;

    function configureVoidGas() external;

    function configureVoidGasOnBehalf(address contractAddress) external;

    function configureGovernor(address _governor) external;

    function configureGovernorOnBehalf(
        address _newGovernor,
        address contractAddress
    ) external;

    // claim yield
    function claimYield(
        address contractAddress,
        address recipientOfYield,
        uint256 amount
    ) external returns (uint256);

    function claimAllYield(
        address contractAddress,
        address recipientOfYield
    ) external returns (uint256);

    // claim gas
    function claimAllGas(
        address contractAddress,
        address recipientOfGas
    ) external returns (uint256);

    function claimGasAtMinClaimRate(
        address contractAddress,
        address recipientOfGas,
        uint256 minClaimRateBips
    ) external returns (uint256);

    function claimMaxGas(
        address contractAddress,
        address recipientOfGas
    ) external returns (uint256);

    function claimGas(
        address contractAddress,
        address recipientOfGas,
        uint256 gasToClaim,
        uint256 gasSecondsToConsume
    ) external returns (uint256);

    // read functions
    function readClaimableYield(
        address contractAddress
    ) external view returns (uint256);

    function readYieldConfiguration(
        address contractAddress
    ) external view returns (uint8);

    function readGasParams(
        address contractAddress
    )
        external
        view
        returns (
            uint256 etherSeconds,
            uint256 etherBalance,
            uint256 lastUpdated,
            GasMode
        );
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.24;

interface IBlastPoints {
    function configurePointsOperator(address operator) external;

    function configurePointsOperatorOnBehalf(
        address contractAddress,
        address operator
    ) external;
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.24;

interface IMegapotBlast {
    // Structs
    struct User {
        uint256 ticketsPurchasedTotalBps;
        uint256 winningsClaimable;
        bool active;
    }

    struct LP {
        uint256 principal;
        uint256 stake;
        uint256 riskPercentage;
        bool active;
    }

    // Events
    event UserTicketPurchase(
        address indexed user,
        uint256 ticketsPurchasedTotalBps,
        address referrer
    );
    event UserWinWithdrawal(address indexed user, uint256 amount);
    event UserReferralFeeWithdrawal(address indexed user, uint256 amount);
    event ProtocolFeeWithdrawal(uint256 amount);
    event LpDeposit(
        address indexed lpAddress,
        uint256 amount,
        uint256 riskPercentage
    );
    event LpPrincipalWithdrawal(
        address indexed lpAddress,
        uint256 principalAmount
    );
    event LotteryRunRequested(address indexed user);
    event LotteryRun(
        uint256 time,
        address winner,
        uint256 winningTicket,
        uint256 winAmount,
        uint256 ticketsPurchasedTotalBps
    );
    event EntropyResult(uint64 sequenceNumber, bytes32 randomNumber);
    event LpStakeWithdrawal(address indexed lpAddress);
    event LpRebalance(
        address indexed lpAddress,
        uint256 principal,
        uint256 stake
    );

    // View functions
    function allowPurchasing() external view returns (bool);

    function usersInfo(address) external view returns (User memory);

    function lpsInfo(address) external view returns (LP memory);

    function ticketPrice() external view returns (uint256);

    function lastWinnerAddress() external view returns (address);

    function lotteryLock() external view returns (bool);

    function entropyCallbackLock() external view returns (bool);

    // State-changing functions
    function purchaseTickets(address referrer, uint256 value) external payable;

    function withdrawWinnings() external;

    function withdrawReferralFees() external;

    function withdrawProtocolFees() external;

    function lpDeposit(uint256 riskPercentage, uint256 value) external;

    function withdrawAllLP() external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_deployerAddress","type":"address"},{"internalType":"address","name":"_referrerAddress","type":"address"},{"internalType":"address","name":"_megapotContractAddress","type":"address"},{"internalType":"address","name":"_blastTokenAddress","type":"address"},{"internalType":"address","name":"_blastGasYieldContract","type":"address"},{"internalType":"address","name":"_blastPointsContract","type":"address"},{"internalType":"address","name":"_governorAddress","type":"address"}],"stateMutability":"payable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"blastGasYieldContract","type":"address"}],"name":"BlastGasYieldContractUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"blastGovernor","type":"address"}],"name":"BlastGovernorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"blastPointsContract","type":"address"}],"name":"BlastPointsContractUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"megapotContractAddress","type":"address"}],"name":"MegapotContractAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"}],"name":"NewRoundStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":true,"internalType":"uint256","name":"amountClaimed","type":"uint256"}],"name":"PlayerWinningsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolState","type":"uint256"}],"name":"PoolClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"poolFeePercentageBps","type":"uint256"}],"name":"PoolFeePercentageUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"totalTicketsPurchased","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"totalCost","type":"uint256"}],"name":"PoolTicketsPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"amountClaimed","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"}],"name":"PoolWinningsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"address","name":"referrerAddress","type":"address"}],"name":"ReferrerAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"}],"name":"RoundDrawing","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"}],"name":"RoundPending","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalTicketsPurchased","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"totalWinningsClaimable","type":"uint256"},{"indexed":true,"internalType":"bool","name":"isPoolWinner","type":"bool"}],"name":"RoundResults","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"ticketPrice","type":"uint256"}],"name":"TicketPriceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":true,"internalType":"uint256","name":"ticketsPurchased","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"}],"name":"TicketsPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"winningsDistributed","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"poolFee","type":"uint256"}],"name":"WinningsDistributed","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"blastGasYieldContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blastPointsContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blastToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimWinnings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getActivePlayersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_player","type":"address"}],"name":"getPlayerTicketsCurrentRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"megapotContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"playerTicketsCurrentRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"players","outputs":[{"internalType":"uint256","name":"ticketsPurchased","type":"uint256"},{"internalType":"uint256","name":"winningsClaimable","type":"uint256"},{"internalType":"bool","name":"isActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolClaimWinnings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"poolFeePercentageBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolPurchaseTickets","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"poolState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ticketCount","type":"uint256"},{"internalType":"uint256","name":"_blastAmount","type":"uint256"}],"name":"purchaseTickets","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"roundId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roundState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setBlastGasYieldContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setBlastGovernor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setBlastPointsContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setMegapotContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolFeePercentageBps","type":"uint256"}],"name":"setPoolFeePercentageBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPoolStateClosed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_referrerAddress","type":"address"}],"name":"setReferrerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setRoundStatePending","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ticketPrice","type":"uint256"}],"name":"setTicketPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ticketPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTicketsCurrentRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a060405260405162001f3f38038062001f3f83398101604081905262000026916200041f565b866001600160a01b0381166200005657604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006181620003b2565b50600380546001600160a01b03199081166001600160a01b038681169190911790925560048054821685841617905560058054821684841617905560028054821689841690811782556000908152600660205260408082208301805460ff19169055825485168252808220829055915484168152818120600190810182905580549093168985161783556101f4600c5568056bc75e2d63100000600b819055600a849055600e829055600d82905593881660805290517fd4c5e06b1ae097ba02372652a7adaa6e4a8e00be527497a3ad0ebc3f761ef3fb9190a3600c54600a546040517f49785993d16ad978a1b3890bf38403b5cb33051a9055df69384a1452f05a65df90600090a3600254600a546040516001600160a01b03909216917fe13062f9359faca1f402c58a009f412a8874d0f1a74a666ca7676d572e1260a390600090a3600a546040517fae4cf40c31a833f14b2aee71da8cb55d5fd1944a9ed5b7696022328921f6e31790600090a26001546040516001600160a01b03909116907f11742c438d1aca9917eebebda548598070d068db2e04e605a117855a79b03f0490600090a2600360009054906101000a90046001600160a01b03166001600160a01b031663f098767a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200025a57600080fd5b505af11580156200026f573d6000803e3d6000fd5b50505050600360009054906101000a90046001600160a01b03166001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620002c457600080fd5b505af1158015620002d9573d6000803e3d6000fd5b5050600354600554604051631d70c8d360e31b81526001600160a01b0391821660048201529116925063eb8646989150602401600060405180830381600087803b1580156200032757600080fd5b505af11580156200033c573d6000803e3d6000fd5b5050600480546005546040516336b91f2b60e01b81526001600160a01b03918216938101939093521692506336b91f2b9150602401600060405180830381600087803b1580156200038c57600080fd5b505af1158015620003a1573d6000803e3d6000fd5b5050505050505050505050620004b4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200041a57600080fd5b919050565b600080600080600080600060e0888a0312156200043b57600080fd5b620004468862000402565b9650620004566020890162000402565b9550620004666040890162000402565b9450620004766060890162000402565b9350620004866080890162000402565b92506200049660a0890162000402565b9150620004a660c0890162000402565b905092959891949750929550565b608051611a3e6200050160003960008181610252015281816108cf015281816109cc01528181610ac801528181610d3f01528181610fc6015281816110a501526115980152611a3e6000f3fe6080604052600436106101b95760003560e01c80638cd221c9116100eb578063c3238a1d1161008f578063ea3647a811610061578063ea3647a814610523578063f2fde38b14610543578063f372136914610563578063f4057c061461057857005b8063c3238a1d14610471578063e0ba8cea14610491578063e2eb41ff146104a7578063e3b1055c1461050357005b8063a4636c4d116100c8578063a4636c4d146103e6578063a6b95c101461041c578063b401faf11461043c578063b930b4821461045157005b80638cd221c91461039c5780638da5cb5b146103b257806399b8aff5146103d057005b806333f8aba71161015d578063715018a61161012f578063715018a61461032c578063773c7c4a146103415780638b210472146103575780638c3421f31461038457005b806333f8aba7146102cc57806354882df3146102e15780636266d324146102f6578063641ad8a91461031657005b80631834c0c9116101965780631834c0c9146102205780631b078ab3146102405780631d5023c81461028c57806327943fc7146102ac57005b806309415a4f146101c25780631209b1f6146101d7578063159816501461020057005b366101c057005b005b3480156101ce57600080fd5b506101c061058b565b3480156101e357600080fd5b506101ed600b5481565b6040519081526020015b60405180910390f35b34801561020c57600080fd5b506101c061021b3660046117f9565b610679565b34801561022c57600080fd5b506101c061023b3660046117f9565b6106b8565b34801561024c57600080fd5b506102747f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101f7565b34801561029857600080fd5b506101c06102a7366004611812565b6106f7565b3480156102b857600080fd5b506101c06102c7366004611812565b61074c565b3480156102d857600080fd5b506007546101ed565b3480156102ed57600080fd5b506101c06107a9565b34801561030257600080fd5b506101c0610311366004611812565b6107e3565b34801561032257600080fd5b506101ed600d5481565b34801561033857600080fd5b506101c0610839565b34801561034d57600080fd5b506101ed60095481565b34801561036357600080fd5b506101ed610372366004611812565b60086020526000908152604090205481565b61038c61084d565b60405190151581526020016101f7565b3480156103a857600080fd5b506101ed600a5481565b3480156103be57600080fd5b506000546001600160a01b0316610274565b3480156103dc57600080fd5b506101ed600c5481565b3480156103f257600080fd5b506101ed610401366004611812565b6001600160a01b031660009081526008602052604090205490565b34801561042857600080fd5b506101c0610437366004611812565b610c70565b34801561044857600080fd5b506101c0610cc2565b34801561045d57600080fd5b50600454610274906001600160a01b031681565b34801561047d57600080fd5b50600354610274906001600160a01b031681565b34801561049d57600080fd5b506101ed600e5481565b3480156104b357600080fd5b506104e66104c2366004611812565b60066020526000908152604090208054600182015460029092015490919060ff1683565b6040805193845260208401929092521515908201526060016101f7565b34801561050f57600080fd5b50600154610274906001600160a01b031681565b34801561052f57600080fd5b506101c061053e366004611812565b610e2e565b34801561054f57600080fd5b506101c061055e366004611812565b610e84565b34801561056f57600080fd5b506101c0610ec2565b6101c0610586366004611842565b6113f9565b61059361174a565b600e54156105e85760405162461bcd60e51b815260206004820181905260248201527f4d656761506f6f6c426c6173743a20526f756e64206973206e6f74206f70656e60448201526064015b60405180910390fd5b6000600954116106465760405162461bcd60e51b815260206004820152602360248201527f4d656761506f6f6c426c6173743a204e6f207469636b657473207075726368616044820152621cd95960ea1b60648201526084016105df565b6001600e55600a546040517f6cfb19826b5a053d873d738b99290455661276ebe2b40ae5f5973f46995a36d990600090a2565b61068161174a565b600b819055600a546040518291907fd4c5e06b1ae097ba02372652a7adaa6e4a8e00be527497a3ad0ebc3f761ef3fb90600090a350565b6106c061174a565b600c819055600a546040518291907f49785993d16ad978a1b3890bf38403b5cb33051a9055df69384a1452f05a65df90600090a350565b6106ff61174a565b600280546001600160a01b0319166001600160a01b038316908117909155600a546040517fe13062f9359faca1f402c58a009f412a8874d0f1a74a666ca7676d572e1260a390600090a350565b61075461174a565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f3b389f2d3ca4b98585be394e375e512a2b6325e806dcc2ae6dca995a2fd31439906020015b60405180910390a150565b6107b161174a565b6001600d8190556040517f925a19753e677c9dc36a80e0fc824ca0c5b1afde494872b43daccab9ffeaffd490600090a2565b6107eb61174a565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527f590b6e04dfc334615ab5a579e76aa2478ad80af902902618f5a9e044196757c29060200161079e565b61084161174a565b61084b6000611777565b565b600061085761174a565b6001600e54146108795760405162461bcd60e51b81526004016105df90611864565b6001600e541461089b5760405162461bcd60e51b81526004016105df90611864565b6000600b546009546108ad91906118bd565b6040516370a0823160e01b815230600482015290915081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610916573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093a91906118da565b101561099d5760405162461bcd60e51b815260206004820152602c60248201527f4d656761506f6f6c426c6173743a20496e73756666696369656e7420636f6e7460448201526b726163742062616c616e636560a01b60648201526084016105df565b60015460405163095ea7b360e01b81526001600160a01b039182166004820181905260248201849052916000917f00000000000000000000000000000000000000000000000000000000000000009091169063095ea7b3906044016020604051808303816000875af1158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190611908565b905080610a9d5760405162461bcd60e51b815260206004820152602a60248201527f4d656761506f6f6c426c6173743a20426c61737420746f6b656e20617070726f6044820152691d985b0819985a5b195960b21b60648201526084016105df565b600154604051636eb1769f60e11b81523060048201526001600160a01b0391821660248201526000917f0000000000000000000000000000000000000000000000000000000000000000169063dd62ed3e90604401602060405180830381865afa158015610b0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3391906118da565b905083811015610b945760405162461bcd60e51b815260206004820152602660248201527f4d656761506f6f6c426c6173743a20546f6b656e20616c6c6f77616e636520746044820152656f6f206c6f7760d01b60648201526084016105df565b6002546040516357c220ef60e01b81526001600160a01b03918216600482015260248101869052908416906357c220ef90604401600060405180830381600087803b158015610be257600080fd5b505af1158015610bf6573d6000803e3d6000fd5b5060029250610c03915050565b600e55600a546040517fac73857f4f68972d1f03640417932faa7e2b7fb7727584a5d5aec2769977ce3e90600090a283600954600a547fd99a59f5e7638616a9a116bd9cc0ca8033bea4215873bc50611fa5a891aca99160405160405180910390a4600194505050505090565b610c7861174a565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f11742c438d1aca9917eebebda548598070d068db2e04e605a117855a79b03f0490600090a250565b336000908152600660205260409020600181015480610d1a5760405162461bcd60e51b81526020600482015260146024820152734e6f2077696e6e696e677320746f20636c61696d60601b60448201526064016105df565b60006001830181905560405163a9059cbb60e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610d90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db49190611908565b905080610dfc5760405162461bcd60e51b8152602060048201526016602482015275115490cc8c0e881d1c985b9cd9995c8819985a5b195960521b60448201526064016105df565b604051829033907fc92f63975de8621ffe782345b82a5a94f51c144e380bbd2ec9f53b3ccfe7b73090600090a3505050565b610e3661174a565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f801a24d4f1f7ba1e29f4072dd6b094c83d624358feb05d172c10aa9cf312a37c9060200161079e565b610e8c61174a565b6001600160a01b038116610eb657604051631e4fbdf760e01b8152600060048201526024016105df565b610ebf81611777565b50565b610eca61174a565b6002600e5414610f285760405162461bcd60e51b815260206004820152602360248201527f4d656761506f6f6c426c6173743a20526f756e64206973206e6f742064726177604482015262696e6760e81b60648201526084016105df565b600154604051635d0eaaaf60e01b81523060048201526001600160a01b03909116906000908290635d0eaaaf90602401606060405180830381865afa158015610f75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f999190611923565b60208101516007549192509081158015906112fb576040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611015573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103991906118da565b9050856001600160a01b031663cc42e83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561107657600080fd5b505af115801561108a573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a0823190602401602060405180830381865afa1580156110f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111991906118da565b905060006111278383611991565b905080861461118d5760405162461bcd60e51b815260206004820152602c60248201527f4d656761506f6f6c426c6173743a2057696e6e696e677320636c61696d65642060448201526b0c8de40dcdee840dac2e8c6d60a31b60648201526084016105df565b600a5460405182907f58bebe106df24787d9e7a43008b75016a7d3c877da8caa15a1041bb5b92fd18b90600090a36000612710600c54836111ce91906118bd565b6111d891906119a4565b905060006111e68284611991565b6002546001600160a01b0316600090815260066020526040812060018101805493945090928592906112199084906119c6565b90915550600090505b888110156112c35760006007828154811061123f5761123f6119d9565b60009182526020808320909101546001600160a01b031680835260089091526040822054600954919350919061127583886118bd565b61127f91906119a4565b6001600160a01b0384166000908152600660205260408120600101805492935083929091906112af9084906119c6565b909155505060019093019250611222915050565b50600a54604051849184917fbe1d837dc2b7f451c1f41fa55c0a2a4c20a693f1f8906132c5b5a735848ed9c090600090a45050505050505b80151583600a547ff4a21cc9ce913f5ff75a4c2fff9c173260ea8a9a2e43ba17c1a82829bce1596360095460405161133591815260200190565b60405180910390a4600060098190555b828110156113a057600060078281548110611362576113626119d9565b60009182526020808320909101546001600160a01b03168252600681526040808320600201805460ff19169055600890915281205550600101611345565b506113ad600760006117c7565b6000600e55600a80546000906113c2906119ef565b90915550600a546040517fae4cf40c31a833f14b2aee71da8cb55d5fd1944a9ed5b7696022328921f6e31790600090a25050505050565b600d54156114495760405162461bcd60e51b815260206004820152601f60248201527f4d656761506f6f6c426c6173743a20506f6f6c206973206e6f74206f70656e0060448201526064016105df565b600e54156114995760405162461bcd60e51b815260206004820181905260248201527f4d656761506f6f6c426c6173743a20526f756e64206973206e6f74206f70656e60448201526064016105df565b600082116115045760405162461bcd60e51b815260206004820152603260248201527f4d656761506f6f6c426c6173743a205469636b657420636f756e74206d75737460448201527102062652067726561746572207468616e20360741b60648201526084016105df565b81600b5461151291906118bd565b81146115765760405162461bcd60e51b815260206004820152602d60248201527f4d656761506f6f6c426c6173743a20496e636f727265637420616d6f756e742060448201526c1bd988199d5b991cc81cd95b9d609a1b60648201526084016105df565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156115e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160d9190611908565b6116525760405162461bcd60e51b8152602060048201526016602482015275115490cc8c0e881d1c985b9cd9995c8819985a5b195960521b60448201526064016105df565b336000908152600660205260409020600281015460ff166116b057600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b031916331790555b60028101805460ff191660011790558054839082906000906116d39084906119c6565b909155505033600090815260086020526040812080548592906116f79084906119c6565b92505081905550826009600082825461171091906119c6565b9091555050600a54604051849033907f7d58f5ddf17a7f65d89554f5d8144ae1dc788046467927063c090f92ed1145dc90600090a4505050565b6000546001600160a01b0316331461084b5760405163118cdaa760e01b81523360048201526024016105df565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5080546000825590600052602060002090810190610ebf91905b808211156117f557600081556001016117e1565b5090565b60006020828403121561180b57600080fd5b5035919050565b60006020828403121561182457600080fd5b81356001600160a01b038116811461183b57600080fd5b9392505050565b6000806040838503121561185557600080fd5b50508035926020909101359150565b60208082526023908201527f4d656761506f6f6c426c6173743a20526f756e64206973206e6f742070656e64604082015262696e6760e81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176118d4576118d46118a7565b92915050565b6000602082840312156118ec57600080fd5b5051919050565b8051801515811461190357600080fd5b919050565b60006020828403121561191a57600080fd5b61183b826118f3565b60006060828403121561193557600080fd5b6040516060810181811067ffffffffffffffff8211171561196657634e487b7160e01b600052604160045260246000fd5b80604052508251815260208301516020820152611985604084016118f3565b60408201529392505050565b818103818111156118d4576118d46118a7565b6000826119c157634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156118d4576118d46118a7565b634e487b7160e01b600052603260045260246000fd5b600060018201611a0157611a016118a7565b506001019056fea264697066735822122011f947fded0c085c731d8f07a0a5aa96d6c735c149540f0f1ff8cf08bb75d75164736f6c63430008180033000000000000000000000000a32e0edc6edd27331e3fae5feef924bfc0b1aa8a0000000000000000000000009111777b56265c3d6b7acfba083a358d303c0fbf000000000000000000000000ea358b86af8763cc6996df87063bff1144401371000000000000000000000000b1a5700fa2358173fe465e6ea4ff52e36e88e2ad00000000000000000000000043000000000000000000000000000000000000020000000000000000000000002536fe9ab3f511540f2f9e2ec2a805005c3dd80000000000000000000000000070d37dd5a7a0a8e3d1ce97270439a51046d6ee53

Deployed Bytecode

0x6080604052600436106101b95760003560e01c80638cd221c9116100eb578063c3238a1d1161008f578063ea3647a811610061578063ea3647a814610523578063f2fde38b14610543578063f372136914610563578063f4057c061461057857005b8063c3238a1d14610471578063e0ba8cea14610491578063e2eb41ff146104a7578063e3b1055c1461050357005b8063a4636c4d116100c8578063a4636c4d146103e6578063a6b95c101461041c578063b401faf11461043c578063b930b4821461045157005b80638cd221c91461039c5780638da5cb5b146103b257806399b8aff5146103d057005b806333f8aba71161015d578063715018a61161012f578063715018a61461032c578063773c7c4a146103415780638b210472146103575780638c3421f31461038457005b806333f8aba7146102cc57806354882df3146102e15780636266d324146102f6578063641ad8a91461031657005b80631834c0c9116101965780631834c0c9146102205780631b078ab3146102405780631d5023c81461028c57806327943fc7146102ac57005b806309415a4f146101c25780631209b1f6146101d7578063159816501461020057005b366101c057005b005b3480156101ce57600080fd5b506101c061058b565b3480156101e357600080fd5b506101ed600b5481565b6040519081526020015b60405180910390f35b34801561020c57600080fd5b506101c061021b3660046117f9565b610679565b34801561022c57600080fd5b506101c061023b3660046117f9565b6106b8565b34801561024c57600080fd5b506102747f000000000000000000000000b1a5700fa2358173fe465e6ea4ff52e36e88e2ad81565b6040516001600160a01b0390911681526020016101f7565b34801561029857600080fd5b506101c06102a7366004611812565b6106f7565b3480156102b857600080fd5b506101c06102c7366004611812565b61074c565b3480156102d857600080fd5b506007546101ed565b3480156102ed57600080fd5b506101c06107a9565b34801561030257600080fd5b506101c0610311366004611812565b6107e3565b34801561032257600080fd5b506101ed600d5481565b34801561033857600080fd5b506101c0610839565b34801561034d57600080fd5b506101ed60095481565b34801561036357600080fd5b506101ed610372366004611812565b60086020526000908152604090205481565b61038c61084d565b60405190151581526020016101f7565b3480156103a857600080fd5b506101ed600a5481565b3480156103be57600080fd5b506000546001600160a01b0316610274565b3480156103dc57600080fd5b506101ed600c5481565b3480156103f257600080fd5b506101ed610401366004611812565b6001600160a01b031660009081526008602052604090205490565b34801561042857600080fd5b506101c0610437366004611812565b610c70565b34801561044857600080fd5b506101c0610cc2565b34801561045d57600080fd5b50600454610274906001600160a01b031681565b34801561047d57600080fd5b50600354610274906001600160a01b031681565b34801561049d57600080fd5b506101ed600e5481565b3480156104b357600080fd5b506104e66104c2366004611812565b60066020526000908152604090208054600182015460029092015490919060ff1683565b6040805193845260208401929092521515908201526060016101f7565b34801561050f57600080fd5b50600154610274906001600160a01b031681565b34801561052f57600080fd5b506101c061053e366004611812565b610e2e565b34801561054f57600080fd5b506101c061055e366004611812565b610e84565b34801561056f57600080fd5b506101c0610ec2565b6101c0610586366004611842565b6113f9565b61059361174a565b600e54156105e85760405162461bcd60e51b815260206004820181905260248201527f4d656761506f6f6c426c6173743a20526f756e64206973206e6f74206f70656e60448201526064015b60405180910390fd5b6000600954116106465760405162461bcd60e51b815260206004820152602360248201527f4d656761506f6f6c426c6173743a204e6f207469636b657473207075726368616044820152621cd95960ea1b60648201526084016105df565b6001600e55600a546040517f6cfb19826b5a053d873d738b99290455661276ebe2b40ae5f5973f46995a36d990600090a2565b61068161174a565b600b819055600a546040518291907fd4c5e06b1ae097ba02372652a7adaa6e4a8e00be527497a3ad0ebc3f761ef3fb90600090a350565b6106c061174a565b600c819055600a546040518291907f49785993d16ad978a1b3890bf38403b5cb33051a9055df69384a1452f05a65df90600090a350565b6106ff61174a565b600280546001600160a01b0319166001600160a01b038316908117909155600a546040517fe13062f9359faca1f402c58a009f412a8874d0f1a74a666ca7676d572e1260a390600090a350565b61075461174a565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f3b389f2d3ca4b98585be394e375e512a2b6325e806dcc2ae6dca995a2fd31439906020015b60405180910390a150565b6107b161174a565b6001600d8190556040517f925a19753e677c9dc36a80e0fc824ca0c5b1afde494872b43daccab9ffeaffd490600090a2565b6107eb61174a565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527f590b6e04dfc334615ab5a579e76aa2478ad80af902902618f5a9e044196757c29060200161079e565b61084161174a565b61084b6000611777565b565b600061085761174a565b6001600e54146108795760405162461bcd60e51b81526004016105df90611864565b6001600e541461089b5760405162461bcd60e51b81526004016105df90611864565b6000600b546009546108ad91906118bd565b6040516370a0823160e01b815230600482015290915081906001600160a01b037f000000000000000000000000b1a5700fa2358173fe465e6ea4ff52e36e88e2ad16906370a0823190602401602060405180830381865afa158015610916573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093a91906118da565b101561099d5760405162461bcd60e51b815260206004820152602c60248201527f4d656761506f6f6c426c6173743a20496e73756666696369656e7420636f6e7460448201526b726163742062616c616e636560a01b60648201526084016105df565b60015460405163095ea7b360e01b81526001600160a01b039182166004820181905260248201849052916000917f000000000000000000000000b1a5700fa2358173fe465e6ea4ff52e36e88e2ad9091169063095ea7b3906044016020604051808303816000875af1158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190611908565b905080610a9d5760405162461bcd60e51b815260206004820152602a60248201527f4d656761506f6f6c426c6173743a20426c61737420746f6b656e20617070726f6044820152691d985b0819985a5b195960b21b60648201526084016105df565b600154604051636eb1769f60e11b81523060048201526001600160a01b0391821660248201526000917f000000000000000000000000b1a5700fa2358173fe465e6ea4ff52e36e88e2ad169063dd62ed3e90604401602060405180830381865afa158015610b0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3391906118da565b905083811015610b945760405162461bcd60e51b815260206004820152602660248201527f4d656761506f6f6c426c6173743a20546f6b656e20616c6c6f77616e636520746044820152656f6f206c6f7760d01b60648201526084016105df565b6002546040516357c220ef60e01b81526001600160a01b03918216600482015260248101869052908416906357c220ef90604401600060405180830381600087803b158015610be257600080fd5b505af1158015610bf6573d6000803e3d6000fd5b5060029250610c03915050565b600e55600a546040517fac73857f4f68972d1f03640417932faa7e2b7fb7727584a5d5aec2769977ce3e90600090a283600954600a547fd99a59f5e7638616a9a116bd9cc0ca8033bea4215873bc50611fa5a891aca99160405160405180910390a4600194505050505090565b610c7861174a565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f11742c438d1aca9917eebebda548598070d068db2e04e605a117855a79b03f0490600090a250565b336000908152600660205260409020600181015480610d1a5760405162461bcd60e51b81526020600482015260146024820152734e6f2077696e6e696e677320746f20636c61696d60601b60448201526064016105df565b60006001830181905560405163a9059cbb60e01b8152336004820152602481018390527f000000000000000000000000b1a5700fa2358173fe465e6ea4ff52e36e88e2ad6001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610d90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db49190611908565b905080610dfc5760405162461bcd60e51b8152602060048201526016602482015275115490cc8c0e881d1c985b9cd9995c8819985a5b195960521b60448201526064016105df565b604051829033907fc92f63975de8621ffe782345b82a5a94f51c144e380bbd2ec9f53b3ccfe7b73090600090a3505050565b610e3661174a565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f801a24d4f1f7ba1e29f4072dd6b094c83d624358feb05d172c10aa9cf312a37c9060200161079e565b610e8c61174a565b6001600160a01b038116610eb657604051631e4fbdf760e01b8152600060048201526024016105df565b610ebf81611777565b50565b610eca61174a565b6002600e5414610f285760405162461bcd60e51b815260206004820152602360248201527f4d656761506f6f6c426c6173743a20526f756e64206973206e6f742064726177604482015262696e6760e81b60648201526084016105df565b600154604051635d0eaaaf60e01b81523060048201526001600160a01b03909116906000908290635d0eaaaf90602401606060405180830381865afa158015610f75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f999190611923565b60208101516007549192509081158015906112fb576040516370a0823160e01b81523060048201526000907f000000000000000000000000b1a5700fa2358173fe465e6ea4ff52e36e88e2ad6001600160a01b0316906370a0823190602401602060405180830381865afa158015611015573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103991906118da565b9050856001600160a01b031663cc42e83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561107657600080fd5b505af115801561108a573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f000000000000000000000000b1a5700fa2358173fe465e6ea4ff52e36e88e2ad6001600160a01b031691506370a0823190602401602060405180830381865afa1580156110f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111991906118da565b905060006111278383611991565b905080861461118d5760405162461bcd60e51b815260206004820152602c60248201527f4d656761506f6f6c426c6173743a2057696e6e696e677320636c61696d65642060448201526b0c8de40dcdee840dac2e8c6d60a31b60648201526084016105df565b600a5460405182907f58bebe106df24787d9e7a43008b75016a7d3c877da8caa15a1041bb5b92fd18b90600090a36000612710600c54836111ce91906118bd565b6111d891906119a4565b905060006111e68284611991565b6002546001600160a01b0316600090815260066020526040812060018101805493945090928592906112199084906119c6565b90915550600090505b888110156112c35760006007828154811061123f5761123f6119d9565b60009182526020808320909101546001600160a01b031680835260089091526040822054600954919350919061127583886118bd565b61127f91906119a4565b6001600160a01b0384166000908152600660205260408120600101805492935083929091906112af9084906119c6565b909155505060019093019250611222915050565b50600a54604051849184917fbe1d837dc2b7f451c1f41fa55c0a2a4c20a693f1f8906132c5b5a735848ed9c090600090a45050505050505b80151583600a547ff4a21cc9ce913f5ff75a4c2fff9c173260ea8a9a2e43ba17c1a82829bce1596360095460405161133591815260200190565b60405180910390a4600060098190555b828110156113a057600060078281548110611362576113626119d9565b60009182526020808320909101546001600160a01b03168252600681526040808320600201805460ff19169055600890915281205550600101611345565b506113ad600760006117c7565b6000600e55600a80546000906113c2906119ef565b90915550600a546040517fae4cf40c31a833f14b2aee71da8cb55d5fd1944a9ed5b7696022328921f6e31790600090a25050505050565b600d54156114495760405162461bcd60e51b815260206004820152601f60248201527f4d656761506f6f6c426c6173743a20506f6f6c206973206e6f74206f70656e0060448201526064016105df565b600e54156114995760405162461bcd60e51b815260206004820181905260248201527f4d656761506f6f6c426c6173743a20526f756e64206973206e6f74206f70656e60448201526064016105df565b600082116115045760405162461bcd60e51b815260206004820152603260248201527f4d656761506f6f6c426c6173743a205469636b657420636f756e74206d75737460448201527102062652067726561746572207468616e20360741b60648201526084016105df565b81600b5461151291906118bd565b81146115765760405162461bcd60e51b815260206004820152602d60248201527f4d656761506f6f6c426c6173743a20496e636f727265637420616d6f756e742060448201526c1bd988199d5b991cc81cd95b9d609a1b60648201526084016105df565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f000000000000000000000000b1a5700fa2358173fe465e6ea4ff52e36e88e2ad6001600160a01b0316906323b872dd906064016020604051808303816000875af11580156115e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160d9190611908565b6116525760405162461bcd60e51b8152602060048201526016602482015275115490cc8c0e881d1c985b9cd9995c8819985a5b195960521b60448201526064016105df565b336000908152600660205260409020600281015460ff166116b057600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b031916331790555b60028101805460ff191660011790558054839082906000906116d39084906119c6565b909155505033600090815260086020526040812080548592906116f79084906119c6565b92505081905550826009600082825461171091906119c6565b9091555050600a54604051849033907f7d58f5ddf17a7f65d89554f5d8144ae1dc788046467927063c090f92ed1145dc90600090a4505050565b6000546001600160a01b0316331461084b5760405163118cdaa760e01b81523360048201526024016105df565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5080546000825590600052602060002090810190610ebf91905b808211156117f557600081556001016117e1565b5090565b60006020828403121561180b57600080fd5b5035919050565b60006020828403121561182457600080fd5b81356001600160a01b038116811461183b57600080fd5b9392505050565b6000806040838503121561185557600080fd5b50508035926020909101359150565b60208082526023908201527f4d656761506f6f6c426c6173743a20526f756e64206973206e6f742070656e64604082015262696e6760e81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176118d4576118d46118a7565b92915050565b6000602082840312156118ec57600080fd5b5051919050565b8051801515811461190357600080fd5b919050565b60006020828403121561191a57600080fd5b61183b826118f3565b60006060828403121561193557600080fd5b6040516060810181811067ffffffffffffffff8211171561196657634e487b7160e01b600052604160045260246000fd5b80604052508251815260208301516020820152611985604084016118f3565b60408201529392505050565b818103818111156118d4576118d46118a7565b6000826119c157634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156118d4576118d46118a7565b634e487b7160e01b600052603260045260246000fd5b600060018201611a0157611a016118a7565b506001019056fea264697066735822122011f947fded0c085c731d8f07a0a5aa96d6c735c149540f0f1ff8cf08bb75d75164736f6c63430008180033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000a32e0edc6edd27331e3fae5feef924bfc0b1aa8a0000000000000000000000009111777b56265c3d6b7acfba083a358d303c0fbf000000000000000000000000ea358b86af8763cc6996df87063bff1144401371000000000000000000000000b1a5700fa2358173fe465e6ea4ff52e36e88e2ad00000000000000000000000043000000000000000000000000000000000000020000000000000000000000002536fe9ab3f511540f2f9e2ec2a805005c3dd80000000000000000000000000070d37dd5a7a0a8e3d1ce97270439a51046d6ee53

-----Decoded View---------------
Arg [0] : _deployerAddress (address): 0xa32E0Edc6edD27331E3fAE5FeeF924bfc0b1aA8A
Arg [1] : _referrerAddress (address): 0x9111777b56265c3D6b7acFBa083a358D303C0FBf
Arg [2] : _megapotContractAddress (address): 0xEa358b86AF8763cc6996Df87063BFf1144401371
Arg [3] : _blastTokenAddress (address): 0xb1a5700fA2358173Fe465e6eA4Ff52E36e88E2ad
Arg [4] : _blastGasYieldContract (address): 0x4300000000000000000000000000000000000002
Arg [5] : _blastPointsContract (address): 0x2536FE9ab3F511540F2f9e2eC2A805005C3Dd800
Arg [6] : _governorAddress (address): 0x70d37Dd5a7a0A8E3D1CE97270439a51046d6Ee53

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000a32e0edc6edd27331e3fae5feef924bfc0b1aa8a
Arg [1] : 0000000000000000000000009111777b56265c3d6b7acfba083a358d303c0fbf
Arg [2] : 000000000000000000000000ea358b86af8763cc6996df87063bff1144401371
Arg [3] : 000000000000000000000000b1a5700fa2358173fe465e6ea4ff52e36e88e2ad
Arg [4] : 0000000000000000000000004300000000000000000000000000000000000002
Arg [5] : 0000000000000000000000002536fe9ab3f511540f2f9e2ec2a805005c3dd800
Arg [6] : 00000000000000000000000070d37dd5a7a0a8e3d1ce97270439a51046d6ee53


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.