Contract 0x307Bb1b395e411Be31C985C146F3EB00F0fab4Ff

  Note: Our ETH balance display is temporarily unavailable. Please check back later.

Contract Overview

Balance:
Txn Hash Method
Block
From
To
Value
0x5caf4ba0dc57ede008c4ee5237e88d065494c24b5ab079acb78ec3139ff5e5d30x608060408193212022-09-02 10:36:45630 days 2 hrs ago0x3363e40cd9ed1bfc82dfa42e059d82570dd8651d IN  Create: ExoticPositionalOpenBidMarket0 ETH0.0000000510380.00001
[ Download CSV Export 
Latest 12 internal transactions
Parent Txn Hash Block From To Value
0x4397953950304aea4ce5e35c2df106d3dba6b705e6012541c3da90224a6332c311275552022-09-15 11:31:05617 days 1 hr ago 0x7ba8900d53c8ba8fefd4937615f74f04492a378e 0x307bb1b395e411be31c985c146f3eb00f0fab4ff0 ETH
0x4397953950304aea4ce5e35c2df106d3dba6b705e6012541c3da90224a6332c311275552022-09-15 11:31:05617 days 1 hr ago 0x7ba8900d53c8ba8fefd4937615f74f04492a378e 0x307bb1b395e411be31c985c146f3eb00f0fab4ff0 ETH
0x55ceb2bf3e853db3cf0212d41d73ea393242ad717d02d79ae3759b5d74d453fc11029892022-09-14 15:02:13617 days 21 hrs ago 0x7ba8900d53c8ba8fefd4937615f74f04492a378e 0x307bb1b395e411be31c985c146f3eb00f0fab4ff0 ETH
0xe0373ff5aacbbe11ecc4c67feda4ff3296a1067b20ecd37135a9f41dc2d48c0610984812022-09-14 11:33:57618 days 1 hr ago 0x7ba8900d53c8ba8fefd4937615f74f04492a378e 0x307bb1b395e411be31c985c146f3eb00f0fab4ff0 ETH
0xe0373ff5aacbbe11ecc4c67feda4ff3296a1067b20ecd37135a9f41dc2d48c0610984812022-09-14 11:33:57618 days 1 hr ago 0x7ba8900d53c8ba8fefd4937615f74f04492a378e 0x307bb1b395e411be31c985c146f3eb00f0fab4ff0 ETH
0x96aa9f4265d64f828079271dc67657fae5fab8de5d53fe5be72295bda059d80b10752652022-09-13 18:22:47618 days 18 hrs ago 0x7ba8900d53c8ba8fefd4937615f74f04492a378e 0x307bb1b395e411be31c985c146f3eb00f0fab4ff0 ETH
0xf984fbc9ddfa3fd053f38178ba837811cba651ff7ba64518b555b2817e90a30910751212022-09-13 18:13:10618 days 18 hrs ago 0x7ba8900d53c8ba8fefd4937615f74f04492a378e 0x307bb1b395e411be31c985c146f3eb00f0fab4ff0 ETH
0x42960926fb41ab476c91c79c92443811563f0cf95764ea29534cbdef18d65cb510750652022-09-13 18:10:38618 days 18 hrs ago 0x7ba8900d53c8ba8fefd4937615f74f04492a378e 0x307bb1b395e411be31c985c146f3eb00f0fab4ff0 ETH
0x1a2cb86a61c2b14e1ce06a3565f12f594fe1e91f2ecdf9076067a1ffdb9e28a510748472022-09-13 17:57:45618 days 18 hrs ago 0x7ba8900d53c8ba8fefd4937615f74f04492a378e 0x307bb1b395e411be31c985c146f3eb00f0fab4ff0 ETH
0x8154fc4e7aedf53bcf019a0c77cf2fbcb6c8d8a347d4da547ff0739edff9a21710748402022-09-13 17:57:27618 days 18 hrs ago 0x7ba8900d53c8ba8fefd4937615f74f04492a378e 0x307bb1b395e411be31c985c146f3eb00f0fab4ff0 ETH
0xdf19cdaf611d79fed6e7381f47f61394aef19c60f8a6f2b9c5dfc002e3c88db810748332022-09-13 17:57:12618 days 18 hrs ago 0x7ba8900d53c8ba8fefd4937615f74f04492a378e 0x307bb1b395e411be31c985c146f3eb00f0fab4ff0 ETH
0xdf19cdaf611d79fed6e7381f47f61394aef19c60f8a6f2b9c5dfc002e3c88db810748332022-09-13 17:57:12618 days 18 hrs ago 0x7ba8900d53c8ba8fefd4937615f74f04492a378e 0x307bb1b395e411be31c985c146f3eb00f0fab4ff0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ExoticPositionalOpenBidMarket

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : ExoticPositionalOpenBidMarket.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-4.4.1/utils/math/SafeMath.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "../utils/proxy/solidity-0.8.0/ProxyOwned.sol";
import "./OraclePausable.sol";
import "@openzeppelin/contracts-4.4.1/token/ERC20/utils/SafeERC20.sol";
import "../utils/proxy/solidity-0.8.0/ProxyReentrancyGuard.sol";
import "../interfaces/IExoticPositionalMarketManager.sol";
import "../interfaces/IThalesBonds.sol";

contract ExoticPositionalOpenBidMarket is Initializable, ProxyOwned, OraclePausable, ProxyReentrancyGuard {
    using SafeMath for uint;
    using SafeERC20 for IERC20;

    enum TicketType {
        FIXED_TICKET_PRICE,
        FLEXIBLE_BID
    }
    uint private constant HUNDRED = 100;
    uint private constant ONE_PERCENT = 1e16;
    uint private constant HUNDRED_PERCENT = 1e18;
    uint private constant CANCELED = 0;

    uint public creationTime;
    uint public resolvedTime;
    uint public lastDisputeTime;
    uint public positionCount;
    uint public endOfPositioning;
    uint public marketMaturity;
    uint public fixedTicketPrice;
    uint public backstopTimeout;
    uint public totalUsersTakenPositions;
    uint public totalOpenBidAmount;
    uint public claimableOpenBidAmount;
    uint public winningPosition;
    uint public disputeClosedTime;
    uint public fixedBondAmount;
    uint public disputePrice;
    uint public safeBoxLowAmount;
    uint public arbitraryRewardForDisputor;
    uint public withdrawalPeriod;
    uint public maxAmountForOpenBidPosition;
    uint public maxWithdrawPercentage;
    uint public minPosAmount;

    bool public noWinners;
    bool public disputed;
    bool public resolved;
    bool public disputedInPositioningPhase;
    bool public feesAndBondsClaimed;
    bool public withdrawalAllowed;

    address public resolverAddress;
    TicketType public ticketType;
    IExoticPositionalMarketManager public marketManager;
    IThalesBonds public thalesBonds;

    mapping(address => uint) public totalUserPlacedAmount;
    mapping(address => mapping(uint => uint)) public userOpenBidPosition;
    mapping(address => uint) public userAlreadyClaimed;
    mapping(uint => uint) public totalOpenBidAmountPerPosition;
    mapping(uint => string) public positionPhrase;
    mapping(address => bool) public withrawalRestrictedForUser;
    uint[] public tags;
    string public marketQuestion;
    string public marketSource;
    string public additionalInfo;

    function initialize(
        string memory _marketQuestion,
        string memory _marketSource,
        string memory _additionalInfo,
        uint _endOfPositioning,
        uint _fixedTicketPrice,
        bool _withdrawalAllowed,
        uint[] memory _tags,
        uint _positionCount,
        string[] memory _positionPhrases
    ) external initializer {
        require(
            _positionCount >= 2 && _positionCount <= IExoticPositionalMarketManager(msg.sender).maximumPositionsAllowed(),
            "Invalid num pos"
        );
        require(_tags.length > 0);
        setOwner(msg.sender);
        marketManager = IExoticPositionalMarketManager(msg.sender);
        thalesBonds = IThalesBonds(marketManager.thalesBonds());
        _initializeWithTwoParameters(
            _marketQuestion,
            _marketSource,
            _endOfPositioning,
            _fixedTicketPrice,
            _withdrawalAllowed,
            _tags,
            _positionPhrases[0],
            _positionPhrases[1]
        );
        if (_positionCount > 2) {
            for (uint i = 2; i < _positionCount; i++) {
                _addPosition(_positionPhrases[i]);
            }
        }
        additionalInfo = _additionalInfo;
        maxAmountForOpenBidPosition = marketManager.maxAmountForOpenBidPosition();
        maxWithdrawPercentage = marketManager.maxFinalWithdrawPercentage();
        fixedBondAmount = marketManager.fixedBondAmount();
        disputePrice = marketManager.disputePrice();
        safeBoxLowAmount = marketManager.safeBoxLowAmount();
        arbitraryRewardForDisputor = marketManager.arbitraryRewardForDisputor();
        withdrawalPeriod = _endOfPositioning.sub(marketManager.withdrawalTimePeriod());
        minPosAmount = marketManager.minFixedTicketPrice();
    }

    function takeCreatorInitialOpenBidPositions(uint[] memory _positions, uint[] memory _amounts) external onlyOwner {
        require(_positions.length > 0 && _positions.length <= positionCount, "Invalid posNum");
        require(ticketType == TicketType.FLEXIBLE_BID, "Not OpenBid");
        uint totalDepositedAmount = 0;
        address creator = marketManager.creatorAddress(address(this));
        for (uint i = 0; i < _positions.length; i++) {
            require(_positions[i] > 0 && _positions[i] <= positionCount, "Value invalid");
            require(
                _amounts[i] == 0 || (_amounts[i] >= minPosAmount && _amounts[i] <= maxAmountForOpenBidPosition),
                "Amounts exceed"
            );

            totalOpenBidAmountPerPosition[_positions[i]] = totalOpenBidAmountPerPosition[_positions[i]].add(_amounts[i]);
            userOpenBidPosition[creator][_positions[i]] = userOpenBidPosition[creator][_positions[i]].add(_amounts[i]);
            totalDepositedAmount = totalDepositedAmount.add(_amounts[i]);
        }
        require(
            totalUserPlacedAmount[creator].add(totalDepositedAmount) >= minPosAmount &&
                totalUserPlacedAmount[creator].add(totalDepositedAmount) <= maxAmountForOpenBidPosition,
            "Amounts exceed"
        );
        totalOpenBidAmount = totalOpenBidAmount.add(totalDepositedAmount);
        totalUserPlacedAmount[creator] = totalUserPlacedAmount[creator].add(totalDepositedAmount);
        totalUsersTakenPositions = totalUsersTakenPositions.add(1);
        IThalesBonds(marketManager.thalesBonds()).transferToMarket(creator, totalDepositedAmount);
        emit NewOpenBidsForPositions(creator, _positions, _amounts);
    }

    function takeOpenBidPositions(
        uint[] memory _positions,
        uint[] memory _amounts,
        address collateral,
        uint expectedPayout,
        uint additionalSlippage
    ) external notPaused nonReentrant {
        require(_positions.length > 0 && _positions.length <= positionCount, "Invalid posNum");
        require(canUsersPlacePosition(), "Market resolved");
        require(ticketType == TicketType.FLEXIBLE_BID, "Not OpenBid");
        if (block.timestamp.add(1 days) > endOfPositioning) {
            if (totalUserPlacedAmount[msg.sender] > 0) {
                require(
                    totalUserPlacedAmount[msg.sender] <=
                        totalOpenBidAmount.mul(maxWithdrawPercentage.mul(ONE_PERCENT)).div(HUNDRED_PERCENT),
                    "Exceeds reposition"
                );
            }
        }
        uint totalDepositedAmount = 0;
        bool firstTime = true;
        for (uint i = 0; i < _positions.length; i++) {
            require(_positions[i] > 0 && _positions[i] <= positionCount, "Position value invalid");
            require(
                _amounts[i] == 0 || (_amounts[i] >= minPosAmount && _amounts[i] <= maxAmountForOpenBidPosition),
                "Amounts exceed"
            );
            if (userOpenBidPosition[msg.sender][_positions[i]] > 0) {
                totalOpenBidAmountPerPosition[_positions[i]] = totalOpenBidAmountPerPosition[_positions[i]].sub(
                    userOpenBidPosition[msg.sender][_positions[i]]
                );
                firstTime = false;
            }
            totalOpenBidAmountPerPosition[_positions[i]] = totalOpenBidAmountPerPosition[_positions[i]].add(_amounts[i]);
            userOpenBidPosition[msg.sender][_positions[i]] = _amounts[i];
            totalDepositedAmount = totalDepositedAmount.add(_amounts[i]);
        }
        require(
            totalDepositedAmount >= minPosAmount && totalDepositedAmount >= totalUserPlacedAmount[msg.sender],
            "Bellow init amounts"
        );
        uint amountToBeAdded = totalDepositedAmount.sub(totalUserPlacedAmount[msg.sender]);
        require(amountToBeAdded <= maxAmountForOpenBidPosition, "Amounts exceed");
        if (amountToBeAdded > 0) {
            totalOpenBidAmount = totalOpenBidAmount.add(amountToBeAdded);
            totalUserPlacedAmount[msg.sender] = totalUserPlacedAmount[msg.sender].add(amountToBeAdded);
            totalUsersTakenPositions = firstTime ? totalUsersTakenPositions.add(1) : totalUsersTakenPositions;
            transferToMarket(msg.sender, amountToBeAdded, collateral, expectedPayout, additionalSlippage);
        }
        emit NewOpenBidsForPositions(msg.sender, _positions, _amounts);
    }

    function withdraw(uint _openBidPosition) external notPaused nonReentrant {
        require(withdrawalAllowed && canUsersPlacePosition() && block.timestamp <= withdrawalPeriod, "Not allowed");
        address creator = marketManager.creatorAddress(address(this));
        require(msg.sender != creator, "Creator forbidden");
        uint totalToWithdraw;
        if (_openBidPosition == 0) {
            for (uint i = 1; i <= positionCount; i++) {
                if (userOpenBidPosition[msg.sender][i] > 0) {
                    totalToWithdraw = totalToWithdraw.add(userOpenBidPosition[msg.sender][i]);
                    totalOpenBidAmountPerPosition[i] = totalOpenBidAmountPerPosition[i].sub(
                        userOpenBidPosition[msg.sender][i]
                    );
                    userOpenBidPosition[msg.sender][i] = 0;
                }
            }
        } else {
            require(userOpenBidPosition[msg.sender][_openBidPosition] > 0, "No amount for position");
            totalOpenBidAmountPerPosition[_openBidPosition] = totalOpenBidAmountPerPosition[_openBidPosition].sub(
                userOpenBidPosition[msg.sender][_openBidPosition]
            );
            totalToWithdraw = userOpenBidPosition[msg.sender][_openBidPosition];
            userOpenBidPosition[msg.sender][_openBidPosition] = 0;
        }
        if (block.timestamp.add(1 days) > endOfPositioning && block.timestamp <= endOfPositioning) {
            require(!withrawalRestrictedForUser[msg.sender], "Already withdrawn");
            require(
                totalToWithdraw <= totalOpenBidAmount.mul(maxWithdrawPercentage.mul(ONE_PERCENT)).div(HUNDRED_PERCENT),
                "Exceeds withdraw limit"
            );
            withrawalRestrictedForUser[msg.sender] = true;
        }
        if (getUserOpenBidTotalPlacedAmount(msg.sender) == 0) {
            totalUsersTakenPositions = totalUsersTakenPositions.sub(1);
        }
        totalOpenBidAmount = totalOpenBidAmount.sub(totalToWithdraw);
        totalUserPlacedAmount[msg.sender] = totalUserPlacedAmount[msg.sender].sub(totalToWithdraw);
        uint withdrawalFee = totalToWithdraw.mul(marketManager.withdrawalPercentage()).mul(ONE_PERCENT).div(HUNDRED_PERCENT);
        thalesBonds.transferFromMarket(marketManager.safeBoxAddress(), withdrawalFee.div(2));
        thalesBonds.transferFromMarket(creator, withdrawalFee.div(2));
        thalesBonds.transferFromMarket(msg.sender, totalToWithdraw.sub(withdrawalFee));
        emit OpenBidUserWithdrawn(msg.sender, _openBidPosition, totalToWithdraw.sub(withdrawalFee), totalOpenBidAmount);
    }

    function resolveMarket(uint _outcomePosition, address _resolverAddress) external onlyOwner {
        require(canMarketBeResolvedByOwner(), "Disputed/not matured");
        require(_outcomePosition <= positionCount, "Outcome exeeds positionNum");
        winningPosition = _outcomePosition;
        if (_outcomePosition == CANCELED) {
            claimableOpenBidAmount = totalOpenBidAmount;
            totalOpenBidAmountPerPosition[_outcomePosition] = totalOpenBidAmount;
        } else {
            claimableOpenBidAmount = getTotalClaimableAmount();
            if (totalOpenBidAmountPerPosition[_outcomePosition] == 0) {
                noWinners = true;
            } else {
                noWinners = false;
            }
        }
        resolved = true;
        resolvedTime = block.timestamp;
        resolverAddress = _resolverAddress;
        emit MarketResolved(_outcomePosition, _resolverAddress, noWinners);
    }

    function resetMarket() external onlyOwner {
        require(resolved, "Market is not resolved");
        if (winningPosition == CANCELED) {
            totalOpenBidAmountPerPosition[winningPosition] = 0;
        }
        winningPosition = 0;
        claimableOpenBidAmount = 0;
        resolved = false;
        noWinners = false;
        resolvedTime = 0;
        resolverAddress = marketManager.safeBoxAddress();
        emit MarketReset();
    }

    function cancelMarket() external onlyOwner {
        winningPosition = CANCELED;
        claimableOpenBidAmount = totalOpenBidAmount;
        totalOpenBidAmountPerPosition[winningPosition] = totalOpenBidAmount;
        resolved = true;
        resolvedTime = block.timestamp;
        resolverAddress = marketManager.safeBoxAddress();
        emit MarketResolved(CANCELED, msg.sender, noWinners);
    }

    function claimWinningTicket() external notPaused nonReentrant {
        require(canUsersClaim(), "Market not finalized");
        uint amount = getUserClaimableAmount(msg.sender);
        require(amount > 0, "Claimable amount is zero.");
        claimableOpenBidAmount = claimableOpenBidAmount.sub(amount);
        resetForUserAllPositionsToZero(msg.sender);
        thalesBonds.transferFromMarket(msg.sender, amount);
        if (!feesAndBondsClaimed) {
            _issueFees();
        }
        userAlreadyClaimed[msg.sender] = userAlreadyClaimed[msg.sender].add(amount);
        emit WinningOpenBidAmountClaimed(msg.sender, amount);
    }

    function claimWinningTicketOnBehalf(address _user) external onlyOwner {
        require(canUsersClaim() || marketManager.cancelledByCreator(address(this)), "Market not finalized");
        uint amount = getUserClaimableAmount(_user);
        require(amount > 0, "Claimable amount is zero.");
        claimableOpenBidAmount = claimableOpenBidAmount.sub(amount);
        resetForUserAllPositionsToZero(_user);
        thalesBonds.transferFromMarket(_user, amount);
        if (!feesAndBondsClaimed) {
            _issueFees();
        }
        userAlreadyClaimed[msg.sender] = userAlreadyClaimed[msg.sender].add(amount);
        emit WinningOpenBidAmountClaimed(_user, amount);
    }

    function issueFees() external notPaused nonReentrant {
        _issueFees();
    }

    function _issueFees() internal {
        require(canUsersClaim() || marketManager.cancelledByCreator(address(this)), "Not finalized");
        require(!feesAndBondsClaimed, "Fees claimed");
        if (winningPosition != CANCELED) {
            thalesBonds.transferFromMarket(marketManager.creatorAddress(address(this)), getAdditionalCreatorAmount());
            thalesBonds.transferFromMarket(resolverAddress, getAdditionalResolverAmount());
            thalesBonds.transferFromMarket(marketManager.safeBoxAddress(), getSafeBoxAmount());
        }
        marketManager.issueBondsBackToCreatorAndResolver(address(this));
        feesAndBondsClaimed = true;
        emit FeesIssued(getTotalFeesAmount());
    }

    function openDispute() external onlyOwner {
        require(isMarketCreated(), "Market not created");
        require(!disputed, "Market already disputed");
        disputed = true;
        disputedInPositioningPhase = canUsersPlacePosition();
        lastDisputeTime = block.timestamp;
        emit MarketDisputed(true);
    }

    function closeDispute() external onlyOwner {
        require(disputed, "Market not disputed");
        disputeClosedTime = block.timestamp;
        if (disputedInPositioningPhase) {
            disputed = false;
            disputedInPositioningPhase = false;
        } else {
            disputed = false;
        }
        emit MarketDisputed(false);
    }

    function transferToMarket(
        address _sender,
        uint _amount,
        address collateral,
        uint expectedPayout,
        uint additionalSlippage
    ) internal notPaused {
        require(_sender != address(0), "Invalid sender address");
        IThalesBonds(marketManager.thalesBonds()).transferToMarket(
            _sender,
            _amount,
            collateral,
            expectedPayout,
            additionalSlippage
        );
    }

    // SETTERS ///////////////////////////////////////////////////////

    function setBackstopTimeout(uint _timeoutPeriod) external onlyOwner {
        backstopTimeout = _timeoutPeriod;
        emit BackstopTimeoutPeriodChanged(_timeoutPeriod);
    }

    // VIEWS /////////////////////////////////////////////////////////

    function isMarketCreated() public view returns (bool) {
        return creationTime > 0;
    }

    function isMarketCancelled() public view returns (bool) {
        return resolved && winningPosition == CANCELED;
    }

    function canUsersPlacePosition() public view returns (bool) {
        return block.timestamp <= endOfPositioning && creationTime > 0 && !resolved;
    }

    function canMarketBeResolved() public view returns (bool) {
        return block.timestamp >= endOfPositioning && creationTime > 0 && (!disputed) && !resolved;
    }

    function canMarketBeResolvedByOwner() public view returns (bool) {
        return block.timestamp >= endOfPositioning && creationTime > 0 && (!disputed);
    }

    function canMarketBeResolvedByPDAO() public view returns (bool) {
        return
            canMarketBeResolvedByOwner() && block.timestamp >= endOfPositioning.add(marketManager.pDAOResolveTimePeriod());
    }

    function canCreatorCancelMarket() external view returns (bool result) {
        if (!disputed && totalUsersTakenPositions == 1) {
            result = true;
        }
    }

    function canUsersClaim() public view returns (bool) {
        return
            resolved &&
            (!disputed) &&
            ((resolvedTime > 0 && block.timestamp > resolvedTime.add(marketManager.claimTimeoutDefaultPeriod())) ||
                (backstopTimeout > 0 &&
                    resolvedTime > 0 &&
                    disputeClosedTime > 0 &&
                    block.timestamp > disputeClosedTime.add(backstopTimeout)));
    }

    function canUserClaim(address _user) external view returns (bool) {
        return canUsersClaim() && getUserClaimableAmount(_user) > 0;
    }

    function canUserWithdraw(address _account) public view returns (bool) {
        if (_account == marketManager.creatorAddress(address(this))) {
            return false;
        }
        return
            withdrawalAllowed &&
            canUsersPlacePosition() &&
            getUserOpenBidTotalPlacedAmount(_account) > 0 &&
            !withrawalRestrictedForUser[_account] &&
            block.timestamp <= withdrawalPeriod;
    }

    function canIssueFees() external view returns (bool) {
        return
            !feesAndBondsClaimed &&
            (thalesBonds.getCreatorBondForMarket(address(this)) > 0 ||
                thalesBonds.getResolverBondForMarket(address(this)) > 0);
    }

    function getPositionPhrase(uint index) public view returns (string memory) {
        return (index <= positionCount && index > 0) ? positionPhrase[index] : string("");
    }

    function getTotalPlacedAmount() public view returns (uint) {
        return totalOpenBidAmount;
    }

    function getTotalClaimableAmount() public view returns (uint) {
        if (totalUsersTakenPositions == 0) {
            return 0;
        } else {
            return winningPosition == CANCELED ? getTotalPlacedAmount() : applyDeduction(getTotalPlacedAmount());
        }
    }

    function getTotalFeesAmount() public view returns (uint) {
        return getTotalPlacedAmount().sub(getTotalClaimableAmount());
    }

    function getPlacedAmountPerPosition(uint _position) public view returns (uint) {
        return totalOpenBidAmountPerPosition[_position];
    }

    function getUserClaimableAmount(address _account) public view returns (uint) {
        return getUserOpenBidTotalClaimableAmount(_account);
    }

    /// FLEXIBLE BID FUNCTIONS

    function getUserOpenBidTotalPlacedAmount(address _account) public view returns (uint amount) {
        for (uint i = 1; i <= positionCount; i++) {
            amount = amount.add(userOpenBidPosition[_account][i]);
        }
        return amount;
    }

    function getUserOpenBidPositionPlacedAmount(address _account, uint _position) external view returns (uint) {
        return userOpenBidPosition[_account][_position];
    }

    function getAllUserPositions(address _account) external view returns (uint[] memory) {
        uint[] memory userAllPositions = new uint[](positionCount);
        if (positionCount == 0) {
            return userAllPositions;
        }
        for (uint i = 1; i <= positionCount; i++) {
            userAllPositions[i - 1] = userOpenBidPosition[_account][i];
        }
        return userAllPositions;
    }

    function getPotentialOpenBidWinningForAllPositions() external view returns (uint[] memory) {
        uint[] memory potentialWinning = new uint[](positionCount);
        if (totalUsersTakenPositions == 0 || totalOpenBidAmount == 0) {
            return potentialWinning;
        }
        for (uint i = 1; i <= positionCount; i++) {
            if (totalOpenBidAmountPerPosition[i] > 0) {
                potentialWinning[i - 1] = applyDeduction(totalOpenBidAmount).mul(HUNDRED_PERCENT).div(
                    totalOpenBidAmountPerPosition[i]
                );
            }
        }
        return potentialWinning;
    }

    function getUserOpenBidPotentialWinningForPosition(address _account, uint _position) public view returns (uint) {
        if (_position == CANCELED) {
            return getUserOpenBidTotalPlacedAmount(_account);
        }
        return
            totalOpenBidAmountPerPosition[_position] > 0
                ? userOpenBidPosition[_account][_position].mul(getTotalClaimableAmount()).div(
                    totalOpenBidAmountPerPosition[_position]
                )
                : 0;
    }

    function getUserOpenBidTotalClaimableAmount(address _account) public view returns (uint) {
        if (noWinners) {
            return applyDeduction(getUserOpenBidTotalPlacedAmount(_account));
        }
        return getUserOpenBidPotentialWinningForPosition(_account, winningPosition);
    }

    function getUserPotentialWinningAmountForAllPosition(address _account) external view returns (uint[] memory) {
        uint[] memory potentialWinning = new uint[](positionCount);
        for (uint i = 1; i <= positionCount; i++) {
            potentialWinning[i - 1] = getUserOpenBidPotentialWinningForPosition(_account, i);
        }
        return potentialWinning;
    }

    function applyDeduction(uint value) internal view returns (uint) {
        return
            (value)
                .mul(
                    HUNDRED.sub(
                        marketManager.safeBoxPercentage().add(marketManager.creatorPercentage()).add(
                            marketManager.resolverPercentage()
                        )
                    )
                )
                .mul(ONE_PERCENT)
                .div(HUNDRED_PERCENT);
    }

    function getTagsCount() external view returns (uint) {
        return tags.length;
    }

    function getTags() external view returns (uint[] memory) {
        return tags;
    }

    function getTicketType() external view returns (uint) {
        return uint(ticketType);
    }

    function getAllAmounts()
        external
        view
        returns (
            uint,
            uint,
            uint,
            uint
        )
    {
        return (fixedBondAmount, disputePrice, safeBoxLowAmount, arbitraryRewardForDisputor);
    }

    function getAllFees()
        external
        view
        returns (
            uint,
            uint,
            uint,
            uint
        )
    {
        return (getAdditionalCreatorAmount(), getAdditionalResolverAmount(), getSafeBoxAmount(), getTotalFeesAmount());
    }

    function resetForUserAllPositionsToZero(address _account) internal {
        if (positionCount > 0) {
            for (uint i = 1; i <= positionCount; i++) {
                userOpenBidPosition[_account][i] = 0;
            }
        }
    }

    function getAdditionalCreatorAmount() internal view returns (uint) {
        return getTotalPlacedAmount().mul(marketManager.creatorPercentage()).mul(ONE_PERCENT).div(HUNDRED_PERCENT);
    }

    function getAdditionalResolverAmount() internal view returns (uint) {
        return getTotalPlacedAmount().mul(marketManager.resolverPercentage()).mul(ONE_PERCENT).div(HUNDRED_PERCENT);
    }

    function getSafeBoxAmount() internal view returns (uint) {
        return getTotalPlacedAmount().mul(marketManager.safeBoxPercentage()).mul(ONE_PERCENT).div(HUNDRED_PERCENT);
    }

    function _initializeWithTwoParameters(
        string memory _marketQuestion,
        string memory _marketSource,
        uint _endOfPositioning,
        uint _fixedTicketPrice,
        bool _withdrawalAllowed,
        uint[] memory _tags,
        string memory _positionPhrase1,
        string memory _positionPhrase2
    ) internal {
        creationTime = block.timestamp;
        marketQuestion = _marketQuestion;
        marketSource = _marketSource;
        endOfPositioning = _endOfPositioning;
        ticketType = _fixedTicketPrice > 0 ? TicketType.FIXED_TICKET_PRICE : TicketType.FLEXIBLE_BID;
        withdrawalAllowed = _withdrawalAllowed;
        tags = _tags;
        _addPosition(_positionPhrase1);
        _addPosition(_positionPhrase2);
    }

    function _addPosition(string memory _position) internal {
        require(keccak256(abi.encode(_position)) != keccak256(abi.encode("")), "Invalid position label (empty string)");
        positionCount = positionCount.add(1);
        positionPhrase[positionCount] = _position;
    }

    event MarketDisputed(bool disputed);
    event MarketCreated(uint creationTime, uint positionCount, bytes32 phrase);
    event MarketResolved(uint winningPosition, address resolverAddress, bool noWinner);
    event MarketReset();
    event WinningOpenBidAmountClaimed(address account, uint amount);
    event BackstopTimeoutPeriodChanged(uint timeoutPeriod);
    event TicketWithdrawn(address account, uint amount);
    event BondIncreased(uint amount, uint totalAmount);
    event BondDecreased(uint amount, uint totalAmount);
    event NewOpenBidsForPositions(address account, uint[] openBidPositions, uint[] openBidAmounts);
    event OpenBidUserWithdrawn(address account, uint position, uint withdrawnAmount, uint totalOpenBidAmount);
    event FeesIssued(uint totalFees);
}

File 2 of 12 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 3 of 12 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 4 of 12 : ProxyOwned.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// Clone of syntetix contract without constructor
contract ProxyOwned {
    address public owner;
    address public nominatedOwner;
    bool private _initialized;
    bool private _transferredAtInit;

    function setOwner(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        require(!_initialized, "Already initialized, use nominateNewOwner");
        _initialized = true;
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    function transferOwnershipAtInit(address proxyAddress) external onlyOwner {
        require(proxyAddress != address(0), "Invalid address");
        require(!_transferredAtInit, "Already transferred");
        owner = proxyAddress;
        _transferredAtInit = true;
        emit OwnerChanged(owner, proxyAddress);
    }

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

    function _onlyOwner() private view {
        require(msg.sender == owner, "Only the contract owner may perform this action");
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}

File 5 of 12 : OraclePausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// Inheritance
import "../utils/proxy/solidity-0.8.0/ProxyOwned.sol";
import "../interfaces/IExoticPositionalMarketManager.sol";

// Clone of syntetix contract without constructor

contract OraclePausable is ProxyOwned {
    uint public lastPauseTime;
    bool public paused;

    /**
     * @notice Change the paused state of the contract
     * @dev Only the contract owner may call this.
     */
    function setPaused(bool _paused) external pauserOnly {
        // Ensure we're actually changing the state before we do anything
        if (_paused == paused) {
            return;
        }
        if (paused) {
            require(msg.sender == IExoticPositionalMarketManager(owner).owner(), "Only Protocol DAO can unpause");
        }
        // Set our paused state.
        paused = _paused;

        // If applicable, set the last pause time.
        if (paused) {
            lastPauseTime = block.timestamp;
        }

        // Let everyone know that our pause state has changed.
        emit PauseChanged(paused);
    }

    event PauseChanged(bool isPaused);

    modifier notPaused {
        require(!IExoticPositionalMarketManager(owner).paused(), "Manager paused.");
        require(!paused, "Contract is paused");
        _;
    }

    modifier pauserOnly {
        require(
            IExoticPositionalMarketManager(owner).isPauserAddress(msg.sender) ||
                IExoticPositionalMarketManager(owner).owner() == msg.sender ||
                owner == msg.sender,
            "Non-pauser address"
        );
        _;
    }
}

File 6 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

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 12 : ProxyReentrancyGuard.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 aplied 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.
 */
contract ProxyReentrancyGuard {
    /// @dev counter to allow mutex lock with only one SSTORE operation
    uint256 private _guardCounter;
    bool private _initialized;

    function initNonReentrant() public {
        require(!_initialized, "Already initialized");
        _initialized = true;
        _guardCounter = 1;
    }

    /**
     * @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() {
        _guardCounter += 1;
        uint256 localCounter = _guardCounter;
        _;
        require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call");
    }
}

File 8 of 12 : IExoticPositionalMarketManager.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IExoticPositionalMarketManager {
    /* ========== VIEWS / VARIABLES ========== */
    function paused() external view returns (bool);

    function getActiveMarketAddress(uint _index) external view returns (address);

    function getActiveMarketIndex(address _marketAddress) external view returns (uint);

    function isActiveMarket(address _marketAddress) external view returns (bool);

    function numberOfActiveMarkets() external view returns (uint);

    function getMarketBondAmount(address _market) external view returns (uint);

    function maximumPositionsAllowed() external view returns (uint);

    function paymentToken() external view returns (address);

    function owner() external view returns (address);

    function thalesBonds() external view returns (address);

    function oracleCouncilAddress() external view returns (address);

    function safeBoxAddress() external view returns (address);

    function creatorAddress(address _market) external view returns (address);

    function resolverAddress(address _market) external view returns (address);

    function isPauserAddress(address _pauserAddress) external view returns (bool);

    function safeBoxPercentage() external view returns (uint);

    function creatorPercentage() external view returns (uint);

    function resolverPercentage() external view returns (uint);

    function withdrawalPercentage() external view returns (uint);

    function pDAOResolveTimePeriod() external view returns (uint);

    function claimTimeoutDefaultPeriod() external view returns (uint);

    function maxOracleCouncilMembers() external view returns (uint);

    function fixedBondAmount() external view returns (uint);

    function disputePrice() external view returns (uint);

    function safeBoxLowAmount() external view returns (uint);

    function arbitraryRewardForDisputor() external view returns (uint);

    function disputeStringLengthLimit() external view returns (uint);

    function cancelledByCreator(address _market) external view returns (bool);

    function withdrawalTimePeriod() external view returns (uint);

    function maxAmountForOpenBidPosition() external view returns (uint);

    function maxFinalWithdrawPercentage() external view returns (uint);

    function minFixedTicketPrice() external view returns (uint);

    function createExoticMarket(
        string memory _marketQuestion,
        string memory _marketSource,
        uint _endOfPositioning,
        uint _fixedTicketPrice,
        bool _withdrawalAllowed,
        uint[] memory _tags,
        uint _positionCount,
        string[] memory _positionPhrases
    ) external;

    function createCLMarket(
        string memory _marketQuestion,
        string memory _marketSource,
        uint _endOfPositioning,
        uint _fixedTicketPrice,
        bool _withdrawalAllowed,
        uint[] memory _tags,
        uint _positionCount,
        uint[] memory _positionsOfCreator,
        string[] memory _positionPhrases
    ) external;

    function disputeMarket(address _marketAddress, address disputor) external;

    function resolveMarket(address _marketAddress, uint _outcomePosition) external;

    function resetMarket(address _marketAddress) external;

    function cancelMarket(address _market) external;

    function closeDispute(address _market) external;

    function setBackstopTimeout(address _market) external;

    function sendMarketBondAmountTo(
        address _market,
        address _recepient,
        uint _amount
    ) external;

    function addPauserAddress(address _pauserAddress) external;

    function removePauserAddress(address _pauserAddress) external;

    function sendRewardToDisputor(
        address _market,
        address _disputorAddress,
        uint amount
    ) external;

    function issueBondsBackToCreatorAndResolver(address _marketAddress) external;
}

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

pragma solidity ^0.8.0;

interface IThalesBonds {
    /* ========== VIEWS / VARIABLES ========== */
    function getTotalDepositedBondAmountForMarket(address _market) external view returns (uint);

    function getClaimedBondAmountForMarket(address _market) external view returns (uint);

    function getClaimableBondAmountForMarket(address _market) external view returns (uint);

    function getDisputorBondForMarket(address _market, address _disputorAddress) external view returns (uint);

    function getCreatorBondForMarket(address _market) external view returns (uint);

    function getResolverBondForMarket(address _market) external view returns (uint);

    function getCurveQuoteForDifferentCollateral(
        uint amount,
        address collateral,
        bool toSUSD
    ) external view returns (uint);

    function sendCreatorBondToMarket(
        address _market,
        address _creatorAddress,
        uint _amount
    ) external;

    function sendResolverBondToMarket(
        address _market,
        address _resolverAddress,
        uint _amount
    ) external;

    function sendDisputorBondToMarket(
        address _market,
        address _disputorAddress,
        uint _amount
    ) external;

    function sendBondFromMarketToUser(
        address _market,
        address _account,
        uint _amount,
        uint _bondToReduce,
        address _disputorAddress
    ) external;

    function sendOpenDisputeBondFromMarketToDisputor(
        address _market,
        address _account,
        uint _amount
    ) external;

    function setOracleCouncilAddress(address _oracleCouncilAddress) external;

    function setManagerAddress(address _managerAddress) external;

    function setCurveSUSD(
        address _curveSUSD,
        address _dai,
        address _usdc,
        address _usdt,
        bool _curveOnrampEnabled
    ) external;

    function issueBondsBackToCreatorAndResolver(address _market) external;

    function transferToMarket(address _account, uint _amount) external;

    function transferToMarket(
        address _account,
        uint _amount,
        address collateral,
        uint expectedPayout,
        uint additionalSlippage
    ) external;

    function transferFromMarket(address _account, uint _amount) external;

    function transferCreatorToResolverBonds(address _market) external;

    function decreaseCreatorVolume(address _market) external;
}

File 10 of 12 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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 Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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);
            }
        }
    }
}

File 11 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

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 12 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timeoutPeriod","type":"uint256"}],"name":"BackstopTimeoutPeriodChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"BondDecreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"BondIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"totalFees","type":"uint256"}],"name":"FeesIssued","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"creationTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"positionCount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"phrase","type":"bytes32"}],"name":"MarketCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"disputed","type":"bool"}],"name":"MarketDisputed","type":"event"},{"anonymous":false,"inputs":[],"name":"MarketReset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"winningPosition","type":"uint256"},{"indexed":false,"internalType":"address","name":"resolverAddress","type":"address"},{"indexed":false,"internalType":"bool","name":"noWinner","type":"bool"}],"name":"MarketResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"openBidPositions","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"openBidAmounts","type":"uint256[]"}],"name":"NewOpenBidsForPositions","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"position","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"withdrawnAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalOpenBidAmount","type":"uint256"}],"name":"OpenBidUserWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"}],"name":"PauseChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TicketWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WinningOpenBidAmountClaimed","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"additionalInfo","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"arbitraryRewardForDisputor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"backstopTimeout","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canCreatorCancelMarket","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canIssueFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canMarketBeResolved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canMarketBeResolvedByOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canMarketBeResolvedByPDAO","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"canUserClaim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"canUserWithdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canUsersClaim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canUsersPlacePosition","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelMarket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimWinningTicket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"claimWinningTicketOnBehalf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimableOpenBidAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"closeDispute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"creationTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disputeClosedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disputePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disputed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disputedInPositioningPhase","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endOfPositioning","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feesAndBondsClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fixedBondAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fixedTicketPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getAllUserPositions","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_position","type":"uint256"}],"name":"getPlacedAmountPerPosition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getPositionPhrase","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPotentialOpenBidWinningForAllPositions","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTags","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTagsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTicketType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalClaimableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalFeesAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalPlacedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getUserClaimableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_position","type":"uint256"}],"name":"getUserOpenBidPositionPlacedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_position","type":"uint256"}],"name":"getUserOpenBidPotentialWinningForPosition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getUserOpenBidTotalClaimableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getUserOpenBidTotalPlacedAmount","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getUserPotentialWinningAmountForAllPosition","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initNonReentrant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_marketQuestion","type":"string"},{"internalType":"string","name":"_marketSource","type":"string"},{"internalType":"string","name":"_additionalInfo","type":"string"},{"internalType":"uint256","name":"_endOfPositioning","type":"uint256"},{"internalType":"uint256","name":"_fixedTicketPrice","type":"uint256"},{"internalType":"bool","name":"_withdrawalAllowed","type":"bool"},{"internalType":"uint256[]","name":"_tags","type":"uint256[]"},{"internalType":"uint256","name":"_positionCount","type":"uint256"},{"internalType":"string[]","name":"_positionPhrases","type":"string[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isMarketCancelled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMarketCreated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"issueFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastDisputeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPauseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketManager","outputs":[{"internalType":"contract IExoticPositionalMarketManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketMaturity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketQuestion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketSource","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAmountForOpenBidPosition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWithdrawPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minPosAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"noWinners","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openDispute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"positionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"positionPhrase","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"resetMarket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_outcomePosition","type":"uint256"},{"internalType":"address","name":"_resolverAddress","type":"address"}],"name":"resolveMarket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resolved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"resolvedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"resolverAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"safeBoxLowAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timeoutPeriod","type":"uint256"}],"name":"setBackstopTimeout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tags","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_positions","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"takeCreatorInitialOpenBidPositions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_positions","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"address","name":"collateral","type":"address"},{"internalType":"uint256","name":"expectedPayout","type":"uint256"},{"internalType":"uint256","name":"additionalSlippage","type":"uint256"}],"name":"takeOpenBidPositions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"thalesBonds","outputs":[{"internalType":"contract IThalesBonds","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ticketType","outputs":[{"internalType":"enum ExoticPositionalOpenBidMarket.TicketType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalOpenBidAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalOpenBidAmountPerPosition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalUserPlacedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUsersTakenPositions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"transferOwnershipAtInit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userAlreadyClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userOpenBidPosition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"winningPosition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_openBidPosition","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawalPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"withrawalRestrictedForUser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50615ac380620000216000396000f3fe608060405234801561001057600080fd5b506004361061050e5760003560e01c8063784cb6bf116102a4578063bcd7b35211610172578063dcd295ce116100d9578063e66c567a11610092578063e66c567a14610a8d578063e7702d0514610ac3578063ebc7977214610acc578063f44e7fba14610ad4578063fd5d01be14610adc578063ffe39fbd14610ae557600080fd5b8063dcd295ce14610a25578063dde27c3a14610a44578063dfb8bae714610a4c578063e0cd6de614610a5f578063e18f0fa614610a72578063e3b2213014610a8557600080fd5b8063d64a02861161012b578063d64a0286146109c1578063d7da5788146109e1578063d8270dce146109ea578063d8c4dc8b146109f3578063d9158ecc14610a13578063d9f050f114610a1c57600080fd5b8063bcd7b35214610972578063c0fda0ec1461097a578063c3b83f5f14610982578063c747b19314610995578063caf14b951461099d578063d1a702ae146109ae57600080fd5b806391b4ded911610216578063b0092db7116101cf578063b0092db7146108f8578063b1b82d6114610901578063b1db5bec14610914578063b20feaaf1461092e578063b7c8318e14610956578063bca7093d1461096957600080fd5b806391b4ded9146108b457806398c185e3146108bd578063995d9ab7146108ca578063a1d19361146108d2578063a9daaed5146108e6578063ae3e420e146108f057600080fd5b80638139f6d0116102685780638139f6d014610867578063833c26d71461086f57806383ba3aea1461087757806389265ca71461088a5780638da5cb5b146108935780638e2b2767146108ac57600080fd5b8063784cb6bf146107eb57806379ba50971461081657806379c8215e1461081e5780637cdeb8d3146108315780637f4a13221461084457600080fd5b80633e3ca871116103e15780635b4ebe05116103535780636b15add81161030c5780636b15add8146107ad5780636bfefd6b146107b65780636da19c35146107be5780636f9b601a146107c757806371cd005a146107cf57806371e0c742146107e257600080fd5b80635b4ebe05146107605780635c975abb146107735780635fcf27be146107805780636278204414610789578063642bc7db1461079157806369496507146107a457600080fd5b80634b3a15b3116103a55780634b3a15b3146106f35780634d08cfdc146106fc5780634fd6137c14610711578063525aabc91461071957806353a47bb71461072d5780635a999bea1461074057600080fd5b80633e3ca871146106845780633f6fa655146106a45780634063c865146106b757806341ed2c12146106bf578063465591f9146106ea57600080fd5b80631e5574f8116104855780632d1789641161043e5780632d178964146106315780632e1a7d4d146106395780632ee953491461064c57806339cdf4ed1461065f5780633af04f50146106725780633bfe56071461067b57600080fd5b80631e5574f8146105de57806320822abc146105f15780632486d67114610604578063253772d91461060d5780632716e0fd146106155780632be07de91461062857600080fd5b80630f3ef6d1116104d75780630f3ef6d11461058c57806313af4035146105955780631627540c146105a857806316c38b3c146105bb57806317447836146105ce5780631897c8fe146105d657600080fd5b8062f367a81461051357806303bb87d71461052a578063066f69af146105345780630695c46c146105495780630c737add1461056b575b600080fd5b600f545b6040519081526020015b60405180910390f35b610532610aed565b005b61053c610c56565b6040516105219190615824565b601b5461055b90610100900460ff1681565b6040519015158152602001610521565b601b5461057f90600160d01b900460ff1681565b60405161052191906157fc565b610517600f5481565b6105326105a336600461547c565b610ce4565b6105326105b636600461547c565b610e1f565b6105326105c93660046155c5565b610e75565b61053c611143565b61055b611150565b6105326105ec3660046154df565b611257565b6105176105ff3660046156f7565b6118aa565b61051760115481565b61055b6118cb565b61051761062336600461547c565b6119e9565b61051760105481565b610517611a1a565b6105326106473660046156f7565b611a49565b61055b61065a36600461547c565b612247565b61055b61066d36600461547c565b61234c565b61051760085481565b610517600c5481565b6105176106923660046156f7565b60216020526000908152604090205481565b601b5461055b9062010000900460ff1681565b61053c61236f565b601c546106d2906001600160a01b031681565b6040516001600160a01b039091168152602001610521565b61051760165481565b61051760185481565b601b5461055b90640100000000900460ff1681565b61053261237c565b601b5461055b906301000000900460ff1681565b6001546106d2906001600160a01b031681565b61075361074e36600461547c565b61248e565b60405161052191906157e9565b61051761076e36600461547c565b612576565b60035461055b9060ff1681565b610517600a5481565b61055b6125cd565b61053261079f366004615727565b6125eb565b610517600b5481565b61051760195481565b610532612785565b61051760145481565b61055b6128ce565b6105326107dd36600461547c565b6128fb565b61051760125481565b6105176107f93660046154b4565b601f60209081526000928352604080842090915290825290205481565b610532612b1e565b61053c61082c3660046156f7565b612c1b565b61051761083f3660046154b4565b612ce5565b61055b61085236600461547c565b60236020526000908152604090205460ff1681565b610753612d65565b61055b612e70565b610532610885366004615540565b612f10565b61051760135481565b6000546106d2906201000090046001600160a01b031681565b6105176136e7565b61051760025481565b601b5461055b9060ff1681565b610753613718565b601b5461055b90600160281b900460ff1681565b600654151561055b565b610532613770565b61051760155481565b61075361090f36600461547c565b61387a565b601b546106d290600160301b90046001600160a01b031681565b610936613930565b604080519485526020850193909352918301526060820152608001610521565b61051761096436600461547c565b613964565b61051760175481565b61053261396f565b602454610517565b61053261099036600461547c565b613c13565b610517613d2c565b601354601454601554601654610936565b6105326109bc3660046155fd565b613d42565b6105176109cf36600461547c565b601e6020526000908152604090205481565b610517600e5481565b61051760065481565b610517610a013660046156f7565b60009081526021602052604090205490565b610517600d5481565b610517601a5481565b610517610a3336600461547c565b602080526000908152604090205481565b61055b614460565b601d546106d2906001600160a01b031681565b61053c610a6d3660046156f7565b6144a2565b610532610a803660046156f7565b6144bb565b61055b6144f8565b610517610a9b3660046154b4565b6001600160a01b03919091166000908152601f60209081526040808320938352929052205490565b61051760095481565b610532614520565b61055b61457e565b61051760075481565b6105326145ab565b610af5614665565b601b5462010000900460ff16610b4b5760405162461bcd60e51b815260206004820152601660248201527513585c9ad95d081a5cc81b9bdd081c995cdbdb1d995960521b60448201526064015b60405180910390fd5b601154610b65576011546000908152602160205260408120555b600060118190556010819055601b805462ff00ff19169055600755601c546040805163543f171560e01b815290516001600160a01b039092169163543f171591600480820192602092909190829003018186803b158015610bc557600080fd5b505afa158015610bd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfd9190615498565b601b80546001600160a01b0392909216600160301b026601000000000000600160d01b03199092169190911790556040517faa376e3d0f974d7040008c204f57c3d1aa22962963ba8f9f12dc3701aca13f7e90600090a1565b60258054610c63906159ee565b80601f0160208091040260200160405190810160405280929190818152602001828054610c8f906159ee565b8015610cdc5780601f10610cb157610100808354040283529160200191610cdc565b820191906000526020600020905b815481529060010190602001808311610cbf57829003601f168201915b505050505081565b6001600160a01b038116610d3a5760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f742062652030000000000000006044820152606401610b42565b600154600160a01b900460ff1615610da65760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b6064820152608401610b42565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b610e27614665565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610e14565b600054604051636e57728160e11b8152336004820152620100009091046001600160a01b03169063dcaee5029060240160206040518083038186803b158015610ebd57600080fd5b505afa158015610ed1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef591906155e1565b80610f88575060005460408051638da5cb5b60e01b8152905133926201000090046001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015610f4557600080fd5b505afa158015610f59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7d9190615498565b6001600160a01b0316145b80610fa357506000546201000090046001600160a01b031633145b610fe45760405162461bcd60e51b81526020600482015260126024820152714e6f6e2d706175736572206164647265737360701b6044820152606401610b42565b60035460ff1615158115151415610ff85750565b60035460ff16156110e957600060029054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561105157600080fd5b505afa158015611065573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110899190615498565b6001600160a01b0316336001600160a01b0316146110e95760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c792050726f746f636f6c2044414f2063616e20756e70617573650000006044820152606401610b42565b6003805460ff191682151590811790915560ff161561110757426002555b60035460405160ff909116151581527f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec590602001610e14565b50565b60268054610c63906159ee565b601b5460009062010000900460ff1680156111735750601b54610100900460ff16155b8015611252575060006007541180156112115750601c5460408051637b6e7f4160e11b8152905161120e926001600160a01b03169163f6dcfe82916004808301926020929190829003018186803b1580156111cd57600080fd5b505afa1580156111e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611205919061570f565b600754906146df565b42115b8061125257506000600d5411801561122b57506000600754115b801561123957506000601254115b80156112525750600d5460125461124f916146df565b42115b905090565b61125f614665565b600082511180156112735750600954825111155b6112b05760405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706f734e756d60901b6044820152606401610b42565b6001601b54600160d01b900460ff1660018111156112de57634e487b7160e01b600052602160045260246000fd5b146113195760405162461bcd60e51b815260206004820152600b60248201526a139bdd0813dc195b909a5960aa1b6044820152606401610b42565b601c5460405163677755bb60e01b815230600482015260009182916001600160a01b039091169063677755bb9060240160206040518083038186803b15801561136157600080fd5b505afa158015611375573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113999190615498565b905060005b84518110156116bb5760008582815181106113c957634e487b7160e01b600052603260045260246000fd5b602002602001015111801561140757506009548582815181106113fc57634e487b7160e01b600052603260045260246000fd5b602002602001015111155b6114435760405162461bcd60e51b815260206004820152600d60248201526c15985b1d59481a5b9d985b1a59609a1b6044820152606401610b42565b83818151811061146357634e487b7160e01b600052603260045260246000fd5b6020026020010151600014806114d65750601a5484828151811061149757634e487b7160e01b600052603260045260246000fd5b6020026020010151101580156114d657506018548482815181106114cb57634e487b7160e01b600052603260045260246000fd5b602002602001015111155b6114f25760405162461bcd60e51b8152600401610b4290615877565b61156684828151811061151557634e487b7160e01b600052603260045260246000fd5b60200260200101516021600088858151811061154157634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020546146df90919063ffffffff16565b6021600087848151811061158a57634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020819055506116168482815181106115c757634e487b7160e01b600052603260045260246000fd5b6020026020010151601f6000856001600160a01b03166001600160a01b03168152602001908152602001600020600088858151811061154157634e487b7160e01b600052603260045260246000fd5b6001600160a01b0383166000908152601f60205260408120875190919088908590811061165357634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020819055506116a784828151811061169057634e487b7160e01b600052603260045260246000fd5b6020026020010151846146df90919063ffffffff16565b9250806116b381615a23565b91505061139e565b50601a546001600160a01b0382166000908152601e60205260409020546116e290846146df565b1015801561171457506018546001600160a01b0382166000908152601e602052604090205461171190846146df565b11155b6117305760405162461bcd60e51b8152600401610b4290615877565b600f5461173d90836146df565b600f556001600160a01b0381166000908152601e602052604090205461176390836146df565b6001600160a01b0382166000908152601e6020526040902055600e5461178a9060016146df565b600e55601c546040805163dfb8bae760e01b815290516001600160a01b039092169163dfb8bae791600480820192602092909190829003018186803b1580156117d257600080fd5b505afa1580156117e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180a9190615498565b6001600160a01b031663e03e2d0282846040518363ffffffff1660e01b81526004016118379291906157d0565b600060405180830381600087803b15801561185157600080fd5b505af1158015611865573d6000803e3d6000fd5b505050507f75613b406583446936b50752c754d7f1b178a2d2b51cf1edc46285b366e5462781858560405161189c93929190615790565b60405180910390a150505050565b602481815481106118ba57600080fd5b600091825260209091200154905081565b601b54600090640100000000900460ff161580156112525750601d54604051632c21134b60e11b81523060048201526000916001600160a01b03169063584226969060240160206040518083038186803b15801561192857600080fd5b505afa15801561193c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611960919061570f565b11806112525750601d5460405163f29e0d0f60e01b81523060048201526000916001600160a01b03169063f29e0d0f9060240160206040518083038186803b1580156119ab57600080fd5b505afa1580156119bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e3919061570f565b11905090565b601b5460009060ff1615611a0e57611a08611a0383612576565b6146eb565b92915050565b611a0882601154612ce5565b601b54600090600160d01b900460ff16600181111561125257634e487b7160e01b600052602160045260246000fd5b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9757600080fd5b505afa158015611aab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611acf91906155e1565b15611aec5760405162461bcd60e51b8152600401610b429061589f565b60035460ff1615611b0f5760405162461bcd60e51b8152600401610b42906158c8565b600160046000828254611b229190615980565b9091555050600454601b54600160281b900460ff168015611b465750611b4661457e565b8015611b5457506017544211155b611b8e5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610b42565b601c5460405163677755bb60e01b81523060048201526000916001600160a01b03169063677755bb9060240160206040518083038186803b158015611bd257600080fd5b505afa158015611be6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c0a9190615498565b9050336001600160a01b0382161415611c595760405162461bcd60e51b815260206004820152601160248201527021b932b0ba37b9103337b93134b23232b760791b6044820152606401610b42565b600083611d245760015b6009548111611d1e57336000908152601f6020908152604080832084845290915290205415611d0c57336000908152601f60209081526040808320848452909152902054611cb29083906146df565b336000908152601f60209081526040808320858452825280832054602190925290912054919350611ce391906148a1565b600082815260216020908152604080832093909355338252601f81528282208483529052908120555b80611d1681615a23565b915050611c63565b50611de0565b336000908152601f60209081526040808320878452909152902054611d845760405162461bcd60e51b815260206004820152601660248201527527379030b6b7bab73a103337b9103837b9b4ba34b7b760511b6044820152606401610b42565b336000908152601f60209081526040808320878452825280832054602190925290912054611db1916148a1565b600085815260216020908152604080832093909355338252601f81528282208783529052908120805491905590505b600a54611df042620151806146df565b118015611dff5750600a544211155b15611ef5573360009081526023602052604090205460ff1615611e585760405162461bcd60e51b815260206004820152601160248201527020b63932b0b23c903bb4ba34323930bbb760791b6044820152606401610b42565b611e92670de0b6b3a7640000611e8c611e83662386f26fc100006019546148ad90919063ffffffff16565b600f54906148ad565b906148b9565b811115611eda5760405162461bcd60e51b8152602060048201526016602482015275115e18d959591cc81dda5d1a191c985dc81b1a5b5a5d60521b6044820152606401610b42565b336000908152602360205260409020805460ff191660011790555b611efe33612576565b611f1457600e54611f109060016148a1565b600e555b600f54611f2190826148a1565b600f55336000908152601e6020526040902054611f3e90826148a1565b336000908152601e6020908152604080832093909355601c548351632c33195760e01b815293519293611ff793670de0b6b3a764000093611e8c93662386f26fc1000093611ff1936001600160a01b0390921692632c33195792600480840193829003018186803b158015611fb257600080fd5b505afa158015611fc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fea919061570f565b87906148ad565b906148ad565b601d54601c546040805163543f171560e01b815290519394506001600160a01b03928316936317f7a1e4939092169163543f171591600480820192602092909190829003018186803b15801561204c57600080fd5b505afa158015612060573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120849190615498565b61208f8460026148b9565b6040518363ffffffff1660e01b81526004016120ac9291906157d0565b600060405180830381600087803b1580156120c657600080fd5b505af11580156120da573d6000803e3d6000fd5b5050601d546001600160a01b031691506317f7a1e49050846120fd8460026148b9565b6040518363ffffffff1660e01b815260040161211a9291906157d0565b600060405180830381600087803b15801561213457600080fd5b505af1158015612148573d6000803e3d6000fd5b5050601d546001600160a01b031691506317f7a1e490503361216a85856148a1565b6040518363ffffffff1660e01b81526004016121879291906157d0565b600060405180830381600087803b1580156121a157600080fd5b505af11580156121b5573d6000803e3d6000fd5b505050507fed067829ae5ac4740fbf566f961a53b2570652a49ed6df9f2540248ec842deb733866121ef84866148a190919063ffffffff16565b600f54604080516001600160a01b039095168552602085019390935291830152606082015260800160405180910390a150505060045481146122435760405162461bcd60e51b8152600401610b42906158f4565b5050565b601c5460405163677755bb60e01b81523060048201526000916001600160a01b03169063677755bb9060240160206040518083038186803b15801561228b57600080fd5b505afa15801561229f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c39190615498565b6001600160a01b0316826001600160a01b031614156122e457506000919050565b601b54600160281b900460ff168015612300575061230061457e565b80156123145750600061231283612576565b115b801561233957506001600160a01b03821660009081526023602052604090205460ff16155b8015611a08575060175442111592915050565b6000612356611150565b8015611a085750600061236883613964565b1192915050565b60278054610c63906159ee565b612384614665565b6006546123c85760405162461bcd60e51b815260206004820152601260248201527113585c9ad95d081b9bdd0818dc99585d195960721b6044820152606401610b42565b601b54610100900460ff16156124205760405162461bcd60e51b815260206004820152601760248201527f4d61726b657420616c72656164792064697370757465640000000000000000006044820152606401610b42565b601b805461ff00191661010017905561243761457e565b601b805491151563010000000263ff0000001990921691909117905542600855604051600181527fcdb418bb756a3b142eb851c0930a83cb41387b1c2433a64e50a298c63b097286906020015b60405180910390a1565b6060600060095467ffffffffffffffff8111156124bb57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156124e4578160200160208202803683370190505b509050600954600014156124f85792915050565b60015b600954811161256f576001600160a01b0384166000908152601f60209081526040808320848452909152902054826125346001846159d7565b8151811061255257634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061256781615a23565b9150506124fb565b5092915050565b600060015b60095481116125c7576001600160a01b0383166000908152601f602090815260408083208484529091529020546125b39083906146df565b9150806125bf81615a23565b91505061257b565b50919050565b601b5460009062010000900460ff1680156112525750506011541590565b6125f3614665565b6125fb6128ce565b61263e5760405162461bcd60e51b8152602060048201526014602482015273111a5cdc1d5d19590bdb9bdd081b585d1d5c995960621b6044820152606401610b42565b6009548211156126905760405162461bcd60e51b815260206004820152601a60248201527f4f7574636f6d652065786565647320706f736974696f6e4e756d0000000000006044820152606401610b42565b6011829055816126b657600f5460108190556000838152602160205260409020556126f1565b6126be6136e7565b6010556000828152602160205260409020546126e657601b805460ff191660011790556126f1565b601b805460ff191690555b601b8054426007556001600160a01b038316600160301b0265ffffff010000600160d01b0319909116176201000017908190556040517fdd895f8f5d520ca7db3fc8259b53d471f0b9c249e49b40c20278f880824e5bb291612779918591859160ff91909116909283526001600160a01b039190911660208301521515604082015260600190565b60405180910390a15050565b61278d614665565b60006011819055600f546010819055908052602160209081527f97ea4a93fb5e400340102ffa4fa5d31ef170c1e583d2cb268c876db385f80bb091909155601b805462ff000019166201000017905542600755601c546040805163543f171560e01b815290516001600160a01b039092169263543f171592600480840193829003018186803b15801561281f57600080fd5b505afa158015612833573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128579190615498565b601b80546001600160a01b0392909216600160301b026601000000000000600160d01b031983168117909155604080516000815233602082015260ff92831692909316919091171515908201527fdd895f8f5d520ca7db3fc8259b53d471f0b9c249e49b40c20278f880824e5bb290606001612484565b6000600a5442101580156128e457506000600654115b8015611252575050601b54610100900460ff161590565b612903614665565b61290b611150565b8061298c5750601c5460405163fbdec41360e01b81523060048201526001600160a01b039091169063fbdec4139060240160206040518083038186803b15801561295457600080fd5b505afa158015612968573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061298c91906155e1565b6129cf5760405162461bcd60e51b815260206004820152601460248201527313585c9ad95d081b9bdd08199a5b985b1a5e995960621b6044820152606401610b42565b60006129da82613964565b905060008111612a285760405162461bcd60e51b815260206004820152601960248201527821b630b4b6b0b136329030b6b7bab73a1034b9903d32b9379760391b6044820152606401610b42565b601054612a3590826148a1565b601055612a41826148c5565b601d546040516305fde87960e21b81526001600160a01b03909116906317f7a1e490612a7390859085906004016157d0565b600060405180830381600087803b158015612a8d57600080fd5b505af1158015612aa1573d6000803e3d6000fd5b5050601b54640100000000900460ff169150612ac1905057612ac161490f565b336000908152602080526040902054612ada90826146df565b3360009081526020805260409081902091909155517f358e9cac7d5e933508ff2c3691dca54de5a3af536d78458e429992999e2326e09061277990849084906157d0565b6001546001600160a01b03163314612b965760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610b42565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b60606009548211158015612c2f5750600082115b612c485760405180602001604052806000815250611a08565b60008281526022602052604090208054612c61906159ee565b80601f0160208091040260200160405190810160405280929190818152602001828054612c8d906159ee565b8015612cda5780601f10612caf57610100808354040283529160200191612cda565b820191906000526020600020905b815481529060010190602001808311612cbd57829003601f168201915b505050505092915050565b600081612cfc57612cf583612576565b9050611a08565b600082815260216020526040902054612d16576000612d5e565b600082815260216020526040902054612d5e90611e8c612d346136e7565b6001600160a01b0387166000908152601f60209081526040808320898452909152902054906148ad565b9392505050565b6060600060095467ffffffffffffffff811115612d9257634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612dbb578160200160208202803683370190505b509050600e5460001480612dcf5750600f54155b15612dd957919050565b60015b60095481116125c75760008181526021602052604090205415612e5e57612e276021600083815260200190815260200160002054611e8c670de0b6b3a7640000611ff1600f546146eb565b82612e336001846159d7565b81518110612e5157634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b80612e6881615a23565b915050612ddc565b6000612e7a6128ce565b80156112525750601c5460408051632b5cd01f60e01b81529051612f08926001600160a01b031691632b5cd01f916004808301926020929190829003018186803b158015612ec757600080fd5b505afa158015612edb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612eff919061570f565b600a54906146df565b421015905090565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f5e57600080fd5b505afa158015612f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f9691906155e1565b15612fb35760405162461bcd60e51b8152600401610b429061589f565b60035460ff1615612fd65760405162461bcd60e51b8152600401610b42906158c8565b600160046000828254612fe99190615980565b90915550506004548551158015906130045750600954865111155b6130415760405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706f734e756d60901b6044820152606401610b42565b61304961457e565b6130875760405162461bcd60e51b815260206004820152600f60248201526e13585c9ad95d081c995cdbdb1d9959608a1b6044820152606401610b42565b6001601b54600160d01b900460ff1660018111156130b557634e487b7160e01b600052602160045260246000fd5b146130f05760405162461bcd60e51b815260206004820152600b60248201526a139bdd0813dc195b909a5960aa1b6044820152606401610b42565b600a5461310042620151806146df565b111561319957336000908152601e60205260409020541561319957613146670de0b6b3a7640000611e8c611e83662386f26fc100006019546148ad90919063ffffffff16565b336000908152601e602052604090205411156131995760405162461bcd60e51b815260206004820152601260248201527122bc31b2b2b239903932b837b9b4ba34b7b760711b6044820152606401610b42565b60006001815b88518110156135725760008982815181106131ca57634e487b7160e01b600052603260045260246000fd5b602002602001015111801561320857506009548982815181106131fd57634e487b7160e01b600052603260045260246000fd5b602002602001015111155b61324d5760405162461bcd60e51b8152602060048201526016602482015275141bdcda5d1a5bdb881d985b1d59481a5b9d985b1a5960521b6044820152606401610b42565b87818151811061326d57634e487b7160e01b600052603260045260246000fd5b6020026020010151600014806132e05750601a548882815181106132a157634e487b7160e01b600052603260045260246000fd5b6020026020010151101580156132e057506018548882815181106132d557634e487b7160e01b600052603260045260246000fd5b602002602001015111155b6132fc5760405162461bcd60e51b8152600401610b4290615877565b336000908152601f602052604081208a5182908c908590811061332f57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002054111561342557336000908152601f602052604081208a516133e292908c908590811061338257634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002054602160008c85815181106133bd57634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020546148a190919063ffffffff16565b602160008b848151811061340657634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002081905550600091505b61347488828151811061344857634e487b7160e01b600052603260045260246000fd5b6020026020010151602160008c858151811061154157634e487b7160e01b600052603260045260246000fd5b602160008b848151811061349857634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020819055508781815181106134d257634e487b7160e01b600052603260045260246000fd5b6020026020010151601f6000336001600160a01b03166001600160a01b0316815260200190815260200160002060008b848151811061352157634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000208190555061355e88828151811061169057634e487b7160e01b600052603260045260246000fd5b92508061356a81615a23565b91505061319f565b50601a5482101580156135945750336000908152601e60205260409020548210155b6135d65760405162461bcd60e51b815260206004820152601360248201527242656c6c6f7720696e697420616d6f756e747360681b6044820152606401610b42565b336000908152601e60205260408120546135f19084906148a1565b90506018548111156136155760405162461bcd60e51b8152600401610b4290615877565b801561368057600f5461362890826146df565b600f55336000908152601e602052604090205461364590826146df565b336000908152601e60205260409020558161366257600e54613670565b600e546136709060016146df565b600e556136803382898989614d05565b7f75613b406583446936b50752c754d7f1b178a2d2b51cf1edc46285b366e54627338a8a6040516136b393929190615790565b60405180910390a150505060045481146136df5760405162461bcd60e51b8152600401610b42906158f4565b505050505050565b6000600e54600014156136fa5750600090565b6011541561370e57611252611a03600f5490565b50600f5490565b90565b6060602480548060200260200160405190810160405280929190818152602001828054801561376657602002820191906000526020600020905b815481526020019060010190808311613752575b5050505050905090565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156137be57600080fd5b505afa1580156137d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137f691906155e1565b156138135760405162461bcd60e51b8152600401610b429061589f565b60035460ff16156138365760405162461bcd60e51b8152600401610b42906158c8565b6001600460008282546138499190615980565b909155505060045461385961490f565b60045481146111405760405162461bcd60e51b8152600401610b42906158f4565b6060600060095467ffffffffffffffff8111156138a757634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156138d0578160200160208202803683370190505b50905060015b600954811161256f576138e98482612ce5565b826138f56001846159d7565b8151811061391357634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061392881615a23565b9150506138d6565b60008060008061393e614f21565b613946614fcb565b61394e615035565b613956613d2c565b935093509350935090919293565b6000611a08826119e9565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156139bd57600080fd5b505afa1580156139d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139f591906155e1565b15613a125760405162461bcd60e51b8152600401610b429061589f565b60035460ff1615613a355760405162461bcd60e51b8152600401610b42906158c8565b600160046000828254613a489190615980565b9091555050600454613a58611150565b613a9b5760405162461bcd60e51b815260206004820152601460248201527313585c9ad95d081b9bdd08199a5b985b1a5e995960621b6044820152606401610b42565b6000613aa633613964565b905060008111613af45760405162461bcd60e51b815260206004820152601960248201527821b630b4b6b0b136329030b6b7bab73a1034b9903d32b9379760391b6044820152606401610b42565b601054613b0190826148a1565b601055613b0d336148c5565b601d546040516305fde87960e21b81526001600160a01b03909116906317f7a1e490613b3f90339085906004016157d0565b600060405180830381600087803b158015613b5957600080fd5b505af1158015613b6d573d6000803e3d6000fd5b5050601b54640100000000900460ff169150613b8d905057613b8d61490f565b336000908152602080526040902054613ba690826146df565b336000818152602080526040908190209290925590517f358e9cac7d5e933508ff2c3691dca54de5a3af536d78458e429992999e2326e091613be99184906157d0565b60405180910390a15060045481146111405760405162461bcd60e51b8152600401610b42906158f4565b613c1b614665565b6001600160a01b038116613c635760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610b42565b600154600160a81b900460ff1615613cb35760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b6044820152606401610b42565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610e14565b6000611252613d396136e7565b600f54906148a1565b600054610100900460ff16613d5d5760005460ff1615613d61565b303b155b613dc45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610b42565b600054610100900460ff16158015613de6576000805461ffff19166101011790555b60028310158015613e675750336001600160a01b0316636f191fd96040518163ffffffff1660e01b815260040160206040518083038186803b158015613e2b57600080fd5b505afa158015613e3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e63919061570f565b8311155b613ea55760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206e756d20706f7360881b6044820152606401610b42565b6000845111613eb357600080fd5b613ebc33610ce4565b601c80546001600160a01b031916339081179091556040805163dfb8bae760e01b8152905163dfb8bae791600480820192602092909190829003018186803b158015613f0757600080fd5b505afa158015613f1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3f9190615498565b601d60006101000a8154816001600160a01b0302191690836001600160a01b03160217905550613fc58a8a8989898988600081518110613f8f57634e487b7160e01b600052603260045260246000fd5b602002602001015189600181518110613fb857634e487b7160e01b600052603260045260246000fd5b602002602001015161509f565b600283111561401d5760025b8381101561401b57614009838281518110613ffc57634e487b7160e01b600052603260045260246000fd5b602002602001015161515d565b8061401381615a23565b915050613fd1565b505b87516140309060279060208b019061523f565b50601c60009054906101000a90046001600160a01b03166001600160a01b0316634b3a15b36040518163ffffffff1660e01b815260040160206040518083038186803b15801561407f57600080fd5b505afa158015614093573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140b7919061570f565b601855601c54604080516306b22ec560e21b815290516001600160a01b0390921691631ac8bb1491600480820192602092909190829003018186803b1580156140ff57600080fd5b505afa158015614113573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614137919061570f565b601955601c54604080516389265ca760e01b815290516001600160a01b03909216916389265ca791600480820192602092909190829003018186803b15801561417f57600080fd5b505afa158015614193573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141b7919061570f565b601355601c5460408051636da19c3560e01b815290516001600160a01b0390921691636da19c3591600480820192602092909190829003018186803b1580156141ff57600080fd5b505afa158015614213573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614237919061570f565b601455601c546040805163b0092db760e01b815290516001600160a01b039092169163b0092db791600480820192602092909190829003018186803b15801561427f57600080fd5b505afa158015614293573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142b7919061570f565b601555601c546040805163465591f960e01b815290516001600160a01b039092169163465591f991600480820192602092909190829003018186803b1580156142ff57600080fd5b505afa158015614313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614337919061570f565b601655601c54604080516326c4422360e21b815290516143bf926001600160a01b031691639b11088c916004808301926020929190829003018186803b15801561438057600080fd5b505afa158015614394573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143b8919061570f565b88906148a1565b601755601c546040805163970dabcf60e01b815290516001600160a01b039092169163970dabcf91600480820192602092909190829003018186803b15801561440757600080fd5b505afa15801561441b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061443f919061570f565b601a558015614454576000805461ff00191690555b50505050505050505050565b6000600a54421015801561447657506000600654115b801561448a5750601b54610100900460ff16155b8015611252575050601b5462010000900460ff161590565b60226020526000908152604090208054610c63906159ee565b6144c3614665565b600d8190556040518181527f8eefe2f226fd813871fb3411baeb5a5752dfd5b97c49c5ec9fb5228fe79aaf5090602001610e14565b601b54600090610100900460ff161580156145155750600e546001145b156137155750600190565b60055460ff16156145695760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610b42565b6005805460ff19166001908117909155600455565b6000600a54421115801561448a57506000600654118015611252575050601b5462010000900460ff161590565b6145b3614665565b601b54610100900460ff166146005760405162461bcd60e51b815260206004820152601360248201527213585c9ad95d081b9bdd08191a5cdc1d5d1959606a1b6044820152606401610b42565b42601255601b546301000000900460ff161561462857601b805463ff00ff0019169055614634565b601b805461ff00191690555b604051600081527fcdb418bb756a3b142eb851c0930a83cb41387b1c2433a64e50a298c63b09728690602001612484565b6000546201000090046001600160a01b031633146146dd5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610b42565b565b6000612d5e8284615980565b6000611a08670de0b6b3a7640000611e8c662386f26fc10000611ff1611fea61489d601c60009054906101000a90046001600160a01b03166001600160a01b031663f4bfd3db6040518163ffffffff1660e01b815260040160206040518083038186803b15801561475b57600080fd5b505afa15801561476f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614793919061570f565b601c546040805163f071bf4f60e01b81529051614897926001600160a01b03169163f071bf4f916004808301926020929190829003018186803b1580156147d957600080fd5b505afa1580156147ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614811919061570f565b601c60009054906101000a90046001600160a01b03166001600160a01b031663a131bdfe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561485f57600080fd5b505afa158015614873573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614897919061570f565b906146df565b6064905b6000612d5e82846159d7565b6000612d5e82846159b8565b6000612d5e8284615998565b600954156111405760015b6009548111612243576001600160a01b0382166000908152601f602090815260408083208484529091528120558061490781615a23565b9150506148d0565b614917611150565b806149985750601c5460405163fbdec41360e01b81523060048201526001600160a01b039091169063fbdec4139060240160206040518083038186803b15801561496057600080fd5b505afa158015614974573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061499891906155e1565b6149d45760405162461bcd60e51b815260206004820152600d60248201526c139bdd08199a5b985b1a5e9959609a1b6044820152606401610b42565b601b54640100000000900460ff1615614a1e5760405162461bcd60e51b815260206004820152600c60248201526b1199595cc818db185a5b595960a21b6044820152606401610b42565b60115415614c5c57601d54601c5460405163677755bb60e01b81523060048201526001600160a01b03928316926317f7a1e492169063677755bb9060240160206040518083038186803b158015614a7457600080fd5b505afa158015614a88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614aac9190615498565b614ab4614f21565b6040518363ffffffff1660e01b8152600401614ad19291906157d0565b600060405180830381600087803b158015614aeb57600080fd5b505af1158015614aff573d6000803e3d6000fd5b5050601d54601b546001600160a01b0391821693506317f7a1e49250600160301b900416614b2b614fcb565b6040518363ffffffff1660e01b8152600401614b489291906157d0565b600060405180830381600087803b158015614b6257600080fd5b505af1158015614b76573d6000803e3d6000fd5b5050601d54601c546040805163543f171560e01b815290516001600160a01b0393841695506317f7a1e49450919092169163543f1715916004808301926020929190829003018186803b158015614bcc57600080fd5b505afa158015614be0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614c049190615498565b614c0c615035565b6040518363ffffffff1660e01b8152600401614c299291906157d0565b600060405180830381600087803b158015614c4357600080fd5b505af1158015614c57573d6000803e3d6000fd5b505050505b601c54604051636fcccfb160e11b81523060048201526001600160a01b039091169063df999f6290602401600060405180830381600087803b158015614ca157600080fd5b505af1158015614cb5573d6000803e3d6000fd5b5050601b805464ff000000001916640100000000179055507ec2b3f8810fd0ab08df7f2fd1d7250a9633ebcb21787e4a8a3d934e2f2153c49050614cf7613d2c565b604051908152602001612484565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614d5357600080fd5b505afa158015614d67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d8b91906155e1565b15614da85760405162461bcd60e51b8152600401610b429061589f565b60035460ff1615614dcb5760405162461bcd60e51b8152600401610b42906158c8565b6001600160a01b038516614e1a5760405162461bcd60e51b8152602060048201526016602482015275496e76616c69642073656e646572206164647265737360501b6044820152606401610b42565b601c60009054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015614e6857600080fd5b505afa158015614e7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ea09190615498565b60405163579175bf60e01b81526001600160a01b0387811660048301526024820187905285811660448301526064820185905260848201849052919091169063579175bf9060a401600060405180830381600087803b158015614f0257600080fd5b505af1158015614f16573d6000803e3d6000fd5b505050505050505050565b6000611252670de0b6b3a7640000611e8c662386f26fc10000611ff1601c60009054906101000a90046001600160a01b03166001600160a01b031663f071bf4f6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f8b57600080fd5b505afa158015614f9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614fc3919061570f565b600f54611ff1565b6000611252670de0b6b3a7640000611e8c662386f26fc10000611ff1601c60009054906101000a90046001600160a01b03166001600160a01b031663f4bfd3db6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f8b57600080fd5b6000611252670de0b6b3a7640000611e8c662386f26fc10000611ff1601c60009054906101000a90046001600160a01b03166001600160a01b031663a131bdfe6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f8b57600080fd5b4260065587516150b69060259060208b019061523f565b5086516150ca9060269060208a019061523f565b50600a869055846150dc5760016150df565b60005b601b805460ff60d01b1916600160d01b83600181111561510f57634e487b7160e01b600052602160045260246000fd5b0217905550601b805465ff00000000001916600160281b8615150217905582516151409060249060208601906152c3565b5061514a8261515d565b6151538161515d565b5050505050505050565b60405160200161517890602080825260009082015260400190565b604051602081830303815290604052805190602001208160405160200161519f9190615824565b6040516020818303038152906040528051906020012014156152115760405162461bcd60e51b815260206004820152602560248201527f496e76616c696420706f736974696f6e206c6162656c2028656d70747920737460448201526472696e672960d81b6064820152608401610b42565b60095461521f9060016146df565b600981905560009081526022602090815260409091208251612243928401905b82805461524b906159ee565b90600052602060002090601f01602090048101928261526d57600085556152b3565b82601f1061528657805160ff19168380011785556152b3565b828001600101855582156152b3579182015b828111156152b3578251825591602001919060010190615298565b506152bf9291506152fd565b5090565b8280548282559060005260206000209081019282156152b357916020028201828111156152b3578251825591602001919060010190615298565b5b808211156152bf57600081556001016152fe565b600082601f830112615322578081fd5b813560206153376153328361595c565b61592b565b80838252828201915082860187848660051b8901011115615356578586fd5b855b8581101561539757813567ffffffffffffffff811115615376578788fd5b6153848a87838c0101615411565b8552509284019290840190600101615358565b5090979650505050505050565b600082601f8301126153b4578081fd5b813560206153c46153328361595c565b80838252828201915082860187848660051b89010111156153e3578586fd5b855b85811015615397578135845292840192908401906001016153e5565b803561540c81615a7f565b919050565b600082601f830112615421578081fd5b813567ffffffffffffffff81111561543b5761543b615a54565b61544e601f8201601f191660200161592b565b818152846020838601011115615462578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121561548d578081fd5b8135612d5e81615a6a565b6000602082840312156154a9578081fd5b8151612d5e81615a6a565b600080604083850312156154c6578081fd5b82356154d181615a6a565b946020939093013593505050565b600080604083850312156154f1578182fd5b823567ffffffffffffffff80821115615508578384fd5b615514868387016153a4565b93506020850135915080821115615529578283fd5b50615536858286016153a4565b9150509250929050565b600080600080600060a08688031215615557578081fd5b853567ffffffffffffffff8082111561556e578283fd5b61557a89838a016153a4565b9650602088013591508082111561558f578283fd5b5061559c888289016153a4565b94505060408601356155ad81615a6a565b94979396509394606081013594506080013592915050565b6000602082840312156155d6578081fd5b8135612d5e81615a7f565b6000602082840312156155f2578081fd5b8151612d5e81615a7f565b60008060008060008060008060006101208a8c03121561561b578384fd5b893567ffffffffffffffff80821115615632578586fd5b61563e8d838e01615411565b9a5060208c0135915080821115615653578586fd5b61565f8d838e01615411565b995060408c0135915080821115615674578586fd5b6156808d838e01615411565b985060608c0135975060808c0135965061569c60a08d01615401565b955060c08c01359150808211156156b1578485fd5b6156bd8d838e016153a4565b945060e08c013593506101008c01359150808211156156da578283fd5b506156e78c828d01615312565b9150509295985092959850929598565b600060208284031215615708578081fd5b5035919050565b600060208284031215615720578081fd5b5051919050565b60008060408385031215615739578182fd5b82359150602083013561574b81615a6a565b809150509250929050565b6000815180845260208085019450808401835b8381101561578557815187529582019590820190600101615769565b509495945050505050565b6001600160a01b03841681526060602082018190526000906157b490830185615756565b82810360408401526157c68185615756565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b602081526000612d5e6020830184615756565b602081016002831061581e57634e487b7160e01b600052602160045260246000fd5b91905290565b6000602080835283518082850152825b8181101561585057858101830151858201604001528201615834565b818111156158615783604083870101525b50601f01601f1916929092016040019392505050565b6020808252600e908201526d105b5bdd5b9d1cc8195e18d9595960921b604082015260600190565b6020808252600f908201526e26b0b730b3b2b9103830bab9b2b21760891b604082015260600190565b60208082526012908201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561595457615954615a54565b604052919050565b600067ffffffffffffffff82111561597657615976615a54565b5060051b60200190565b6000821982111561599357615993615a3e565b500190565b6000826159b357634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156159d2576159d2615a3e565b500290565b6000828210156159e9576159e9615a3e565b500390565b600181811c90821680615a0257607f821691505b602082108114156125c757634e487b7160e01b600052602260045260246000fd5b6000600019821415615a3757615a37615a3e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461114057600080fd5b801515811461114057600080fdfea2646970667358221220277756548334a6cb64979bb5660061be26844c245e1e197cb5a89acfc5203cfe64736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061050e5760003560e01c8063784cb6bf116102a4578063bcd7b35211610172578063dcd295ce116100d9578063e66c567a11610092578063e66c567a14610a8d578063e7702d0514610ac3578063ebc7977214610acc578063f44e7fba14610ad4578063fd5d01be14610adc578063ffe39fbd14610ae557600080fd5b8063dcd295ce14610a25578063dde27c3a14610a44578063dfb8bae714610a4c578063e0cd6de614610a5f578063e18f0fa614610a72578063e3b2213014610a8557600080fd5b8063d64a02861161012b578063d64a0286146109c1578063d7da5788146109e1578063d8270dce146109ea578063d8c4dc8b146109f3578063d9158ecc14610a13578063d9f050f114610a1c57600080fd5b8063bcd7b35214610972578063c0fda0ec1461097a578063c3b83f5f14610982578063c747b19314610995578063caf14b951461099d578063d1a702ae146109ae57600080fd5b806391b4ded911610216578063b0092db7116101cf578063b0092db7146108f8578063b1b82d6114610901578063b1db5bec14610914578063b20feaaf1461092e578063b7c8318e14610956578063bca7093d1461096957600080fd5b806391b4ded9146108b457806398c185e3146108bd578063995d9ab7146108ca578063a1d19361146108d2578063a9daaed5146108e6578063ae3e420e146108f057600080fd5b80638139f6d0116102685780638139f6d014610867578063833c26d71461086f57806383ba3aea1461087757806389265ca71461088a5780638da5cb5b146108935780638e2b2767146108ac57600080fd5b8063784cb6bf146107eb57806379ba50971461081657806379c8215e1461081e5780637cdeb8d3146108315780637f4a13221461084457600080fd5b80633e3ca871116103e15780635b4ebe05116103535780636b15add81161030c5780636b15add8146107ad5780636bfefd6b146107b65780636da19c35146107be5780636f9b601a146107c757806371cd005a146107cf57806371e0c742146107e257600080fd5b80635b4ebe05146107605780635c975abb146107735780635fcf27be146107805780636278204414610789578063642bc7db1461079157806369496507146107a457600080fd5b80634b3a15b3116103a55780634b3a15b3146106f35780634d08cfdc146106fc5780634fd6137c14610711578063525aabc91461071957806353a47bb71461072d5780635a999bea1461074057600080fd5b80633e3ca871146106845780633f6fa655146106a45780634063c865146106b757806341ed2c12146106bf578063465591f9146106ea57600080fd5b80631e5574f8116104855780632d1789641161043e5780632d178964146106315780632e1a7d4d146106395780632ee953491461064c57806339cdf4ed1461065f5780633af04f50146106725780633bfe56071461067b57600080fd5b80631e5574f8146105de57806320822abc146105f15780632486d67114610604578063253772d91461060d5780632716e0fd146106155780632be07de91461062857600080fd5b80630f3ef6d1116104d75780630f3ef6d11461058c57806313af4035146105955780631627540c146105a857806316c38b3c146105bb57806317447836146105ce5780631897c8fe146105d657600080fd5b8062f367a81461051357806303bb87d71461052a578063066f69af146105345780630695c46c146105495780630c737add1461056b575b600080fd5b600f545b6040519081526020015b60405180910390f35b610532610aed565b005b61053c610c56565b6040516105219190615824565b601b5461055b90610100900460ff1681565b6040519015158152602001610521565b601b5461057f90600160d01b900460ff1681565b60405161052191906157fc565b610517600f5481565b6105326105a336600461547c565b610ce4565b6105326105b636600461547c565b610e1f565b6105326105c93660046155c5565b610e75565b61053c611143565b61055b611150565b6105326105ec3660046154df565b611257565b6105176105ff3660046156f7565b6118aa565b61051760115481565b61055b6118cb565b61051761062336600461547c565b6119e9565b61051760105481565b610517611a1a565b6105326106473660046156f7565b611a49565b61055b61065a36600461547c565b612247565b61055b61066d36600461547c565b61234c565b61051760085481565b610517600c5481565b6105176106923660046156f7565b60216020526000908152604090205481565b601b5461055b9062010000900460ff1681565b61053c61236f565b601c546106d2906001600160a01b031681565b6040516001600160a01b039091168152602001610521565b61051760165481565b61051760185481565b601b5461055b90640100000000900460ff1681565b61053261237c565b601b5461055b906301000000900460ff1681565b6001546106d2906001600160a01b031681565b61075361074e36600461547c565b61248e565b60405161052191906157e9565b61051761076e36600461547c565b612576565b60035461055b9060ff1681565b610517600a5481565b61055b6125cd565b61053261079f366004615727565b6125eb565b610517600b5481565b61051760195481565b610532612785565b61051760145481565b61055b6128ce565b6105326107dd36600461547c565b6128fb565b61051760125481565b6105176107f93660046154b4565b601f60209081526000928352604080842090915290825290205481565b610532612b1e565b61053c61082c3660046156f7565b612c1b565b61051761083f3660046154b4565b612ce5565b61055b61085236600461547c565b60236020526000908152604090205460ff1681565b610753612d65565b61055b612e70565b610532610885366004615540565b612f10565b61051760135481565b6000546106d2906201000090046001600160a01b031681565b6105176136e7565b61051760025481565b601b5461055b9060ff1681565b610753613718565b601b5461055b90600160281b900460ff1681565b600654151561055b565b610532613770565b61051760155481565b61075361090f36600461547c565b61387a565b601b546106d290600160301b90046001600160a01b031681565b610936613930565b604080519485526020850193909352918301526060820152608001610521565b61051761096436600461547c565b613964565b61051760175481565b61053261396f565b602454610517565b61053261099036600461547c565b613c13565b610517613d2c565b601354601454601554601654610936565b6105326109bc3660046155fd565b613d42565b6105176109cf36600461547c565b601e6020526000908152604090205481565b610517600e5481565b61051760065481565b610517610a013660046156f7565b60009081526021602052604090205490565b610517600d5481565b610517601a5481565b610517610a3336600461547c565b602080526000908152604090205481565b61055b614460565b601d546106d2906001600160a01b031681565b61053c610a6d3660046156f7565b6144a2565b610532610a803660046156f7565b6144bb565b61055b6144f8565b610517610a9b3660046154b4565b6001600160a01b03919091166000908152601f60209081526040808320938352929052205490565b61051760095481565b610532614520565b61055b61457e565b61051760075481565b6105326145ab565b610af5614665565b601b5462010000900460ff16610b4b5760405162461bcd60e51b815260206004820152601660248201527513585c9ad95d081a5cc81b9bdd081c995cdbdb1d995960521b60448201526064015b60405180910390fd5b601154610b65576011546000908152602160205260408120555b600060118190556010819055601b805462ff00ff19169055600755601c546040805163543f171560e01b815290516001600160a01b039092169163543f171591600480820192602092909190829003018186803b158015610bc557600080fd5b505afa158015610bd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfd9190615498565b601b80546001600160a01b0392909216600160301b026601000000000000600160d01b03199092169190911790556040517faa376e3d0f974d7040008c204f57c3d1aa22962963ba8f9f12dc3701aca13f7e90600090a1565b60258054610c63906159ee565b80601f0160208091040260200160405190810160405280929190818152602001828054610c8f906159ee565b8015610cdc5780601f10610cb157610100808354040283529160200191610cdc565b820191906000526020600020905b815481529060010190602001808311610cbf57829003601f168201915b505050505081565b6001600160a01b038116610d3a5760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f742062652030000000000000006044820152606401610b42565b600154600160a01b900460ff1615610da65760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b6064820152608401610b42565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b610e27614665565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610e14565b600054604051636e57728160e11b8152336004820152620100009091046001600160a01b03169063dcaee5029060240160206040518083038186803b158015610ebd57600080fd5b505afa158015610ed1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef591906155e1565b80610f88575060005460408051638da5cb5b60e01b8152905133926201000090046001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015610f4557600080fd5b505afa158015610f59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7d9190615498565b6001600160a01b0316145b80610fa357506000546201000090046001600160a01b031633145b610fe45760405162461bcd60e51b81526020600482015260126024820152714e6f6e2d706175736572206164647265737360701b6044820152606401610b42565b60035460ff1615158115151415610ff85750565b60035460ff16156110e957600060029054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561105157600080fd5b505afa158015611065573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110899190615498565b6001600160a01b0316336001600160a01b0316146110e95760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c792050726f746f636f6c2044414f2063616e20756e70617573650000006044820152606401610b42565b6003805460ff191682151590811790915560ff161561110757426002555b60035460405160ff909116151581527f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec590602001610e14565b50565b60268054610c63906159ee565b601b5460009062010000900460ff1680156111735750601b54610100900460ff16155b8015611252575060006007541180156112115750601c5460408051637b6e7f4160e11b8152905161120e926001600160a01b03169163f6dcfe82916004808301926020929190829003018186803b1580156111cd57600080fd5b505afa1580156111e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611205919061570f565b600754906146df565b42115b8061125257506000600d5411801561122b57506000600754115b801561123957506000601254115b80156112525750600d5460125461124f916146df565b42115b905090565b61125f614665565b600082511180156112735750600954825111155b6112b05760405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706f734e756d60901b6044820152606401610b42565b6001601b54600160d01b900460ff1660018111156112de57634e487b7160e01b600052602160045260246000fd5b146113195760405162461bcd60e51b815260206004820152600b60248201526a139bdd0813dc195b909a5960aa1b6044820152606401610b42565b601c5460405163677755bb60e01b815230600482015260009182916001600160a01b039091169063677755bb9060240160206040518083038186803b15801561136157600080fd5b505afa158015611375573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113999190615498565b905060005b84518110156116bb5760008582815181106113c957634e487b7160e01b600052603260045260246000fd5b602002602001015111801561140757506009548582815181106113fc57634e487b7160e01b600052603260045260246000fd5b602002602001015111155b6114435760405162461bcd60e51b815260206004820152600d60248201526c15985b1d59481a5b9d985b1a59609a1b6044820152606401610b42565b83818151811061146357634e487b7160e01b600052603260045260246000fd5b6020026020010151600014806114d65750601a5484828151811061149757634e487b7160e01b600052603260045260246000fd5b6020026020010151101580156114d657506018548482815181106114cb57634e487b7160e01b600052603260045260246000fd5b602002602001015111155b6114f25760405162461bcd60e51b8152600401610b4290615877565b61156684828151811061151557634e487b7160e01b600052603260045260246000fd5b60200260200101516021600088858151811061154157634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020546146df90919063ffffffff16565b6021600087848151811061158a57634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020819055506116168482815181106115c757634e487b7160e01b600052603260045260246000fd5b6020026020010151601f6000856001600160a01b03166001600160a01b03168152602001908152602001600020600088858151811061154157634e487b7160e01b600052603260045260246000fd5b6001600160a01b0383166000908152601f60205260408120875190919088908590811061165357634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020819055506116a784828151811061169057634e487b7160e01b600052603260045260246000fd5b6020026020010151846146df90919063ffffffff16565b9250806116b381615a23565b91505061139e565b50601a546001600160a01b0382166000908152601e60205260409020546116e290846146df565b1015801561171457506018546001600160a01b0382166000908152601e602052604090205461171190846146df565b11155b6117305760405162461bcd60e51b8152600401610b4290615877565b600f5461173d90836146df565b600f556001600160a01b0381166000908152601e602052604090205461176390836146df565b6001600160a01b0382166000908152601e6020526040902055600e5461178a9060016146df565b600e55601c546040805163dfb8bae760e01b815290516001600160a01b039092169163dfb8bae791600480820192602092909190829003018186803b1580156117d257600080fd5b505afa1580156117e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180a9190615498565b6001600160a01b031663e03e2d0282846040518363ffffffff1660e01b81526004016118379291906157d0565b600060405180830381600087803b15801561185157600080fd5b505af1158015611865573d6000803e3d6000fd5b505050507f75613b406583446936b50752c754d7f1b178a2d2b51cf1edc46285b366e5462781858560405161189c93929190615790565b60405180910390a150505050565b602481815481106118ba57600080fd5b600091825260209091200154905081565b601b54600090640100000000900460ff161580156112525750601d54604051632c21134b60e11b81523060048201526000916001600160a01b03169063584226969060240160206040518083038186803b15801561192857600080fd5b505afa15801561193c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611960919061570f565b11806112525750601d5460405163f29e0d0f60e01b81523060048201526000916001600160a01b03169063f29e0d0f9060240160206040518083038186803b1580156119ab57600080fd5b505afa1580156119bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e3919061570f565b11905090565b601b5460009060ff1615611a0e57611a08611a0383612576565b6146eb565b92915050565b611a0882601154612ce5565b601b54600090600160d01b900460ff16600181111561125257634e487b7160e01b600052602160045260246000fd5b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9757600080fd5b505afa158015611aab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611acf91906155e1565b15611aec5760405162461bcd60e51b8152600401610b429061589f565b60035460ff1615611b0f5760405162461bcd60e51b8152600401610b42906158c8565b600160046000828254611b229190615980565b9091555050600454601b54600160281b900460ff168015611b465750611b4661457e565b8015611b5457506017544211155b611b8e5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610b42565b601c5460405163677755bb60e01b81523060048201526000916001600160a01b03169063677755bb9060240160206040518083038186803b158015611bd257600080fd5b505afa158015611be6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c0a9190615498565b9050336001600160a01b0382161415611c595760405162461bcd60e51b815260206004820152601160248201527021b932b0ba37b9103337b93134b23232b760791b6044820152606401610b42565b600083611d245760015b6009548111611d1e57336000908152601f6020908152604080832084845290915290205415611d0c57336000908152601f60209081526040808320848452909152902054611cb29083906146df565b336000908152601f60209081526040808320858452825280832054602190925290912054919350611ce391906148a1565b600082815260216020908152604080832093909355338252601f81528282208483529052908120555b80611d1681615a23565b915050611c63565b50611de0565b336000908152601f60209081526040808320878452909152902054611d845760405162461bcd60e51b815260206004820152601660248201527527379030b6b7bab73a103337b9103837b9b4ba34b7b760511b6044820152606401610b42565b336000908152601f60209081526040808320878452825280832054602190925290912054611db1916148a1565b600085815260216020908152604080832093909355338252601f81528282208783529052908120805491905590505b600a54611df042620151806146df565b118015611dff5750600a544211155b15611ef5573360009081526023602052604090205460ff1615611e585760405162461bcd60e51b815260206004820152601160248201527020b63932b0b23c903bb4ba34323930bbb760791b6044820152606401610b42565b611e92670de0b6b3a7640000611e8c611e83662386f26fc100006019546148ad90919063ffffffff16565b600f54906148ad565b906148b9565b811115611eda5760405162461bcd60e51b8152602060048201526016602482015275115e18d959591cc81dda5d1a191c985dc81b1a5b5a5d60521b6044820152606401610b42565b336000908152602360205260409020805460ff191660011790555b611efe33612576565b611f1457600e54611f109060016148a1565b600e555b600f54611f2190826148a1565b600f55336000908152601e6020526040902054611f3e90826148a1565b336000908152601e6020908152604080832093909355601c548351632c33195760e01b815293519293611ff793670de0b6b3a764000093611e8c93662386f26fc1000093611ff1936001600160a01b0390921692632c33195792600480840193829003018186803b158015611fb257600080fd5b505afa158015611fc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fea919061570f565b87906148ad565b906148ad565b601d54601c546040805163543f171560e01b815290519394506001600160a01b03928316936317f7a1e4939092169163543f171591600480820192602092909190829003018186803b15801561204c57600080fd5b505afa158015612060573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120849190615498565b61208f8460026148b9565b6040518363ffffffff1660e01b81526004016120ac9291906157d0565b600060405180830381600087803b1580156120c657600080fd5b505af11580156120da573d6000803e3d6000fd5b5050601d546001600160a01b031691506317f7a1e49050846120fd8460026148b9565b6040518363ffffffff1660e01b815260040161211a9291906157d0565b600060405180830381600087803b15801561213457600080fd5b505af1158015612148573d6000803e3d6000fd5b5050601d546001600160a01b031691506317f7a1e490503361216a85856148a1565b6040518363ffffffff1660e01b81526004016121879291906157d0565b600060405180830381600087803b1580156121a157600080fd5b505af11580156121b5573d6000803e3d6000fd5b505050507fed067829ae5ac4740fbf566f961a53b2570652a49ed6df9f2540248ec842deb733866121ef84866148a190919063ffffffff16565b600f54604080516001600160a01b039095168552602085019390935291830152606082015260800160405180910390a150505060045481146122435760405162461bcd60e51b8152600401610b42906158f4565b5050565b601c5460405163677755bb60e01b81523060048201526000916001600160a01b03169063677755bb9060240160206040518083038186803b15801561228b57600080fd5b505afa15801561229f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c39190615498565b6001600160a01b0316826001600160a01b031614156122e457506000919050565b601b54600160281b900460ff168015612300575061230061457e565b80156123145750600061231283612576565b115b801561233957506001600160a01b03821660009081526023602052604090205460ff16155b8015611a08575060175442111592915050565b6000612356611150565b8015611a085750600061236883613964565b1192915050565b60278054610c63906159ee565b612384614665565b6006546123c85760405162461bcd60e51b815260206004820152601260248201527113585c9ad95d081b9bdd0818dc99585d195960721b6044820152606401610b42565b601b54610100900460ff16156124205760405162461bcd60e51b815260206004820152601760248201527f4d61726b657420616c72656164792064697370757465640000000000000000006044820152606401610b42565b601b805461ff00191661010017905561243761457e565b601b805491151563010000000263ff0000001990921691909117905542600855604051600181527fcdb418bb756a3b142eb851c0930a83cb41387b1c2433a64e50a298c63b097286906020015b60405180910390a1565b6060600060095467ffffffffffffffff8111156124bb57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156124e4578160200160208202803683370190505b509050600954600014156124f85792915050565b60015b600954811161256f576001600160a01b0384166000908152601f60209081526040808320848452909152902054826125346001846159d7565b8151811061255257634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061256781615a23565b9150506124fb565b5092915050565b600060015b60095481116125c7576001600160a01b0383166000908152601f602090815260408083208484529091529020546125b39083906146df565b9150806125bf81615a23565b91505061257b565b50919050565b601b5460009062010000900460ff1680156112525750506011541590565b6125f3614665565b6125fb6128ce565b61263e5760405162461bcd60e51b8152602060048201526014602482015273111a5cdc1d5d19590bdb9bdd081b585d1d5c995960621b6044820152606401610b42565b6009548211156126905760405162461bcd60e51b815260206004820152601a60248201527f4f7574636f6d652065786565647320706f736974696f6e4e756d0000000000006044820152606401610b42565b6011829055816126b657600f5460108190556000838152602160205260409020556126f1565b6126be6136e7565b6010556000828152602160205260409020546126e657601b805460ff191660011790556126f1565b601b805460ff191690555b601b8054426007556001600160a01b038316600160301b0265ffffff010000600160d01b0319909116176201000017908190556040517fdd895f8f5d520ca7db3fc8259b53d471f0b9c249e49b40c20278f880824e5bb291612779918591859160ff91909116909283526001600160a01b039190911660208301521515604082015260600190565b60405180910390a15050565b61278d614665565b60006011819055600f546010819055908052602160209081527f97ea4a93fb5e400340102ffa4fa5d31ef170c1e583d2cb268c876db385f80bb091909155601b805462ff000019166201000017905542600755601c546040805163543f171560e01b815290516001600160a01b039092169263543f171592600480840193829003018186803b15801561281f57600080fd5b505afa158015612833573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128579190615498565b601b80546001600160a01b0392909216600160301b026601000000000000600160d01b031983168117909155604080516000815233602082015260ff92831692909316919091171515908201527fdd895f8f5d520ca7db3fc8259b53d471f0b9c249e49b40c20278f880824e5bb290606001612484565b6000600a5442101580156128e457506000600654115b8015611252575050601b54610100900460ff161590565b612903614665565b61290b611150565b8061298c5750601c5460405163fbdec41360e01b81523060048201526001600160a01b039091169063fbdec4139060240160206040518083038186803b15801561295457600080fd5b505afa158015612968573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061298c91906155e1565b6129cf5760405162461bcd60e51b815260206004820152601460248201527313585c9ad95d081b9bdd08199a5b985b1a5e995960621b6044820152606401610b42565b60006129da82613964565b905060008111612a285760405162461bcd60e51b815260206004820152601960248201527821b630b4b6b0b136329030b6b7bab73a1034b9903d32b9379760391b6044820152606401610b42565b601054612a3590826148a1565b601055612a41826148c5565b601d546040516305fde87960e21b81526001600160a01b03909116906317f7a1e490612a7390859085906004016157d0565b600060405180830381600087803b158015612a8d57600080fd5b505af1158015612aa1573d6000803e3d6000fd5b5050601b54640100000000900460ff169150612ac1905057612ac161490f565b336000908152602080526040902054612ada90826146df565b3360009081526020805260409081902091909155517f358e9cac7d5e933508ff2c3691dca54de5a3af536d78458e429992999e2326e09061277990849084906157d0565b6001546001600160a01b03163314612b965760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610b42565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b60606009548211158015612c2f5750600082115b612c485760405180602001604052806000815250611a08565b60008281526022602052604090208054612c61906159ee565b80601f0160208091040260200160405190810160405280929190818152602001828054612c8d906159ee565b8015612cda5780601f10612caf57610100808354040283529160200191612cda565b820191906000526020600020905b815481529060010190602001808311612cbd57829003601f168201915b505050505092915050565b600081612cfc57612cf583612576565b9050611a08565b600082815260216020526040902054612d16576000612d5e565b600082815260216020526040902054612d5e90611e8c612d346136e7565b6001600160a01b0387166000908152601f60209081526040808320898452909152902054906148ad565b9392505050565b6060600060095467ffffffffffffffff811115612d9257634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612dbb578160200160208202803683370190505b509050600e5460001480612dcf5750600f54155b15612dd957919050565b60015b60095481116125c75760008181526021602052604090205415612e5e57612e276021600083815260200190815260200160002054611e8c670de0b6b3a7640000611ff1600f546146eb565b82612e336001846159d7565b81518110612e5157634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b80612e6881615a23565b915050612ddc565b6000612e7a6128ce565b80156112525750601c5460408051632b5cd01f60e01b81529051612f08926001600160a01b031691632b5cd01f916004808301926020929190829003018186803b158015612ec757600080fd5b505afa158015612edb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612eff919061570f565b600a54906146df565b421015905090565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f5e57600080fd5b505afa158015612f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f9691906155e1565b15612fb35760405162461bcd60e51b8152600401610b429061589f565b60035460ff1615612fd65760405162461bcd60e51b8152600401610b42906158c8565b600160046000828254612fe99190615980565b90915550506004548551158015906130045750600954865111155b6130415760405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706f734e756d60901b6044820152606401610b42565b61304961457e565b6130875760405162461bcd60e51b815260206004820152600f60248201526e13585c9ad95d081c995cdbdb1d9959608a1b6044820152606401610b42565b6001601b54600160d01b900460ff1660018111156130b557634e487b7160e01b600052602160045260246000fd5b146130f05760405162461bcd60e51b815260206004820152600b60248201526a139bdd0813dc195b909a5960aa1b6044820152606401610b42565b600a5461310042620151806146df565b111561319957336000908152601e60205260409020541561319957613146670de0b6b3a7640000611e8c611e83662386f26fc100006019546148ad90919063ffffffff16565b336000908152601e602052604090205411156131995760405162461bcd60e51b815260206004820152601260248201527122bc31b2b2b239903932b837b9b4ba34b7b760711b6044820152606401610b42565b60006001815b88518110156135725760008982815181106131ca57634e487b7160e01b600052603260045260246000fd5b602002602001015111801561320857506009548982815181106131fd57634e487b7160e01b600052603260045260246000fd5b602002602001015111155b61324d5760405162461bcd60e51b8152602060048201526016602482015275141bdcda5d1a5bdb881d985b1d59481a5b9d985b1a5960521b6044820152606401610b42565b87818151811061326d57634e487b7160e01b600052603260045260246000fd5b6020026020010151600014806132e05750601a548882815181106132a157634e487b7160e01b600052603260045260246000fd5b6020026020010151101580156132e057506018548882815181106132d557634e487b7160e01b600052603260045260246000fd5b602002602001015111155b6132fc5760405162461bcd60e51b8152600401610b4290615877565b336000908152601f602052604081208a5182908c908590811061332f57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002054111561342557336000908152601f602052604081208a516133e292908c908590811061338257634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002054602160008c85815181106133bd57634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020546148a190919063ffffffff16565b602160008b848151811061340657634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002081905550600091505b61347488828151811061344857634e487b7160e01b600052603260045260246000fd5b6020026020010151602160008c858151811061154157634e487b7160e01b600052603260045260246000fd5b602160008b848151811061349857634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020819055508781815181106134d257634e487b7160e01b600052603260045260246000fd5b6020026020010151601f6000336001600160a01b03166001600160a01b0316815260200190815260200160002060008b848151811061352157634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000208190555061355e88828151811061169057634e487b7160e01b600052603260045260246000fd5b92508061356a81615a23565b91505061319f565b50601a5482101580156135945750336000908152601e60205260409020548210155b6135d65760405162461bcd60e51b815260206004820152601360248201527242656c6c6f7720696e697420616d6f756e747360681b6044820152606401610b42565b336000908152601e60205260408120546135f19084906148a1565b90506018548111156136155760405162461bcd60e51b8152600401610b4290615877565b801561368057600f5461362890826146df565b600f55336000908152601e602052604090205461364590826146df565b336000908152601e60205260409020558161366257600e54613670565b600e546136709060016146df565b600e556136803382898989614d05565b7f75613b406583446936b50752c754d7f1b178a2d2b51cf1edc46285b366e54627338a8a6040516136b393929190615790565b60405180910390a150505060045481146136df5760405162461bcd60e51b8152600401610b42906158f4565b505050505050565b6000600e54600014156136fa5750600090565b6011541561370e57611252611a03600f5490565b50600f5490565b90565b6060602480548060200260200160405190810160405280929190818152602001828054801561376657602002820191906000526020600020905b815481526020019060010190808311613752575b5050505050905090565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156137be57600080fd5b505afa1580156137d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137f691906155e1565b156138135760405162461bcd60e51b8152600401610b429061589f565b60035460ff16156138365760405162461bcd60e51b8152600401610b42906158c8565b6001600460008282546138499190615980565b909155505060045461385961490f565b60045481146111405760405162461bcd60e51b8152600401610b42906158f4565b6060600060095467ffffffffffffffff8111156138a757634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156138d0578160200160208202803683370190505b50905060015b600954811161256f576138e98482612ce5565b826138f56001846159d7565b8151811061391357634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061392881615a23565b9150506138d6565b60008060008061393e614f21565b613946614fcb565b61394e615035565b613956613d2c565b935093509350935090919293565b6000611a08826119e9565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156139bd57600080fd5b505afa1580156139d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139f591906155e1565b15613a125760405162461bcd60e51b8152600401610b429061589f565b60035460ff1615613a355760405162461bcd60e51b8152600401610b42906158c8565b600160046000828254613a489190615980565b9091555050600454613a58611150565b613a9b5760405162461bcd60e51b815260206004820152601460248201527313585c9ad95d081b9bdd08199a5b985b1a5e995960621b6044820152606401610b42565b6000613aa633613964565b905060008111613af45760405162461bcd60e51b815260206004820152601960248201527821b630b4b6b0b136329030b6b7bab73a1034b9903d32b9379760391b6044820152606401610b42565b601054613b0190826148a1565b601055613b0d336148c5565b601d546040516305fde87960e21b81526001600160a01b03909116906317f7a1e490613b3f90339085906004016157d0565b600060405180830381600087803b158015613b5957600080fd5b505af1158015613b6d573d6000803e3d6000fd5b5050601b54640100000000900460ff169150613b8d905057613b8d61490f565b336000908152602080526040902054613ba690826146df565b336000818152602080526040908190209290925590517f358e9cac7d5e933508ff2c3691dca54de5a3af536d78458e429992999e2326e091613be99184906157d0565b60405180910390a15060045481146111405760405162461bcd60e51b8152600401610b42906158f4565b613c1b614665565b6001600160a01b038116613c635760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610b42565b600154600160a81b900460ff1615613cb35760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b6044820152606401610b42565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610e14565b6000611252613d396136e7565b600f54906148a1565b600054610100900460ff16613d5d5760005460ff1615613d61565b303b155b613dc45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610b42565b600054610100900460ff16158015613de6576000805461ffff19166101011790555b60028310158015613e675750336001600160a01b0316636f191fd96040518163ffffffff1660e01b815260040160206040518083038186803b158015613e2b57600080fd5b505afa158015613e3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e63919061570f565b8311155b613ea55760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206e756d20706f7360881b6044820152606401610b42565b6000845111613eb357600080fd5b613ebc33610ce4565b601c80546001600160a01b031916339081179091556040805163dfb8bae760e01b8152905163dfb8bae791600480820192602092909190829003018186803b158015613f0757600080fd5b505afa158015613f1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3f9190615498565b601d60006101000a8154816001600160a01b0302191690836001600160a01b03160217905550613fc58a8a8989898988600081518110613f8f57634e487b7160e01b600052603260045260246000fd5b602002602001015189600181518110613fb857634e487b7160e01b600052603260045260246000fd5b602002602001015161509f565b600283111561401d5760025b8381101561401b57614009838281518110613ffc57634e487b7160e01b600052603260045260246000fd5b602002602001015161515d565b8061401381615a23565b915050613fd1565b505b87516140309060279060208b019061523f565b50601c60009054906101000a90046001600160a01b03166001600160a01b0316634b3a15b36040518163ffffffff1660e01b815260040160206040518083038186803b15801561407f57600080fd5b505afa158015614093573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140b7919061570f565b601855601c54604080516306b22ec560e21b815290516001600160a01b0390921691631ac8bb1491600480820192602092909190829003018186803b1580156140ff57600080fd5b505afa158015614113573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614137919061570f565b601955601c54604080516389265ca760e01b815290516001600160a01b03909216916389265ca791600480820192602092909190829003018186803b15801561417f57600080fd5b505afa158015614193573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141b7919061570f565b601355601c5460408051636da19c3560e01b815290516001600160a01b0390921691636da19c3591600480820192602092909190829003018186803b1580156141ff57600080fd5b505afa158015614213573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614237919061570f565b601455601c546040805163b0092db760e01b815290516001600160a01b039092169163b0092db791600480820192602092909190829003018186803b15801561427f57600080fd5b505afa158015614293573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142b7919061570f565b601555601c546040805163465591f960e01b815290516001600160a01b039092169163465591f991600480820192602092909190829003018186803b1580156142ff57600080fd5b505afa158015614313573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614337919061570f565b601655601c54604080516326c4422360e21b815290516143bf926001600160a01b031691639b11088c916004808301926020929190829003018186803b15801561438057600080fd5b505afa158015614394573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143b8919061570f565b88906148a1565b601755601c546040805163970dabcf60e01b815290516001600160a01b039092169163970dabcf91600480820192602092909190829003018186803b15801561440757600080fd5b505afa15801561441b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061443f919061570f565b601a558015614454576000805461ff00191690555b50505050505050505050565b6000600a54421015801561447657506000600654115b801561448a5750601b54610100900460ff16155b8015611252575050601b5462010000900460ff161590565b60226020526000908152604090208054610c63906159ee565b6144c3614665565b600d8190556040518181527f8eefe2f226fd813871fb3411baeb5a5752dfd5b97c49c5ec9fb5228fe79aaf5090602001610e14565b601b54600090610100900460ff161580156145155750600e546001145b156137155750600190565b60055460ff16156145695760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610b42565b6005805460ff19166001908117909155600455565b6000600a54421115801561448a57506000600654118015611252575050601b5462010000900460ff161590565b6145b3614665565b601b54610100900460ff166146005760405162461bcd60e51b815260206004820152601360248201527213585c9ad95d081b9bdd08191a5cdc1d5d1959606a1b6044820152606401610b42565b42601255601b546301000000900460ff161561462857601b805463ff00ff0019169055614634565b601b805461ff00191690555b604051600081527fcdb418bb756a3b142eb851c0930a83cb41387b1c2433a64e50a298c63b09728690602001612484565b6000546201000090046001600160a01b031633146146dd5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610b42565b565b6000612d5e8284615980565b6000611a08670de0b6b3a7640000611e8c662386f26fc10000611ff1611fea61489d601c60009054906101000a90046001600160a01b03166001600160a01b031663f4bfd3db6040518163ffffffff1660e01b815260040160206040518083038186803b15801561475b57600080fd5b505afa15801561476f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614793919061570f565b601c546040805163f071bf4f60e01b81529051614897926001600160a01b03169163f071bf4f916004808301926020929190829003018186803b1580156147d957600080fd5b505afa1580156147ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614811919061570f565b601c60009054906101000a90046001600160a01b03166001600160a01b031663a131bdfe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561485f57600080fd5b505afa158015614873573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614897919061570f565b906146df565b6064905b6000612d5e82846159d7565b6000612d5e82846159b8565b6000612d5e8284615998565b600954156111405760015b6009548111612243576001600160a01b0382166000908152601f602090815260408083208484529091528120558061490781615a23565b9150506148d0565b614917611150565b806149985750601c5460405163fbdec41360e01b81523060048201526001600160a01b039091169063fbdec4139060240160206040518083038186803b15801561496057600080fd5b505afa158015614974573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061499891906155e1565b6149d45760405162461bcd60e51b815260206004820152600d60248201526c139bdd08199a5b985b1a5e9959609a1b6044820152606401610b42565b601b54640100000000900460ff1615614a1e5760405162461bcd60e51b815260206004820152600c60248201526b1199595cc818db185a5b595960a21b6044820152606401610b42565b60115415614c5c57601d54601c5460405163677755bb60e01b81523060048201526001600160a01b03928316926317f7a1e492169063677755bb9060240160206040518083038186803b158015614a7457600080fd5b505afa158015614a88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614aac9190615498565b614ab4614f21565b6040518363ffffffff1660e01b8152600401614ad19291906157d0565b600060405180830381600087803b158015614aeb57600080fd5b505af1158015614aff573d6000803e3d6000fd5b5050601d54601b546001600160a01b0391821693506317f7a1e49250600160301b900416614b2b614fcb565b6040518363ffffffff1660e01b8152600401614b489291906157d0565b600060405180830381600087803b158015614b6257600080fd5b505af1158015614b76573d6000803e3d6000fd5b5050601d54601c546040805163543f171560e01b815290516001600160a01b0393841695506317f7a1e49450919092169163543f1715916004808301926020929190829003018186803b158015614bcc57600080fd5b505afa158015614be0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614c049190615498565b614c0c615035565b6040518363ffffffff1660e01b8152600401614c299291906157d0565b600060405180830381600087803b158015614c4357600080fd5b505af1158015614c57573d6000803e3d6000fd5b505050505b601c54604051636fcccfb160e11b81523060048201526001600160a01b039091169063df999f6290602401600060405180830381600087803b158015614ca157600080fd5b505af1158015614cb5573d6000803e3d6000fd5b5050601b805464ff000000001916640100000000179055507ec2b3f8810fd0ab08df7f2fd1d7250a9633ebcb21787e4a8a3d934e2f2153c49050614cf7613d2c565b604051908152602001612484565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614d5357600080fd5b505afa158015614d67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d8b91906155e1565b15614da85760405162461bcd60e51b8152600401610b429061589f565b60035460ff1615614dcb5760405162461bcd60e51b8152600401610b42906158c8565b6001600160a01b038516614e1a5760405162461bcd60e51b8152602060048201526016602482015275496e76616c69642073656e646572206164647265737360501b6044820152606401610b42565b601c60009054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015614e6857600080fd5b505afa158015614e7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ea09190615498565b60405163579175bf60e01b81526001600160a01b0387811660048301526024820187905285811660448301526064820185905260848201849052919091169063579175bf9060a401600060405180830381600087803b158015614f0257600080fd5b505af1158015614f16573d6000803e3d6000fd5b505050505050505050565b6000611252670de0b6b3a7640000611e8c662386f26fc10000611ff1601c60009054906101000a90046001600160a01b03166001600160a01b031663f071bf4f6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f8b57600080fd5b505afa158015614f9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614fc3919061570f565b600f54611ff1565b6000611252670de0b6b3a7640000611e8c662386f26fc10000611ff1601c60009054906101000a90046001600160a01b03166001600160a01b031663f4bfd3db6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f8b57600080fd5b6000611252670de0b6b3a7640000611e8c662386f26fc10000611ff1601c60009054906101000a90046001600160a01b03166001600160a01b031663a131bdfe6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f8b57600080fd5b4260065587516150b69060259060208b019061523f565b5086516150ca9060269060208a019061523f565b50600a869055846150dc5760016150df565b60005b601b805460ff60d01b1916600160d01b83600181111561510f57634e487b7160e01b600052602160045260246000fd5b0217905550601b805465ff00000000001916600160281b8615150217905582516151409060249060208601906152c3565b5061514a8261515d565b6151538161515d565b5050505050505050565b60405160200161517890602080825260009082015260400190565b604051602081830303815290604052805190602001208160405160200161519f9190615824565b6040516020818303038152906040528051906020012014156152115760405162461bcd60e51b815260206004820152602560248201527f496e76616c696420706f736974696f6e206c6162656c2028656d70747920737460448201526472696e672960d81b6064820152608401610b42565b60095461521f9060016146df565b600981905560009081526022602090815260409091208251612243928401905b82805461524b906159ee565b90600052602060002090601f01602090048101928261526d57600085556152b3565b82601f1061528657805160ff19168380011785556152b3565b828001600101855582156152b3579182015b828111156152b3578251825591602001919060010190615298565b506152bf9291506152fd565b5090565b8280548282559060005260206000209081019282156152b357916020028201828111156152b3578251825591602001919060010190615298565b5b808211156152bf57600081556001016152fe565b600082601f830112615322578081fd5b813560206153376153328361595c565b61592b565b80838252828201915082860187848660051b8901011115615356578586fd5b855b8581101561539757813567ffffffffffffffff811115615376578788fd5b6153848a87838c0101615411565b8552509284019290840190600101615358565b5090979650505050505050565b600082601f8301126153b4578081fd5b813560206153c46153328361595c565b80838252828201915082860187848660051b89010111156153e3578586fd5b855b85811015615397578135845292840192908401906001016153e5565b803561540c81615a7f565b919050565b600082601f830112615421578081fd5b813567ffffffffffffffff81111561543b5761543b615a54565b61544e601f8201601f191660200161592b565b818152846020838601011115615462578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121561548d578081fd5b8135612d5e81615a6a565b6000602082840312156154a9578081fd5b8151612d5e81615a6a565b600080604083850312156154c6578081fd5b82356154d181615a6a565b946020939093013593505050565b600080604083850312156154f1578182fd5b823567ffffffffffffffff80821115615508578384fd5b615514868387016153a4565b93506020850135915080821115615529578283fd5b50615536858286016153a4565b9150509250929050565b600080600080600060a08688031215615557578081fd5b853567ffffffffffffffff8082111561556e578283fd5b61557a89838a016153a4565b9650602088013591508082111561558f578283fd5b5061559c888289016153a4565b94505060408601356155ad81615a6a565b94979396509394606081013594506080013592915050565b6000602082840312156155d6578081fd5b8135612d5e81615a7f565b6000602082840312156155f2578081fd5b8151612d5e81615a7f565b60008060008060008060008060006101208a8c03121561561b578384fd5b893567ffffffffffffffff80821115615632578586fd5b61563e8d838e01615411565b9a5060208c0135915080821115615653578586fd5b61565f8d838e01615411565b995060408c0135915080821115615674578586fd5b6156808d838e01615411565b985060608c0135975060808c0135965061569c60a08d01615401565b955060c08c01359150808211156156b1578485fd5b6156bd8d838e016153a4565b945060e08c013593506101008c01359150808211156156da578283fd5b506156e78c828d01615312565b9150509295985092959850929598565b600060208284031215615708578081fd5b5035919050565b600060208284031215615720578081fd5b5051919050565b60008060408385031215615739578182fd5b82359150602083013561574b81615a6a565b809150509250929050565b6000815180845260208085019450808401835b8381101561578557815187529582019590820190600101615769565b509495945050505050565b6001600160a01b03841681526060602082018190526000906157b490830185615756565b82810360408401526157c68185615756565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b602081526000612d5e6020830184615756565b602081016002831061581e57634e487b7160e01b600052602160045260246000fd5b91905290565b6000602080835283518082850152825b8181101561585057858101830151858201604001528201615834565b818111156158615783604083870101525b50601f01601f1916929092016040019392505050565b6020808252600e908201526d105b5bdd5b9d1cc8195e18d9595960921b604082015260600190565b6020808252600f908201526e26b0b730b3b2b9103830bab9b2b21760891b604082015260600190565b60208082526012908201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561595457615954615a54565b604052919050565b600067ffffffffffffffff82111561597657615976615a54565b5060051b60200190565b6000821982111561599357615993615a3e565b500190565b6000826159b357634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156159d2576159d2615a3e565b500290565b6000828210156159e9576159e9615a3e565b500390565b600181811c90821680615a0257607f821691505b602082108114156125c757634e487b7160e01b600052602260045260246000fd5b6000600019821415615a3757615a37615a3e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461114057600080fd5b801515811461114057600080fdfea2646970667358221220277756548334a6cb64979bb5660061be26844c245e1e197cb5a89acfc5203cfe64736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading