S Price: $0.067598 (-3.89%)
Gas: 55 Gwei

Contract

0xb6598DD93D2ef3D1079B39332eD658528F7B0210

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0.0998657537382 S

S Value

Less Than $0.01 (@ $0.07/S)

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Execute Start610795632026-01-25 0:00:2336 hrs ago1769299223IN
0xb6598DD9...28F7B0210
0 S0.0235282351.8
Execute Draw610794772026-01-24 23:58:0736 hrs ago1769299087IN
0xb6598DD9...28F7B0210
0 S0.0101441451.8
Execute Close610794072026-01-24 23:56:0836 hrs ago1769298968IN
0xb6598DD9...28F7B0210
0.0429 S0.0131621751.8
Execute Start610265302026-01-24 0:00:072 days ago1769212807IN
0xb6598DD9...28F7B0210
0 S0.0235282351.8
Execute Draw610264732026-01-23 23:58:072 days ago1769212687IN
0xb6598DD9...28F7B0210
0 S0.0101441451.8
Execute Close610263892026-01-23 23:56:082 days ago1769212568IN
0xb6598DD9...28F7B0210
0.0667108 S0.0131621751.8
Execute Start609552042026-01-23 0:00:223 days ago1769126422IN
0xb6598DD9...28F7B0210
0 S0.0235282351.8
Execute Draw609551112026-01-22 23:58:073 days ago1769126287IN
0xb6598DD9...28F7B0210
0 S0.0101441451.8
Execute Close609550172026-01-22 23:56:083 days ago1769126168IN
0xb6598DD9...28F7B0210
0.0396 S0.0131621751.8
Execute Start608866702026-01-22 0:00:274 days ago1769040027IN
0xb6598DD9...28F7B0210
0 S0.0235282351.8
Execute Draw608865552026-01-21 23:58:084 days ago1769039888IN
0xb6598DD9...28F7B0210
0 S0.0101441451.8
Execute Close608864632026-01-21 23:56:094 days ago1769039769IN
0xb6598DD9...28F7B0210
0.04538171 S0.0131621751.8
Execute Start608084882026-01-21 0:00:225 days ago1768953622IN
0xb6598DD9...28F7B0210
0 S0.0235282351.8
Execute Draw608083812026-01-20 23:58:085 days ago1768953488IN
0xb6598DD9...28F7B0210
0 S0.0101441451.8
Execute Close608082982026-01-20 23:56:085 days ago1768953368IN
0xb6598DD9...28F7B0210
0.23438213 S0.0131621751.8
Execute Start607276722026-01-20 0:00:066 days ago1768867206IN
0xb6598DD9...28F7B0210
0 S0.0235282351.8
Execute Draw607275842026-01-19 23:58:086 days ago1768867088IN
0xb6598DD9...28F7B0210
0 S0.0101441451.8
Execute Close607275012026-01-19 23:56:076 days ago1768866967IN
0xb6598DD9...28F7B0210
0.05858039 S0.0131621751.8
Execute Start606575882026-01-19 0:00:237 days ago1768780823IN
0xb6598DD9...28F7B0210
0 S0.0235282351.8
Execute Draw606573712026-01-18 23:58:067 days ago1768780686IN
0xb6598DD9...28F7B0210
0 S0.0101441451.8
Execute Close606571982026-01-18 23:56:087 days ago1768780568IN
0xb6598DD9...28F7B0210
0.04581176 S0.0131621751.8
Execute Start605974872026-01-18 0:00:098 days ago1768694409IN
0xb6598DD9...28F7B0210
0 S0.0235282351.8
Execute Draw605974202026-01-17 23:58:098 days ago1768694289IN
0xb6598DD9...28F7B0210
0 S0.0101441451.8
Execute Close605973512026-01-17 23:56:078 days ago1768694167IN
0xb6598DD9...28F7B0210
0.04529411 S0.0131621751.8
Execute Start605427062026-01-17 0:00:189 days ago1768608018IN
0xb6598DD9...28F7B0210
0 S0.0235282351.8
View all transactions

Latest 19 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
610794072026-01-24 23:56:0836 hrs ago1769298968
0xb6598DD9...28F7B0210
0.039 S
610263892026-01-23 23:56:082 days ago1769212568
0xb6598DD9...28F7B0210
0.06064618 S
609550172026-01-22 23:56:083 days ago1769126168
0xb6598DD9...28F7B0210
0.036 S
608864632026-01-21 23:56:094 days ago1769039769
0xb6598DD9...28F7B0210
0.0412561 S
608082982026-01-20 23:56:085 days ago1768953368
0xb6598DD9...28F7B0210
0.21307467 S
607275012026-01-19 23:56:076 days ago1768866967
0xb6598DD9...28F7B0210
0.0532549 S
606571982026-01-18 23:56:087 days ago1768780568
0xb6598DD9...28F7B0210
0.04164705 S
605973512026-01-17 23:56:078 days ago1768694167
0xb6598DD9...28F7B0210
0.04117647 S
605425512026-01-16 23:56:099 days ago1768607769
0xb6598DD9...28F7B0210
0.04117647 S
604771632026-01-15 23:56:0810 days ago1768521368
0xb6598DD9...28F7B0210
0.04129954 S
604044862026-01-14 23:56:0711 days ago1768434967
0xb6598DD9...28F7B0210
0.04421386 S
602532562026-01-12 23:56:0713 days ago1768262167
0xb6598DD9...28F7B0210
0.04117647 S
601844892026-01-11 23:56:0714 days ago1768175767
0xb6598DD9...28F7B0210
0.04229727 S
601119642026-01-10 23:56:0715 days ago1768089367
0xb6598DD9...28F7B0210
0.036 S
600444422026-01-09 23:56:0816 days ago1768002968
0xb6598DD9...28F7B0210
0.05929411 S
599552012026-01-08 23:56:0717 days ago1767916567
0xb6598DD9...28F7B0210
0.036 S
598672752026-01-07 23:56:0918 days ago1767830169
0xb6598DD9...28F7B0210
0.036 S
596969232026-01-05 23:56:0820 days ago1767657368
0xb6598DD9...28F7B0210
0.04117647 S
593980272026-01-01 23:56:0924 days ago1767311769
0xb6598DD9...28F7B0210
0.05396791 S
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LotteryGelatoChecker

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 99999 runs

Other Settings:
default evmVersion
File 1 of 9 : LotteryGelatoChecker.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
import "@pythnetwork/entropy-sdk-solidity/IEntropyV2.sol";

/**
 * @title LotteryGelatoChecker
 * @notice Gelato automation contract for Lumos Lottery lifecycle management
 * @dev Provides automated execution of lottery operations through Gelato Web3 Functions
 * Manages three critical lottery phases:
 * - Starting new lottery rounds with configurable parameters
 * - Closing lottery rounds and requesting randomness via Pyth Entropy
 * - Drawing final numbers and distributing rewards
 * Access control allows execution by designated operator or contract owner
 */

interface ILumosLotteryLike {
    function startLottery(
        uint256 _endTime,
        uint256 _priceTicketInS,
        uint256 _discountDivisor,
        uint256[6] calldata _rewardsBreakdown,
        uint256 _treasuryFee
    ) external;

    function closeLottery(uint256 _lotteryId) external payable;
    function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId, bool _autoInjection) external;

    function operatorAddress() external view returns (address);
    function viewCurrentLotteryId() external view returns (uint256);

    // Boundary constants and variables
    function MIN_DISCOUNT_DIVISOR() external view returns (uint256);
    function MIN_LENGTH_LOTTERY() external view returns (uint256);
    function MAX_LENGTH_LOTTERY() external view returns (uint256);
    function MAX_TREASURY_FEE() external view returns (uint256);
    function minPriceTicketInS() external view returns (uint256);
    function maxPriceTicketInS() external view returns (uint256);

    function viewLottery(
        uint256 _lotteryId
    )
        external
        view
        returns (
            uint8 status,
            uint256 startTime,
            uint256 endTime,
            uint256 priceTicketInS,
            uint256 discountDivisor,
            uint256[6] memory rewardsBreakdown,
            uint256 treasuryFee,
            uint256[6] memory sPerBracket,
            uint256[6] memory countWinnersPerBracket,
            uint256 firstTicketId,
            uint256 firstTicketIdNextLottery,
            uint256 amountCollectedInS,
            uint32 finalNumber
        );
}

interface INewRandomNumberGeneratorLike {
    function getFee() external view returns (uint256);

    function viewLatestLotteryId() external view returns (uint256);
    function viewRandomResult() external view returns (uint32);

    // Ownable view to sanity-check ownership in checkers
    function owner() external view returns (address);
}

contract LotteryGelatoChecker is Ownable, Pausable {
    ILumosLotteryLike public lottery;
    INewRandomNumberGeneratorLike public rng;

    uint256 public gasPriceCap; // 0 disables gas ceiling

    address public operatorAddress;

    uint256 public interval; // lottery duration in seconds
    bool public useDynamicEndTime = true; // if true, endTime = now + interval
    uint256 public endTime; // used when useDynamicEndTime == false
    uint256 public priceTicketInS; // 18 decimals
    uint256 public discountDivisor; // >0
    uint256[6] public rewardsBreakdown; // must sum to 10000
    uint256 public treasuryFee; // bps, <=10000

    bool public autoInjection; // used for drawFinalNumber(..., autoInjection)

    event ExecutedStart(
        uint256 endTime,
        uint256 price,
        uint256 discountDivisor,
        uint256[6] rewards,
        uint256 treasuryFee
    );
    event ExecutedClose(uint256 lotteryId, uint256 feePaid);
    event ExecutedDraw(uint256 lotteryId, bool autoInjection);

    modifier onlyOperatorOrOwner() {
        require(msg.sender == operatorAddress || msg.sender == owner(), "Not operator or owner");
        _;
    }

    /**
     * @notice Initializes the lottery automation contract
     * @param _lottery Address of the Lumos lottery contract
     * @param _rng Address of the random number generator contract
     * @param _operatorAddress Address authorized to execute automation tasks (Gelato)
     * @param _interval Duration of each lottery round in seconds
     * @param _priceTicketInS Price per lottery ticket in S tokens (18 decimals)
     * @param _discountDivisor Divisor for bulk purchase discounts
     * @param _rewardsBreakdown Array of 6 values defining reward distribution (must sum to 10000)
     * @param _treasuryFee Treasury fee in basis points (max 10000 = 100%)
     * @param _autoInjection Whether to auto-inject remaining funds into next lottery
     */
    constructor(
        address _lottery,
        address _rng,
        address _operatorAddress,
        uint256 _interval,
        uint256 _priceTicketInS,
        uint256 _discountDivisor,
        uint256[6] memory _rewardsBreakdown,
        uint256 _treasuryFee,
        bool _autoInjection
    ) {
        require(_lottery != address(0) && _rng != address(0) && _operatorAddress != address(0), "zero addr");

        lottery = ILumosLotteryLike(_lottery);
        rng = INewRandomNumberGeneratorLike(_rng);

        // Validate interval against lottery boundaries
        require(_interval >= lottery.MIN_LENGTH_LOTTERY(), "interval too short");
        require(_interval <= lottery.MAX_LENGTH_LOTTERY(), "interval too long");

        // Validate price against lottery boundaries
        require(_priceTicketInS >= lottery.minPriceTicketInS(), "priceTicket too low");
        require(_priceTicketInS <= lottery.maxPriceTicketInS(), "priceTicket too high");

        // Validate discount divisor against lottery boundaries
        require(_discountDivisor >= lottery.MIN_DISCOUNT_DIVISOR(), "discountDivisor too low");

        // Validate treasury fee against lottery boundaries
        require(_treasuryFee <= lottery.MAX_TREASURY_FEE(), "treasuryFee too high");

        // Validate rewards breakdown sums to 10000
        uint256 sum;
        for (uint256 i = 0; i < 6; i++) sum += _rewardsBreakdown[i];
        require(sum == 10_000, "rewards sum != 10000");

        operatorAddress = _operatorAddress;
        interval = _interval;
        priceTicketInS = _priceTicketInS;
        discountDivisor = _discountDivisor;
        rewardsBreakdown = _rewardsBreakdown;
        treasuryFee = _treasuryFee;
        autoInjection = _autoInjection;
    }

    receive() external payable {}

    /**
     * @notice Updates the lottery contract address
     * @param _lottery New lottery contract address
     */
    function setLottery(address _lottery) external onlyOwner {
        require(_lottery != address(0), "lottery=0");
        lottery = ILumosLotteryLike(_lottery);
    }

    /**
     * @notice Updates the random number generator contract address
     * @param _rng New RNG contract address
     */
    function setRng(address _rng) external onlyOwner {
        require(_rng != address(0), "rng=0");
        rng = INewRandomNumberGeneratorLike(_rng);
    }

    /**
     * @notice Pauses all automation functions
     * @dev Can only be called by owner. Emits Paused event
     */
    function pause() external onlyOwner {
        _pause();
    }

    /**
     * @notice Unpauses all automation functions
     * @dev Can only be called by owner. Emits Unpaused event
     */
    function unpause() external onlyOwner {
        _unpause();
    }

    /**
     * @notice Sets maximum gas price for automation execution (0 = no limit)
     * @param _cap Maximum gas price in wei
     */
    function setGasPriceCap(uint256 _cap) external onlyOwner {
        gasPriceCap = _cap;
    }

    /**
     * @notice Updates the operator address authorized to execute tasks
     * @param _addr New operator address (typically Gelato)
     */
    function setOperatorAddress(address _addr) external onlyOwner {
        require(_addr != address(0), "operator=0");
        operatorAddress = _addr;
    }

    /**
     * @notice Sets the duration for lottery rounds
     * @param _interval Round duration in seconds
     */
    function setInterval(uint256 _interval) external onlyOwner {
        require(_interval >= lottery.MIN_LENGTH_LOTTERY(), "interval too short");
        require(_interval <= lottery.MAX_LENGTH_LOTTERY(), "interval too long");
        interval = _interval;
    }

    /**
     * @notice Toggles between dynamic (now + interval) and fixed end time
     * @param v True for dynamic end time, false for fixed
     */
    function setUseDynamicEndTime(bool v) external onlyOwner {
        // If switching to fixed mode, ensure endTime has been set
        if (!v) {
            require(endTime > 0, "endTime not set");
            require(endTime > block.timestamp, "endTime in past");
        }
        useDynamicEndTime = v;
    }

    /**
     * @notice Sets fixed end time (only used when useDynamicEndTime is false)
     * @param _endTime Unix timestamp for lottery end
     */
    function setEndTime(uint256 _endTime) external onlyOwner {
        require(_endTime > block.timestamp, "endTime in past");
        uint256 duration = _endTime - block.timestamp;
        require(duration >= lottery.MIN_LENGTH_LOTTERY(), "endTime too soon");
        require(duration <= lottery.MAX_LENGTH_LOTTERY(), "endTime too far");
        endTime = _endTime;
    }

    /**
     * @notice Sets the price per lottery ticket
     * @param _priceTicketInS Ticket price in S tokens (18 decimals)
     */
    function setPriceTicketInS(uint256 _priceTicketInS) external onlyOwner {
        require(_priceTicketInS >= lottery.minPriceTicketInS(), "priceTicket too low");
        require(_priceTicketInS <= lottery.maxPriceTicketInS(), "priceTicket too high");
        priceTicketInS = _priceTicketInS;
    }

    /**
     * @notice Sets the discount divisor for bulk ticket purchases
     * @param _discountDivisor Divisor value (higher = smaller discount)
     */
    function setDiscountDivisor(uint256 _discountDivisor) external onlyOwner {
        require(_discountDivisor >= lottery.MIN_DISCOUNT_DIVISOR(), "discountDivisor too low");
        discountDivisor = _discountDivisor;
    }

    /**
     * @notice Updates reward distribution across 6 brackets
     * @param _rb Array of 6 values that must sum to 10000 (100%)
     */
    function setRewardsBreakdown(uint256[6] calldata _rb) external onlyOwner {
        uint256 sum;
        for (uint256 i = 0; i < 6; i++) sum += _rb[i];
        require(sum == 10_000, "rewards sum != 10000");
        rewardsBreakdown = _rb;
    }

    /**
     * @notice Sets the treasury fee percentage
     * @param _treasuryFee Fee in basis points (100 = 1%, max 10000 = 100%)
     */
    function setTreasuryFee(uint256 _treasuryFee) external onlyOwner {
        require(_treasuryFee <= lottery.MAX_TREASURY_FEE(), "treasuryFee too high");
        treasuryFee = _treasuryFee;
    }

    /**
     * @notice Toggles automatic fund injection into next lottery
     * @param v True to enable auto-injection, false to disable
     */
    function setAutoInjection(bool v) external onlyOwner {
        autoInjection = v;
    }

    /**
     * @dev Withdraw contract balance to owner. Useful for recovering excess entropy fees.
     */
    function withdrawBalance() external onlyOwner {
        uint256 balance = address(this).balance;
        require(balance > 0, "no balance");
        (bool success, ) = owner().call{value: balance}("");
        require(success, "withdraw failed");
    }

    /**
     * @dev Start the lottery using configured parameters. Restricted to operator address OR owner.
     *      Validates that no lottery is currently active (currentLotteryId == 0 OR previous lottery is Claimable)
     */
    function executeStart() external onlyOperatorOrOwner {
        if (paused()) revert("Checker contract is paused");
        require(address(lottery) != address(0), "Lottery not set");
        if (gasPriceCap > 0) require(tx.gasprice <= gasPriceCap, "Gas price too high");
        require(lottery.operatorAddress() == address(this), "operator!=this");

        uint256 currentId = lottery.viewCurrentLotteryId();

        // Check if we can start: either no lottery exists (id == 0) or previous lottery is Claimable (status == 3)
        if (currentId > 0) {
            uint8 status = _getLotteryStatus(currentId);
            require(status == 3, "Previous lottery not claimable"); // Claimable
        }

        uint256 _end = useDynamicEndTime ? block.timestamp + interval : endTime;
        require(_end > block.timestamp, "endTime in past");

        // Validate duration respects lottery boundaries
        uint256 duration = _end - block.timestamp;
        require(duration >= lottery.MIN_LENGTH_LOTTERY(), "duration too short");
        require(duration <= lottery.MAX_LENGTH_LOTTERY(), "duration too long");

        uint256[6] memory rb = rewardsBreakdown;
        lottery.startLottery(_end, priceTicketInS, discountDivisor, rb, treasuryFee);
        emit ExecutedStart(_end, priceTicketInS, discountDivisor, rb, treasuryFee);
    }

    /**
     * @dev Close the latest (current) lottery. Pays RNG fee from either msg.value or contract balance.
     *      Supports two modes:
     *      1) Caller sends entropy fee with the transaction (msg.value >= fee)
     *      2) Contract is pre-funded and uses its own balance (address(this).balance >= fee)
     *      Any excess remains in contract and can be withdrawn by owner via withdrawBalance().
     */
    function executeClose() external payable onlyOperatorOrOwner {
        if (paused()) revert("Checker contract is paused");
        require(address(lottery) != address(0) && address(rng) != address(0), "Config not set");
        if (gasPriceCap > 0) require(tx.gasprice <= gasPriceCap, "Gas price too high");
        require(lottery.operatorAddress() == address(this), "operator!=this");

        uint256 id = lottery.viewCurrentLotteryId();
        require(id > 0, "Invalid lottery ID");

        (uint8 status, uint256 _endTime) = _getLotteryStatusAndEndTime(id);
        require(status == 1, "status != Open"); // Open
        require(block.timestamp > _endTime, "not ended");

        uint256 fee = IEntropyV2(0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320).getFeeV2();
        require(address(this).balance >= fee, "insufficient fee balance");

        lottery.closeLottery{value: fee}(id);
        emit ExecutedClose(id, fee);
    }

    /**
     * @dev Draw final number for the RNG's latest lottery, make it claimable.
     *      Uses rng.viewLatestLotteryId() to satisfy Lumos's internal check.
     */
    function executeDraw() external onlyOperatorOrOwner {
        if (paused()) revert("Checker contract is paused");
        require(address(lottery) != address(0) && address(rng) != address(0), "Config not set");
        if (gasPriceCap > 0) require(tx.gasprice <= gasPriceCap, "Gas price too high");
        require(lottery.operatorAddress() == address(this), "operator!=this");

        uint256 idToDraw = rng.viewLatestLotteryId();
        require(idToDraw > 0, "Invalid lottery ID");

        uint8 status = _getLotteryStatus(idToDraw);
        require(status == 2, "status != Close"); // Close

        lottery.drawFinalNumberAndMakeLotteryClaimable(idToDraw, autoInjection);
        emit ExecutedDraw(idToDraw, autoInjection);
    }

    /**
     * @dev Checker for starting a lottery. Returns exec payload for executeStart().
     *      Validates that no lottery is currently active (currentLotteryId == 0 OR previous lottery is Claimable)
     */
    function checkerStart() external view returns (bool canExec, bytes memory execData) {
        if (paused()) return (false, bytes("Checker contract is paused"));
        if (address(lottery) == address(0)) return (false, bytes("Lottery not set"));
        if (gasPriceCap > 0 && tx.gasprice > gasPriceCap) return (false, bytes("Gas price too high"));
        if (lottery.operatorAddress() != address(this)) return (false, bytes("operator!=this"));

        uint256 currentId = lottery.viewCurrentLotteryId();

        // Check if we can start: either no lottery exists (id == 0) or previous lottery is Claimable (status == 3)
        if (currentId > 0) {
            uint8 status = _getLotteryStatus(currentId);
            if (status != 3) return (false, bytes("Previous lottery not claimable")); // Claimable
        }

        uint256 _end = useDynamicEndTime ? block.timestamp + interval : endTime;
        if (_end <= block.timestamp) return (false, bytes("endTime in past"));

        // Validate duration respects lottery boundaries
        uint256 duration = _end - block.timestamp;
        if (duration < lottery.MIN_LENGTH_LOTTERY()) return (false, bytes("duration too short"));
        if (duration > lottery.MAX_LENGTH_LOTTERY()) return (false, bytes("duration too long"));

        execData = abi.encodeWithSelector(this.executeStart.selector);
        return (true, execData);
    }

    /**
     * @dev Checker for closing a lottery. Returns exec payload for executeClose().
     *      - Confirms operator is this contract
     *      - Confirms latest lottery is Open and past endTime
     *      - Confirms RNG fee is obtainable and contract has enough balance
     */
    function checkerClose() external view returns (bool canExec, bytes memory execData) {
        if (paused()) return (false, bytes("Checker contract is paused"));
        if (address(lottery) == address(0) || address(rng) == address(0)) return (false, bytes("Config not set"));
        if (gasPriceCap > 0 && tx.gasprice > gasPriceCap) return (false, bytes("Gas price too high"));
        if (lottery.operatorAddress() != address(this)) return (false, bytes("operator!=this"));

        uint256 id = lottery.viewCurrentLotteryId();
        if (id == 0) return (false, bytes("Invalid lottery ID"));

        (uint8 status, uint256 _endTime) = _getLotteryStatusAndEndTime(id);

        // Status.Open == 1 (see enum)
        if (status != 1) return (false, bytes("status != Open"));
        if (block.timestamp <= _endTime) return (false, bytes("not ended"));

        uint256 fee = IEntropyV2(0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320).getFeeV2();
        // Either contract balance or caller balance must have enough for fee
        if (address(this).balance < fee && msg.sender.balance < fee) {
            return (false, bytes("insufficient fee balance"));
        }

        execData = abi.encodeWithSelector(this.executeClose.selector);
        return (true, execData);
    }

    /**
     * @dev Checker for drawing final number & making claimable. Returns exec payload for executeDraw().
     *      - Uses RNG.viewLatestLotteryId() for the lottery expected by Lumos's draw function
     *      - Confirms that lottery status is Close
     */
    function checkerDraw() external view returns (bool canExec, bytes memory execData) {
        if (paused()) return (false, bytes("Checker contract is paused"));
        if (address(lottery) == address(0) || address(rng) == address(0)) return (false, bytes("Config not set"));
        if (gasPriceCap > 0 && tx.gasprice > gasPriceCap) return (false, bytes("Gas price too high"));
        if (lottery.operatorAddress() != address(this)) return (false, bytes("operator!=this"));

        uint256 idToDraw = rng.viewLatestLotteryId();
        if (idToDraw == 0) return (false, bytes("Invalid lottery ID"));

        uint8 status = _getLotteryStatus(idToDraw);

        // Status.Close == 2
        if (status != 2) return (false, bytes("status != Close"));

        execData = abi.encodeWithSelector(this.executeDraw.selector);
        return (true, execData);
    }

    /**
     * @notice Get lottery status only
     * @dev Uses low-level call to avoid stack too deep error from viewLottery's 13 return values
     * @param lotteryId The lottery ID to query
     * @return status Lottery status (0=Pending, 1=Open, 2=Close, 3=Claimable)
     */
    function _getLotteryStatus(uint256 lotteryId) internal view returns (uint8 status) {
        bytes memory data = abi.encodeWithSignature("viewLottery(uint256)", lotteryId);
        (bool success, bytes memory result) = address(lottery).staticcall(data);
        require(success, "viewLottery failed");
        (status, , ) = abi.decode(result, (uint8, uint256, uint256));
    }

    /**
     * @notice Get lottery status and end time
     * @dev Uses low-level call to avoid stack too deep error from viewLottery's 13 return values
     * @param lotteryId The lottery ID to query
     * @return status Lottery status (0=Pending, 1=Open, 2=Close, 3=Claimable)
     * @return lotteryEndTime Unix timestamp when lottery ends
     */
    function _getLotteryStatusAndEndTime(
        uint256 lotteryId
    ) internal view returns (uint8 status, uint256 lotteryEndTime) {
        bytes memory data = abi.encodeWithSignature("viewLottery(uint256)", lotteryId);
        (bool success, bytes memory result) = address(lottery).staticcall(data);
        require(success, "viewLottery failed");
        (status, , lotteryEndTime) = abi.decode(result, (uint8, uint256, uint256));
    }
}

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

pragma solidity ^0.8.0;

import "../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.
 *
 * By default, the owner account will be the one that deploys the contract. 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;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @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 {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _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 v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

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

pragma solidity ^0.8.0;

/**
 * @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;
    }
}

File 5 of 9 : EntropyEvents.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

import "./EntropyStructs.sol";

// Deprecated -- these events are still emitted, but the lack of indexing
// makes them hard to use.
interface EntropyEvents {
    event Registered(EntropyStructs.ProviderInfo provider);

    event Requested(EntropyStructs.Request request);
    event RequestedWithCallback(
        address indexed provider,
        address indexed requestor,
        uint64 indexed sequenceNumber,
        bytes32 userRandomNumber,
        EntropyStructs.Request request
    );

    event Revealed(
        EntropyStructs.Request request,
        bytes32 userRevelation,
        bytes32 providerRevelation,
        bytes32 blockHash,
        bytes32 randomNumber
    );
    event RevealedWithCallback(
        EntropyStructs.Request request,
        bytes32 userRandomNumber,
        bytes32 providerRevelation,
        bytes32 randomNumber
    );

    event CallbackFailed(
        address indexed provider,
        address indexed requestor,
        uint64 indexed sequenceNumber,
        bytes32 userRandomNumber,
        bytes32 providerRevelation,
        bytes32 randomNumber,
        bytes errorCode
    );

    event ProviderFeeUpdated(address provider, uint128 oldFee, uint128 newFee);

    event ProviderDefaultGasLimitUpdated(
        address indexed provider,
        uint32 oldDefaultGasLimit,
        uint32 newDefaultGasLimit
    );

    event ProviderUriUpdated(address provider, bytes oldUri, bytes newUri);

    event ProviderFeeManagerUpdated(
        address provider,
        address oldFeeManager,
        address newFeeManager
    );
    event ProviderMaxNumHashesAdvanced(
        address provider,
        uint32 oldMaxNumHashes,
        uint32 newMaxNumHashes
    );

    event Withdrawal(
        address provider,
        address recipient,
        uint128 withdrawnAmount
    );
}

File 6 of 9 : EntropyEventsV2.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

import "./EntropyStructs.sol";

/**
 * @title EntropyEventsV2
 * @notice Interface defining events for the Entropy V2 system, which handles random number generation
 * and provider management on Ethereum.
 * @dev This interface is used to emit events that track the lifecycle of random number requests,
 * provider registrations, and system configurations.
 */
interface EntropyEventsV2 {
    /**
     * @notice Emitted when a new provider registers with the Entropy system
     * @param provider The address of the registered provider
     * @param extraArgs A field for extra data for forward compatibility.
     */
    event Registered(address indexed provider, bytes extraArgs);

    /**
     * @notice Emitted when a user requests a random number from a provider
     * @param provider The address of the provider handling the request
     * @param caller The address of the user requesting the random number
     * @param sequenceNumber A unique identifier for this request
     * @param userContribution The user's contribution to the random number
     * @param gasLimit The gas limit for the callback.
     * @param extraArgs A field for extra data for forward compatibility.
     */
    event Requested(
        address indexed provider,
        address indexed caller,
        uint64 indexed sequenceNumber,
        bytes32 userContribution,
        uint32 gasLimit,
        bytes extraArgs
    );

    /**
     * @notice Emitted when a provider reveals the generated random number
     * @param provider The address of the provider that generated the random number
     * @param caller The address of the user who requested the random number (and who receives a callback)
     * @param sequenceNumber The unique identifier of the request
     * @param randomNumber The generated random number
     * @param userContribution The user's contribution to the random number
     * @param providerContribution The provider's contribution to the random number
     * @param callbackFailed Whether the callback to the caller failed
     * @param callbackReturnValue Return value from the callback. If the callback failed, this field contains
     * the error code and any additional returned data. Note that "" often indicates an out-of-gas error.
     * If the callback returns more than 256 bytes, only the first 256 bytes of the callback return value are included.
     * @param callbackGasUsed How much gas the callback used.
     * @param extraArgs A field for extra data for forward compatibility.
     */
    event Revealed(
        address indexed provider,
        address indexed caller,
        uint64 indexed sequenceNumber,
        bytes32 randomNumber,
        bytes32 userContribution,
        bytes32 providerContribution,
        bool callbackFailed,
        bytes callbackReturnValue,
        uint32 callbackGasUsed,
        bytes extraArgs
    );

    /**
     * @notice Emitted when a provider updates their fee
     * @param provider The address of the provider updating their fee
     * @param oldFee The previous fee amount
     * @param newFee The new fee amount
     * @param extraArgs A field for extra data for forward compatibility.
     */
    event ProviderFeeUpdated(
        address indexed provider,
        uint128 oldFee,
        uint128 newFee,
        bytes extraArgs
    );

    /**
     * @notice Emitted when a provider updates their default gas limit
     * @param provider The address of the provider updating their gas limit
     * @param oldDefaultGasLimit The previous default gas limit
     * @param newDefaultGasLimit The new default gas limit
     * @param extraArgs A field for extra data for forward compatibility.
     */
    event ProviderDefaultGasLimitUpdated(
        address indexed provider,
        uint32 oldDefaultGasLimit,
        uint32 newDefaultGasLimit,
        bytes extraArgs
    );

    /**
     * @notice Emitted when a provider updates their URI
     * @param provider The address of the provider updating their URI
     * @param oldUri The previous URI
     * @param newUri The new URI
     * @param extraArgs A field for extra data for forward compatibility.
     */
    event ProviderUriUpdated(
        address indexed provider,
        bytes oldUri,
        bytes newUri,
        bytes extraArgs
    );

    /**
     * @notice Emitted when a provider updates their fee manager address
     * @param provider The address of the provider updating their fee manager
     * @param oldFeeManager The previous fee manager address
     * @param newFeeManager The new fee manager address
     * @param extraArgs A field for extra data for forward compatibility.
     */
    event ProviderFeeManagerUpdated(
        address indexed provider,
        address oldFeeManager,
        address newFeeManager,
        bytes extraArgs
    );

    /**
     * @notice Emitted when a provider updates their maximum number of hashes that can be advanced
     * @param provider The address of the provider updating their max hashes
     * @param oldMaxNumHashes The previous maximum number of hashes
     * @param newMaxNumHashes The new maximum number of hashes
     * @param extraArgs A field for extra data for forward compatibility.
     */
    event ProviderMaxNumHashesAdvanced(
        address indexed provider,
        uint32 oldMaxNumHashes,
        uint32 newMaxNumHashes,
        bytes extraArgs
    );

    /**
     * @notice Emitted when a provider withdraws their accumulated fees
     * @param provider The address of the provider withdrawing fees
     * @param recipient The address receiving the withdrawn fees
     * @param withdrawnAmount The amount of fees withdrawn
     * @param extraArgs A field for extra data for forward compatibility.
     */
    event Withdrawal(
        address indexed provider,
        address indexed recipient,
        uint128 withdrawnAmount,
        bytes extraArgs
    );
}

File 7 of 9 : EntropyStructs.sol
// SPDX-License-Identifier: Apache 2

pragma solidity ^0.8.0;

// This contract holds old versions of the Entropy structs that are no longer used for contract storage.
// However, they are still used in EntropyEvents to maintain the public interface of prior versions of
// the Entropy contract.
//
// See EntropyStructsV2 for the struct definitions currently in use.
contract EntropyStructs {
    struct ProviderInfo {
        uint128 feeInWei;
        uint128 accruedFeesInWei;
        // The commitment that the provider posted to the blockchain, and the sequence number
        // where they committed to this. This value is not advanced after the provider commits,
        // and instead is stored to help providers track where they are in the hash chain.
        bytes32 originalCommitment;
        uint64 originalCommitmentSequenceNumber;
        // Metadata for the current commitment. Providers may optionally use this field to help
        // manage rotations (i.e., to pick the sequence number from the correct hash chain).
        bytes commitmentMetadata;
        // Optional URI where clients can retrieve revelations for the provider.
        // Client SDKs can use this field to automatically determine how to retrieve random values for each provider.
        // TODO: specify the API that must be implemented at this URI
        bytes uri;
        // The first sequence number that is *not* included in the current commitment (i.e., an exclusive end index).
        // The contract maintains the invariant that sequenceNumber <= endSequenceNumber.
        // If sequenceNumber == endSequenceNumber, the provider must rotate their commitment to add additional random values.
        uint64 endSequenceNumber;
        // The sequence number that will be assigned to the next inbound user request.
        uint64 sequenceNumber;
        // The current commitment represents an index/value in the provider's hash chain.
        // These values are used to verify requests for future sequence numbers. Note that
        // currentCommitmentSequenceNumber < sequenceNumber.
        //
        // The currentCommitment advances forward through the provider's hash chain as values
        // are revealed on-chain.
        bytes32 currentCommitment;
        uint64 currentCommitmentSequenceNumber;
        // An address that is authorized to set / withdraw fees on behalf of this provider.
        address feeManager;
        // Maximum number of hashes to record in a request. This should be set according to the maximum gas limit
        // the provider supports for callbacks.
        uint32 maxNumHashes;
    }

    struct Request {
        // Storage slot 1 //
        address provider;
        uint64 sequenceNumber;
        // The number of hashes required to verify the provider revelation.
        uint32 numHashes;
        // Storage slot 2 //
        // The commitment is keccak256(userCommitment, providerCommitment). Storing the hash instead of both saves 20k gas by
        // eliminating 1 store.
        bytes32 commitment;
        // Storage slot 3 //
        // The number of the block where this request was created.
        // Note that we're using a uint64 such that we have an additional space for an address and other fields in
        // this storage slot. Although block.number returns a uint256, 64 bits should be plenty to index all of the
        // blocks ever generated.
        uint64 blockNumber;
        // The address that requested this random number.
        address requester;
        // If true, incorporate the blockhash of blockNumber into the generated random value.
        bool useBlockhash;
        // True if this is a request that expects a callback.
        bool isRequestWithCallback;
    }
}

File 8 of 9 : EntropyStructsV2.sol
// SPDX-License-Identifier: Apache 2

pragma solidity ^0.8.0;

contract EntropyStructsV2 {
    struct ProviderInfo {
        uint128 feeInWei;
        uint128 accruedFeesInWei;
        // The commitment that the provider posted to the blockchain, and the sequence number
        // where they committed to this. This value is not advanced after the provider commits,
        // and instead is stored to help providers track where they are in the hash chain.
        bytes32 originalCommitment;
        uint64 originalCommitmentSequenceNumber;
        // Metadata for the current commitment. Providers may optionally use this field to help
        // manage rotations (i.e., to pick the sequence number from the correct hash chain).
        bytes commitmentMetadata;
        // Optional URI where clients can retrieve revelations for the provider.
        // Client SDKs can use this field to automatically determine how to retrieve random values for each provider.
        // TODO: specify the API that must be implemented at this URI
        bytes uri;
        // The first sequence number that is *not* included in the current commitment (i.e., an exclusive end index).
        // The contract maintains the invariant that sequenceNumber <= endSequenceNumber.
        // If sequenceNumber == endSequenceNumber, the provider must rotate their commitment to add additional random values.
        uint64 endSequenceNumber;
        // The sequence number that will be assigned to the next inbound user request.
        uint64 sequenceNumber;
        // The current commitment represents an index/value in the provider's hash chain.
        // These values are used to verify requests for future sequence numbers. Note that
        // currentCommitmentSequenceNumber < sequenceNumber.
        //
        // The currentCommitment advances forward through the provider's hash chain as values
        // are revealed on-chain.
        bytes32 currentCommitment;
        uint64 currentCommitmentSequenceNumber;
        // An address that is authorized to set / withdraw fees on behalf of this provider.
        address feeManager;
        // Maximum number of hashes to record in a request. This should be set according to the maximum gas limit
        // the provider supports for callbacks.
        uint32 maxNumHashes;
        // Default gas limit to use for callbacks.
        uint32 defaultGasLimit;
    }

    struct Request {
        // Storage slot 1 //
        address provider;
        uint64 sequenceNumber;
        // The number of hashes required to verify the provider revelation.
        uint32 numHashes;
        // Storage slot 2 //
        // The commitment is keccak256(userCommitment, providerCommitment). Storing the hash instead of both saves 20k gas by
        // eliminating 1 store.
        bytes32 commitment;
        // Storage slot 3 //
        // The number of the block where this request was created.
        // Note that we're using a uint64 such that we have an additional space for an address and other fields in
        // this storage slot. Although block.number returns a uint256, 64 bits should be plenty to index all of the
        // blocks ever generated.
        uint64 blockNumber;
        // The address that requested this random number.
        address requester;
        // If true, incorporate the blockhash of blockNumber into the generated random value.
        bool useBlockhash;
        // Status flag for requests with callbacks. See EntropyConstants for the possible values of this flag.
        uint8 callbackStatus;
        // The gasLimit in units of 10k gas. (i.e., 2 = 20k gas). We're using units of 10k in order to fit this
        // field into the remaining 2 bytes of this storage slot. The dynamic range here is 10k - 655M, which should
        // cover all real-world use cases.
        uint16 gasLimit10k;
    }
}

// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.0;

import "./EntropyEvents.sol";
import "./EntropyEventsV2.sol";
import "./EntropyStructsV2.sol";

interface IEntropyV2 is EntropyEventsV2 {
    /// @notice Request a random number using the default provider with default gas limit
    /// @return assignedSequenceNumber A unique identifier for this request
    /// @dev The address calling this function should be a contract that inherits from the IEntropyConsumer interface.
    /// The `entropyCallback` method on that interface will receive a callback with the returned sequence number and
    /// the generated random number.
    ///
    /// `entropyCallback` will be run with the provider's configured default gas limit.
    ///
    /// This method will revert unless the caller provides a sufficient fee (at least `getFeeV2()`) as msg.value.
    /// Note that the fee can change over time. Callers of this method should explicitly compute `getFeeV2()`
    /// prior to each invocation (as opposed to hardcoding a value). Further note that excess value is *not* refunded to the caller.
    ///
    /// Note that this method uses an in-contract PRNG to generate the user's contribution to the random number.
    /// This approach modifies the security guarantees such that a dishonest validator and provider can
    /// collude to manipulate the result (as opposed to a malicious user and provider). That is, the user
    /// now trusts the validator honestly draw a random number. If you wish to avoid this trust assumption,
    /// call a variant of `requestV2` that accepts a `userRandomNumber` parameter.
    function requestV2()
        external
        payable
        returns (uint64 assignedSequenceNumber);

    /// @notice Request a random number using the default provider with specified gas limit
    /// @param gasLimit The gas limit for the callback function.
    /// @return assignedSequenceNumber A unique identifier for this request
    /// @dev The address calling this function should be a contract that inherits from the IEntropyConsumer interface.
    /// The `entropyCallback` method on that interface will receive a callback with the returned sequence number and
    /// the generated random number.
    ///
    /// `entropyCallback` will be run with the `gasLimit` provided to this function.
    /// The `gasLimit` will be rounded up to a multiple of 10k (e.g., 19000 -> 20000), and furthermore is lower bounded
    /// by the provider's configured default limit.
    ///
    /// This method will revert unless the caller provides a sufficient fee (at least `getFeeV2(gasLimit)`) as msg.value.
    /// Note that the fee can change over time. Callers of this method should explicitly compute `getFeeV2(gasLimit)`
    /// prior to each invocation (as opposed to hardcoding a value). Further note that excess value is *not* refunded to the caller.
    ///
    /// Note that this method uses an in-contract PRNG to generate the user's contribution to the random number.
    /// This approach modifies the security guarantees such that a dishonest validator and provider can
    /// collude to manipulate the result (as opposed to a malicious user and provider). That is, the user
    /// now trusts the validator honestly draw a random number. If you wish to avoid this trust assumption,
    /// call a variant of `requestV2` that accepts a `userRandomNumber` parameter.
    function requestV2(
        uint32 gasLimit
    ) external payable returns (uint64 assignedSequenceNumber);

    /// @notice Request a random number from a specific provider with specified gas limit
    /// @param provider The address of the provider to request from
    /// @param gasLimit The gas limit for the callback function
    /// @return assignedSequenceNumber A unique identifier for this request
    /// @dev The address calling this function should be a contract that inherits from the IEntropyConsumer interface.
    /// The `entropyCallback` method on that interface will receive a callback with the returned sequence number and
    /// the generated random number.
    ///
    /// `entropyCallback` will be run with the `gasLimit` provided to this function.
    /// The `gasLimit` will be rounded up to a multiple of 10k (e.g., 19000 -> 20000), and furthermore is lower bounded
    /// by the provider's configured default limit.
    ///
    /// This method will revert unless the caller provides a sufficient fee (at least `getFeeV2(provider, gasLimit)`) as msg.value.
    /// Note that provider fees can change over time. Callers of this method should explicitly compute `getFeeV2(provider, gasLimit)`
    /// prior to each invocation (as opposed to hardcoding a value). Further note that excess value is *not* refunded to the caller.
    ///
    /// Note that this method uses an in-contract PRNG to generate the user's contribution to the random number.
    /// This approach modifies the security guarantees such that a dishonest validator and provider can
    /// collude to manipulate the result (as opposed to a malicious user and provider). That is, the user
    /// now trusts the validator honestly draw a random number. If you wish to avoid this trust assumption,
    /// call a variant of `requestV2` that accepts a `userRandomNumber` parameter.
    function requestV2(
        address provider,
        uint32 gasLimit
    ) external payable returns (uint64 assignedSequenceNumber);

    /// @notice Request a random number from a specific provider with a user-provided random number and gas limit
    /// @param provider The address of the provider to request from
    /// @param userRandomNumber A random number provided by the user for additional entropy
    /// @param gasLimit The gas limit for the callback function. Pass 0 to get a sane default value -- see note below.
    /// @return assignedSequenceNumber A unique identifier for this request
    /// @dev The address calling this function should be a contract that inherits from the IEntropyConsumer interface.
    /// The `entropyCallback` method on that interface will receive a callback with the returned sequence number and
    /// the generated random number.
    ///
    /// `entropyCallback` will be run with the `gasLimit` provided to this function.
    /// The `gasLimit` will be rounded up to a multiple of 10k (e.g., 19000 -> 20000), and furthermore is lower bounded
    /// by the provider's configured default limit.
    ///
    /// This method will revert unless the caller provides a sufficient fee (at least `getFeeV2(provider, gasLimit)`) as msg.value.
    /// Note that provider fees can change over time. Callers of this method should explicitly compute `getFeeV2(provider, gasLimit)`
    /// prior to each invocation (as opposed to hardcoding a value). Further note that excess value is *not* refunded to the caller.
    function requestV2(
        address provider,
        bytes32 userRandomNumber,
        uint32 gasLimit
    ) external payable returns (uint64 assignedSequenceNumber);

    /// @notice Get information about a specific entropy provider
    /// @param provider The address of the provider to query
    /// @return info The provider information including configuration, fees, and operational status
    /// @dev This method returns detailed information about a provider's configuration and capabilities.
    /// The returned ProviderInfo struct contains information such as the provider's fee structure and gas limits.
    function getProviderInfoV2(
        address provider
    ) external view returns (EntropyStructsV2.ProviderInfo memory info);

    /// @notice Get the address of the default entropy provider
    /// @return provider The address of the default provider
    /// @dev This method returns the address of the provider that will be used when no specific provider is specified
    /// in the requestV2 calls. The default provider can be used to get the base fee and gas limit information.
    function getDefaultProvider() external view returns (address provider);

    /// @notice Get information about a specific request
    /// @param provider The address of the provider that handled the request
    /// @param sequenceNumber The unique identifier of the request
    /// @return req The request information including status, random number, and other metadata
    /// @dev This method allows querying the state of a previously made request. The returned Request struct
    /// contains information about whether the request was fulfilled, the generated random number (if available),
    /// and other metadata about the request.
    function getRequestV2(
        address provider,
        uint64 sequenceNumber
    ) external view returns (EntropyStructsV2.Request memory req);

    /// @notice Get the fee charged by the default provider for the default gas limit
    /// @return feeAmount The fee amount in wei
    /// @dev This method returns the base fee required to make a request using the default provider with
    /// the default gas limit. This fee should be passed as msg.value when calling requestV2().
    /// The fee can change over time, so this method should be called before each request.
    function getFeeV2() external view returns (uint128 feeAmount);

    /// @notice Get the fee charged by the default provider for a specific gas limit
    /// @param gasLimit The gas limit for the callback function
    /// @return feeAmount The fee amount in wei
    /// @dev This method returns the fee required to make a request using the default provider with
    /// the specified gas limit. This fee should be passed as msg.value when calling requestV2(gasLimit).
    /// The fee can change over time, so this method should be called before each request.
    function getFeeV2(
        uint32 gasLimit
    ) external view returns (uint128 feeAmount);

    /// @notice Get the fee charged by a specific provider for a request with a given gas limit
    /// @param provider The address of the provider to query
    /// @param gasLimit The gas limit for the callback function
    /// @return feeAmount The fee amount in wei
    /// @dev This method returns the fee required to make a request using the specified provider with
    /// the given gas limit. This fee should be passed as msg.value when calling requestV2(provider, gasLimit)
    /// or requestV2(provider, userRandomNumber, gasLimit). The fee can change over time, so this method
    /// should be called before each request.
    function getFeeV2(
        address provider,
        uint32 gasLimit
    ) external view returns (uint128 feeAmount);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_lottery","type":"address"},{"internalType":"address","name":"_rng","type":"address"},{"internalType":"address","name":"_operatorAddress","type":"address"},{"internalType":"uint256","name":"_interval","type":"uint256"},{"internalType":"uint256","name":"_priceTicketInS","type":"uint256"},{"internalType":"uint256","name":"_discountDivisor","type":"uint256"},{"internalType":"uint256[6]","name":"_rewardsBreakdown","type":"uint256[6]"},{"internalType":"uint256","name":"_treasuryFee","type":"uint256"},{"internalType":"bool","name":"_autoInjection","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lotteryId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feePaid","type":"uint256"}],"name":"ExecutedClose","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lotteryId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"autoInjection","type":"bool"}],"name":"ExecutedDraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"discountDivisor","type":"uint256"},{"indexed":false,"internalType":"uint256[6]","name":"rewards","type":"uint256[6]"},{"indexed":false,"internalType":"uint256","name":"treasuryFee","type":"uint256"}],"name":"ExecutedStart","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"autoInjection","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkerClose","outputs":[{"internalType":"bool","name":"canExec","type":"bool"},{"internalType":"bytes","name":"execData","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkerDraw","outputs":[{"internalType":"bool","name":"canExec","type":"bool"},{"internalType":"bytes","name":"execData","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkerStart","outputs":[{"internalType":"bool","name":"canExec","type":"bool"},{"internalType":"bytes","name":"execData","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"discountDivisor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"executeClose","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"executeDraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"executeStart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gasPriceCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"interval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lottery","outputs":[{"internalType":"contract ILumosLotteryLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceTicketInS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardsBreakdown","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rng","outputs":[{"internalType":"contract INewRandomNumberGeneratorLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"v","type":"bool"}],"name":"setAutoInjection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_discountDivisor","type":"uint256"}],"name":"setDiscountDivisor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"setEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cap","type":"uint256"}],"name":"setGasPriceCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_interval","type":"uint256"}],"name":"setInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lottery","type":"address"}],"name":"setLottery","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setOperatorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_priceTicketInS","type":"uint256"}],"name":"setPriceTicketInS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[6]","name":"_rb","type":"uint256[6]"}],"name":"setRewardsBreakdown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rng","type":"address"}],"name":"setRng","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_treasuryFee","type":"uint256"}],"name":"setTreasuryFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"v","type":"bool"}],"name":"setUseDynamicEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useDynamicEndTime","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526006805460ff191660011790553480156200001e57600080fd5b5060405162004d4b38038062004d4b8339810160408190526200004191620007d1565b6200004c33620006f9565b6000805460ff60a01b191690556001600160a01b038916158015906200007a57506001600160a01b03881615155b80156200008f57506001600160a01b03871615155b620000cd5760405162461bcd60e51b81526020600482015260096024820152683d32b9379030b2323960b91b60448201526064015b60405180910390fd5b600180546001600160a01b03808c166001600160a01b0319928316811790935560028054918c1691909216179055604080516301fed6a760e21b815290516307fb5a9c91600480820192602092909190829003018186803b1580156200013257600080fd5b505afa15801562000147573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200016d9190620008cc565b861015620001b35760405162461bcd60e51b81526020600482015260126024820152711a5b9d195c9d985b081d1bdbc81cda1bdc9d60721b6044820152606401620000c4565b600160009054906101000a90046001600160a01b03166001600160a01b031663db19da0d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200020257600080fd5b505afa15801562000217573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200023d9190620008cc565b861115620002825760405162461bcd60e51b8152602060048201526011602482015270696e74657276616c20746f6f206c6f6e6760781b6044820152606401620000c4565b600160009054906101000a90046001600160a01b03166001600160a01b03166385e93cad6040518163ffffffff1660e01b815260040160206040518083038186803b158015620002d157600080fd5b505afa158015620002e6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200030c9190620008cc565b8510156200035d5760405162461bcd60e51b815260206004820152601360248201527f70726963655469636b657420746f6f206c6f77000000000000000000000000006044820152606401620000c4565b600160009054906101000a90046001600160a01b03166001600160a01b031663a568f0f86040518163ffffffff1660e01b815260040160206040518083038186803b158015620003ac57600080fd5b505afa158015620003c1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003e79190620008cc565b851115620004385760405162461bcd60e51b815260206004820152601460248201527f70726963655469636b657420746f6f20686967680000000000000000000000006044820152606401620000c4565b600160009054906101000a90046001600160a01b03166001600160a01b0316637cb583bd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200048757600080fd5b505afa1580156200049c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004c29190620008cc565b841015620005135760405162461bcd60e51b815260206004820152601760248201527f646973636f756e7444697669736f7220746f6f206c6f770000000000000000006044820152606401620000c4565b600160009054906101000a90046001600160a01b03166001600160a01b031663f2b3c8096040518163ffffffff1660e01b815260040160206040518083038186803b1580156200056257600080fd5b505afa15801562000577573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200059d9190620008cc565b821115620005ee5760405162461bcd60e51b815260206004820152601460248201527f747265617375727946656520746f6f20686967680000000000000000000000006044820152606401620000c4565b6000805b600681101562000645578481600681106200061d57634e487b7160e01b600052603260045260246000fd5b60200201516200062e9083620008e5565b9150806200063c8162000900565b915050620005f2565b508061271014620006995760405162461bcd60e51b815260206004820152601460248201527f726577617264732073756d20213d2031303030300000000000000000000000006044820152606401620000c4565b600480546001600160a01b0319166001600160a01b038a16179055600587905560088690556009859055620006d2600a85600662000749565b50506010919091556011805460ff1916911515919091179055506200094a95505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82600681019282156200077a579160200282015b828111156200077a5782518255916020019190600101906200075d565b50620007889291506200078c565b5090565b5b808211156200078857600081556001016200078d565b80516001600160a01b0381168114620007bb57600080fd5b919050565b80518015158114620007bb57600080fd5b60008060008060008060008060006101c08a8c031215620007f0578485fd5b620007fb8a620007a3565b985060206200080c818c01620007a3565b98506200081c60408c01620007a3565b975060608b0151965060808b0151955060a08b015194508b60df8c011262000842578384fd5b60405160c081016001600160401b038111828210171562000867576200086762000934565b6040528060c08d016101808e018f81111562000881578788fd5b875b6006811015620008a25782518452928501929185019160010162000883565b5051929650919450620008bd925050506101a08b01620007c0565b90509295985092959850929598565b600060208284031215620008de578081fd5b5051919050565b60008219821115620008fb57620008fb6200091e565b500190565b60006000198214156200091757620009176200091e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6143f1806200095a6000396000f3fe60806040526004361061026e5760003560e01c80638da5cb5b11610153578063ccada611116100cb578063e2ef74fe1161007f578063f298083b11610064578063f298083b14610691578063f2fde38b146106b1578063fbd4006b146106d157600080fd5b8063e2ef74fe1461065b578063ecd13b891461067b57600080fd5b8063d605787b116100b0578063d605787b146105f8578063e02dc5c514610625578063e2ce3c641461064557600080fd5b8063ccada611146105b8578063ccb98ffc146105d857600080fd5b8063b573f50f11610122578063bb2e804711610107578063bb2e80471461056d578063bf4fc7641461058d578063cc32d176146105a257600080fd5b8063b573f50f14610526578063ba13a5721461054057600080fd5b80638da5cb5b146104bd578063947a36fb146104e857806397ff1cac146104fe578063a6536e751461051e57600080fd5b80633f4ba83a116101e657806368f5f2b0116101b557806377e741c71161019a57806377e741c7146104735780638031b7f4146104935780638456cb59146104a857600080fd5b806368f5f2b01461043e578063715018a61461045e57600080fd5b80633f4ba83a146103c45780634937295c146103d95780635c975abb146103f95780635fd8c7101461042957600080fd5b80632d49a7bf1161023d5780632f1d5a60116102225780632f1d5a601461036a57806330d08eb31461038a5780633197cbb6146103ae57600080fd5b80632d49a7bf146103405780632ef89cc01461035557600080fd5b8063127effb21461027a5780631d16927a146102d157806322a90082146102fb5780632a76bde91461031d57600080fd5b3661027557005b600080fd5b34801561028657600080fd5b506004546102a79073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156102dd57600080fd5b506011546102eb9060ff1681565b60405190151581526020016102c8565b34801561030757600080fd5b5061031b61031636600461419e565b6106f1565b005b34801561032957600080fd5b50610332610915565b6040516102c8929190614225565b34801561034c57600080fd5b5061031b610ce2565b34801561036157600080fd5b506103326112a3565b34801561037657600080fd5b5061031b6103853660046140e9565b611862565b34801561039657600080fd5b506103a060085481565b6040519081526020016102c8565b3480156103ba57600080fd5b506103a060075481565b3480156103d057600080fd5b5061031b61192e565b3480156103e557600080fd5b5061031b6103f436600461419e565b611940565b34801561040557600080fd5b5060005474010000000000000000000000000000000000000000900460ff166102eb565b34801561043557600080fd5b5061031b611a56565b34801561044a57600080fd5b5061031b610459366004614128565b611b94565b34801561046a57600080fd5b5061031b611c84565b34801561047f57600080fd5b5061031b61048e36600461419e565b611c96565b34801561049f57600080fd5b50610332611dac565b3480156104b457600080fd5b5061031b6122c9565b3480156104c957600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166102a7565b3480156104f457600080fd5b506103a060055481565b34801561050a57600080fd5b506103a061051936600461419e565b6122d9565b61031b6122f0565b34801561053257600080fd5b506006546102eb9060ff1681565b34801561054c57600080fd5b506001546102a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561057957600080fd5b5061031b6105883660046140e9565b612a22565b34801561059957600080fd5b5061031b612aee565b3480156105ae57600080fd5b506103a060105481565b3480156105c457600080fd5b5061031b6105d336600461414e565b613304565b3480156105e457600080fd5b5061031b6105f336600461419e565b613419565b34801561060457600080fd5b506002546102a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561063157600080fd5b5061031b61064036600461414e565b6136b0565b34801561065157600080fd5b506103a060035481565b34801561066757600080fd5b5061031b61067636600461419e565b6136e9565b34801561068757600080fd5b506103a060095481565b34801561069d57600080fd5b5061031b6106ac3660046140e9565b613908565b3480156106bd57600080fd5b5061031b6106cc3660046140e9565b6139d4565b3480156106dd57600080fd5b5061031b6106ec36600461419e565b613a8b565b6106f9613a98565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166307fb5a9c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561076157600080fd5b505afa158015610775573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079991906141b6565b811015610807576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e74657276616c20746f6f2073686f7274000000000000000000000000000060448201526064015b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663db19da0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561086f57600080fd5b505afa158015610883573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a791906141b6565b811115610910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f696e74657276616c20746f6f206c6f6e6700000000000000000000000000000060448201526064016107fe565b600555565b6000805460609074010000000000000000000000000000000000000000900460ff161561097757505060408051808201909152601a81527f436865636b657220636f6e7472616374206973207061757365640000000000006020820152600091565b60015473ffffffffffffffffffffffffffffffffffffffff1615806109b2575060025473ffffffffffffffffffffffffffffffffffffffff16155b156109f257505060408051808201909152600e81527f436f6e666967206e6f74207365740000000000000000000000000000000000006020820152600091565b6000600354118015610a0557506003543a115b15610a4557505060408051808201909152601281527f47617320707269636520746f6f206869676800000000000000000000000000006020820152600091565b600154604080517f127effb20000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163127effb2916004808301926020929190829003018186803b158015610aaf57600080fd5b505afa158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae7919061410c565b73ffffffffffffffffffffffffffffffffffffffff1614610b3d57505060408051808201909152600e81527f6f70657261746f72213d746869730000000000000000000000000000000000006020820152600091565b600254604080517ffbe5d917000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163fbe5d917916004808301926020929190829003018186803b158015610ba857600080fd5b505afa158015610bbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be091906141b6565b905080610c2557505060408051808201909152601281527f496e76616c6964206c6f747465727920494400000000000000000000000000006020820152600092909150565b6000610c3082613b19565b90508060ff16600214610c7f5760006040518060400160405280600f81526020017f73746174757320213d20436c6f736500000000000000000000000000000000008152509350935050509091565b50506040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f2d49a7bf000000000000000000000000000000000000000000000000000000001790526001939092509050565b60045473ffffffffffffffffffffffffffffffffffffffff16331480610d1f575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610d85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f70657261746f72206f72206f776e6572000000000000000000000060448201526064016107fe565b60005474010000000000000000000000000000000000000000900460ff1615610e0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f436865636b657220636f6e74726163742069732070617573656400000000000060448201526064016107fe565b60015473ffffffffffffffffffffffffffffffffffffffff1615801590610e48575060025473ffffffffffffffffffffffffffffffffffffffff1615155b610eae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f436f6e666967206e6f742073657400000000000000000000000000000000000060448201526064016107fe565b60035415610f22576003543a1115610f22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f47617320707269636520746f6f2068696768000000000000000000000000000060448201526064016107fe565b600154604080517f127effb20000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163127effb2916004808301926020929190829003018186803b158015610f8c57600080fd5b505afa158015610fa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc4919061410c565b73ffffffffffffffffffffffffffffffffffffffff1614611041576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6f70657261746f72213d7468697300000000000000000000000000000000000060448201526064016107fe565b600254604080517ffbe5d917000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163fbe5d917916004808301926020929190829003018186803b1580156110ac57600080fd5b505afa1580156110c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e491906141b6565b905060008111611150576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c6964206c6f7474657279204944000000000000000000000000000060448201526064016107fe565b600061115b82613b19565b90508060ff166002146111ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f73746174757320213d20436c6f7365000000000000000000000000000000000060448201526064016107fe565b6001546011546040517fc38de5390000000000000000000000000000000000000000000000000000000081526004810185905260ff9091161515602482015273ffffffffffffffffffffffffffffffffffffffff9091169063c38de53990604401600060405180830381600087803b15801561124557600080fd5b505af1158015611259573d6000803e3d6000fd5b50506011546040805186815260ff909216151560208301527f56533d264df95c080b60c651181276995a42e54c79dc542ff2d6e9443b240ffb935001905060405180910390a15050565b6000805460609074010000000000000000000000000000000000000000900460ff161561130557505060408051808201909152601a81527f436865636b657220636f6e7472616374206973207061757365640000000000006020820152600091565b60015473ffffffffffffffffffffffffffffffffffffffff1661135d57505060408051808201909152600f81527f4c6f7474657279206e6f742073657400000000000000000000000000000000006020820152600091565b600060035411801561137057506003543a115b156113b057505060408051808201909152601281527f47617320707269636520746f6f206869676800000000000000000000000000006020820152600091565b600154604080517f127effb20000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163127effb2916004808301926020929190829003018186803b15801561141a57600080fd5b505afa15801561142e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611452919061410c565b73ffffffffffffffffffffffffffffffffffffffff16146114a857505060408051808201909152600e81527f6f70657261746f72213d746869730000000000000000000000000000000000006020820152600091565b600154604080517f80a06160000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916380a06160916004808301926020929190829003018186803b15801561151357600080fd5b505afa158015611527573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154b91906141b6565b905080156115af57600061155e82613b19565b90508060ff166003146115ad5760006040518060400160405280601e81526020017f50726576696f7573206c6f7474657279206e6f7420636c61696d61626c6500008152509350935050509091565b505b60065460009060ff166115c4576007546115d1565b6005546115d190426142d2565b905042811161161c5760006040518060400160405280600f81526020017f656e6454696d6520696e207061737400000000000000000000000000000000008152509350935050509091565b600061162842836142ea565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166307fb5a9c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561169257600080fd5b505afa1580156116a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ca91906141b6565b8110156117145760006040518060400160405280601281526020017f6475726174696f6e20746f6f2073686f72740000000000000000000000000000815250945094505050509091565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663db19da0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561177c57600080fd5b505afa158015611790573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b491906141b6565b8111156117fe5760006040518060400160405280601181526020017f6475726174696f6e20746f6f206c6f6e67000000000000000000000000000000815250945094505050509091565b50506040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fbf4fc76400000000000000000000000000000000000000000000000000000000179052600194909350915050565b61186a613a98565b73ffffffffffffffffffffffffffffffffffffffff81166118e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f70657261746f723d300000000000000000000000000000000000000000000060448201526064016107fe565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611936613a98565b61193e613ca0565b565b611948613a98565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637cb583bd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119b057600080fd5b505afa1580156119c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e891906141b6565b811015611a51576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f646973636f756e7444697669736f7220746f6f206c6f7700000000000000000060448201526064016107fe565b600955565b611a5e613a98565b4780611ac6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f2062616c616e63650000000000000000000000000000000000000000000060448201526064016107fe565b6000805460405173ffffffffffffffffffffffffffffffffffffffff9091169083908381818185875af1925050503d8060008114611b20576040519150601f19603f3d011682016040523d82523d6000602084013e611b25565b606091505b5050905080611b90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f7769746864726177206661696c6564000000000000000000000000000000000060448201526064016107fe565b5050565b611b9c613a98565b6000805b6006811015611c0657828160068110611be2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002013582611bf291906142d2565b915080611bfe81614331565b915050611ba0565b508061271014611c72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f726577617264732073756d20213d20313030303000000000000000000000000060448201526064016107fe565b611c7f600a836006614096565b505050565b611c8c613a98565b61193e6000613d1d565b611c9e613a98565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2b3c8096040518163ffffffff1660e01b815260040160206040518083038186803b158015611d0657600080fd5b505afa158015611d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d3e91906141b6565b811115611da7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f747265617375727946656520746f6f206869676800000000000000000000000060448201526064016107fe565b601055565b6000805460609074010000000000000000000000000000000000000000900460ff1615611e0e57505060408051808201909152601a81527f436865636b657220636f6e7472616374206973207061757365640000000000006020820152600091565b60015473ffffffffffffffffffffffffffffffffffffffff161580611e49575060025473ffffffffffffffffffffffffffffffffffffffff16155b15611e8957505060408051808201909152600e81527f436f6e666967206e6f74207365740000000000000000000000000000000000006020820152600091565b6000600354118015611e9c57506003543a115b15611edc57505060408051808201909152601281527f47617320707269636520746f6f206869676800000000000000000000000000006020820152600091565b600154604080517f127effb20000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163127effb2916004808301926020929190829003018186803b158015611f4657600080fd5b505afa158015611f5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7e919061410c565b73ffffffffffffffffffffffffffffffffffffffff1614611fd457505060408051808201909152600e81527f6f70657261746f72213d746869730000000000000000000000000000000000006020820152600091565b600154604080517f80a06160000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916380a06160916004808301926020929190829003018186803b15801561203f57600080fd5b505afa158015612053573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207791906141b6565b9050806120bc57505060408051808201909152601281527f496e76616c6964206c6f747465727920494400000000000000000000000000006020820152600092909150565b6000806120c883613d92565b915091508160ff1660011461211a5760006040518060400160405280600e81526020017f73746174757320213d204f70656e000000000000000000000000000000000000815250945094505050509091565b8042116121645760006040518060400160405280600981526020017f6e6f7420656e6465640000000000000000000000000000000000000000000000815250945094505050509091565b60007336825bf3fbdf5a29e2d5148bfe7dcf7b5639e32073ffffffffffffffffffffffffffffffffffffffff16638204b67a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c057600080fd5b505afa1580156121d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f8919061416e565b6fffffffffffffffffffffffffffffffff169050804710801561221b5750333181115b156122645760006040518060400160405280601881526020017f696e73756666696369656e74206665652062616c616e6365000000000000000081525095509550505050509091565b50506040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa6536e750000000000000000000000000000000000000000000000000000000017905260019590945092505050565b6122d1613a98565b61193e613f1e565b600a81600681106122e957600080fd5b0154905081565b60045473ffffffffffffffffffffffffffffffffffffffff1633148061232d575060005473ffffffffffffffffffffffffffffffffffffffff1633145b612393576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f70657261746f72206f72206f776e6572000000000000000000000060448201526064016107fe565b60005474010000000000000000000000000000000000000000900460ff1615612418576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f436865636b657220636f6e74726163742069732070617573656400000000000060448201526064016107fe565b60015473ffffffffffffffffffffffffffffffffffffffff1615801590612456575060025473ffffffffffffffffffffffffffffffffffffffff1615155b6124bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f436f6e666967206e6f742073657400000000000000000000000000000000000060448201526064016107fe565b60035415612530576003543a1115612530576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f47617320707269636520746f6f2068696768000000000000000000000000000060448201526064016107fe565b600154604080517f127effb20000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163127effb2916004808301926020929190829003018186803b15801561259a57600080fd5b505afa1580156125ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d2919061410c565b73ffffffffffffffffffffffffffffffffffffffff161461264f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6f70657261746f72213d7468697300000000000000000000000000000000000060448201526064016107fe565b600154604080517f80a06160000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916380a06160916004808301926020929190829003018186803b1580156126ba57600080fd5b505afa1580156126ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126f291906141b6565b90506000811161275e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c6964206c6f7474657279204944000000000000000000000000000060448201526064016107fe565b60008061276a83613d92565b915091508160ff166001146127db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f73746174757320213d204f70656e00000000000000000000000000000000000060448201526064016107fe565b804211612844576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f7420656e646564000000000000000000000000000000000000000000000060448201526064016107fe565b60007336825bf3fbdf5a29e2d5148bfe7dcf7b5639e32073ffffffffffffffffffffffffffffffffffffffff16638204b67a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128a057600080fd5b505afa1580156128b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d8919061416e565b6fffffffffffffffffffffffffffffffff16905080471015612956576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f696e73756666696369656e74206665652062616c616e6365000000000000000060448201526064016107fe565b6001546040517f9d8ca5310000000000000000000000000000000000000000000000000000000081526004810186905273ffffffffffffffffffffffffffffffffffffffff90911690639d8ca5319083906024016000604051808303818588803b1580156129c357600080fd5b505af11580156129d7573d6000803e3d6000fd5b505060408051888152602081018690527f3caf32ffc2ef889548d1debbfbf4c8bc098e90a405cdcfa57a369fddb973934a9450019150612a149050565b60405180910390a150505050565b612a2a613a98565b73ffffffffffffffffffffffffffffffffffffffff8116612aa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600560248201527f726e673d3000000000000000000000000000000000000000000000000000000060448201526064016107fe565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff16331480612b2b575060005473ffffffffffffffffffffffffffffffffffffffff1633145b612b91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f70657261746f72206f72206f776e6572000000000000000000000060448201526064016107fe565b60005474010000000000000000000000000000000000000000900460ff1615612c16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f436865636b657220636f6e74726163742069732070617573656400000000000060448201526064016107fe565b60015473ffffffffffffffffffffffffffffffffffffffff16612c95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4c6f7474657279206e6f7420736574000000000000000000000000000000000060448201526064016107fe565b60035415612d09576003543a1115612d09576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f47617320707269636520746f6f2068696768000000000000000000000000000060448201526064016107fe565b600154604080517f127effb20000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163127effb2916004808301926020929190829003018186803b158015612d7357600080fd5b505afa158015612d87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dab919061410c565b73ffffffffffffffffffffffffffffffffffffffff1614612e28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6f70657261746f72213d7468697300000000000000000000000000000000000060448201526064016107fe565b600154604080517f80a06160000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916380a06160916004808301926020929190829003018186803b158015612e9357600080fd5b505afa158015612ea7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ecb91906141b6565b90508015612f4f576000612ede82613b19565b90508060ff16600314612f4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f50726576696f7573206c6f7474657279206e6f7420636c61696d61626c65000060448201526064016107fe565b505b60065460009060ff16612f6457600754612f71565b600554612f7190426142d2565b9050428111612fdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f656e6454696d6520696e2070617374000000000000000000000000000000000060448201526064016107fe565b6000612fe842836142ea565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166307fb5a9c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561305257600080fd5b505afa158015613066573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061308a91906141b6565b8110156130f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6475726174696f6e20746f6f2073686f7274000000000000000000000000000060448201526064016107fe565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663db19da0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561315b57600080fd5b505afa15801561316f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061319391906141b6565b8111156131fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6475726174696f6e20746f6f206c6f6e6700000000000000000000000000000060448201526064016107fe565b6040805160c0810191829052600091600a9060069082845b8154815260200190600101908083116132145750506001546008546009546010546040517fb1829b8200000000000000000000000000000000000000000000000000000000815297985073ffffffffffffffffffffffffffffffffffffffff9093169663b1829b82965061329595508a94509192909188919060040161427f565b600060405180830381600087803b1580156132af57600080fd5b505af11580156132c3573d6000803e3d6000fd5b505050507fcc30479927d2a432a192037028bffae35f034715e13969795a33658e1789b89f8360085460095484601054604051612a1495949392919061427f565b61330c613a98565b806133e85760006007541161337d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f656e6454696d65206e6f7420736574000000000000000000000000000000000060448201526064016107fe565b42600754116133e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f656e6454696d6520696e2070617374000000000000000000000000000000000060448201526064016107fe565b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b613421613a98565b42811161348a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f656e6454696d6520696e2070617374000000000000000000000000000000000060448201526064016107fe565b600061349642836142ea565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166307fb5a9c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561350057600080fd5b505afa158015613514573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061353891906141b6565b8110156135a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f656e6454696d6520746f6f20736f6f6e0000000000000000000000000000000060448201526064016107fe565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663db19da0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561360957600080fd5b505afa15801561361d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061364191906141b6565b8111156136aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f656e6454696d6520746f6f20666172000000000000000000000000000000000060448201526064016107fe565b50600755565b6136b8613a98565b601180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6136f1613a98565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166385e93cad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561375957600080fd5b505afa15801561376d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061379191906141b6565b8110156137fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f70726963655469636b657420746f6f206c6f770000000000000000000000000060448201526064016107fe565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a568f0f86040518163ffffffff1660e01b815260040160206040518083038186803b15801561386257600080fd5b505afa158015613876573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061389a91906141b6565b811115613903576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f70726963655469636b657420746f6f206869676800000000000000000000000060448201526064016107fe565b600855565b613910613a98565b73ffffffffffffffffffffffffffffffffffffffff811661398d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6c6f74746572793d30000000000000000000000000000000000000000000000060448201526064016107fe565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6139dc613a98565b73ffffffffffffffffffffffffffffffffffffffff8116613a7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107fe565b613a8881613d1d565b50565b613a93613a98565b600355565b60005473ffffffffffffffffffffffffffffffffffffffff16331461193e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107fe565b60008082604051602401613b2f91815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f2423807a000000000000000000000000000000000000000000000000000000001790526001549051919250600091829173ffffffffffffffffffffffffffffffffffffffff1690613bd4908590614209565b600060405180830381855afa9150503d8060008114613c0f576040519150601f19603f3d011682016040523d82523d6000602084013e613c14565b606091505b509150915081613c80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f766965774c6f7474657279206661696c6564000000000000000000000000000060448201526064016107fe565b80806020019051810190613c9491906141ce565b50909695505050505050565b613ca8613f8d565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600083604051602401613daa91815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f2423807a000000000000000000000000000000000000000000000000000000001790526001549051919250600091829173ffffffffffffffffffffffffffffffffffffffff1690613e4f908590614209565b600060405180830381855afa9150503d8060008114613e8a576040519150601f19603f3d011682016040523d82523d6000602084013e613e8f565b606091505b509150915081613efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f766965774c6f7474657279206661696c6564000000000000000000000000000060448201526064016107fe565b80806020019051810190613f0f91906141ce565b91989197509095505050505050565b613f26614011565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613cf33390565b60005474010000000000000000000000000000000000000000900460ff1661193e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016107fe565b60005474010000000000000000000000000000000000000000900460ff161561193e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016107fe565b82600681019282156140c4579160200282015b828111156140c45782358255916020019190600101906140a9565b506140d09291506140d4565b5090565b5b808211156140d057600081556001016140d5565b6000602082840312156140fa578081fd5b813561410581614399565b9392505050565b60006020828403121561411d578081fd5b815161410581614399565b600060c08284031215614139578081fd5b8260c083011115614148578081fd5b50919050565b60006020828403121561415f578081fd5b81358015158114614105578182fd5b60006020828403121561417f578081fd5b81516fffffffffffffffffffffffffffffffff81168114614105578182fd5b6000602082840312156141af578081fd5b5035919050565b6000602082840312156141c7578081fd5b5051919050565b6000806000606084860312156141e2578182fd5b835160ff811681146141f2578283fd5b602085015160409095015190969495509392505050565b6000825161421b818460208701614301565b9190910192915050565b8215158152604060208201526000825180604084015261424c816060850160208701614301565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016060019392505050565b60006101408201905086825260208681840152856040840152606083018560005b60068110156142bd578151835291830191908301906001016142a0565b50505050826101208301529695505050505050565b600082198211156142e5576142e561436a565b500190565b6000828210156142fc576142fc61436a565b500390565b60005b8381101561431c578181015183820152602001614304565b8381111561432b576000848401525b50505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156143635761436361436a565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114613a8857600080fdfea26469706673582212207322d30238bc7db002ab11b7add8aac88ac8feaf0e52a0cafde6f62daafadbc664736f6c63430008040033000000000000000000000000aea5becd22975855c77300ab3b6efb94e1f3af6f000000000000000000000000330a1a59604b838c26e1aaf25dd5dc1c1ddc545a0000000000000000000000004b9a16f82569d5edea55823df185614751bda03200000000000000000000000000000000000000000000000000000000000151440000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000c8000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000005dc00000000000000000000000000000000000000000000000000000000000009c4000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000007d00000000000000000000000000000000000000000000000000000000000000001

Deployed Bytecode

0x60806040526004361061026e5760003560e01c80638da5cb5b11610153578063ccada611116100cb578063e2ef74fe1161007f578063f298083b11610064578063f298083b14610691578063f2fde38b146106b1578063fbd4006b146106d157600080fd5b8063e2ef74fe1461065b578063ecd13b891461067b57600080fd5b8063d605787b116100b0578063d605787b146105f8578063e02dc5c514610625578063e2ce3c641461064557600080fd5b8063ccada611146105b8578063ccb98ffc146105d857600080fd5b8063b573f50f11610122578063bb2e804711610107578063bb2e80471461056d578063bf4fc7641461058d578063cc32d176146105a257600080fd5b8063b573f50f14610526578063ba13a5721461054057600080fd5b80638da5cb5b146104bd578063947a36fb146104e857806397ff1cac146104fe578063a6536e751461051e57600080fd5b80633f4ba83a116101e657806368f5f2b0116101b557806377e741c71161019a57806377e741c7146104735780638031b7f4146104935780638456cb59146104a857600080fd5b806368f5f2b01461043e578063715018a61461045e57600080fd5b80633f4ba83a146103c45780634937295c146103d95780635c975abb146103f95780635fd8c7101461042957600080fd5b80632d49a7bf1161023d5780632f1d5a60116102225780632f1d5a601461036a57806330d08eb31461038a5780633197cbb6146103ae57600080fd5b80632d49a7bf146103405780632ef89cc01461035557600080fd5b8063127effb21461027a5780631d16927a146102d157806322a90082146102fb5780632a76bde91461031d57600080fd5b3661027557005b600080fd5b34801561028657600080fd5b506004546102a79073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156102dd57600080fd5b506011546102eb9060ff1681565b60405190151581526020016102c8565b34801561030757600080fd5b5061031b61031636600461419e565b6106f1565b005b34801561032957600080fd5b50610332610915565b6040516102c8929190614225565b34801561034c57600080fd5b5061031b610ce2565b34801561036157600080fd5b506103326112a3565b34801561037657600080fd5b5061031b6103853660046140e9565b611862565b34801561039657600080fd5b506103a060085481565b6040519081526020016102c8565b3480156103ba57600080fd5b506103a060075481565b3480156103d057600080fd5b5061031b61192e565b3480156103e557600080fd5b5061031b6103f436600461419e565b611940565b34801561040557600080fd5b5060005474010000000000000000000000000000000000000000900460ff166102eb565b34801561043557600080fd5b5061031b611a56565b34801561044a57600080fd5b5061031b610459366004614128565b611b94565b34801561046a57600080fd5b5061031b611c84565b34801561047f57600080fd5b5061031b61048e36600461419e565b611c96565b34801561049f57600080fd5b50610332611dac565b3480156104b457600080fd5b5061031b6122c9565b3480156104c957600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166102a7565b3480156104f457600080fd5b506103a060055481565b34801561050a57600080fd5b506103a061051936600461419e565b6122d9565b61031b6122f0565b34801561053257600080fd5b506006546102eb9060ff1681565b34801561054c57600080fd5b506001546102a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561057957600080fd5b5061031b6105883660046140e9565b612a22565b34801561059957600080fd5b5061031b612aee565b3480156105ae57600080fd5b506103a060105481565b3480156105c457600080fd5b5061031b6105d336600461414e565b613304565b3480156105e457600080fd5b5061031b6105f336600461419e565b613419565b34801561060457600080fd5b506002546102a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561063157600080fd5b5061031b61064036600461414e565b6136b0565b34801561065157600080fd5b506103a060035481565b34801561066757600080fd5b5061031b61067636600461419e565b6136e9565b34801561068757600080fd5b506103a060095481565b34801561069d57600080fd5b5061031b6106ac3660046140e9565b613908565b3480156106bd57600080fd5b5061031b6106cc3660046140e9565b6139d4565b3480156106dd57600080fd5b5061031b6106ec36600461419e565b613a8b565b6106f9613a98565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166307fb5a9c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561076157600080fd5b505afa158015610775573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079991906141b6565b811015610807576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e74657276616c20746f6f2073686f7274000000000000000000000000000060448201526064015b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663db19da0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561086f57600080fd5b505afa158015610883573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a791906141b6565b811115610910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f696e74657276616c20746f6f206c6f6e6700000000000000000000000000000060448201526064016107fe565b600555565b6000805460609074010000000000000000000000000000000000000000900460ff161561097757505060408051808201909152601a81527f436865636b657220636f6e7472616374206973207061757365640000000000006020820152600091565b60015473ffffffffffffffffffffffffffffffffffffffff1615806109b2575060025473ffffffffffffffffffffffffffffffffffffffff16155b156109f257505060408051808201909152600e81527f436f6e666967206e6f74207365740000000000000000000000000000000000006020820152600091565b6000600354118015610a0557506003543a115b15610a4557505060408051808201909152601281527f47617320707269636520746f6f206869676800000000000000000000000000006020820152600091565b600154604080517f127effb20000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163127effb2916004808301926020929190829003018186803b158015610aaf57600080fd5b505afa158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae7919061410c565b73ffffffffffffffffffffffffffffffffffffffff1614610b3d57505060408051808201909152600e81527f6f70657261746f72213d746869730000000000000000000000000000000000006020820152600091565b600254604080517ffbe5d917000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163fbe5d917916004808301926020929190829003018186803b158015610ba857600080fd5b505afa158015610bbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be091906141b6565b905080610c2557505060408051808201909152601281527f496e76616c6964206c6f747465727920494400000000000000000000000000006020820152600092909150565b6000610c3082613b19565b90508060ff16600214610c7f5760006040518060400160405280600f81526020017f73746174757320213d20436c6f736500000000000000000000000000000000008152509350935050509091565b50506040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f2d49a7bf000000000000000000000000000000000000000000000000000000001790526001939092509050565b60045473ffffffffffffffffffffffffffffffffffffffff16331480610d1f575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610d85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f70657261746f72206f72206f776e6572000000000000000000000060448201526064016107fe565b60005474010000000000000000000000000000000000000000900460ff1615610e0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f436865636b657220636f6e74726163742069732070617573656400000000000060448201526064016107fe565b60015473ffffffffffffffffffffffffffffffffffffffff1615801590610e48575060025473ffffffffffffffffffffffffffffffffffffffff1615155b610eae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f436f6e666967206e6f742073657400000000000000000000000000000000000060448201526064016107fe565b60035415610f22576003543a1115610f22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f47617320707269636520746f6f2068696768000000000000000000000000000060448201526064016107fe565b600154604080517f127effb20000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163127effb2916004808301926020929190829003018186803b158015610f8c57600080fd5b505afa158015610fa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc4919061410c565b73ffffffffffffffffffffffffffffffffffffffff1614611041576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6f70657261746f72213d7468697300000000000000000000000000000000000060448201526064016107fe565b600254604080517ffbe5d917000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163fbe5d917916004808301926020929190829003018186803b1580156110ac57600080fd5b505afa1580156110c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e491906141b6565b905060008111611150576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c6964206c6f7474657279204944000000000000000000000000000060448201526064016107fe565b600061115b82613b19565b90508060ff166002146111ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f73746174757320213d20436c6f7365000000000000000000000000000000000060448201526064016107fe565b6001546011546040517fc38de5390000000000000000000000000000000000000000000000000000000081526004810185905260ff9091161515602482015273ffffffffffffffffffffffffffffffffffffffff9091169063c38de53990604401600060405180830381600087803b15801561124557600080fd5b505af1158015611259573d6000803e3d6000fd5b50506011546040805186815260ff909216151560208301527f56533d264df95c080b60c651181276995a42e54c79dc542ff2d6e9443b240ffb935001905060405180910390a15050565b6000805460609074010000000000000000000000000000000000000000900460ff161561130557505060408051808201909152601a81527f436865636b657220636f6e7472616374206973207061757365640000000000006020820152600091565b60015473ffffffffffffffffffffffffffffffffffffffff1661135d57505060408051808201909152600f81527f4c6f7474657279206e6f742073657400000000000000000000000000000000006020820152600091565b600060035411801561137057506003543a115b156113b057505060408051808201909152601281527f47617320707269636520746f6f206869676800000000000000000000000000006020820152600091565b600154604080517f127effb20000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163127effb2916004808301926020929190829003018186803b15801561141a57600080fd5b505afa15801561142e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611452919061410c565b73ffffffffffffffffffffffffffffffffffffffff16146114a857505060408051808201909152600e81527f6f70657261746f72213d746869730000000000000000000000000000000000006020820152600091565b600154604080517f80a06160000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916380a06160916004808301926020929190829003018186803b15801561151357600080fd5b505afa158015611527573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154b91906141b6565b905080156115af57600061155e82613b19565b90508060ff166003146115ad5760006040518060400160405280601e81526020017f50726576696f7573206c6f7474657279206e6f7420636c61696d61626c6500008152509350935050509091565b505b60065460009060ff166115c4576007546115d1565b6005546115d190426142d2565b905042811161161c5760006040518060400160405280600f81526020017f656e6454696d6520696e207061737400000000000000000000000000000000008152509350935050509091565b600061162842836142ea565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166307fb5a9c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561169257600080fd5b505afa1580156116a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ca91906141b6565b8110156117145760006040518060400160405280601281526020017f6475726174696f6e20746f6f2073686f72740000000000000000000000000000815250945094505050509091565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663db19da0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561177c57600080fd5b505afa158015611790573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b491906141b6565b8111156117fe5760006040518060400160405280601181526020017f6475726174696f6e20746f6f206c6f6e67000000000000000000000000000000815250945094505050509091565b50506040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fbf4fc76400000000000000000000000000000000000000000000000000000000179052600194909350915050565b61186a613a98565b73ffffffffffffffffffffffffffffffffffffffff81166118e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f70657261746f723d300000000000000000000000000000000000000000000060448201526064016107fe565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611936613a98565b61193e613ca0565b565b611948613a98565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637cb583bd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119b057600080fd5b505afa1580156119c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e891906141b6565b811015611a51576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f646973636f756e7444697669736f7220746f6f206c6f7700000000000000000060448201526064016107fe565b600955565b611a5e613a98565b4780611ac6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f2062616c616e63650000000000000000000000000000000000000000000060448201526064016107fe565b6000805460405173ffffffffffffffffffffffffffffffffffffffff9091169083908381818185875af1925050503d8060008114611b20576040519150601f19603f3d011682016040523d82523d6000602084013e611b25565b606091505b5050905080611b90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f7769746864726177206661696c6564000000000000000000000000000000000060448201526064016107fe565b5050565b611b9c613a98565b6000805b6006811015611c0657828160068110611be2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002013582611bf291906142d2565b915080611bfe81614331565b915050611ba0565b508061271014611c72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f726577617264732073756d20213d20313030303000000000000000000000000060448201526064016107fe565b611c7f600a836006614096565b505050565b611c8c613a98565b61193e6000613d1d565b611c9e613a98565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2b3c8096040518163ffffffff1660e01b815260040160206040518083038186803b158015611d0657600080fd5b505afa158015611d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d3e91906141b6565b811115611da7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f747265617375727946656520746f6f206869676800000000000000000000000060448201526064016107fe565b601055565b6000805460609074010000000000000000000000000000000000000000900460ff1615611e0e57505060408051808201909152601a81527f436865636b657220636f6e7472616374206973207061757365640000000000006020820152600091565b60015473ffffffffffffffffffffffffffffffffffffffff161580611e49575060025473ffffffffffffffffffffffffffffffffffffffff16155b15611e8957505060408051808201909152600e81527f436f6e666967206e6f74207365740000000000000000000000000000000000006020820152600091565b6000600354118015611e9c57506003543a115b15611edc57505060408051808201909152601281527f47617320707269636520746f6f206869676800000000000000000000000000006020820152600091565b600154604080517f127effb20000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163127effb2916004808301926020929190829003018186803b158015611f4657600080fd5b505afa158015611f5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7e919061410c565b73ffffffffffffffffffffffffffffffffffffffff1614611fd457505060408051808201909152600e81527f6f70657261746f72213d746869730000000000000000000000000000000000006020820152600091565b600154604080517f80a06160000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916380a06160916004808301926020929190829003018186803b15801561203f57600080fd5b505afa158015612053573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207791906141b6565b9050806120bc57505060408051808201909152601281527f496e76616c6964206c6f747465727920494400000000000000000000000000006020820152600092909150565b6000806120c883613d92565b915091508160ff1660011461211a5760006040518060400160405280600e81526020017f73746174757320213d204f70656e000000000000000000000000000000000000815250945094505050509091565b8042116121645760006040518060400160405280600981526020017f6e6f7420656e6465640000000000000000000000000000000000000000000000815250945094505050509091565b60007336825bf3fbdf5a29e2d5148bfe7dcf7b5639e32073ffffffffffffffffffffffffffffffffffffffff16638204b67a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c057600080fd5b505afa1580156121d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f8919061416e565b6fffffffffffffffffffffffffffffffff169050804710801561221b5750333181115b156122645760006040518060400160405280601881526020017f696e73756666696369656e74206665652062616c616e6365000000000000000081525095509550505050509091565b50506040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa6536e750000000000000000000000000000000000000000000000000000000017905260019590945092505050565b6122d1613a98565b61193e613f1e565b600a81600681106122e957600080fd5b0154905081565b60045473ffffffffffffffffffffffffffffffffffffffff1633148061232d575060005473ffffffffffffffffffffffffffffffffffffffff1633145b612393576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f70657261746f72206f72206f776e6572000000000000000000000060448201526064016107fe565b60005474010000000000000000000000000000000000000000900460ff1615612418576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f436865636b657220636f6e74726163742069732070617573656400000000000060448201526064016107fe565b60015473ffffffffffffffffffffffffffffffffffffffff1615801590612456575060025473ffffffffffffffffffffffffffffffffffffffff1615155b6124bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f436f6e666967206e6f742073657400000000000000000000000000000000000060448201526064016107fe565b60035415612530576003543a1115612530576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f47617320707269636520746f6f2068696768000000000000000000000000000060448201526064016107fe565b600154604080517f127effb20000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163127effb2916004808301926020929190829003018186803b15801561259a57600080fd5b505afa1580156125ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d2919061410c565b73ffffffffffffffffffffffffffffffffffffffff161461264f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6f70657261746f72213d7468697300000000000000000000000000000000000060448201526064016107fe565b600154604080517f80a06160000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916380a06160916004808301926020929190829003018186803b1580156126ba57600080fd5b505afa1580156126ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126f291906141b6565b90506000811161275e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c6964206c6f7474657279204944000000000000000000000000000060448201526064016107fe565b60008061276a83613d92565b915091508160ff166001146127db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f73746174757320213d204f70656e00000000000000000000000000000000000060448201526064016107fe565b804211612844576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f7420656e646564000000000000000000000000000000000000000000000060448201526064016107fe565b60007336825bf3fbdf5a29e2d5148bfe7dcf7b5639e32073ffffffffffffffffffffffffffffffffffffffff16638204b67a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128a057600080fd5b505afa1580156128b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d8919061416e565b6fffffffffffffffffffffffffffffffff16905080471015612956576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f696e73756666696369656e74206665652062616c616e6365000000000000000060448201526064016107fe565b6001546040517f9d8ca5310000000000000000000000000000000000000000000000000000000081526004810186905273ffffffffffffffffffffffffffffffffffffffff90911690639d8ca5319083906024016000604051808303818588803b1580156129c357600080fd5b505af11580156129d7573d6000803e3d6000fd5b505060408051888152602081018690527f3caf32ffc2ef889548d1debbfbf4c8bc098e90a405cdcfa57a369fddb973934a9450019150612a149050565b60405180910390a150505050565b612a2a613a98565b73ffffffffffffffffffffffffffffffffffffffff8116612aa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600560248201527f726e673d3000000000000000000000000000000000000000000000000000000060448201526064016107fe565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff16331480612b2b575060005473ffffffffffffffffffffffffffffffffffffffff1633145b612b91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f70657261746f72206f72206f776e6572000000000000000000000060448201526064016107fe565b60005474010000000000000000000000000000000000000000900460ff1615612c16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f436865636b657220636f6e74726163742069732070617573656400000000000060448201526064016107fe565b60015473ffffffffffffffffffffffffffffffffffffffff16612c95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4c6f7474657279206e6f7420736574000000000000000000000000000000000060448201526064016107fe565b60035415612d09576003543a1115612d09576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f47617320707269636520746f6f2068696768000000000000000000000000000060448201526064016107fe565b600154604080517f127effb20000000000000000000000000000000000000000000000000000000081529051309273ffffffffffffffffffffffffffffffffffffffff169163127effb2916004808301926020929190829003018186803b158015612d7357600080fd5b505afa158015612d87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dab919061410c565b73ffffffffffffffffffffffffffffffffffffffff1614612e28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6f70657261746f72213d7468697300000000000000000000000000000000000060448201526064016107fe565b600154604080517f80a06160000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916380a06160916004808301926020929190829003018186803b158015612e9357600080fd5b505afa158015612ea7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ecb91906141b6565b90508015612f4f576000612ede82613b19565b90508060ff16600314612f4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f50726576696f7573206c6f7474657279206e6f7420636c61696d61626c65000060448201526064016107fe565b505b60065460009060ff16612f6457600754612f71565b600554612f7190426142d2565b9050428111612fdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f656e6454696d6520696e2070617374000000000000000000000000000000000060448201526064016107fe565b6000612fe842836142ea565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166307fb5a9c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561305257600080fd5b505afa158015613066573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061308a91906141b6565b8110156130f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6475726174696f6e20746f6f2073686f7274000000000000000000000000000060448201526064016107fe565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663db19da0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561315b57600080fd5b505afa15801561316f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061319391906141b6565b8111156131fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6475726174696f6e20746f6f206c6f6e6700000000000000000000000000000060448201526064016107fe565b6040805160c0810191829052600091600a9060069082845b8154815260200190600101908083116132145750506001546008546009546010546040517fb1829b8200000000000000000000000000000000000000000000000000000000815297985073ffffffffffffffffffffffffffffffffffffffff9093169663b1829b82965061329595508a94509192909188919060040161427f565b600060405180830381600087803b1580156132af57600080fd5b505af11580156132c3573d6000803e3d6000fd5b505050507fcc30479927d2a432a192037028bffae35f034715e13969795a33658e1789b89f8360085460095484601054604051612a1495949392919061427f565b61330c613a98565b806133e85760006007541161337d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f656e6454696d65206e6f7420736574000000000000000000000000000000000060448201526064016107fe565b42600754116133e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f656e6454696d6520696e2070617374000000000000000000000000000000000060448201526064016107fe565b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b613421613a98565b42811161348a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f656e6454696d6520696e2070617374000000000000000000000000000000000060448201526064016107fe565b600061349642836142ea565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166307fb5a9c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561350057600080fd5b505afa158015613514573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061353891906141b6565b8110156135a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f656e6454696d6520746f6f20736f6f6e0000000000000000000000000000000060448201526064016107fe565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663db19da0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561360957600080fd5b505afa15801561361d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061364191906141b6565b8111156136aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f656e6454696d6520746f6f20666172000000000000000000000000000000000060448201526064016107fe565b50600755565b6136b8613a98565b601180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6136f1613a98565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166385e93cad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561375957600080fd5b505afa15801561376d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061379191906141b6565b8110156137fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f70726963655469636b657420746f6f206c6f770000000000000000000000000060448201526064016107fe565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a568f0f86040518163ffffffff1660e01b815260040160206040518083038186803b15801561386257600080fd5b505afa158015613876573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061389a91906141b6565b811115613903576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f70726963655469636b657420746f6f206869676800000000000000000000000060448201526064016107fe565b600855565b613910613a98565b73ffffffffffffffffffffffffffffffffffffffff811661398d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6c6f74746572793d30000000000000000000000000000000000000000000000060448201526064016107fe565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6139dc613a98565b73ffffffffffffffffffffffffffffffffffffffff8116613a7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107fe565b613a8881613d1d565b50565b613a93613a98565b600355565b60005473ffffffffffffffffffffffffffffffffffffffff16331461193e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107fe565b60008082604051602401613b2f91815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f2423807a000000000000000000000000000000000000000000000000000000001790526001549051919250600091829173ffffffffffffffffffffffffffffffffffffffff1690613bd4908590614209565b600060405180830381855afa9150503d8060008114613c0f576040519150601f19603f3d011682016040523d82523d6000602084013e613c14565b606091505b509150915081613c80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f766965774c6f7474657279206661696c6564000000000000000000000000000060448201526064016107fe565b80806020019051810190613c9491906141ce565b50909695505050505050565b613ca8613f8d565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600083604051602401613daa91815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f2423807a000000000000000000000000000000000000000000000000000000001790526001549051919250600091829173ffffffffffffffffffffffffffffffffffffffff1690613e4f908590614209565b600060405180830381855afa9150503d8060008114613e8a576040519150601f19603f3d011682016040523d82523d6000602084013e613e8f565b606091505b509150915081613efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f766965774c6f7474657279206661696c6564000000000000000000000000000060448201526064016107fe565b80806020019051810190613f0f91906141ce565b91989197509095505050505050565b613f26614011565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613cf33390565b60005474010000000000000000000000000000000000000000900460ff1661193e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016107fe565b60005474010000000000000000000000000000000000000000900460ff161561193e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016107fe565b82600681019282156140c4579160200282015b828111156140c45782358255916020019190600101906140a9565b506140d09291506140d4565b5090565b5b808211156140d057600081556001016140d5565b6000602082840312156140fa578081fd5b813561410581614399565b9392505050565b60006020828403121561411d578081fd5b815161410581614399565b600060c08284031215614139578081fd5b8260c083011115614148578081fd5b50919050565b60006020828403121561415f578081fd5b81358015158114614105578182fd5b60006020828403121561417f578081fd5b81516fffffffffffffffffffffffffffffffff81168114614105578182fd5b6000602082840312156141af578081fd5b5035919050565b6000602082840312156141c7578081fd5b5051919050565b6000806000606084860312156141e2578182fd5b835160ff811681146141f2578283fd5b602085015160409095015190969495509392505050565b6000825161421b818460208701614301565b9190910192915050565b8215158152604060208201526000825180604084015261424c816060850160208701614301565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016060019392505050565b60006101408201905086825260208681840152856040840152606083018560005b60068110156142bd578151835291830191908301906001016142a0565b50505050826101208301529695505050505050565b600082198211156142e5576142e561436a565b500190565b6000828210156142fc576142fc61436a565b500390565b60005b8381101561431c578181015183820152602001614304565b8381111561432b576000848401525b50505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156143635761436361436a565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114613a8857600080fdfea26469706673582212207322d30238bc7db002ab11b7add8aac88ac8feaf0e52a0cafde6f62daafadbc664736f6c63430008040033

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

000000000000000000000000aea5becd22975855c77300ab3b6efb94e1f3af6f000000000000000000000000330a1a59604b838c26e1aaf25dd5dc1c1ddc545a0000000000000000000000004b9a16f82569d5edea55823df185614751bda03200000000000000000000000000000000000000000000000000000000000151440000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000c8000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000005dc00000000000000000000000000000000000000000000000000000000000009c4000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000007d00000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : _lottery (address): 0xAEA5bEcd22975855C77300aB3b6efb94e1F3af6F
Arg [1] : _rng (address): 0x330A1A59604b838c26E1aAf25dD5Dc1C1dDC545a
Arg [2] : _operatorAddress (address): 0x4b9A16f82569D5edEA55823Df185614751BDA032
Arg [3] : _interval (uint256): 86340
Arg [4] : _priceTicketInS (uint256): 1000000000000000000
Arg [5] : _discountDivisor (uint256): 10000
Arg [6] : _rewardsBreakdown (uint256[6]): 200,300,500,1500,2500,5000
Arg [7] : _treasuryFee (uint256): 2000
Arg [8] : _autoInjection (bool): True

-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 000000000000000000000000aea5becd22975855c77300ab3b6efb94e1f3af6f
Arg [1] : 000000000000000000000000330a1a59604b838c26e1aaf25dd5dc1c1ddc545a
Arg [2] : 0000000000000000000000004b9a16f82569d5edea55823df185614751bda032
Arg [3] : 0000000000000000000000000000000000000000000000000000000000015144
Arg [4] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [6] : 00000000000000000000000000000000000000000000000000000000000000c8
Arg [7] : 000000000000000000000000000000000000000000000000000000000000012c
Arg [8] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [9] : 00000000000000000000000000000000000000000000000000000000000005dc
Arg [10] : 00000000000000000000000000000000000000000000000000000000000009c4
Arg [11] : 0000000000000000000000000000000000000000000000000000000000001388
Arg [12] : 00000000000000000000000000000000000000000000000000000000000007d0
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000001


Block Transaction 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  ]
[ 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.