Contract 0x7a8F5A10bA5bfc189E5ed43FaB3ff6c50346e2Da 4

 

Contract Overview

Arbswap: Prediction
Balance:
1.817746261402764293 ETH

ETH Value:
$6,186.19 (@ $3,403.22/ETH)
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x4150b5ec8d336ae5f0e283fd49a6249ef5d32bd6e9667b8d3b1811c046a4c08fClaim638745592024-04-08 21:45:1477 days 19 hrs ago0xa81698817f79d2894a5ee806d3634a3811c6abf4 IN  Arbswap: Prediction0 ETH0.000005410.056018
0x4c23ac26e0c4478f8075f38365d8daae7b1e46ff563d6589cb0f9fc7dade71c5Claim638708712024-04-08 21:20:0777 days 20 hrs ago0x04d5b4bc6ed30780c64fa6d1e3f5557133f69e9a IN  Arbswap: Prediction0 ETH0.000003380.049717
0x7b8d044ebf240fa4d4e09291f6294d759b024d6e3b6db8516854de921cddb32eClaim638708172024-04-08 21:19:4977 days 20 hrs ago0x04d5b4bc6ed30780c64fa6d1e3f5557133f69e9a IN  Arbswap: Prediction0 ETH0.000003750.055407
0x30a3041a0213e09295abbf07971d4f525b6e8b30b86b760725519bf6eb074d80Claim638707712024-04-08 21:19:2577 days 20 hrs ago0x04d5b4bc6ed30780c64fa6d1e3f5557133f69e9a IN  Arbswap: Prediction0 ETH0.00000490.050395
0x68f353ed4f797cc036e4985fa790c4c7595e46d081acad63942c40e805a736c3Claim635926682024-04-07 16:53:4879 days 35 mins ago0xcff1b1831e37487d3d78f1276ed9f177d24230a6 IN  Arbswap: Prediction0 ETH0.00001161 0.073201
0x26817ac2c32593257338c0456afc9fc06fe0ef858ce1c873dac6c07e6a4773adClaim634333732024-04-06 22:17:4179 days 19 hrs ago0x3161b1654835a80b8b438c8c9dcbdbf6171435a8 IN  Arbswap: Prediction0 ETH0.000005140.054101
0x17534d0c035afdd7ef9c80e577bbf26dbf6b4db0023b7279aa2d7d85535d5dabClaim633585292024-04-06 13:13:2280 days 4 hrs ago0x3f4b2b54974a892eb57237321d9d2a7b4b4aeb93 IN  Arbswap: Prediction0 ETH0.00001278 0.057727
0xce3d78a7b69e57b34f7c5fbb1fda88740439374ff9c33ebe4c57d76ee058d17dClaim633092962024-04-06 7:23:5180 days 10 hrs ago0xbfb35244f0ceff22f99b80c46916c5333b293fb5 IN  Arbswap: Prediction0 ETH0.00001759 0.079556
0x18a39e91765dabdeae52bcedca98218de7c369bc5bc828b41e04c44b2a37268eClaim632034272024-04-05 18:25:4080 days 23 hrs ago0xc8cf09777866522011df9f76c8ca34ca96749608 IN  Arbswap: Prediction0 ETH0.00000614 0.063899
0x45dcdd255a6dddef3421dbfe11528cbf8d60d30921ee9a5ec1cd85a1924e3456Claim632016562024-04-05 18:09:2080 days 23 hrs ago0xbe6c5447423aec564e595cb00ce022c624d0da8e IN  Arbswap: Prediction0 ETH0.000005730.059901
0x1aba07f3d988a6486c4803277d3eb05aa82b2f850f9594934a6a05639811a323Claim628908632024-04-04 7:02:4682 days 10 hrs ago0x8399ac25c2d42e93f245a3a8aed080c118d1634b IN  Arbswap: Prediction0 ETH0.00000765 0.080247
0xa0266925a31363de8fa4bcd3e8498ed38e70b2fd1670705b1299f0594381ef2bClaim627297712024-04-03 15:39:0983 days 1 hr ago0x9a464782490e8c5a3ea81bbc01061c96c7ddcdf7 IN  Arbswap: Prediction0 ETH0.000006840.067812
0x31a78da95f6dd54803bd16885992b60aa0f3271da648cef65362c951447c4c89Claim626481482024-04-03 8:06:5783 days 9 hrs ago0x0c071f47eb96c3e31e8e01290b2dc4d905eef433 IN  Arbswap: Prediction0 ETH0.00000673 0.069146
0x8c3628a2b1b90f80094f359a216aeb62eda449cbddc0da4b1cafa094ec4d985fClaim624371602024-04-02 14:45:5184 days 2 hrs ago0x74648ba6f408a1decfde319cef04f1b332949b38 IN  Arbswap: Prediction0 ETH0.00000560.056311
0x6ce37b51284e4ca67cc27268fb811c5bbdcc1d98a00f705ff4dfe5d31d021b31Claim621967762024-04-01 16:37:2485 days 51 mins ago0xc0c028809001e7f889cd30eae0afc0dfe8772c22 IN  Arbswap: Prediction0 ETH0.000004930.05105
0xf932eb1e70ab5e0c90bba6c4771b2baa09ca9aa8b74d52dc4f847278378935bdClaim620777992024-03-31 14:54:2186 days 2 hrs ago0xb32c56ec27b3c8a553eaeec0b4f4b833a66ae305 IN  Arbswap: Prediction0 ETH0.00000942 0.097898
0x69001316e164cf5e242f1fa05d621658e609a31991e991045b30fb33c818b19fClaim620737032024-03-31 13:42:4486 days 3 hrs ago0x0a834389cc3bc2c409e9352428b37a1222d7ccef IN  Arbswap: Prediction0 ETH0.00000287 0.028568
0xdf4b5e9eabe27a7b6daefb06440860a6d7f383bd2e4309756dcd4cea4e770252Claim619667672024-03-30 7:49:3287 days 9 hrs ago0xace2c19d9cae27c680d0a78c6b2097b786517d13 IN  Arbswap: Prediction0 ETH0.00000448 0.046336
0x78cbf76287b309f2b337fc017a0fea30fbb8451a91068348bbbd1c4d39e1fd7aClaim612136692024-03-26 11:48:0491 days 5 hrs ago0x2c15c5f41ee3cddc7d835c768ec451ada24c65bd IN  Arbswap: Prediction0 ETH0.000001110.01
0x1f61f82b5a2552f912f870fcd57e5b924520cc16c54d9688897dbfbeb018783bClaim611523152024-03-26 6:05:1191 days 11 hrs ago0x80ddc5d0d32dedb6c989d8facecea358229bfde3 IN  Arbswap: Prediction0 ETH0.0000011 0.01
0x760eaacde3ea00686821a22613d4e4937344878a971a0b3fae8ea8b1d3d461c1Claim605503172024-03-23 22:52:2593 days 18 hrs ago0x52bdbc574250c816081f26e20be93048def92968 IN  Arbswap: Prediction0 ETH0.0000016 0.016098
0xa071d1240bc57ce68eff99c40648e6475c398c00fb6a3d87d0a94b85cf0ae88cClaim597154072024-03-20 23:46:1796 days 17 hrs ago0xf544c2733c10471d6089222b20856a821283a9ea IN  Arbswap: Prediction0 ETH0.00000149 0.014008
0x83fa703666bf957adf7ee387f76994856fc36f40ad78df4fb5b32ef86323106eClaim590077642024-03-18 18:01:1298 days 23 hrs ago0x9e4bd7ace642eb5ea41c00d39e98e1f0a24d1c76 IN  Arbswap: Prediction0 ETH0.00000155 0.013486
0x11bbf9df45b3bf3b77965af8cc4aaf922fba8cc3a580a6f6ac9fbe65f897ee33Claim577087782024-03-14 16:05:06103 days 1 hr ago0xdca767b91cadeae4651515d28c894bd4be633bc7 IN  Arbswap: Prediction0 ETH0.00000133 0.01
0x83795beb620f1d20e1876c124193dbf4ad9cdb8efc891aae09c3ae7be5bef3c5Claim570518322024-03-12 15:47:50105 days 1 hr ago0x2fa0db556bb6f400a295c19347565c2b65729857 IN  Arbswap: Prediction0 ETH0.000001710.01
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x4150b5ec8d336ae5f0e283fd49a6249ef5d32bd6e9667b8d3b1811c046a4c08f638745592024-04-08 21:45:1477 days 19 hrs ago Arbswap: Prediction0xa81698817f79d2894a5ee806d3634a3811c6abf40.000235614255360247 ETH
0x30a3041a0213e09295abbf07971d4f525b6e8b30b86b760725519bf6eb074d80638707712024-04-08 21:19:2577 days 20 hrs ago Arbswap: Prediction0x04d5b4bc6ed30780c64fa6d1e3f5557133f69e9a0.001325398231850117 ETH
0x68f353ed4f797cc036e4985fa790c4c7595e46d081acad63942c40e805a736c3635926682024-04-07 16:53:4879 days 35 mins ago Arbswap: Prediction0xcff1b1831e37487d3d78f1276ed9f177d24230a60.005084456827698275 ETH
0x26817ac2c32593257338c0456afc9fc06fe0ef858ce1c873dac6c07e6a4773ad634333732024-04-06 22:17:4179 days 19 hrs ago Arbswap: Prediction0x3161b1654835a80b8b438c8c9dcbdbf6171435a80.004907001510293141 ETH
0x17534d0c035afdd7ef9c80e577bbf26dbf6b4db0023b7279aa2d7d85535d5dab633585292024-04-06 13:13:2280 days 4 hrs ago Arbswap: Prediction0x3f4b2b54974a892eb57237321d9d2a7b4b4aeb930.002508569284518624 ETH
0xce3d78a7b69e57b34f7c5fbb1fda88740439374ff9c33ebe4c57d76ee058d17d633092962024-04-06 7:23:5180 days 10 hrs ago Arbswap: Prediction0xbfb35244f0ceff22f99b80c46916c5333b293fb50.001525328517961138 ETH
0x18a39e91765dabdeae52bcedca98218de7c369bc5bc828b41e04c44b2a37268e632034272024-04-05 18:25:4080 days 23 hrs ago Arbswap: Prediction0xc8cf09777866522011df9f76c8ca34ca967496080.000794861529994838 ETH
0x45dcdd255a6dddef3421dbfe11528cbf8d60d30921ee9a5ec1cd85a1924e3456632016562024-04-05 18:09:2080 days 23 hrs ago Arbswap: Prediction0xbe6c5447423aec564e595cb00ce022c624d0da8e0.001467631062707163 ETH
0x1aba07f3d988a6486c4803277d3eb05aa82b2f850f9594934a6a05639811a323628908632024-04-04 7:02:4682 days 10 hrs ago Arbswap: Prediction0x8399ac25c2d42e93f245a3a8aed080c118d1634b0.001 ETH
0xa0266925a31363de8fa4bcd3e8498ed38e70b2fd1670705b1299f0594381ef2b627297712024-04-03 15:39:0983 days 1 hr ago Arbswap: Prediction0x9a464782490e8c5a3ea81bbc01061c96c7ddcdf70.000238922014510374 ETH
0x31a78da95f6dd54803bd16885992b60aa0f3271da648cef65362c951447c4c89626481482024-04-03 8:06:5783 days 9 hrs ago Arbswap: Prediction0x0c071f47eb96c3e31e8e01290b2dc4d905eef4330.000193903096903096 ETH
0x8c3628a2b1b90f80094f359a216aeb62eda449cbddc0da4b1cafa094ec4d985f624371602024-04-02 14:45:5184 days 2 hrs ago Arbswap: Prediction0x74648ba6f408a1decfde319cef04f1b332949b380.000194 ETH
0x6ce37b51284e4ca67cc27268fb811c5bbdcc1d98a00f705ff4dfe5d31d021b31621967762024-04-01 16:37:2485 days 51 mins ago Arbswap: Prediction0xc0c028809001e7f889cd30eae0afc0dfe8772c220.00175320386966953 ETH
0xf932eb1e70ab5e0c90bba6c4771b2baa09ca9aa8b74d52dc4f847278378935bd620777992024-03-31 14:54:2186 days 2 hrs ago Arbswap: Prediction0xb32c56ec27b3c8a553eaeec0b4f4b833a66ae3050.00193667156862745 ETH
0x69001316e164cf5e242f1fa05d621658e609a31991e991045b30fb33c818b19f620737032024-03-31 13:42:4486 days 3 hrs ago Arbswap: Prediction0x0a834389cc3bc2c409e9352428b37a1222d7ccef0.004441418331295843 ETH
0xdf4b5e9eabe27a7b6daefb06440860a6d7f383bd2e4309756dcd4cea4e770252619667672024-03-30 7:49:3287 days 9 hrs ago Arbswap: Prediction0xace2c19d9cae27c680d0a78c6b2097b786517d130.000329241239784731 ETH
0x78cbf76287b309f2b337fc017a0fea30fbb8451a91068348bbbd1c4d39e1fd7a612136692024-03-26 11:48:0491 days 5 hrs ago Arbswap: Prediction0x2c15c5f41ee3cddc7d835c768ec451ada24c65bd0.001715034472168905 ETH
0x1f61f82b5a2552f912f870fcd57e5b924520cc16c54d9688897dbfbeb018783b611523152024-03-26 6:05:1191 days 11 hrs ago Arbswap: Prediction0x80ddc5d0d32dedb6c989d8facecea358229bfde30.000234376007984031 ETH
0x760eaacde3ea00686821a22613d4e4937344878a971a0b3fae8ea8b1d3d461c1605503172024-03-23 22:52:2593 days 18 hrs ago Arbswap: Prediction0x52bdbc574250c816081f26e20be93048def929680.001808548996179228 ETH
0xa071d1240bc57ce68eff99c40648e6475c398c00fb6a3d87d0a94b85cf0ae88c597154072024-03-20 23:46:1796 days 17 hrs ago Arbswap: Prediction0xf544c2733c10471d6089222b20856a821283a9ea0.001030847797136449 ETH
0x83fa703666bf957adf7ee387f76994856fc36f40ad78df4fb5b32ef86323106e590077642024-03-18 18:01:1298 days 23 hrs ago Arbswap: Prediction0x9e4bd7ace642eb5ea41c00d39e98e1f0a24d1c760.000991711843798789 ETH
0x11bbf9df45b3bf3b77965af8cc4aaf922fba8cc3a580a6f6ac9fbe65f897ee33577087782024-03-14 16:05:06103 days 1 hr ago Arbswap: Prediction0xdca767b91cadeae4651515d28c894bd4be633bc70.0000071 ETH
0x83795beb620f1d20e1876c124193dbf4ad9cdb8efc891aae09c3ae7be5bef3c5570518322024-03-12 15:47:50105 days 1 hr ago Arbswap: Prediction0x2fa0db556bb6f400a295c19347565c2b657298570.001762950758978156 ETH
0xa5a0223fef7fc56378927847280d2028c6524fd34a31bcb153f3b93db76a0f0b566890762024-03-11 13:42:28106 days 3 hrs ago Arbswap: Prediction0xb6dba156a8807fa299f9c085066026ae3fd0095c0.002173910836320423 ETH
0xa85019fbb6180eb3dd77072e83490a8d3118c9b39978951e8d6c1be904ae65c7546343892024-03-05 11:46:45112 days 5 hrs ago Arbswap: Prediction0x50288fedda75c8e97831d9d2adc934f935245bba0.008067308776522457 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Prediction

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 99999 runs

Other Settings:
default evmVersion
File 1 of 9 : Prediction.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";

/**
 * @title Prediction
 */
contract Prediction is Ownable, Pausable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    AggregatorV3Interface public oracle;

    bool public genesisLockOnce = false;
    bool public genesisStartOnce = false;

    address public adminAddress; // address of the admin
    address public operatorAddress; // address of the operator

    uint256 public bufferSeconds; // number of seconds for valid execution of a prediction round
    uint256 public intervalSeconds; // interval in seconds between two prediction rounds

    uint256 public minBetAmount; // minimum betting amount (denominated in wei)
    uint256 public treasuryFee; // treasury rate (e.g. 200 = 2%, 150 = 1.50%)
    uint256 public treasuryAmount; // treasury amount that was not claimed

    uint256 public currentEpoch; // current epoch for prediction round

    uint256 public oracleLatestRoundId; // converted from uint80 (Chainlink)
    uint256 public oracleUpdateAllowance; // seconds

    uint256 public constant MAX_TREASURY_FEE = 1000; // 10%

    mapping(uint256 => mapping(address => BetInfo)) public ledger;
    mapping(uint256 => Round) public rounds;
    mapping(address => uint256[]) public userRounds;

    enum Position {
        Bull,
        Bear
    }

    struct Round {
        uint256 epoch;
        uint256 startTimestamp;
        uint256 lockTimestamp;
        uint256 closeTimestamp;
        int256 lockPrice;
        int256 closePrice;
        uint256 lockOracleId;
        uint256 closeOracleId;
        uint256 totalAmount;
        uint256 bullAmount;
        uint256 bearAmount;
        uint256 rewardBaseCalAmount;
        uint256 rewardAmount;
        bool oracleCalled;
    }

    struct BetInfo {
        Position position;
        uint256 amount;
        bool claimed; // default false
    }

    event BetBear(address indexed sender, uint256 indexed epoch, uint256 amount);
    event BetBull(address indexed sender, uint256 indexed epoch, uint256 amount);
    event Claim(address indexed sender, uint256 indexed epoch, uint256 amount);
    event EndRound(uint256 indexed epoch, uint256 indexed roundId, int256 price);
    event LockRound(uint256 indexed epoch, uint256 indexed roundId, int256 price);

    event NewAdminAddress(address admin);
    event NewBufferAndIntervalSeconds(uint256 bufferSeconds, uint256 intervalSeconds);
    event NewMinBetAmount(uint256 indexed epoch, uint256 minBetAmount);
    event NewTreasuryFee(uint256 indexed epoch, uint256 treasuryFee);
    event NewOperatorAddress(address operator);
    event NewOracle(address oracle);
    event NewOracleUpdateAllowance(uint256 oracleUpdateAllowance);

    event Pause(uint256 indexed epoch);
    event RewardsCalculated(
        uint256 indexed epoch,
        uint256 rewardBaseCalAmount,
        uint256 rewardAmount,
        uint256 treasuryAmount
    );

    event StartRound(uint256 indexed epoch);
    event TokenRecovery(address indexed token, uint256 amount);
    event TreasuryClaim(uint256 amount);
    event Unpause(uint256 indexed epoch);

    modifier onlyAdmin() {
        require(msg.sender == adminAddress, "Not admin");
        _;
    }

    modifier onlyAdminOrOperator() {
        require(msg.sender == adminAddress || msg.sender == operatorAddress, "Not operator/admin");
        _;
    }

    modifier onlyOperator() {
        require(msg.sender == operatorAddress, "Not operator");
        _;
    }

    modifier notContract() {
        require(!_isContract(msg.sender), "Contract not allowed");
        require(msg.sender == tx.origin, "Proxy contract not allowed");
        _;
    }

    /**
     * @notice Constructor
     * @param _oracleAddress: oracle address
     * @param _adminAddress: admin address
     * @param _operatorAddress: operator address
     * @param _intervalSeconds: number of time within an interval
     * @param _bufferSeconds: buffer of time for resolution of price
     * @param _minBetAmount: minimum bet amounts (in wei)
     * @param _oracleUpdateAllowance: oracle update allowance
     * @param _treasuryFee: treasury fee (1000 = 10%)
     */
    constructor(
        address _oracleAddress,
        address _adminAddress,
        address _operatorAddress,
        uint256 _intervalSeconds,
        uint256 _bufferSeconds,
        uint256 _minBetAmount,
        uint256 _oracleUpdateAllowance,
        uint256 _treasuryFee
    ) {
        require(_treasuryFee <= MAX_TREASURY_FEE, "Treasury fee too high");

        oracle = AggregatorV3Interface(_oracleAddress);
        adminAddress = _adminAddress;
        operatorAddress = _operatorAddress;
        intervalSeconds = _intervalSeconds;
        bufferSeconds = _bufferSeconds;
        minBetAmount = _minBetAmount;
        oracleUpdateAllowance = _oracleUpdateAllowance;
        treasuryFee = _treasuryFee;
    }

    /**
     * @notice Bet bear position
     * @param epoch: epoch
     */
    function betBear(uint256 epoch) external payable whenNotPaused nonReentrant notContract {
        require(epoch == currentEpoch, "Bet is too early/late");
        require(_bettable(epoch), "Round not bettable");
        require(msg.value >= minBetAmount, "Bet amount must be greater than minBetAmount");
        require(ledger[epoch][msg.sender].amount == 0, "Can only bet once per round");

        // Update round data
        uint256 amount = msg.value;
        Round storage round = rounds[epoch];
        round.totalAmount = round.totalAmount + amount;
        round.bearAmount = round.bearAmount + amount;

        // Update user data
        BetInfo storage betInfo = ledger[epoch][msg.sender];
        betInfo.position = Position.Bear;
        betInfo.amount = amount;
        userRounds[msg.sender].push(epoch);

        emit BetBear(msg.sender, epoch, amount);
    }

    /**
     * @notice Bet bull position
     * @param epoch: epoch
     */
    function betBull(uint256 epoch) external payable whenNotPaused nonReentrant notContract {
        require(epoch == currentEpoch, "Bet is too early/late");
        require(_bettable(epoch), "Round not bettable");
        require(msg.value >= minBetAmount, "Bet amount must be greater than minBetAmount");
        require(ledger[epoch][msg.sender].amount == 0, "Can only bet once per round");

        // Update round data
        uint256 amount = msg.value;
        Round storage round = rounds[epoch];
        round.totalAmount = round.totalAmount + amount;
        round.bullAmount = round.bullAmount + amount;

        // Update user data
        BetInfo storage betInfo = ledger[epoch][msg.sender];
        betInfo.position = Position.Bull;
        betInfo.amount = amount;
        userRounds[msg.sender].push(epoch);

        emit BetBull(msg.sender, epoch, amount);
    }

    /**
     * @notice Claim reward for an array of epochs
     * @param epochs: array of epochs
     */
    function claim(uint256[] calldata epochs) external nonReentrant notContract {
        uint256 reward; // Initializes reward

        for (uint256 i = 0; i < epochs.length; i++) {
            require(rounds[epochs[i]].startTimestamp != 0, "Round has not started");
            require(block.timestamp > rounds[epochs[i]].closeTimestamp, "Round has not ended");

            uint256 addedReward = 0;

            // Round valid, claim rewards
            if (rounds[epochs[i]].oracleCalled) {
                require(claimable(epochs[i], msg.sender), "Not eligible for claim");
                Round memory round = rounds[epochs[i]];
                addedReward = (ledger[epochs[i]][msg.sender].amount * round.rewardAmount) / round.rewardBaseCalAmount;
            }
            // Round invalid, refund bet amount
            else {
                require(refundable(epochs[i], msg.sender), "Not eligible for refund");
                addedReward = ledger[epochs[i]][msg.sender].amount;
            }

            ledger[epochs[i]][msg.sender].claimed = true;
            reward += addedReward;

            emit Claim(msg.sender, epochs[i], addedReward);
        }

        if (reward > 0) {
            _safeTransferBNB(address(msg.sender), reward);
        }
    }

    /**
     * @notice Start the next round n, lock price for round n-1, end round n-2
     * @dev Callable by operator
     */
    function executeRound() external whenNotPaused onlyOperator {
        require(
            genesisStartOnce && genesisLockOnce,
            "Can only run after genesisStartRound and genesisLockRound is triggered"
        );

        (uint80 currentRoundId, int256 currentPrice) = _getPriceFromOracle();

        oracleLatestRoundId = uint256(currentRoundId);

        // CurrentEpoch refers to previous round (n-1)
        _safeLockRound(currentEpoch, currentRoundId, currentPrice);
        _safeEndRound(currentEpoch - 1, currentRoundId, currentPrice);
        _calculateRewards(currentEpoch - 1);

        // Increment currentEpoch to current round (n)
        currentEpoch = currentEpoch + 1;
        _safeStartRound(currentEpoch);
    }

    /**
     * @notice Lock genesis round
     * @dev Callable by operator
     */
    function genesisLockRound() external whenNotPaused onlyOperator {
        require(genesisStartOnce, "Can only run after genesisStartRound is triggered");
        require(!genesisLockOnce, "Can only run genesisLockRound once");

        (uint80 currentRoundId, int256 currentPrice) = _getPriceFromOracle();

        oracleLatestRoundId = uint256(currentRoundId);

        _safeLockRound(currentEpoch, currentRoundId, currentPrice);

        currentEpoch = currentEpoch + 1;
        _startRound(currentEpoch);
        genesisLockOnce = true;
    }

    /**
     * @notice Start genesis round
     * @dev Callable by admin or operator
     */
    function genesisStartRound() external whenNotPaused onlyOperator {
        require(!genesisStartOnce, "Can only run genesisStartRound once");

        currentEpoch = currentEpoch + 1;
        _startRound(currentEpoch);
        genesisStartOnce = true;
    }

    /**
     * @notice called by the admin to pause, triggers stopped state
     * @dev Callable by admin or operator
     */
    function pause() external whenNotPaused onlyAdminOrOperator {
        _pause();

        emit Pause(currentEpoch);
    }

    /**
     * @notice Claim all rewards in treasury
     * @dev Callable by admin
     */
    function claimTreasury() external nonReentrant onlyAdmin {
        uint256 currentTreasuryAmount = treasuryAmount;
        treasuryAmount = 0;
        _safeTransferBNB(adminAddress, currentTreasuryAmount);

        emit TreasuryClaim(currentTreasuryAmount);
    }

    /**
     * @notice called by the admin to unpause, returns to normal state
     * Reset genesis state. Once paused, the rounds would need to be kickstarted by genesis
     */
    function unpause() external whenPaused onlyAdminOrOperator {
        genesisStartOnce = false;
        genesisLockOnce = false;
        _unpause();

        emit Unpause(currentEpoch);
    }

    /**
     * @notice Set buffer and interval (in seconds)
     * @dev Callable by admin
     */
    function setBufferAndIntervalSeconds(uint256 _bufferSeconds, uint256 _intervalSeconds)
        external
        whenPaused
        onlyAdmin
    {
        require(_bufferSeconds < _intervalSeconds, "bufferSeconds must be inferior to intervalSeconds");
        bufferSeconds = _bufferSeconds;
        intervalSeconds = _intervalSeconds;

        emit NewBufferAndIntervalSeconds(_bufferSeconds, _intervalSeconds);
    }

    /**
     * @notice Set minBetAmount
     * @dev Callable by admin
     */
    function setMinBetAmount(uint256 _minBetAmount) external whenPaused onlyAdmin {
        require(_minBetAmount != 0, "Must be superior to 0");
        minBetAmount = _minBetAmount;

        emit NewMinBetAmount(currentEpoch, minBetAmount);
    }

    /**
     * @notice Set operator address
     * @dev Callable by admin
     */
    function setOperator(address _operatorAddress) external onlyAdmin {
        require(_operatorAddress != address(0), "Cannot be zero address");
        operatorAddress = _operatorAddress;

        emit NewOperatorAddress(_operatorAddress);
    }

    /**
     * @notice Set Oracle address
     * @dev Callable by admin
     */
    function setOracle(address _oracle) external whenPaused onlyAdmin {
        require(_oracle != address(0), "Cannot be zero address");
        oracleLatestRoundId = 0;
        oracle = AggregatorV3Interface(_oracle);

        // Dummy check to make sure the interface implements this function properly
        oracle.latestRoundData();

        emit NewOracle(_oracle);
    }

    /**
     * @notice Set oracle update allowance
     * @dev Callable by admin
     */
    function setOracleUpdateAllowance(uint256 _oracleUpdateAllowance) external whenPaused onlyAdmin {
        oracleUpdateAllowance = _oracleUpdateAllowance;

        emit NewOracleUpdateAllowance(_oracleUpdateAllowance);
    }

    /**
     * @notice Set treasury fee
     * @dev Callable by admin
     */
    function setTreasuryFee(uint256 _treasuryFee) external whenPaused onlyAdmin {
        require(_treasuryFee <= MAX_TREASURY_FEE, "Treasury fee too high");
        treasuryFee = _treasuryFee;

        emit NewTreasuryFee(currentEpoch, treasuryFee);
    }

    /**
     * @notice It allows the owner to recover tokens sent to the contract by mistake
     * @param _token: token address
     * @param _amount: token amount
     * @dev Callable by owner
     */
    function recoverToken(address _token, uint256 _amount) external onlyOwner {
        IERC20(_token).safeTransfer(address(msg.sender), _amount);

        emit TokenRecovery(_token, _amount);
    }

    /**
     * @notice Set admin address
     * @dev Callable by owner
     */
    function setAdmin(address _adminAddress) external onlyOwner {
        require(_adminAddress != address(0), "Cannot be zero address");
        adminAddress = _adminAddress;

        emit NewAdminAddress(_adminAddress);
    }

    /**
     * @notice Returns round epochs and bet information for a user that has participated
     * @param user: user address
     * @param cursor: cursor
     * @param size: size
     */
    function getUserRounds(
        address user,
        uint256 cursor,
        uint256 size
    )
        external
        view
        returns (
            uint256[] memory,
            BetInfo[] memory,
            uint256
        )
    {
        uint256 length = size;

        if (length > userRounds[user].length - cursor) {
            length = userRounds[user].length - cursor;
        }

        uint256[] memory values = new uint256[](length);
        BetInfo[] memory betInfo = new BetInfo[](length);

        for (uint256 i = 0; i < length; i++) {
            values[i] = userRounds[user][cursor + i];
            betInfo[i] = ledger[values[i]][user];
        }

        return (values, betInfo, cursor + length);
    }

    /**
     * @notice Returns round epochs length
     * @param user: user address
     */
    function getUserRoundsLength(address user) external view returns (uint256) {
        return userRounds[user].length;
    }

    /**
     * @notice Get the claimable stats of specific epoch and user account
     * @param epoch: epoch
     * @param user: user address
     */
    function claimable(uint256 epoch, address user) public view returns (bool) {
        BetInfo memory betInfo = ledger[epoch][user];
        Round memory round = rounds[epoch];
        if (round.lockPrice == round.closePrice) {
            return false;
        }
        return
            round.oracleCalled &&
            betInfo.amount != 0 &&
            !betInfo.claimed &&
            ((round.closePrice > round.lockPrice && betInfo.position == Position.Bull) ||
                (round.closePrice < round.lockPrice && betInfo.position == Position.Bear));
    }

    /**
     * @notice Get the refundable stats of specific epoch and user account
     * @param epoch: epoch
     * @param user: user address
     */
    function refundable(uint256 epoch, address user) public view returns (bool) {
        BetInfo memory betInfo = ledger[epoch][user];
        Round memory round = rounds[epoch];
        return
            !round.oracleCalled &&
            !betInfo.claimed &&
            block.timestamp > round.closeTimestamp + bufferSeconds &&
            betInfo.amount != 0;
    }

    /**
     * @notice Calculate rewards for round
     * @param epoch: epoch
     */
    function _calculateRewards(uint256 epoch) internal {
        require(rounds[epoch].rewardBaseCalAmount == 0 && rounds[epoch].rewardAmount == 0, "Rewards calculated");
        Round storage round = rounds[epoch];
        uint256 rewardBaseCalAmount;
        uint256 treasuryAmt;
        uint256 rewardAmount;

        // Bull wins
        if (round.closePrice > round.lockPrice) {
            rewardBaseCalAmount = round.bullAmount;
            //no winner , house win
            if (rewardBaseCalAmount == 0) {
                treasuryAmt = round.totalAmount;
            } else {
                if(round.bearAmount > 0){
                    treasuryAmt = (round.totalAmount * treasuryFee) / 10000;
                }
            }
            rewardAmount = round.totalAmount - treasuryAmt;
        }
        // Bear wins
        else if (round.closePrice < round.lockPrice) {
            rewardBaseCalAmount = round.bearAmount;
            //no winner , house win
            if (rewardBaseCalAmount == 0) {
                treasuryAmt = round.totalAmount;
            } else {
                if(round.bullAmount > 0){
                    treasuryAmt = (round.totalAmount * treasuryFee) / 10000;
                }
            }
            rewardAmount = round.totalAmount - treasuryAmt;
        }
        // House wins
        else {
            rewardBaseCalAmount = 0;
            rewardAmount = 0;
            treasuryAmt = round.totalAmount;
        }
        round.rewardBaseCalAmount = rewardBaseCalAmount;
        round.rewardAmount = rewardAmount;

        // Add to treasury
        treasuryAmount += treasuryAmt;

        emit RewardsCalculated(epoch, rewardBaseCalAmount, rewardAmount, treasuryAmt);
    }

    /**
     * @notice End round
     * @param epoch: epoch
     * @param roundId: roundId
     * @param price: price of the round
     */
    function _safeEndRound(
        uint256 epoch,
        uint256 roundId,
        int256 price
    ) internal {
        require(rounds[epoch].lockTimestamp != 0, "Can only end round after round has locked");
        require(block.timestamp >= rounds[epoch].closeTimestamp, "Can only end round after closeTimestamp");
        require(
            block.timestamp <= rounds[epoch].closeTimestamp + bufferSeconds,
            "Can only end round within bufferSeconds"
        );
        Round storage round = rounds[epoch];
        round.closePrice = price;
        round.closeOracleId = roundId;
        round.oracleCalled = true;

        emit EndRound(epoch, roundId, round.closePrice);
    }

    /**
     * @notice Lock round
     * @param epoch: epoch
     * @param roundId: roundId
     * @param price: price of the round
     */
    function _safeLockRound(
        uint256 epoch,
        uint256 roundId,
        int256 price
    ) internal {
        require(rounds[epoch].startTimestamp != 0, "Can only lock round after round has started");
        require(block.timestamp >= rounds[epoch].lockTimestamp, "Can only lock round after lockTimestamp");
        require(
            block.timestamp <= rounds[epoch].lockTimestamp + bufferSeconds,
            "Can only lock round within bufferSeconds"
        );
        Round storage round = rounds[epoch];
        round.closeTimestamp = block.timestamp + intervalSeconds;
        round.lockPrice = price;
        round.lockOracleId = roundId;

        emit LockRound(epoch, roundId, round.lockPrice);
    }

    /**
     * @notice Start round
     * Previous round n-2 must end
     * @param epoch: epoch
     */
    function _safeStartRound(uint256 epoch) internal {
        require(genesisStartOnce, "Can only run after genesisStartRound is triggered");
        require(rounds[epoch - 2].closeTimestamp != 0, "Can only start round after round n-2 has ended");
        require(
            block.timestamp >= rounds[epoch - 2].closeTimestamp,
            "Can only start new round after round n-2 closeTimestamp"
        );
        _startRound(epoch);
    }

    /**
     * @notice Transfer BNB in a safe way
     * @param to: address to transfer BNB to
     * @param value: BNB amount to transfer (in wei)
     */
    function _safeTransferBNB(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}("");
        require(success, "TransferHelper: BNB_TRANSFER_FAILED");
    }

    /**
     * @notice Start round
     * Previous round n-2 must end
     * @param epoch: epoch
     */
    function _startRound(uint256 epoch) internal {
        Round storage round = rounds[epoch];
        round.startTimestamp = block.timestamp;
        round.lockTimestamp = block.timestamp + intervalSeconds;
        round.closeTimestamp = block.timestamp + (2 * intervalSeconds);
        round.epoch = epoch;
        round.totalAmount = 0;

        emit StartRound(epoch);
    }

    /**
     * @notice Determine if a round is valid for receiving bets
     * Round must have started and locked
     * Current timestamp must be within startTimestamp and closeTimestamp
     */
    function _bettable(uint256 epoch) internal view returns (bool) {
        return
            rounds[epoch].startTimestamp != 0 &&
            rounds[epoch].lockTimestamp != 0 &&
            block.timestamp > rounds[epoch].startTimestamp &&
            block.timestamp < rounds[epoch].lockTimestamp;
    }

    /**
     * @notice Get latest recorded price from oracle
     * If it falls below allowed buffer or has not updated, it would be invalid.
     */
    function _getPriceFromOracle() internal view returns (uint80, int256) {
        uint256 leastAllowedTimestamp = block.timestamp + oracleUpdateAllowance;
        (uint80 roundId, int256 price, , uint256 timestamp, ) = oracle.latestRoundData();
        require(timestamp <= leastAllowedTimestamp, "Oracle update exceeded max timestamp allowance");
        require(
            uint256(roundId) > oracleLatestRoundId,
            "Oracle update roundId must be larger than oracleLatestRoundId"
        );
        return (roundId, price);
    }

    /**
     * @notice Returns true if `account` is a contract.
     * @param account: account address
     */
    function _isContract(address account) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }
}

File 2 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 9 : Pausable.sol
// SPDX-License-Identifier: MIT

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 Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

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

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        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());
    }
}

File 4 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 5 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 6 of 9 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 9 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {

  function decimals()
    external
    view
    returns (
      uint8
    );

  function description()
    external
    view
    returns (
      string memory
    );

  function version()
    external
    view
    returns (
      uint256
    );

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(
    uint80 _roundId
  )
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

}

File 8 of 9 : Context.sol
// SPDX-License-Identifier: MIT

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;
    }
}

File 9 of 9 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_oracleAddress","type":"address"},{"internalType":"address","name":"_adminAddress","type":"address"},{"internalType":"address","name":"_operatorAddress","type":"address"},{"internalType":"uint256","name":"_intervalSeconds","type":"uint256"},{"internalType":"uint256","name":"_bufferSeconds","type":"uint256"},{"internalType":"uint256","name":"_minBetAmount","type":"uint256"},{"internalType":"uint256","name":"_oracleUpdateAllowance","type":"uint256"},{"internalType":"uint256","name":"_treasuryFee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BetBear","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BetBull","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"int256","name":"price","type":"int256"}],"name":"EndRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"int256","name":"price","type":"int256"}],"name":"LockRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"}],"name":"NewAdminAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bufferSeconds","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"intervalSeconds","type":"uint256"}],"name":"NewBufferAndIntervalSeconds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minBetAmount","type":"uint256"}],"name":"NewMinBetAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"NewOperatorAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oracle","type":"address"}],"name":"NewOracle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oracleUpdateAllowance","type":"uint256"}],"name":"NewOracleUpdateAllowance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryFee","type":"uint256"}],"name":"NewTreasuryFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardBaseCalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryAmount","type":"uint256"}],"name":"RewardsCalculated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"StartRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenRecovery","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TreasuryClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MAX_TREASURY_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adminAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"betBear","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"betBull","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"bufferSeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"epochs","type":"uint256[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"claimable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"executeRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"genesisLockOnce","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genesisLockRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"genesisStartOnce","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genesisStartRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"getUserRounds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"components":[{"internalType":"enum Prediction.Position","name":"position","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"claimed","type":"bool"}],"internalType":"struct Prediction.BetInfo[]","name":"","type":"tuple[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserRoundsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"intervalSeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"ledger","outputs":[{"internalType":"enum Prediction.Position","name":"position","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"claimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBetAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleLatestRoundId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleUpdateAllowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"refundable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rounds","outputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"lockTimestamp","type":"uint256"},{"internalType":"uint256","name":"closeTimestamp","type":"uint256"},{"internalType":"int256","name":"lockPrice","type":"int256"},{"internalType":"int256","name":"closePrice","type":"int256"},{"internalType":"uint256","name":"lockOracleId","type":"uint256"},{"internalType":"uint256","name":"closeOracleId","type":"uint256"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"bullAmount","type":"uint256"},{"internalType":"uint256","name":"bearAmount","type":"uint256"},{"internalType":"uint256","name":"rewardBaseCalAmount","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"bool","name":"oracleCalled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_adminAddress","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bufferSeconds","type":"uint256"},{"internalType":"uint256","name":"_intervalSeconds","type":"uint256"}],"name":"setBufferAndIntervalSeconds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBetAmount","type":"uint256"}],"name":"setMinBetAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operatorAddress","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_oracleUpdateAllowance","type":"uint256"}],"name":"setOracleUpdateAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_treasuryFee","type":"uint256"}],"name":"setTreasuryFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userRounds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040526002805461ffff60a01b191690553480156200001f57600080fd5b506040516200569a3803806200569a83398101604081905262000042916200017e565b6200004d3362000111565b6000805460ff60a01b19169055600180556103e8811115620000b55760405162461bcd60e51b815260206004820152601560248201527f54726561737572792066656520746f6f20686967680000000000000000000000604482015260640160405180910390fd5b600280546001600160a01b03199081166001600160a01b039a8b1617909155600380548216988a1698909817909755600480549097169590971694909417909455600691909155600555600791909155600c55600855620001f8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200017957600080fd5b919050565b600080600080600080600080610100898b0312156200019b578384fd5b620001a68962000161565b9750620001b660208a0162000161565b9650620001c660408a0162000161565b9550606089015194506080890151935060a0890151925060c0890151915060e089015190509295985092959890939650565b61549280620002086000396000f3fe6080604052600436106102d05760003560e01c80637dc0d1d011610179578063cc32d176116100d6578063ec3247031161008a578063f7fdec2811610064578063f7fdec28146108d1578063fa968eea14610904578063fc6f94681461091a57600080fd5b8063ec32470314610885578063f2b3c8091461089b578063f2fde38b146108b157600080fd5b8063d9d55eac116100bb578063d9d55eac1461083a578063dd1f75961461084f578063eaba23611461086f57600080fd5b8063cc32d17614610804578063cf2f50391461081a57600080fd5b8063951fd6001161012d578063aa6b873a11610112578063aa6b873a146107b1578063b29a8140146107c4578063b3ab15fb146107e457600080fd5b8063951fd60014610762578063a0c7f71c1461079157600080fd5b8063890dc7661161015e578063890dc766146106225780638c65c81f146106425780638da5cb5b1461073757600080fd5b80637dc0d1d0146105e05780638456cb591461060d57600080fd5b80636ba4c1381161023257806376671808116101e65780637b3205f5116101c05780637b3205f5146105955780637bf41254146105aa5780637d1cd04f146105ca57600080fd5b8063766718081461053f57806377e741c7146105555780637adbf9731461057557600080fd5b8063704b6c0211610217578063704b6c02146104af578063715018a6146104cf5780637285c58b146104e457600080fd5b80636ba4c1381461046f5780636c1885931461048f57600080fd5b80633f4ba83a1161028957806357fb096f1161026e57806357fb096f146104165780635c975abb14610429578063605540111461045957600080fd5b80633f4ba83a146103ec578063452fd75a1461040157600080fd5b8063127effb2116102ba578063127effb214610333578063273867d414610385578063368acb09146103d657600080fd5b80623bdc74146102d55780630f74174f146102ec575b600080fd5b3480156102e157600080fd5b506102ea610947565b005b3480156102f857600080fd5b5060025461031e9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020015b60405180910390f35b34801561033f57600080fd5b506004546103609073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161032a565b34801561039157600080fd5b506103c86103a0366004614ff9565b73ffffffffffffffffffffffffffffffffffffffff166000908152600f602052604090205490565b60405190815260200161032a565b3480156103e257600080fd5b506103c860095481565b3480156103f857600080fd5b506102ea610aa5565b34801561040d57600080fd5b506102ea610c2a565b6102ea6104243660046150fe565b610e3a565b34801561043557600080fd5b5060005474010000000000000000000000000000000000000000900460ff1661031e565b34801561046557600080fd5b506103c8600c5481565b34801561047b57600080fd5b506102ea61048a36600461506e565b6112ce565b34801561049b57600080fd5b506102ea6104aa3660046150fe565b611b0c565b3480156104bb57600080fd5b506102ea6104ca366004614ff9565b611cb7565b3480156104db57600080fd5b506102ea611e2f565b3480156104f057600080fd5b506105306104ff366004615116565b600d60209081526000928352604080842090915290825290208054600182015460029092015460ff91821692911683565b60405161032a939291906152aa565b34801561054b57600080fd5b506103c8600a5481565b34801561056157600080fd5b506102ea6105703660046150fe565b611ebc565b34801561058157600080fd5b506102ea610590366004614ff9565b612065565b3480156105a157600080fd5b506102ea612303565b3480156105b657600080fd5b5061031e6105c5366004615116565b612597565b3480156105d657600080fd5b506103c860065481565b3480156105ec57600080fd5b506002546103609073ffffffffffffffffffffffffffffffffffffffff1681565b34801561061957600080fd5b506102ea612762565b34801561062e57600080fd5b506102ea61063d366004615141565b6128c0565b34801561064e57600080fd5b506106cd61065d3660046150fe565b600e60205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a8b0154600b8c0154600c8d0154600d909d01549b9c9a9b999a98999798969795969495939492939192909160ff168e565b604080519e8f5260208f019d909d529b8d019a909a5260608c019890985260808b019690965260a08a019490945260c089019290925260e088015261010087015261012086015261014085015261016084015261018083015215156101a08201526101c00161032a565b34801561074357600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610360565b34801561076e57600080fd5b5061078261077d36600461503c565b612a9b565b60405161032a93929190615208565b34801561079d57600080fd5b5061031e6107ac366004615116565b612e7c565b6102ea6107bf3660046150fe565b6130ed565b3480156107d057600080fd5b506102ea6107df366004615013565b613576565b3480156107f057600080fd5b506102ea6107ff366004614ff9565b61366c565b34801561081057600080fd5b506103c860085481565b34801561082657600080fd5b506102ea6108353660046150fe565b6137dd565b34801561084657600080fd5b506102ea613917565b34801561085b57600080fd5b506103c861086a366004615013565b613c0d565b34801561087b57600080fd5b506103c860055481565b34801561089157600080fd5b506103c8600b5481565b3480156108a757600080fd5b506103c86103e881565b3480156108bd57600080fd5b506102ea6108cc366004614ff9565b613c3e565b3480156108dd57600080fd5b5060025461031e907501000000000000000000000000000000000000000000900460ff1681565b34801561091057600080fd5b506103c860075481565b34801561092657600080fd5b506003546103609073ffffffffffffffffffffffffffffffffffffffff1681565b600260015414156109b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260015560035473ffffffffffffffffffffffffffffffffffffffff163314610a3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b600980546000909155600354610a6b9073ffffffffffffffffffffffffffffffffffffffff1682613d6e565b6040518181527fb9197c6b8e21274bd1e2d9c956a88af5cfee510f630fab3f046300f88b4223619060200160405180910390a15060018055565b60005474010000000000000000000000000000000000000000900460ff16610b29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff16331480610b66575060045473ffffffffffffffffffffffffffffffffffffffff1633145b610bcc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4e6f74206f70657261746f722f61646d696e000000000000000000000000000060448201526064016109b0565b600280547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff169055610bfc613e63565b600a546040517faaa520fdd7d2c83061d632fa017b0432407e798818af63ea908589fceda39ab790600090a2565b60005474010000000000000000000000000000000000000000900460ff1615610caf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b60045473ffffffffffffffffffffffffffffffffffffffff163314610d30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f74206f70657261746f72000000000000000000000000000000000000000060448201526064016109b0565b6002547501000000000000000000000000000000000000000000900460ff1615610ddc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e206f6e6c792072756e2067656e657369735374617274526f756e64206f60448201527f6e6365000000000000000000000000000000000000000000000000000000000060648201526084016109b0565b600a54610dea90600161531f565b600a819055610df890613f5c565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167501000000000000000000000000000000000000000000179055565b60005474010000000000000000000000000000000000000000900460ff1615610ebf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b60026001541415610f2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b0565b6002600155333b15610f9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016109b0565b333214611003576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f77656400000000000060448201526064016109b0565b600a54811461106e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f42657420697320746f6f206561726c792f6c617465000000000000000000000060448201526064016109b0565b61107781613fda565b6110dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f526f756e64206e6f74206265747461626c65000000000000000000000000000060448201526064016109b0565b60075434101561116f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f42657420616d6f756e74206d7573742062652067726561746572207468616e2060448201527f6d696e426574416d6f756e74000000000000000000000000000000000000000060648201526084016109b0565b6000818152600d60209081526040808320338452909152902060010154156111f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e206f6e6c7920626574206f6e63652070657220726f756e64000000000060448201526064016109b0565b6000818152600e60205260409020600881015434919061121490839061531f565b6008820155600981015461122990839061531f565b60098201556000838152600d602090815260408083203380855290835281842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681556001808201889055600f855283862080549182018155865294849020909401879055905185815286927f438122d8cff518d18388099a5181f0d17a12b4f1b55faedf6e4a6acee0060c1291015b60405180910390a35050600180555050565b6002600154141561133b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b0565b6002600155333b156113a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016109b0565b333214611412576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f77656400000000000060448201526064016109b0565b6000805b82811015611af257600e600085858481811061145b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060010154600014156114de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f526f756e6420686173206e6f742073746172746564000000000000000000000060448201526064016109b0565b600e600085858481811061151b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060030154421161159c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f526f756e6420686173206e6f7420656e6465640000000000000000000000000060448201526064016109b0565b6000600e60008686858181106115db577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60209081029290920135835250810191909152604001600020600d015460ff16156118695761164985858481811061163c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002013533612e7c565b6116af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e6f7420656c696769626c6520666f7220636c61696d0000000000000000000060448201526064016109b0565b6000600e60008787868181106116ee577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201358152602001908152602001600020604051806101c001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820160009054906101000a900460ff1615151515815250509050806101600151816101800151600d60008989888181106117f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546118579190615370565b6118619190615337565b9150506119ae565b6118b28585848181106118a5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002013533612597565b611918576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f7420656c696769626c6520666f7220726566756e6400000000000000000060448201526064016109b0565b600d6000868685818110611955577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490505b6001600d60008787868181106119ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602090810292909201358352508181019290925260409081016000908120338252909252902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055611a4d818461531f565b9250848483818110611a88577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201353373ffffffffffffffffffffffffffffffffffffffff167f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf783604051611ad791815260200190565b60405180910390a35080611aea816153f4565b915050611416565b508015611b0357611b033382613d6e565b50506001805550565b60005474010000000000000000000000000000000000000000900460ff16611b90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff163314611c11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b80611c78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4d757374206265207375706572696f7220746f2030000000000000000000000060448201526064016109b0565b6007819055600a546040518281527f90eb87c560a0213754ceb3a7fa3012f01acab0a35602c1e1995adf69dabc9d50906020015b60405180910390a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314611d38576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b0565b73ffffffffffffffffffffffffffffffffffffffff8116611db5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f43616e6e6f74206265207a65726f20616464726573730000000000000000000060448201526064016109b0565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f137b621413925496477d46e5055ac0d56178bdd724ba8bf843afceef18268ba3906020015b60405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff163314611eb0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b0565b611eba6000614045565b565b60005474010000000000000000000000000000000000000000900460ff16611f40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff163314611fc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b6103e881111561202d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f54726561737572792066656520746f6f2068696768000000000000000000000060448201526064016109b0565b6008819055600a546040518281527fb1c4ee38d35556741133da7ff9b6f7ab0fa88d0406133126ff128f635490a85790602001611cac565b60005474010000000000000000000000000000000000000000900460ff166120e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff16331461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b73ffffffffffffffffffffffffffffffffffffffff81166121e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f43616e6e6f74206265207a65726f20616464726573730000000000000000000060448201526064016109b0565b6000600b55600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117909155604080517ffeaf968c000000000000000000000000000000000000000000000000000000008152905163feaf968c9160048082019260a092909190829003018186803b15801561227e57600080fd5b505afa158015612292573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b69190615162565b505060405173ffffffffffffffffffffffffffffffffffffffff851681527fb3eacd0e351fafdfefdec84e1cd19679b38dbcd63ea7c2c24da17fd2bc3b3c0e93506020019150611e249050565b60005474010000000000000000000000000000000000000000900460ff1615612388576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b60045473ffffffffffffffffffffffffffffffffffffffff163314612409576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f74206f70657261746f72000000000000000000000000000000000000000060448201526064016109b0565b6002547501000000000000000000000000000000000000000000900460ff16801561244e575060025474010000000000000000000000000000000000000000900460ff165b612500576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604660248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e6420616e642067656e657369734c6f636b526f756e642069732074726960648201527f6767657265640000000000000000000000000000000000000000000000000000608482015260a4016109b0565b60008061250b6140ba565b915091508169ffffffffffffffffffff16600b8190555061253b600a548369ffffffffffffffffffff16836142b4565b6125606001600a5461254d91906153ad565b8369ffffffffffffffffffff168361450d565b6125776001600a5461257291906153ad565b61477a565b600a5461258590600161531f565b600a81905561259390614954565b5050565b6000828152600d6020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152808220815160608101909252805483929190829060ff166001811115612613577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600181111561264b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260018281015460208084019190915260029384015460ff908116151560409485015260008a8152600e835284902084516101c08101865281548152938101549284019290925293810154928201929092526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d909101549091161580156101a08301819052929350909161272c57508160400151155b801561274857506005548160600151612745919061531f565b42115b80156127575750602082015115155b925050505b92915050565b60005474010000000000000000000000000000000000000000900460ff16156127e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff16331480612824575060045473ffffffffffffffffffffffffffffffffffffffff1633145b61288a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4e6f74206f70657261746f722f61646d696e000000000000000000000000000060448201526064016109b0565b612892614b69565b600a546040517f68b095021b1f40fe513109f513c66692f0b3219aee674a69f4efc57badb8201d90600090a2565b60005474010000000000000000000000000000000000000000900460ff16612944576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff1633146129c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b808210612a54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f6275666665725365636f6e6473206d75737420626520696e666572696f72207460448201527f6f20696e74657276616c5365636f6e647300000000000000000000000000000060648201526084016109b0565b6005829055600681905560408051838152602081018390527fe60149e0431fec12df63dfab5fce2a9cefe9a4d3df5f41cb626f579ae1f2b91a910160405180910390a15050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600f602052604081205460609182918490612ad39087906153ad565b811115612b0e5773ffffffffffffffffffffffffffffffffffffffff87166000908152600f6020526040902054612b0b9087906153ad565b90505b60008167ffffffffffffffff811115612b50577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015612b79578160200160208202803683370190505b50905060008267ffffffffffffffff811115612bbe577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015612c2757816020015b60408051606081018252600080825260208083018290529282015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181612bdc5790505b50905060005b83811015612e5d5773ffffffffffffffffffffffffffffffffffffffff8a166000908152600f60205260409020612c64828b61531f565b81548110612c9b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200154838281518110612cdf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001018181525050600d6000848381518110612d28577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020908102919091018101518252818101929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff8e168252909252908190208151606081019092528054829060ff166001811115612daf577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6001811115612de7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526001820154602082015260029091015460ff1615156040909101528251839083908110612e3f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101819052508080612e55906153f4565b915050612c2d565b508181612e6a858b61531f565b95509550955050505093509350939050565b6000828152600d6020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152808220815160608101909252805483929190829060ff166001811115612ef8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6001811115612f30577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260018281015460208084019190915260029384015460ff908116151560409485015260008a8152600e835284902084516101c081018652815481529381015492840192909252938101549282019290925260038201546060820152600482015460808201819052600583015460a08301819052600684015460c0840152600784015460e084015260088401546101008401526009840154610120840152600a840154610140840152600b840154610160840152600c840154610180840152600d9093015490931615156101a082015292935014156130155760009250505061275c565b806101a00151801561302a5750602082015115155b801561303857508160400151155b8015612757575080608001518160a0015113801561308f575060008251600181111561308d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b145b80612757575080608001518160a0015112801561275757506001825160018111156130e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1495945050505050565b60005474010000000000000000000000000000000000000000900460ff1615613172576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b600260015414156131df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b0565b6002600155333b1561324d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016109b0565b3332146132b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f77656400000000000060448201526064016109b0565b600a548114613321576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f42657420697320746f6f206561726c792f6c617465000000000000000000000060448201526064016109b0565b61332a81613fda565b613390576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f526f756e64206e6f74206265747461626c65000000000000000000000000000060448201526064016109b0565b600754341015613422576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f42657420616d6f756e74206d7573742062652067726561746572207468616e2060448201527f6d696e426574416d6f756e74000000000000000000000000000000000000000060648201526084016109b0565b6000818152600d60209081526040808320338452909152902060010154156134a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e206f6e6c7920626574206f6e63652070657220726f756e64000000000060448201526064016109b0565b6000818152600e6020526040902060088101543491906134c790839061531f565b6008820155600a8101546134dc90839061531f565b600a8201556000838152600d602090815260408083203380855290835281842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081178255808201889055600f855283862080549182018155865294849020909401879055905185815286927f0d8c1fe3e67ab767116a81f122b83c2557a8c2564019cb7c4f83de1aeb1f1f0d91016112bc565b60005473ffffffffffffffffffffffffffffffffffffffff1633146135f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b0565b61361873ffffffffffffffffffffffffffffffffffffffff83163383614c55565b8173ffffffffffffffffffffffffffffffffffffffff167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e988260405161366091815260200190565b60405180910390a25050565b60035473ffffffffffffffffffffffffffffffffffffffff1633146136ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b73ffffffffffffffffffffffffffffffffffffffff811661376a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f43616e6e6f74206265207a65726f20616464726573730000000000000000000060448201526064016109b0565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fc47d127c07bdd56c5ccba00463ce3bd3c1bca71b4670eea6e5d0c02e4aa156e290602001611e24565b60005474010000000000000000000000000000000000000000900460ff16613861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff1633146138e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b600c8190556040518181527f93ccaceac092ffb842c46b8718667a13a80e9058dcd0bd403d0b47215b30da0790602001611e24565b60005474010000000000000000000000000000000000000000900460ff161561399c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b60045473ffffffffffffffffffffffffffffffffffffffff163314613a1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f74206f70657261746f72000000000000000000000000000000000000000060448201526064016109b0565b6002547501000000000000000000000000000000000000000000900460ff16613ac8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e642069732074726967676572656400000000000000000000000000000060648201526084016109b0565b60025474010000000000000000000000000000000000000000900460ff1615613b73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f43616e206f6e6c792072756e2067656e657369734c6f636b526f756e64206f6e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016109b0565b600080613b7e6140ba565b915091508169ffffffffffffffffffff16600b81905550613bae600a548369ffffffffffffffffffff16836142b4565b600a54613bbc90600161531f565b600a819055613bca90613f5c565b5050600280547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b600f6020528160005260406000208181548110613c2957600080fd5b90600052602060002001600091509150505481565b60005473ffffffffffffffffffffffffffffffffffffffff163314613cbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b0565b73ffffffffffffffffffffffffffffffffffffffff8116613d62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109b0565b613d6b81614045565b50565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114613dc8576040519150601f19603f3d011682016040523d82523d6000602084013e613dcd565b606091505b5050905080613e5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5472616e7366657248656c7065723a20424e425f5452414e534645525f46414960448201527f4c4544000000000000000000000000000000000000000000000000000000000060648201526084016109b0565b505050565b60005474010000000000000000000000000000000000000000900460ff16613ee7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6000818152600e602052604090204260018201819055600654613f7e9161531f565b600280830191909155600654613f9391615370565b613f9d904261531f565b600382015581815560006008820181905560405183917f939f42374aa9bf1d8d8cd56d8a9110cb040cd8dfeae44080c6fcf2645e51b45291a25050565b6000818152600e60205260408120600101541580159061400a57506000828152600e602052604090206002015415155b801561402657506000828152600e602052604090206001015442115b801561275c5750506000908152600e6020526040902060020154421090565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000600c54426140cd919061531f565b90506000806000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561413c57600080fd5b505afa158015614150573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141749190615162565b50935050925092508381111561420c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4f7261636c6520757064617465206578636565646564206d61782074696d657360448201527f74616d7020616c6c6f77616e636500000000000000000000000000000000000060648201526084016109b0565b600b548369ffffffffffffffffffff16116142a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4f7261636c652075706461746520726f756e644964206d757374206265206c6160448201527f72676572207468616e206f7261636c654c6174657374526f756e64496400000060648201526084016109b0565b509094909350915050565b6000838152600e6020526040902060010154614352576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f43616e206f6e6c79206c6f636b20726f756e6420616674657220726f756e642060448201527f686173207374617274656400000000000000000000000000000000000000000060648201526084016109b0565b6000838152600e60205260409020600201544210156143f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f43616e206f6e6c79206c6f636b20726f756e64206166746572206c6f636b546960448201527f6d657374616d700000000000000000000000000000000000000000000000000060648201526084016109b0565b6005546000848152600e6020526040902060020154614412919061531f565b4211156144a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f43616e206f6e6c79206c6f636b20726f756e642077697468696e20627566666560448201527f725365636f6e647300000000000000000000000000000000000000000000000060648201526084016109b0565b6000838152600e602052604090206006546144bc904261531f565b60038201556004810182905560068101839055604051828152839085907f482e76a65b448a42deef26e99e58fb20c85e26f075defff8df6aa80459b39006906020015b60405180910390a350505050565b6000838152600e60205260409020600201546145ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f43616e206f6e6c7920656e6420726f756e6420616674657220726f756e64206860448201527f6173206c6f636b6564000000000000000000000000000000000000000000000060648201526084016109b0565b6000838152600e602052604090206003015442101561464c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f43616e206f6e6c7920656e6420726f756e6420616674657220636c6f7365546960448201527f6d657374616d700000000000000000000000000000000000000000000000000060648201526084016109b0565b6005546000848152600e602052604090206003015461466b919061531f565b4211156146fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f43616e206f6e6c7920656e6420726f756e642077697468696e2062756666657260448201527f5365636f6e64730000000000000000000000000000000000000000000000000060648201526084016109b0565b6000838152600e6020526040908190206005810183905560078101849055600d810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790559051839085907fb6ff1fe915db84788cbbbc017f0d2bef9485fad9fd0bd8ce9340fde0d8410dd8906144ff9086815260200190565b6000818152600e60205260409020600b01541580156147a857506000818152600e60205260409020600c0154155b61480e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f526577617264732063616c63756c61746564000000000000000000000000000060448201526064016109b0565b6000818152600e602052604081206004810154600582015491929182918291131561488e57600984015492508261484b5783600801549150614877565b600a8401541561487757612710600854856008015461486a9190615370565b6148749190615337565b91505b81846008015461488791906153ad565b90506148e2565b8360040154846005015412156148d557600a8401549250826148b65783600801549150614877565b60098401541561487757612710600854856008015461486a9190615370565b5050506008810154600090815b600b8401839055600c84018190556009805483919060009061490590849061531f565b9091555050604080518481526020810183905290810183905285907f6dfdfcb09c8804d0058826cd2539f1acfbe3cb887c9be03d928035bce0f1a58d9060600160405180910390a25050505050565b6002547501000000000000000000000000000000000000000000900460ff166149ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e642069732074726967676572656400000000000000000000000000000060648201526084016109b0565b600e6000614a0e6002846153ad565b81526020019081526020016000206003015460001415614ab0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43616e206f6e6c7920737461727420726f756e6420616674657220726f756e6460448201527f206e2d322068617320656e64656400000000000000000000000000000000000060648201526084016109b0565b600e6000614abf6002846153ad565b815260200190815260200160002060030154421015614b60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43616e206f6e6c79207374617274206e657720726f756e64206166746572207260448201527f6f756e64206e2d3220636c6f736554696d657374616d7000000000000000000060648201526084016109b0565b613d6b81613f5c565b60005474010000000000000000000000000000000000000000900460ff1615614bee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613f323390565b6040805173ffffffffffffffffffffffffffffffffffffffff848116602483015260448083018590528351808403909101815260649092018352602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152613e5e92869291600091614d20918516908490614dca565b805190915015613e5e5780806020019051810190614d3e91906150de565b613e5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016109b0565b6060614dd98484600085614de3565b90505b9392505050565b606082471015614e75576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016109b0565b843b614edd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109b0565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051614f0691906151ec565b60006040518083038185875af1925050503d8060008114614f43576040519150601f19603f3d011682016040523d82523d6000602084013e614f48565b606091505b5091509150614f58828286614f63565b979650505050505050565b60608315614f72575081614ddc565b825115614f825782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b091906152ce565b803573ffffffffffffffffffffffffffffffffffffffff81168114614fda57600080fd5b919050565b805169ffffffffffffffffffff81168114614fda57600080fd5b60006020828403121561500a578081fd5b614ddc82614fb6565b60008060408385031215615025578081fd5b61502e83614fb6565b946020939093013593505050565b600080600060608486031215615050578081fd5b61505984614fb6565b95602085013595506040909401359392505050565b60008060208385031215615080578182fd5b823567ffffffffffffffff80821115615097578384fd5b818501915085601f8301126150aa578384fd5b8135818111156150b8578485fd5b8660208260051b85010111156150cc578485fd5b60209290920196919550909350505050565b6000602082840312156150ef578081fd5b81518015158114614ddc578182fd5b60006020828403121561510f578081fd5b5035919050565b60008060408385031215615128578182fd5b8235915061513860208401614fb6565b90509250929050565b60008060408385031215615153578182fd5b50508035926020909101359150565b600080600080600060a08688031215615179578081fd5b61518286614fdf565b94506020860151935060408601519250606086015191506151a560808701614fdf565b90509295509295909350565b600281106151e8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b600082516151fe8184602087016153c4565b9190910192915050565b60608082528451828201819052600091906020906080850190828901855b8281101561524257815184529284019290840190600101615226565b50505084810382860152865180825287830191830190855b8181101561529357835161526f8482516151b1565b8086015184870152604090810151151590840152928401929185019160010161525a565b505080945050505050826040830152949350505050565b606081016152b882866151b1565b8360208301528215156040830152949350505050565b60208152600082518060208401526152ed8160408501602087016153c4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600082198211156153325761533261542d565b500190565b60008261536b577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156153a8576153a861542d565b500290565b6000828210156153bf576153bf61542d565b500390565b60005b838110156153df5781810151838201526020016153c7565b838111156153ee576000848401525b50505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156154265761542661542d565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220ee3b14de1e24e3e45e06bb7f2209e3a4248e769c6035f732a1b9a76fa0046beb64736f6c63430008040033000000000000000000000000a2fc84417d605fc78bc77ba0c7cd071590360409000000000000000000000000d7878bdcb6aae569dcd19bda1b29ca3ae4516e04000000000000000000000000ab8b61d63fb11973edcfe461b2400cd468e314aa000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000002540be400000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000000012c

Deployed Bytecode

0x6080604052600436106102d05760003560e01c80637dc0d1d011610179578063cc32d176116100d6578063ec3247031161008a578063f7fdec2811610064578063f7fdec28146108d1578063fa968eea14610904578063fc6f94681461091a57600080fd5b8063ec32470314610885578063f2b3c8091461089b578063f2fde38b146108b157600080fd5b8063d9d55eac116100bb578063d9d55eac1461083a578063dd1f75961461084f578063eaba23611461086f57600080fd5b8063cc32d17614610804578063cf2f50391461081a57600080fd5b8063951fd6001161012d578063aa6b873a11610112578063aa6b873a146107b1578063b29a8140146107c4578063b3ab15fb146107e457600080fd5b8063951fd60014610762578063a0c7f71c1461079157600080fd5b8063890dc7661161015e578063890dc766146106225780638c65c81f146106425780638da5cb5b1461073757600080fd5b80637dc0d1d0146105e05780638456cb591461060d57600080fd5b80636ba4c1381161023257806376671808116101e65780637b3205f5116101c05780637b3205f5146105955780637bf41254146105aa5780637d1cd04f146105ca57600080fd5b8063766718081461053f57806377e741c7146105555780637adbf9731461057557600080fd5b8063704b6c0211610217578063704b6c02146104af578063715018a6146104cf5780637285c58b146104e457600080fd5b80636ba4c1381461046f5780636c1885931461048f57600080fd5b80633f4ba83a1161028957806357fb096f1161026e57806357fb096f146104165780635c975abb14610429578063605540111461045957600080fd5b80633f4ba83a146103ec578063452fd75a1461040157600080fd5b8063127effb2116102ba578063127effb214610333578063273867d414610385578063368acb09146103d657600080fd5b80623bdc74146102d55780630f74174f146102ec575b600080fd5b3480156102e157600080fd5b506102ea610947565b005b3480156102f857600080fd5b5060025461031e9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020015b60405180910390f35b34801561033f57600080fd5b506004546103609073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161032a565b34801561039157600080fd5b506103c86103a0366004614ff9565b73ffffffffffffffffffffffffffffffffffffffff166000908152600f602052604090205490565b60405190815260200161032a565b3480156103e257600080fd5b506103c860095481565b3480156103f857600080fd5b506102ea610aa5565b34801561040d57600080fd5b506102ea610c2a565b6102ea6104243660046150fe565b610e3a565b34801561043557600080fd5b5060005474010000000000000000000000000000000000000000900460ff1661031e565b34801561046557600080fd5b506103c8600c5481565b34801561047b57600080fd5b506102ea61048a36600461506e565b6112ce565b34801561049b57600080fd5b506102ea6104aa3660046150fe565b611b0c565b3480156104bb57600080fd5b506102ea6104ca366004614ff9565b611cb7565b3480156104db57600080fd5b506102ea611e2f565b3480156104f057600080fd5b506105306104ff366004615116565b600d60209081526000928352604080842090915290825290208054600182015460029092015460ff91821692911683565b60405161032a939291906152aa565b34801561054b57600080fd5b506103c8600a5481565b34801561056157600080fd5b506102ea6105703660046150fe565b611ebc565b34801561058157600080fd5b506102ea610590366004614ff9565b612065565b3480156105a157600080fd5b506102ea612303565b3480156105b657600080fd5b5061031e6105c5366004615116565b612597565b3480156105d657600080fd5b506103c860065481565b3480156105ec57600080fd5b506002546103609073ffffffffffffffffffffffffffffffffffffffff1681565b34801561061957600080fd5b506102ea612762565b34801561062e57600080fd5b506102ea61063d366004615141565b6128c0565b34801561064e57600080fd5b506106cd61065d3660046150fe565b600e60205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a8b0154600b8c0154600c8d0154600d909d01549b9c9a9b999a98999798969795969495939492939192909160ff168e565b604080519e8f5260208f019d909d529b8d019a909a5260608c019890985260808b019690965260a08a019490945260c089019290925260e088015261010087015261012086015261014085015261016084015261018083015215156101a08201526101c00161032a565b34801561074357600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610360565b34801561076e57600080fd5b5061078261077d36600461503c565b612a9b565b60405161032a93929190615208565b34801561079d57600080fd5b5061031e6107ac366004615116565b612e7c565b6102ea6107bf3660046150fe565b6130ed565b3480156107d057600080fd5b506102ea6107df366004615013565b613576565b3480156107f057600080fd5b506102ea6107ff366004614ff9565b61366c565b34801561081057600080fd5b506103c860085481565b34801561082657600080fd5b506102ea6108353660046150fe565b6137dd565b34801561084657600080fd5b506102ea613917565b34801561085b57600080fd5b506103c861086a366004615013565b613c0d565b34801561087b57600080fd5b506103c860055481565b34801561089157600080fd5b506103c8600b5481565b3480156108a757600080fd5b506103c86103e881565b3480156108bd57600080fd5b506102ea6108cc366004614ff9565b613c3e565b3480156108dd57600080fd5b5060025461031e907501000000000000000000000000000000000000000000900460ff1681565b34801561091057600080fd5b506103c860075481565b34801561092657600080fd5b506003546103609073ffffffffffffffffffffffffffffffffffffffff1681565b600260015414156109b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260015560035473ffffffffffffffffffffffffffffffffffffffff163314610a3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b600980546000909155600354610a6b9073ffffffffffffffffffffffffffffffffffffffff1682613d6e565b6040518181527fb9197c6b8e21274bd1e2d9c956a88af5cfee510f630fab3f046300f88b4223619060200160405180910390a15060018055565b60005474010000000000000000000000000000000000000000900460ff16610b29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff16331480610b66575060045473ffffffffffffffffffffffffffffffffffffffff1633145b610bcc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4e6f74206f70657261746f722f61646d696e000000000000000000000000000060448201526064016109b0565b600280547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff169055610bfc613e63565b600a546040517faaa520fdd7d2c83061d632fa017b0432407e798818af63ea908589fceda39ab790600090a2565b60005474010000000000000000000000000000000000000000900460ff1615610caf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b60045473ffffffffffffffffffffffffffffffffffffffff163314610d30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f74206f70657261746f72000000000000000000000000000000000000000060448201526064016109b0565b6002547501000000000000000000000000000000000000000000900460ff1615610ddc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e206f6e6c792072756e2067656e657369735374617274526f756e64206f60448201527f6e6365000000000000000000000000000000000000000000000000000000000060648201526084016109b0565b600a54610dea90600161531f565b600a819055610df890613f5c565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167501000000000000000000000000000000000000000000179055565b60005474010000000000000000000000000000000000000000900460ff1615610ebf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b60026001541415610f2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b0565b6002600155333b15610f9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016109b0565b333214611003576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f77656400000000000060448201526064016109b0565b600a54811461106e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f42657420697320746f6f206561726c792f6c617465000000000000000000000060448201526064016109b0565b61107781613fda565b6110dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f526f756e64206e6f74206265747461626c65000000000000000000000000000060448201526064016109b0565b60075434101561116f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f42657420616d6f756e74206d7573742062652067726561746572207468616e2060448201527f6d696e426574416d6f756e74000000000000000000000000000000000000000060648201526084016109b0565b6000818152600d60209081526040808320338452909152902060010154156111f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e206f6e6c7920626574206f6e63652070657220726f756e64000000000060448201526064016109b0565b6000818152600e60205260409020600881015434919061121490839061531f565b6008820155600981015461122990839061531f565b60098201556000838152600d602090815260408083203380855290835281842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681556001808201889055600f855283862080549182018155865294849020909401879055905185815286927f438122d8cff518d18388099a5181f0d17a12b4f1b55faedf6e4a6acee0060c1291015b60405180910390a35050600180555050565b6002600154141561133b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b0565b6002600155333b156113a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016109b0565b333214611412576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f77656400000000000060448201526064016109b0565b6000805b82811015611af257600e600085858481811061145b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060010154600014156114de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f526f756e6420686173206e6f742073746172746564000000000000000000000060448201526064016109b0565b600e600085858481811061151b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060030154421161159c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f526f756e6420686173206e6f7420656e6465640000000000000000000000000060448201526064016109b0565b6000600e60008686858181106115db577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60209081029290920135835250810191909152604001600020600d015460ff16156118695761164985858481811061163c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002013533612e7c565b6116af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e6f7420656c696769626c6520666f7220636c61696d0000000000000000000060448201526064016109b0565b6000600e60008787868181106116ee577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201358152602001908152602001600020604051806101c001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820160009054906101000a900460ff1615151515815250509050806101600151816101800151600d60008989888181106117f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546118579190615370565b6118619190615337565b9150506119ae565b6118b28585848181106118a5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002013533612597565b611918576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f7420656c696769626c6520666f7220726566756e6400000000000000000060448201526064016109b0565b600d6000868685818110611955577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490505b6001600d60008787868181106119ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602090810292909201358352508181019290925260409081016000908120338252909252902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055611a4d818461531f565b9250848483818110611a88577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201353373ffffffffffffffffffffffffffffffffffffffff167f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf783604051611ad791815260200190565b60405180910390a35080611aea816153f4565b915050611416565b508015611b0357611b033382613d6e565b50506001805550565b60005474010000000000000000000000000000000000000000900460ff16611b90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff163314611c11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b80611c78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4d757374206265207375706572696f7220746f2030000000000000000000000060448201526064016109b0565b6007819055600a546040518281527f90eb87c560a0213754ceb3a7fa3012f01acab0a35602c1e1995adf69dabc9d50906020015b60405180910390a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314611d38576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b0565b73ffffffffffffffffffffffffffffffffffffffff8116611db5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f43616e6e6f74206265207a65726f20616464726573730000000000000000000060448201526064016109b0565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f137b621413925496477d46e5055ac0d56178bdd724ba8bf843afceef18268ba3906020015b60405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff163314611eb0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b0565b611eba6000614045565b565b60005474010000000000000000000000000000000000000000900460ff16611f40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff163314611fc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b6103e881111561202d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f54726561737572792066656520746f6f2068696768000000000000000000000060448201526064016109b0565b6008819055600a546040518281527fb1c4ee38d35556741133da7ff9b6f7ab0fa88d0406133126ff128f635490a85790602001611cac565b60005474010000000000000000000000000000000000000000900460ff166120e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff16331461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b73ffffffffffffffffffffffffffffffffffffffff81166121e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f43616e6e6f74206265207a65726f20616464726573730000000000000000000060448201526064016109b0565b6000600b55600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117909155604080517ffeaf968c000000000000000000000000000000000000000000000000000000008152905163feaf968c9160048082019260a092909190829003018186803b15801561227e57600080fd5b505afa158015612292573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b69190615162565b505060405173ffffffffffffffffffffffffffffffffffffffff851681527fb3eacd0e351fafdfefdec84e1cd19679b38dbcd63ea7c2c24da17fd2bc3b3c0e93506020019150611e249050565b60005474010000000000000000000000000000000000000000900460ff1615612388576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b60045473ffffffffffffffffffffffffffffffffffffffff163314612409576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f74206f70657261746f72000000000000000000000000000000000000000060448201526064016109b0565b6002547501000000000000000000000000000000000000000000900460ff16801561244e575060025474010000000000000000000000000000000000000000900460ff165b612500576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604660248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e6420616e642067656e657369734c6f636b526f756e642069732074726960648201527f6767657265640000000000000000000000000000000000000000000000000000608482015260a4016109b0565b60008061250b6140ba565b915091508169ffffffffffffffffffff16600b8190555061253b600a548369ffffffffffffffffffff16836142b4565b6125606001600a5461254d91906153ad565b8369ffffffffffffffffffff168361450d565b6125776001600a5461257291906153ad565b61477a565b600a5461258590600161531f565b600a81905561259390614954565b5050565b6000828152600d6020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152808220815160608101909252805483929190829060ff166001811115612613577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600181111561264b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260018281015460208084019190915260029384015460ff908116151560409485015260008a8152600e835284902084516101c08101865281548152938101549284019290925293810154928201929092526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d909101549091161580156101a08301819052929350909161272c57508160400151155b801561274857506005548160600151612745919061531f565b42115b80156127575750602082015115155b925050505b92915050565b60005474010000000000000000000000000000000000000000900460ff16156127e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff16331480612824575060045473ffffffffffffffffffffffffffffffffffffffff1633145b61288a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4e6f74206f70657261746f722f61646d696e000000000000000000000000000060448201526064016109b0565b612892614b69565b600a546040517f68b095021b1f40fe513109f513c66692f0b3219aee674a69f4efc57badb8201d90600090a2565b60005474010000000000000000000000000000000000000000900460ff16612944576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff1633146129c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b808210612a54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f6275666665725365636f6e6473206d75737420626520696e666572696f72207460448201527f6f20696e74657276616c5365636f6e647300000000000000000000000000000060648201526084016109b0565b6005829055600681905560408051838152602081018390527fe60149e0431fec12df63dfab5fce2a9cefe9a4d3df5f41cb626f579ae1f2b91a910160405180910390a15050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600f602052604081205460609182918490612ad39087906153ad565b811115612b0e5773ffffffffffffffffffffffffffffffffffffffff87166000908152600f6020526040902054612b0b9087906153ad565b90505b60008167ffffffffffffffff811115612b50577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015612b79578160200160208202803683370190505b50905060008267ffffffffffffffff811115612bbe577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015612c2757816020015b60408051606081018252600080825260208083018290529282015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181612bdc5790505b50905060005b83811015612e5d5773ffffffffffffffffffffffffffffffffffffffff8a166000908152600f60205260409020612c64828b61531f565b81548110612c9b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200154838281518110612cdf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001018181525050600d6000848381518110612d28577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020908102919091018101518252818101929092526040908101600090812073ffffffffffffffffffffffffffffffffffffffff8e168252909252908190208151606081019092528054829060ff166001811115612daf577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6001811115612de7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81526001820154602082015260029091015460ff1615156040909101528251839083908110612e3f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101819052508080612e55906153f4565b915050612c2d565b508181612e6a858b61531f565b95509550955050505093509350939050565b6000828152600d6020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152808220815160608101909252805483929190829060ff166001811115612ef8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6001811115612f30577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260018281015460208084019190915260029384015460ff908116151560409485015260008a8152600e835284902084516101c081018652815481529381015492840192909252938101549282019290925260038201546060820152600482015460808201819052600583015460a08301819052600684015460c0840152600784015460e084015260088401546101008401526009840154610120840152600a840154610140840152600b840154610160840152600c840154610180840152600d9093015490931615156101a082015292935014156130155760009250505061275c565b806101a00151801561302a5750602082015115155b801561303857508160400151155b8015612757575080608001518160a0015113801561308f575060008251600181111561308d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b145b80612757575080608001518160a0015112801561275757506001825160018111156130e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1495945050505050565b60005474010000000000000000000000000000000000000000900460ff1615613172576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b600260015414156131df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109b0565b6002600155333b1561324d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f436f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016109b0565b3332146132b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f50726f787920636f6e7472616374206e6f7420616c6c6f77656400000000000060448201526064016109b0565b600a548114613321576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f42657420697320746f6f206561726c792f6c617465000000000000000000000060448201526064016109b0565b61332a81613fda565b613390576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f526f756e64206e6f74206265747461626c65000000000000000000000000000060448201526064016109b0565b600754341015613422576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f42657420616d6f756e74206d7573742062652067726561746572207468616e2060448201527f6d696e426574416d6f756e74000000000000000000000000000000000000000060648201526084016109b0565b6000818152600d60209081526040808320338452909152902060010154156134a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f43616e206f6e6c7920626574206f6e63652070657220726f756e64000000000060448201526064016109b0565b6000818152600e6020526040902060088101543491906134c790839061531f565b6008820155600a8101546134dc90839061531f565b600a8201556000838152600d602090815260408083203380855290835281842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081178255808201889055600f855283862080549182018155865294849020909401879055905185815286927f0d8c1fe3e67ab767116a81f122b83c2557a8c2564019cb7c4f83de1aeb1f1f0d91016112bc565b60005473ffffffffffffffffffffffffffffffffffffffff1633146135f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b0565b61361873ffffffffffffffffffffffffffffffffffffffff83163383614c55565b8173ffffffffffffffffffffffffffffffffffffffff167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e988260405161366091815260200190565b60405180910390a25050565b60035473ffffffffffffffffffffffffffffffffffffffff1633146136ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b73ffffffffffffffffffffffffffffffffffffffff811661376a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f43616e6e6f74206265207a65726f20616464726573730000000000000000000060448201526064016109b0565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fc47d127c07bdd56c5ccba00463ce3bd3c1bca71b4670eea6e5d0c02e4aa156e290602001611e24565b60005474010000000000000000000000000000000000000000900460ff16613861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b60035473ffffffffffffffffffffffffffffffffffffffff1633146138e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742061646d696e000000000000000000000000000000000000000000000060448201526064016109b0565b600c8190556040518181527f93ccaceac092ffb842c46b8718667a13a80e9058dcd0bd403d0b47215b30da0790602001611e24565b60005474010000000000000000000000000000000000000000900460ff161561399c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b60045473ffffffffffffffffffffffffffffffffffffffff163314613a1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f74206f70657261746f72000000000000000000000000000000000000000060448201526064016109b0565b6002547501000000000000000000000000000000000000000000900460ff16613ac8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e642069732074726967676572656400000000000000000000000000000060648201526084016109b0565b60025474010000000000000000000000000000000000000000900460ff1615613b73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f43616e206f6e6c792072756e2067656e657369734c6f636b526f756e64206f6e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016109b0565b600080613b7e6140ba565b915091508169ffffffffffffffffffff16600b81905550613bae600a548369ffffffffffffffffffff16836142b4565b600a54613bbc90600161531f565b600a819055613bca90613f5c565b5050600280547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b600f6020528160005260406000208181548110613c2957600080fd5b90600052602060002001600091509150505481565b60005473ffffffffffffffffffffffffffffffffffffffff163314613cbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109b0565b73ffffffffffffffffffffffffffffffffffffffff8116613d62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109b0565b613d6b81614045565b50565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114613dc8576040519150601f19603f3d011682016040523d82523d6000602084013e613dcd565b606091505b5050905080613e5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5472616e7366657248656c7065723a20424e425f5452414e534645525f46414960448201527f4c4544000000000000000000000000000000000000000000000000000000000060648201526084016109b0565b505050565b60005474010000000000000000000000000000000000000000900460ff16613ee7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016109b0565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6000818152600e602052604090204260018201819055600654613f7e9161531f565b600280830191909155600654613f9391615370565b613f9d904261531f565b600382015581815560006008820181905560405183917f939f42374aa9bf1d8d8cd56d8a9110cb040cd8dfeae44080c6fcf2645e51b45291a25050565b6000818152600e60205260408120600101541580159061400a57506000828152600e602052604090206002015415155b801561402657506000828152600e602052604090206001015442115b801561275c5750506000908152600e6020526040902060020154421090565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000600c54426140cd919061531f565b90506000806000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561413c57600080fd5b505afa158015614150573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141749190615162565b50935050925092508381111561420c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4f7261636c6520757064617465206578636565646564206d61782074696d657360448201527f74616d7020616c6c6f77616e636500000000000000000000000000000000000060648201526084016109b0565b600b548369ffffffffffffffffffff16116142a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4f7261636c652075706461746520726f756e644964206d757374206265206c6160448201527f72676572207468616e206f7261636c654c6174657374526f756e64496400000060648201526084016109b0565b509094909350915050565b6000838152600e6020526040902060010154614352576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f43616e206f6e6c79206c6f636b20726f756e6420616674657220726f756e642060448201527f686173207374617274656400000000000000000000000000000000000000000060648201526084016109b0565b6000838152600e60205260409020600201544210156143f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f43616e206f6e6c79206c6f636b20726f756e64206166746572206c6f636b546960448201527f6d657374616d700000000000000000000000000000000000000000000000000060648201526084016109b0565b6005546000848152600e6020526040902060020154614412919061531f565b4211156144a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f43616e206f6e6c79206c6f636b20726f756e642077697468696e20627566666560448201527f725365636f6e647300000000000000000000000000000000000000000000000060648201526084016109b0565b6000838152600e602052604090206006546144bc904261531f565b60038201556004810182905560068101839055604051828152839085907f482e76a65b448a42deef26e99e58fb20c85e26f075defff8df6aa80459b39006906020015b60405180910390a350505050565b6000838152600e60205260409020600201546145ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f43616e206f6e6c7920656e6420726f756e6420616674657220726f756e64206860448201527f6173206c6f636b6564000000000000000000000000000000000000000000000060648201526084016109b0565b6000838152600e602052604090206003015442101561464c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f43616e206f6e6c7920656e6420726f756e6420616674657220636c6f7365546960448201527f6d657374616d700000000000000000000000000000000000000000000000000060648201526084016109b0565b6005546000848152600e602052604090206003015461466b919061531f565b4211156146fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f43616e206f6e6c7920656e6420726f756e642077697468696e2062756666657260448201527f5365636f6e64730000000000000000000000000000000000000000000000000060648201526084016109b0565b6000838152600e6020526040908190206005810183905560078101849055600d810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790559051839085907fb6ff1fe915db84788cbbbc017f0d2bef9485fad9fd0bd8ce9340fde0d8410dd8906144ff9086815260200190565b6000818152600e60205260409020600b01541580156147a857506000818152600e60205260409020600c0154155b61480e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f526577617264732063616c63756c61746564000000000000000000000000000060448201526064016109b0565b6000818152600e602052604081206004810154600582015491929182918291131561488e57600984015492508261484b5783600801549150614877565b600a8401541561487757612710600854856008015461486a9190615370565b6148749190615337565b91505b81846008015461488791906153ad565b90506148e2565b8360040154846005015412156148d557600a8401549250826148b65783600801549150614877565b60098401541561487757612710600854856008015461486a9190615370565b5050506008810154600090815b600b8401839055600c84018190556009805483919060009061490590849061531f565b9091555050604080518481526020810183905290810183905285907f6dfdfcb09c8804d0058826cd2539f1acfbe3cb887c9be03d928035bce0f1a58d9060600160405180910390a25050505050565b6002547501000000000000000000000000000000000000000000900460ff166149ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f43616e206f6e6c792072756e2061667465722067656e6573697353746172745260448201527f6f756e642069732074726967676572656400000000000000000000000000000060648201526084016109b0565b600e6000614a0e6002846153ad565b81526020019081526020016000206003015460001415614ab0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43616e206f6e6c7920737461727420726f756e6420616674657220726f756e6460448201527f206e2d322068617320656e64656400000000000000000000000000000000000060648201526084016109b0565b600e6000614abf6002846153ad565b815260200190815260200160002060030154421015614b60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f43616e206f6e6c79207374617274206e657720726f756e64206166746572207260448201527f6f756e64206e2d3220636c6f736554696d657374616d7000000000000000000060648201526084016109b0565b613d6b81613f5c565b60005474010000000000000000000000000000000000000000900460ff1615614bee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016109b0565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613f323390565b6040805173ffffffffffffffffffffffffffffffffffffffff848116602483015260448083018590528351808403909101815260649092018352602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152613e5e92869291600091614d20918516908490614dca565b805190915015613e5e5780806020019051810190614d3e91906150de565b613e5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016109b0565b6060614dd98484600085614de3565b90505b9392505050565b606082471015614e75576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016109b0565b843b614edd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109b0565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051614f0691906151ec565b60006040518083038185875af1925050503d8060008114614f43576040519150601f19603f3d011682016040523d82523d6000602084013e614f48565b606091505b5091509150614f58828286614f63565b979650505050505050565b60608315614f72575081614ddc565b825115614f825782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b091906152ce565b803573ffffffffffffffffffffffffffffffffffffffff81168114614fda57600080fd5b919050565b805169ffffffffffffffffffff81168114614fda57600080fd5b60006020828403121561500a578081fd5b614ddc82614fb6565b60008060408385031215615025578081fd5b61502e83614fb6565b946020939093013593505050565b600080600060608486031215615050578081fd5b61505984614fb6565b95602085013595506040909401359392505050565b60008060208385031215615080578182fd5b823567ffffffffffffffff80821115615097578384fd5b818501915085601f8301126150aa578384fd5b8135818111156150b8578485fd5b8660208260051b85010111156150cc578485fd5b60209290920196919550909350505050565b6000602082840312156150ef578081fd5b81518015158114614ddc578182fd5b60006020828403121561510f578081fd5b5035919050565b60008060408385031215615128578182fd5b8235915061513860208401614fb6565b90509250929050565b60008060408385031215615153578182fd5b50508035926020909101359150565b600080600080600060a08688031215615179578081fd5b61518286614fdf565b94506020860151935060408601519250606086015191506151a560808701614fdf565b90509295509295909350565b600281106151e8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b600082516151fe8184602087016153c4565b9190910192915050565b60608082528451828201819052600091906020906080850190828901855b8281101561524257815184529284019290840190600101615226565b50505084810382860152865180825287830191830190855b8181101561529357835161526f8482516151b1565b8086015184870152604090810151151590840152928401929185019160010161525a565b505080945050505050826040830152949350505050565b606081016152b882866151b1565b8360208301528215156040830152949350505050565b60208152600082518060208401526152ed8160408501602087016153c4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600082198211156153325761533261542d565b500190565b60008261536b577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156153a8576153a861542d565b500290565b6000828210156153bf576153bf61542d565b500390565b60005b838110156153df5781810151838201526020016153c7565b838111156153ee576000848401525b50505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156154265761542661542d565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220ee3b14de1e24e3e45e06bb7f2209e3a4248e769c6035f732a1b9a76fa0046beb64736f6c63430008040033

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

000000000000000000000000a2fc84417d605fc78bc77ba0c7cd071590360409000000000000000000000000d7878bdcb6aae569dcd19bda1b29ca3ae4516e04000000000000000000000000ab8b61d63fb11973edcfe461b2400cd468e314aa000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000002540be400000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000000012c

-----Decoded View---------------
Arg [0] : _oracleAddress (address): 0xa2fc84417d605fC78bC77ba0C7cd071590360409
Arg [1] : _adminAddress (address): 0xD7878BdCB6aAe569dCD19BDa1b29ca3aE4516e04
Arg [2] : _operatorAddress (address): 0xAB8b61D63fB11973eDcfe461B2400CD468E314aa
Arg [3] : _intervalSeconds (uint256): 300
Arg [4] : _bufferSeconds (uint256): 30
Arg [5] : _minBetAmount (uint256): 10000000000
Arg [6] : _oracleUpdateAllowance (uint256): 300
Arg [7] : _treasuryFee (uint256): 300

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000a2fc84417d605fc78bc77ba0c7cd071590360409
Arg [1] : 000000000000000000000000d7878bdcb6aae569dcd19bda1b29ca3ae4516e04
Arg [2] : 000000000000000000000000ab8b61d63fb11973edcfe461b2400cd468e314aa
Arg [3] : 000000000000000000000000000000000000000000000000000000000000012c
Arg [4] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [5] : 00000000000000000000000000000000000000000000000000000002540be400
Arg [6] : 000000000000000000000000000000000000000000000000000000000000012c
Arg [7] : 000000000000000000000000000000000000000000000000000000000000012c


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.