ETH Price: $2,077.49 (-0.54%)

Contract

0x14f05E3A555b1DC833e549e5625Fd0a05E76eBd2

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ExoticPositionalFixedMarket

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : ExoticPositionalFixedMarket.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 ExoticPositionalFixedMarket 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 claimableTicketsCount;
    uint public winningPosition;
    uint public disputeClosedTime;
    uint public fixedBondAmount;
    uint public disputePrice;
    uint public safeBoxLowAmount;
    uint public arbitraryRewardForDisputor;
    uint public withdrawalPeriod;

    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 userPosition;
    mapping(address => uint) public userAlreadyClaimed;
    mapping(uint => uint) public ticketsPerPosition;
    mapping(uint => string) public positionPhrase;
    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 of positions"
        );
        require(_tags.length > 0);
        setOwner(msg.sender);
        marketManager = IExoticPositionalMarketManager(msg.sender);
        thalesBonds = IThalesBonds(marketManager.thalesBonds());
        _initializeWithTwoParameters(
            _marketQuestion,
            _marketSource,
            _additionalInfo,
            _endOfPositioning,
            _fixedTicketPrice,
            _withdrawalAllowed,
            _tags,
            _positionPhrases[0],
            _positionPhrases[1]
        );
        if (_positionCount > 2) {
            for (uint i = 2; i < _positionCount; i++) {
                _addPosition(_positionPhrases[i]);
            }
        }
        fixedBondAmount = marketManager.fixedBondAmount();
        disputePrice = marketManager.disputePrice();
        safeBoxLowAmount = marketManager.safeBoxLowAmount();
        arbitraryRewardForDisputor = marketManager.arbitraryRewardForDisputor();
        withdrawalPeriod = _endOfPositioning.sub(marketManager.withdrawalTimePeriod());
    }

    function takeCreatorInitialPosition(uint _position) external onlyOwner {
        require(_position > 0 && _position <= positionCount, "Value invalid");
        require(ticketType == TicketType.FIXED_TICKET_PRICE, "Not Fixed type");
        totalUsersTakenPositions = totalUsersTakenPositions.add(1);
        address creator = marketManager.creatorAddress(address(this));
        ticketsPerPosition[_position] = ticketsPerPosition[_position].add(1);
        userPosition[creator] = _position;
        IThalesBonds(marketManager.thalesBonds()).transferToMarket(creator, fixedTicketPrice);
        emit NewPositionTaken(creator, _position, fixedTicketPrice);
    }

    function takeAPosition(
        uint _position,
        address collateral,
        uint expectedPayout,
        uint additionalSlippage
    ) external notPaused nonReentrant {
        require(_position > 0, "Invalid position");
        require(_position <= positionCount, "Position value invalid");
        require(canUsersPlacePosition(), "Positioning finished/market resolved");
        //require(same position)
        require(ticketType == TicketType.FIXED_TICKET_PRICE, "Not Fixed type");
        if (userPosition[msg.sender] == 0) {
            transferToMarket(msg.sender, fixedTicketPrice, collateral, expectedPayout, additionalSlippage);
            totalUsersTakenPositions = totalUsersTakenPositions.add(1);
        } else {
            ticketsPerPosition[userPosition[msg.sender]] = ticketsPerPosition[userPosition[msg.sender]].sub(1);
        }
        ticketsPerPosition[_position] = ticketsPerPosition[_position].add(1);
        userPosition[msg.sender] = _position;
        emit NewPositionTaken(msg.sender, _position, fixedTicketPrice);
    }

    function withdraw() external notPaused nonReentrant {
        require(withdrawalAllowed, "Not allowed");
        require(canUsersPlacePosition(), "Market resolved");
        require(block.timestamp <= withdrawalPeriod, "Withdrawal expired");
        require(userPosition[msg.sender] > 0, "Not a ticket holder");
        address creator = marketManager.creatorAddress(address(this));
        require(msg.sender != creator, "Can not withdraw");
        uint withdrawalFee = fixedTicketPrice.mul(marketManager.withdrawalPercentage()).mul(ONE_PERCENT).div(
            HUNDRED_PERCENT
        );
        totalUsersTakenPositions = totalUsersTakenPositions.sub(1);
        ticketsPerPosition[userPosition[msg.sender]] = ticketsPerPosition[userPosition[msg.sender]].sub(1);
        userPosition[msg.sender] = 0;
        thalesBonds.transferFromMarket(marketManager.safeBoxAddress(), withdrawalFee.div(2));
        thalesBonds.transferFromMarket(creator, withdrawalFee.div(2));
        thalesBonds.transferFromMarket(msg.sender, fixedTicketPrice.sub(withdrawalFee));
        emit TicketWithdrawn(msg.sender, fixedTicketPrice.sub(withdrawalFee));
    }

    function issueFees() external notPaused nonReentrant {
        require(canUsersClaim(), "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());
    }

    // market resolved only through the Manager
    function resolveMarket(uint _outcomePosition, address _resolverAddress) external onlyOwner {
        require(canMarketBeResolvedByOwner(), "Not resolvable. Disputed/not matured");
        require(_outcomePosition <= positionCount, "Outcome exeeds positionNum");
        winningPosition = _outcomePosition;
        if (_outcomePosition == CANCELED) {
            claimableTicketsCount = totalUsersTakenPositions;
            ticketsPerPosition[winningPosition] = totalUsersTakenPositions;
        } else {
            if (ticketsPerPosition[_outcomePosition] == 0) {
                claimableTicketsCount = totalUsersTakenPositions;
                noWinners = true;
            } else {
                claimableTicketsCount = ticketsPerPosition[_outcomePosition];
                noWinners = false;
            }
        }
        resolved = true;
        resolvedTime = block.timestamp;
        resolverAddress = _resolverAddress;
        emit MarketResolved(_outcomePosition, _resolverAddress, noWinners);
    }

    function resetMarket() external onlyOwner {
        require(resolved, "Not resolved");
        if (winningPosition == CANCELED) {
            ticketsPerPosition[winningPosition] = 0;
        }
        winningPosition = 0;
        claimableTicketsCount = 0;
        resolved = false;
        noWinners = false;
        resolvedTime = 0;
        resolverAddress = marketManager.safeBoxAddress();
        emit MarketReset();
    }

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

    function claimWinningTicket() external notPaused nonReentrant {
        require(canUsersClaim(), "Not finalized.");
        uint amount = getUserClaimableAmount(msg.sender);
        require(amount > 0, "Zero claimable.");
        claimableTicketsCount = claimableTicketsCount.sub(1);
        userPosition[msg.sender] = 0;
        thalesBonds.transferFromMarket(msg.sender, amount);
        if (!feesAndBondsClaimed) {
            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());
        }
        userAlreadyClaimed[msg.sender] = userAlreadyClaimed[msg.sender].add(amount);
        emit WinningTicketClaimed(msg.sender, amount);
    }

    function claimWinningTicketOnBehalf(address _user) external onlyOwner {
        require(canUsersClaim() || marketManager.cancelledByCreator(address(this)), "Not finalized.");
        uint amount = getUserClaimableAmount(_user);
        require(amount > 0, "Zero claimable.");
        claimableTicketsCount = claimableTicketsCount.sub(1);
        userPosition[_user] = 0;
        thalesBonds.transferFromMarket(_user, amount);
        if (
            winningPosition == CANCELED &&
            marketManager.cancelledByCreator(address(this)) &&
            thalesBonds.getCreatorBondForMarket(address(this)) > 0
        ) {
            marketManager.issueBondsBackToCreatorAndResolver(address(this));
            feesAndBondsClaimed = true;
        } else if (!feesAndBondsClaimed) {
            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());
        }
        userAlreadyClaimed[msg.sender] = userAlreadyClaimed[msg.sender].add(amount);
        emit WinningTicketClaimed(_user, amount);
    }

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

    function closeDispute() external onlyOwner {
        require(disputed, "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");
        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) {
        if (disputed) {
            return false;
        } else if (totalUsersTakenPositions != 1) {
            return totalUsersTakenPositions > 1 ? false : true;
        } else {
            return userPosition[marketManager.creatorAddress(address(this))] > 0 ? true : false;
        }
    }

    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 canIssueFees() external view returns (bool) {
        return
            !feesAndBondsClaimed &&
            (thalesBonds.getCreatorBondForMarket(address(this)) > 0 ||
                thalesBonds.getResolverBondForMarket(address(this)) > 0);
    }

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

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

    function getTotalPlacedAmount() public view returns (uint) {
        return totalUsersTakenPositions > 0 ? fixedTicketPrice.mul(totalUsersTakenPositions) : 0;
    }

    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 fixedTicketPrice.mul(ticketsPerPosition[_position]);
    }

    function getUserClaimableAmount(address _account) public view returns (uint) {
        return
            userPosition[_account] > 0 &&
                (noWinners || userPosition[_account] == winningPosition || winningPosition == CANCELED)
                ? getWinningAmountPerTicket()
                : 0;
    }

    /// FLEXIBLE BID FUNCTIONS

    function getAllUserPositions(address _account) external view returns (uint[] memory) {
        uint[] memory userAllPositions = new uint[](positionCount);
        if (positionCount == 0) {
            return userAllPositions;
        }
        userAllPositions[userPosition[_account]] = 1;
        return userAllPositions;
    }

    /// FIXED TICKET FUNCTIONS

    function getUserPosition(address _account) external view returns (uint) {
        return userPosition[_account];
    }

    function getUserPositionPhrase(address _account) external view returns (string memory) {
        return (userPosition[_account] > 0) ? positionPhrase[userPosition[_account]] : string("");
    }

    function getPotentialWinningAmountForAllPosition(bool forNewUserView, uint userAlreadyTakenPosition)
        external
        view
        returns (uint[] memory)
    {
        uint[] memory potentialWinning = new uint[](positionCount);
        for (uint i = 1; i <= positionCount; i++) {
            potentialWinning[i - 1] = getPotentialWinningAmountForPosition(i, forNewUserView, userAlreadyTakenPosition == i);
        }
        return potentialWinning;
    }

    function getUserPotentialWinningAmount(address _account) external view returns (uint) {
        return userPosition[_account] > 0 ? getPotentialWinningAmountForPosition(userPosition[_account], false, true) : 0;
    }

    function getPotentialWinningAmountForPosition(
        uint _position,
        bool forNewUserView,
        bool userHasAlreadyTakenThisPosition
    ) internal view returns (uint) {
        if (totalUsersTakenPositions == 0) {
            return 0;
        }
        if (ticketsPerPosition[_position] == 0) {
            return
                forNewUserView
                    ? applyDeduction(getTotalPlacedAmount().add(fixedTicketPrice))
                    : applyDeduction(getTotalPlacedAmount());
        } else {
            if (forNewUserView) {
                return
                    applyDeduction(getTotalPlacedAmount().add(fixedTicketPrice)).div(ticketsPerPosition[_position].add(1));
            } else {
                uint calculatedPositions = userHasAlreadyTakenThisPosition && ticketsPerPosition[_position] > 0
                    ? ticketsPerPosition[_position]
                    : ticketsPerPosition[_position].add(1);
                return applyDeduction(getTotalPlacedAmount()).div(calculatedPositions);
            }
        }
    }

    function getWinningAmountPerTicket() public view returns (uint) {
        if (totalUsersTakenPositions == 0 || !resolved || (!noWinners && (ticketsPerPosition[winningPosition] == 0))) {
            return 0;
        }
        if (noWinners) {
            return getTotalClaimableAmount().div(totalUsersTakenPositions);
        } else {
            return
                winningPosition == CANCELED
                    ? fixedTicketPrice
                    : getTotalClaimableAmount().div(ticketsPerPosition[winningPosition]);
        }
    }

    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 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,
        string memory _additionalInfo,
        uint _endOfPositioning,
        uint _fixedTicketPrice,
        bool _withdrawalAllowed,
        uint[] memory _tags,
        string memory _positionPhrase1,
        string memory _positionPhrase2
    ) internal {
        creationTime = block.timestamp;
        marketQuestion = _marketQuestion;
        marketSource = _marketSource;
        additionalInfo = _additionalInfo;
        endOfPositioning = _endOfPositioning;
        // Ticket Type can be determined based on ticket price
        ticketType = _fixedTicketPrice > 0 ? TicketType.FIXED_TICKET_PRICE : TicketType.FLEXIBLE_BID;
        fixedTicketPrice = _fixedTicketPrice;
        // Withdrawal allowance determined based on withdrawal percentage, if it is over 100% then it is forbidden
        withdrawalAllowed = _withdrawalAllowed;
        // The tag is just a number for now
        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)");
        // require(bytes(_position).length < marketManager.marketPositionStringLimit(), "Position label exceeds length");
        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 WinningTicketClaimed(address account, uint amount);
    event BackstopTimeoutPeriodChanged(uint timeoutPeriod);
    event NewPositionTaken(address account, uint position, uint fixedTicketAmount);
    event TicketWithdrawn(address account, uint amount);
    event BondIncreased(uint amount, uint totalAmount);
    event BondDecreased(uint amount, uint totalAmount);
    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 Security Audit

Contract ABI

API
[{"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":"position","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fixedTicketAmount","type":"uint256"}],"name":"NewPositionTaken","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":"WinningTicketClaimed","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":"","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":"claimableTicketsCount","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":[{"internalType":"bool","name":"forNewUserView","type":"bool"},{"internalType":"uint256","name":"userAlreadyTakenPosition","type":"uint256"}],"name":"getPotentialWinningAmountForAllPosition","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"}],"name":"getUserPosition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getUserPositionPhrase","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getUserPotentialWinningAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWinningAmountPerTicket","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":"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":"_position","type":"uint256"},{"internalType":"address","name":"collateral","type":"address"},{"internalType":"uint256","name":"expectedPayout","type":"uint256"},{"internalType":"uint256","name":"additionalSlippage","type":"uint256"}],"name":"takeAPosition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_position","type":"uint256"}],"name":"takeCreatorInitialPosition","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 ExoticPositionalFixedMarket.TicketType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ticketsPerPosition","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"}],"name":"userPosition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"winningPosition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"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"}]

608060405234801561001057600080fd5b5061551d806100206000396000f3fe608060405234801561001057600080fd5b50600436106104c15760003560e01c8063833c26d711610278578063caf14b951161015c578063e3b22130116100ce578063f02a594c11610092578063f02a594c146109b2578063f2af88d4146109c5578063f44e7fba146109ce578063f6ac7d9f146109d6578063fd5d01be146109e9578063ffe39fbd146109f257600080fd5b8063e3b2213014610971578063e7702d0514610979578063e943a26414610982578063ebc797721461098a578063ee26eed11461099257600080fd5b8063d9158ecc11610120578063d9158ecc14610907578063dcd295ce14610910578063dde27c3a14610930578063dfb8bae714610938578063e0cd6de61461094b578063e18f0fa61461095e57600080fd5b8063caf14b95146108be578063d1a702ae146108cf578063d7da5788146108e2578063d8270dce146108eb578063d8c4dc8b146108f457600080fd5b8063a9daaed5116101f5578063b7c8318e116101b9578063b7c8318e14610877578063bca7093d1461088a578063bcd7b35214610893578063c0fda0ec1461089b578063c3b83f5f146108a3578063c747b193146108b657600080fd5b8063a9daaed51461081a578063ae3e420e14610824578063b0092db71461082c578063b1db5bec14610835578063b20feaaf1461084f57600080fd5b806391b4ded91161023c57806391b4ded9146107c857806393a12402146107d157806398c185e3146107f1578063995d9ab7146107fe578063a1d193611461080657600080fd5b8063833c26d71461078357806389265ca71461078b5780638a15a277146107945780638da5cb5b146107a75780638e2b2767146107c057600080fd5b80633f6fa655116103aa5780635fcf27be1161031c5780636da19c35116102e05780636da19c351461073b5780636f9b601a1461074457806371cd005a1461074c57806371e0c7421461075f57806379ba50971461076857806379c8215e1461077057600080fd5b80635fcf27be14610706578063627820441461070f578063642bc7db14610717578063694965071461072a5780636bfefd6b1461073357600080fd5b80634fd6137c1161036e5780634fd6137c1461068e578063525aabc91461069657806353a47bb7146106aa5780635a999bea146106bd5780635b7c2dad146106d05780635c975abb146106f957600080fd5b80633f6fa6551461062b5780634063c8651461063e57806341ed2c1214610646578063465591f9146106715780634d08cfdc1461067a57600080fd5b80631897c8fe116104435780632d178964116104075780632d178964146105e35780632ee95349146105eb57806339cdf4ed146105fe5780633af04f50146106115780633bfe56071461061a5780633ccfd60b1461062357600080fd5b80631897c8fe1461059757806319b22f4d1461059f57806320822abc146105bf5780632486d671146105d2578063253772d9146105db57600080fd5b80631024e95d1161048a5780631024e95d1461054357806313af4035146105565780631627540c1461056957806316c38b3c1461057c578063174478361461058f57600080fd5b8062f367a8146104c657806303bb87d7146104e1578063066f69af146104eb5780630695c46c146105005780630c737add14610522575b600080fd5b6104ce6109fa565b6040519081526020015b60405180910390f35b6104e9610a1f565b005b6104f3610b7e565b6040516104d891906152a0565b60175461051290610100900460ff1681565b60405190151581526020016104d8565b60175461053690600160d01b900460ff1681565b6040516104d89190615278565b6104ce610551366004614feb565b610c0c565b6104e9610564366004614feb565b610c5a565b6104e9610577366004614feb565b610d95565b6104e961058a366004615023565b610deb565b6104f36110b9565b6105126110c6565b6105b26105ad36600461505b565b6111cc565b6040516104d89190615234565b6104ce6105cd366004615180565b61128d565b6104ce60105481565b6105126112ae565b6104ce6113cb565b6105126105f9366004614feb565b6113fa565b61051261060c366004614feb565b6114e9565b6104ce60085481565b6104ce600c5481565b6104e961150c565b6017546105129062010000900460ff1681565b6104f3611b28565b601854610659906001600160a01b031681565b6040516001600160a01b0390911681526020016104d8565b6104ce60155481565b60175461051290600160201b900460ff1681565b6104e9611b35565b601754610512906301000000900460ff1681565b600154610659906001600160a01b031681565b6105b26106cb366004614feb565b611c33565b6104ce6106de366004614feb565b6001600160a01b03166000908152601a602052604090205490565b6003546105129060ff1681565b6104ce600a5481565b610512611cea565b6104e96107253660046151b0565b611d08565b6104ce600b5481565b6104e9611ec7565b6104ce60135481565b610512612010565b6104e961075a366004614feb565b61203d565b6104ce60115481565b6104e96126c6565b6104f361077e366004615180565b6127c3565b61051261288d565b6104ce60125481565b6104e96107a2366004615180565b61292d565b600054610659906201000090046001600160a01b031681565b6104ce612be0565b6104ce60025481565b6104ce6107df366004615180565b601c6020526000908152604090205481565b6017546105129060ff1681565b6105b2612c13565b60175461051290600160281b900460ff1681565b6006541515610512565b6104e9612c6b565b6104ce60145481565b60175461065990600160301b90046001600160a01b031681565b6108576130e3565b6040805194855260208501939093529183015260608201526080016104d8565b6104ce610885366004614feb565b613117565b6104ce60165481565b6104e9613181565b601e546104ce565b6104e96108b1366004614feb565b613702565b6104ce61381b565b601254601354601454601554610857565b6104e96108dd366004615086565b613836565b6104ce600e5481565b6104ce60065481565b6104ce610902366004615180565b613dcf565b6104ce600d5481565b6104ce61091e366004614feb565b601b6020526000908152604090205481565b610512613dea565b601954610659906001600160a01b031681565b6104f3610959366004615180565b613e2c565b6104e961096c366004615180565b613e45565b610512613e82565b6104ce60095481565b6104ce613f6e565b6104e9614003565b6104ce6109a0366004614feb565b601a6020526000908152604090205481565b6104e96109c03660046151df565b614061565b6104ce600f5481565b6105126143bc565b6104f36109e4366004614feb565b6143e9565b6104ce60075481565b6104e961444e565b600080600e5411610a0b5750600090565b600e54600c54610a1a91614501565b905090565b610a27614514565b60175462010000900460ff16610a735760405162461bcd60e51b815260206004820152600c60248201526b139bdd081c995cdbdb1d995960a21b60448201526064015b60405180910390fd5b601054610a8d576010546000908152601c60205260408120555b60006010819055600f8190556017805462ff00ff191690556007556018546040805163543f171560e01b815290516001600160a01b039092169163543f171591600480820192602092909190829003018186803b158015610aed57600080fd5b505afa158015610b01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b259190615007565b601780546001600160a01b0392909216600160301b026601000000000000600160d01b03199092169190911790556040517faa376e3d0f974d7040008c204f57c3d1aa22962963ba8f9f12dc3701aca13f7e90600090a1565b601f8054610b8b90615442565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb790615442565b8015610c045780601f10610bd957610100808354040283529160200191610c04565b820191906000526020600020905b815481529060010190602001808311610be757829003601f168201915b505050505081565b6001600160a01b0381166000908152601a6020526040812054610c30576000610c54565b6001600160a01b0382166000908152601a6020526040812054610c5491600161458e565b92915050565b6001600160a01b038116610cb05760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f742062652030000000000000006044820152606401610a6a565b600154600160a01b900460ff1615610d1c5760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b6064820152608401610a6a565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b610d9d614514565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610d8a565b600054604051636e57728160e11b8152336004820152620100009091046001600160a01b03169063dcaee5029060240160206040518083038186803b158015610e3357600080fd5b505afa158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6b919061503f565b80610efe575060005460408051638da5cb5b60e01b8152905133926201000090046001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015610ebb57600080fd5b505afa158015610ecf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef39190615007565b6001600160a01b0316145b80610f1957506000546201000090046001600160a01b031633145b610f5a5760405162461bcd60e51b81526020600482015260126024820152714e6f6e2d706175736572206164647265737360701b6044820152606401610a6a565b60035460ff1615158115151415610f6e5750565b60035460ff161561105f57600060029054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610fc757600080fd5b505afa158015610fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fff9190615007565b6001600160a01b0316336001600160a01b03161461105f5760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c792050726f746f636f6c2044414f2063616e20756e70617573650000006044820152606401610a6a565b6003805460ff191682151590811790915560ff161561107d57426002555b60035460405160ff909116151581527f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec590602001610d8a565b50565b60208054610b8b90615442565b60175460009062010000900460ff1680156110e95750601754610100900460ff16155b8015610a1a57506000600754118015611187575060185460408051637b6e7f4160e11b81529051611184926001600160a01b03169163f6dcfe82916004808301926020929190829003018186803b15801561114357600080fd5b505afa158015611157573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117b9190615198565b60075490614687565b42115b80610a1a57506000600d541180156111a157506000600754115b80156111af57506000601154115b8015610a1a5750600d546011546111c591614687565b4211905090565b6060600060095467ffffffffffffffff8111156111f957634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611222578160200160208202803683370190505b50905060015b60095481116112855761123e818683871461458e565b8261124a60018461542b565b8151811061126857634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061127d8161547d565b915050611228565b509392505050565b601e818154811061129d57600080fd5b600091825260209091200154905081565b601754600090600160201b900460ff16158015610a1a5750601954604051632c21134b60e11b81523060048201526000916001600160a01b03169063584226969060240160206040518083038186803b15801561130a57600080fd5b505afa15801561131e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113429190615198565b1180610a1a575060195460405163f29e0d0f60e01b81523060048201526000916001600160a01b03169063f29e0d0f9060240160206040518083038186803b15801561138d57600080fd5b505afa1580156113a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c59190615198565b11905090565b601754600090600160d01b900460ff166001811115610a1a57634e487b7160e01b600052602160045260246000fd5b60185460405163677755bb60e01b81523060048201526000916001600160a01b03169063677755bb9060240160206040518083038186803b15801561143e57600080fd5b505afa158015611452573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114769190615007565b6001600160a01b0316826001600160a01b0316141561149757506000919050565b601754600160281b900460ff1680156114b357506114b36143bc565b80156114d657506001600160a01b0382166000908152601a602052604090205415155b8015610c54575060165442111592915050565b60006114f36110c6565b8015610c545750600061150583613117565b1192915050565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561155a57600080fd5b505afa15801561156e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611592919061503f565b156115af5760405162461bcd60e51b8152600401610a6a906152f3565b60035460ff16156115d25760405162461bcd60e51b8152600401610a6a9061531c565b6001600460008282546115e591906153d4565b9091555050600454601754600160281b900460ff166116345760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610a6a565b61163c6143bc565b61167a5760405162461bcd60e51b815260206004820152600f60248201526e13585c9ad95d081c995cdbdb1d9959608a1b6044820152606401610a6a565b6016544211156116c15760405162461bcd60e51b815260206004820152601260248201527115da5d1a191c985dd85b08195e1c1a5c995960721b6044820152606401610a6a565b336000908152601a60205260409020546117135760405162461bcd60e51b81526020600482015260136024820152722737ba1030903a34b1b5b2ba103437b63232b960691b6044820152606401610a6a565b60185460405163677755bb60e01b81523060048201526000916001600160a01b03169063677755bb9060240160206040518083038186803b15801561175757600080fd5b505afa15801561176b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178f9190615007565b9050336001600160a01b03821614156117dd5760405162461bcd60e51b815260206004820152601060248201526f43616e206e6f7420776974686472617760801b6044820152606401610a6a565b6000611894670de0b6b3a764000061188e662386f26fc10000611888601860009054906101000a90046001600160a01b03166001600160a01b0316632c3319576040518163ffffffff1660e01b815260040160206040518083038186803b15801561184757600080fd5b505afa15801561185b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187f9190615198565b600c5490614501565b90614501565b90614693565b600e549091506118a590600161469f565b600e55336000908152601a60209081526040808320548352601c9091529020546118d090600161469f565b336000818152601a6020818152604080842080548552601c8352818520969096559383529081529255601954601854825163543f171560e01b815292516001600160a01b03928316946317f7a1e494929093169263543f17159260048082019391829003018186803b15801561194557600080fd5b505afa158015611959573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197d9190615007565b611988846002614693565b6040518363ffffffff1660e01b81526004016119a592919061521b565b600060405180830381600087803b1580156119bf57600080fd5b505af11580156119d3573d6000803e3d6000fd5b50506019546001600160a01b031691506317f7a1e49050836119f6846002614693565b6040518363ffffffff1660e01b8152600401611a1392919061521b565b600060405180830381600087803b158015611a2d57600080fd5b505af1158015611a41573d6000803e3d6000fd5b5050601954600c546001600160a01b0390911692506317f7a1e491503390611a69908561469f565b6040518363ffffffff1660e01b8152600401611a8692919061521b565b600060405180830381600087803b158015611aa057600080fd5b505af1158015611ab4573d6000803e3d6000fd5b505050507fdcde81133cdcbee60c608a65b8ac850ce5966c16a94e8ff9e2798a778a86ca6d33611aef83600c5461469f90919063ffffffff16565b604051611afd92919061521b565b60405180910390a1505060045481146110b65760405162461bcd60e51b8152600401610a6a90615348565b60218054610b8b90615442565b611b3d614514565b600654611b7a5760405162461bcd60e51b815260206004820152600b60248201526a139bdd0818dc99585d195960aa1b6044820152606401610a6a565b601754610100900460ff1615611bc55760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e48191a5cdc1d5d195960821b6044820152606401610a6a565b6017805461ff001916610100179055611bdc6143bc565b6017805491151563010000000263ff0000001990921691909117905542600855604051600181527fcdb418bb756a3b142eb851c0930a83cb41387b1c2433a64e50a298c63b097286906020015b60405180910390a1565b6060600060095467ffffffffffffffff811115611c6057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611c89578160200160208202803683370190505b50905060095460001415611c9d5792915050565b6001600160a01b0383166000908152601a6020526040902054815160019183918110611cd957634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b60175460009062010000900460ff168015610a1a5750506010541590565b611d10614514565b611d18612010565b611d705760405162461bcd60e51b8152602060048201526024808201527f4e6f74207265736f6c7661626c652e2044697370757465642f6e6f74206d61746044820152631d5c995960e21b6064820152608401610a6a565b600954821115611dc25760405162461bcd60e51b815260206004820152601a60248201527f4f7574636f6d652065786565647320706f736974696f6e4e756d0000000000006044820152606401610a6a565b601082905581611deb57600e54600f8190556010546000908152601c6020526040902055611e33565b6000828152601c6020526040902054611e1657600e54600f556017805460ff19166001179055611e33565b6000828152601c6020526040902054600f556017805460ff191690555b60178054426007556001600160a01b038316600160301b0265ffffff010000600160d01b0319909116176201000017908190556040517fdd895f8f5d520ca7db3fc8259b53d471f0b9c249e49b40c20278f880824e5bb291611ebb918591859160ff91909116909283526001600160a01b039190911660208301521515604082015260600190565b60405180910390a15050565b611ecf614514565b60006010819055600e54600f819055908052601c60209081527fb9c6de81004e18dedadca3e5eabaab449ca91dff6f58efc9461da635fe77f849919091556017805462ff00ff191662010000179055426007556018546040805163543f171560e01b815290516001600160a01b039092169263543f171592600480840193829003018186803b158015611f6157600080fd5b505afa158015611f75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f999190615007565b601780546001600160a01b0392909216600160301b026601000000000000600160d01b031983168117909155604080516000815233602082015260ff92831692909316919091171515908201527fdd895f8f5d520ca7db3fc8259b53d471f0b9c249e49b40c20278f880824e5bb290606001611c29565b6000600a54421015801561202657506000600654115b8015610a1a575050601754610100900460ff161590565b612045614514565b61204d6110c6565b806120ce575060185460405163fbdec41360e01b81523060048201526001600160a01b039091169063fbdec4139060240160206040518083038186803b15801561209657600080fd5b505afa1580156120aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ce919061503f565b61210b5760405162461bcd60e51b815260206004820152600e60248201526d2737ba103334b730b634bd32b21760911b6044820152606401610a6a565b600061211682613117565b90506000811161215a5760405162461bcd60e51b815260206004820152600f60248201526e2d32b9379031b630b4b6b0b136329760891b6044820152606401610a6a565b600f5461216890600161469f565b600f556001600160a01b038083166000908152601a60205260408082209190915560195490516305fde87960e21b81529116906317f7a1e4906121b1908590859060040161521b565b600060405180830381600087803b1580156121cb57600080fd5b505af11580156121df573d6000803e3d6000fd5b50505050600060105414801561226b575060185460405163fbdec41360e01b81523060048201526001600160a01b039091169063fbdec4139060240160206040518083038186803b15801561223357600080fd5b505afa158015612247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226b919061503f565b80156122f05750601954604051632c21134b60e11b81523060048201526000916001600160a01b03169063584226969060240160206040518083038186803b1580156122b657600080fd5b505afa1580156122ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ee9190615198565b115b1561236c57601854604051636fcccfb160e11b81523060048201526001600160a01b039091169063df999f6290602401600060405180830381600087803b15801561233a57600080fd5b505af115801561234e573d6000803e3d6000fd5b50506017805464ff000000001916600160201b179055506126679050565b601754600160201b900460ff1661266757601054156125bb5760195460185460405163677755bb60e01b81523060048201526001600160a01b03928316926317f7a1e492169063677755bb9060240160206040518083038186803b1580156123d357600080fd5b505afa1580156123e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240b9190615007565b6124136146ab565b6040518363ffffffff1660e01b815260040161243092919061521b565b600060405180830381600087803b15801561244a57600080fd5b505af115801561245e573d6000803e3d6000fd5b50506019546017546001600160a01b0391821693506317f7a1e49250600160301b90041661248a614755565b6040518363ffffffff1660e01b81526004016124a792919061521b565b600060405180830381600087803b1580156124c157600080fd5b505af11580156124d5573d6000803e3d6000fd5b50506019546018546040805163543f171560e01b815290516001600160a01b0393841695506317f7a1e49450919092169163543f1715916004808301926020929190829003018186803b15801561252b57600080fd5b505afa15801561253f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125639190615007565b61256b6147bf565b6040518363ffffffff1660e01b815260040161258892919061521b565b600060405180830381600087803b1580156125a257600080fd5b505af11580156125b6573d6000803e3d6000fd5b505050505b601854604051636fcccfb160e11b81523060048201526001600160a01b039091169063df999f6290602401600060405180830381600087803b15801561260057600080fd5b505af1158015612614573d6000803e3d6000fd5b50506017805464ff000000001916600160201b179055507ec2b3f8810fd0ab08df7f2fd1d7250a9633ebcb21787e4a8a3d934e2f2153c4905061265561381b565b60405190815260200160405180910390a15b336000908152601b60205260409020546126819082614687565b336000908152601b60205260409081902091909155517f8f76a3afa3078a92f595673647cdaef4b54481fd8a6f8d3f2008c0fc4fb52fc590611ebb908490849061521b565b6001546001600160a01b0316331461273e5760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610a6a565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b606060095482111580156127d75750600082115b6127f05760405180602001604052806000815250610c54565b6000828152601d60205260409020805461280990615442565b80601f016020809104026020016040519081016040528092919081815260200182805461283590615442565b80156128825780601f1061285757610100808354040283529160200191612882565b820191906000526020600020905b81548152906001019060200180831161286557829003601f168201915b505050505092915050565b6000612897612010565b8015610a1a575060185460408051632b5cd01f60e01b81529051612925926001600160a01b031691632b5cd01f916004808301926020929190829003018186803b1580156128e457600080fd5b505afa1580156128f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061291c9190615198565b600a5490614687565b421015905090565b612935614514565b60008111801561294757506009548111155b6129835760405162461bcd60e51b815260206004820152600d60248201526c15985b1d59481a5b9d985b1a59609a1b6044820152606401610a6a565b6000601754600160d01b900460ff1660018111156129b157634e487b7160e01b600052602160045260246000fd5b146129ef5760405162461bcd60e51b815260206004820152600e60248201526d4e6f74204669786564207479706560901b6044820152606401610a6a565b600e546129fd906001614687565b600e5560185460405163677755bb60e01b81523060048201526000916001600160a01b03169063677755bb9060240160206040518083038186803b158015612a4457600080fd5b505afa158015612a58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7c9190615007565b6000838152601c6020526040902054909150612a99906001614687565b6000838152601c60209081526040808320939093556001600160a01b038085168352601a825291839020859055601854835163dfb8bae760e01b8152935192169263dfb8bae79260048083019392829003018186803b158015612afb57600080fd5b505afa158015612b0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b339190615007565b6001600160a01b031663e03e2d0282600c546040518363ffffffff1660e01b8152600401612b6292919061521b565b600060405180830381600087803b158015612b7c57600080fd5b505af1158015612b90573d6000803e3d6000fd5b5050600c54604080516001600160a01b038616815260208101879052908101919091527f28cef51ef06214503aa7e16bc05ab053593ca414883ea278a418ccacb53e91cd92506060019050611ebb565b6000600e5460001415612bf35750600090565b60105415612c0b57610a1a612c066109fa565b614829565b610a1a6109fa565b6060601e805480602002602001604051908101604052809291908181526020018280548015612c6157602002820191906000526020600020905b815481526020019060010190808311612c4d575b5050505050905090565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015612cb957600080fd5b505afa158015612ccd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cf1919061503f565b15612d0e5760405162461bcd60e51b8152600401610a6a906152f3565b60035460ff1615612d315760405162461bcd60e51b8152600401610a6a9061531c565b600160046000828254612d4491906153d4565b9091555050600454612d546110c6565b612d905760405162461bcd60e51b815260206004820152600d60248201526c139bdd08199a5b985b1a5e9959609a1b6044820152606401610a6a565b601754600160201b900460ff1615612dd95760405162461bcd60e51b815260206004820152600c60248201526b1199595cc818db185a5b595960a21b6044820152606401610a6a565b601054156130175760195460185460405163677755bb60e01b81523060048201526001600160a01b03928316926317f7a1e492169063677755bb9060240160206040518083038186803b158015612e2f57600080fd5b505afa158015612e43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e679190615007565b612e6f6146ab565b6040518363ffffffff1660e01b8152600401612e8c92919061521b565b600060405180830381600087803b158015612ea657600080fd5b505af1158015612eba573d6000803e3d6000fd5b50506019546017546001600160a01b0391821693506317f7a1e49250600160301b900416612ee6614755565b6040518363ffffffff1660e01b8152600401612f0392919061521b565b600060405180830381600087803b158015612f1d57600080fd5b505af1158015612f31573d6000803e3d6000fd5b50506019546018546040805163543f171560e01b815290516001600160a01b0393841695506317f7a1e49450919092169163543f1715916004808301926020929190829003018186803b158015612f8757600080fd5b505afa158015612f9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fbf9190615007565b612fc76147bf565b6040518363ffffffff1660e01b8152600401612fe492919061521b565b600060405180830381600087803b158015612ffe57600080fd5b505af1158015613012573d6000803e3d6000fd5b505050505b601854604051636fcccfb160e11b81523060048201526001600160a01b039091169063df999f6290602401600060405180830381600087803b15801561305c57600080fd5b505af1158015613070573d6000803e3d6000fd5b50506017805464ff000000001916600160201b179055507ec2b3f8810fd0ab08df7f2fd1d7250a9633ebcb21787e4a8a3d934e2f2153c490506130b161381b565b60405190815260200160405180910390a160045481146110b65760405162461bcd60e51b8152600401610a6a90615348565b6000806000806130f16146ab565b6130f9614755565b6131016147bf565b61310961381b565b935093509350935090919293565b6001600160a01b0381166000908152601a60205260408120541580159061316e575060175460ff168061316357506010546001600160a01b0383166000908152601a6020526040902054145b8061316e5750601054155b613179576000610c54565b610c54613f6e565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131cf57600080fd5b505afa1580156131e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613207919061503f565b156132245760405162461bcd60e51b8152600401610a6a906152f3565b60035460ff16156132475760405162461bcd60e51b8152600401610a6a9061531c565b60016004600082825461325a91906153d4565b909155505060045461326a6110c6565b6132a75760405162461bcd60e51b815260206004820152600e60248201526d2737ba103334b730b634bd32b21760911b6044820152606401610a6a565b60006132b233613117565b9050600081116132f65760405162461bcd60e51b815260206004820152600f60248201526e2d32b9379031b630b4b6b0b136329760891b6044820152606401610a6a565b600f5461330490600161469f565b600f55336000818152601a60205260408082209190915560195490516305fde87960e21b81526001600160a01b03909116916317f7a1e49161334b9190859060040161521b565b600060405180830381600087803b15801561336557600080fd5b505af1158015613379573d6000803e3d6000fd5b5050601754600160201b900460ff16915061367a905057601054156135ce5760195460185460405163677755bb60e01b81523060048201526001600160a01b03928316926317f7a1e492169063677755bb9060240160206040518083038186803b1580156133e657600080fd5b505afa1580156133fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061341e9190615007565b6134266146ab565b6040518363ffffffff1660e01b815260040161344392919061521b565b600060405180830381600087803b15801561345d57600080fd5b505af1158015613471573d6000803e3d6000fd5b50506019546017546001600160a01b0391821693506317f7a1e49250600160301b90041661349d614755565b6040518363ffffffff1660e01b81526004016134ba92919061521b565b600060405180830381600087803b1580156134d457600080fd5b505af11580156134e8573d6000803e3d6000fd5b50506019546018546040805163543f171560e01b815290516001600160a01b0393841695506317f7a1e49450919092169163543f1715916004808301926020929190829003018186803b15801561353e57600080fd5b505afa158015613552573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135769190615007565b61357e6147bf565b6040518363ffffffff1660e01b815260040161359b92919061521b565b600060405180830381600087803b1580156135b557600080fd5b505af11580156135c9573d6000803e3d6000fd5b505050505b601854604051636fcccfb160e11b81523060048201526001600160a01b039091169063df999f6290602401600060405180830381600087803b15801561361357600080fd5b505af1158015613627573d6000803e3d6000fd5b50506017805464ff000000001916600160201b179055507ec2b3f8810fd0ab08df7f2fd1d7250a9633ebcb21787e4a8a3d934e2f2153c4905061366861381b565b60405190815260200160405180910390a15b336000908152601b60205260409020546136949082614687565b336000818152601b6020526040908190209290925590517f8f76a3afa3078a92f595673647cdaef4b54481fd8a6f8d3f2008c0fc4fb52fc5916136d891849061521b565b60405180910390a15060045481146110b65760405162461bcd60e51b8152600401610a6a90615348565b61370a614514565b6001600160a01b0381166137525760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610a6a565b600154600160a81b900460ff16156137a25760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b6044820152606401610a6a565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610d8a565b6000610a1a613828612be0565b6138306109fa565b9061469f565b600054610100900460ff166138515760005460ff1615613855565b303b155b6138b85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a6a565b600054610100900460ff161580156138da576000805461ffff19166101011790555b6002831015801561395b5750336001600160a01b0316636f191fd96040518163ffffffff1660e01b815260040160206040518083038186803b15801561391f57600080fd5b505afa158015613933573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139579190615198565b8311155b6139a75760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964206e756d206f6620706f736974696f6e7300000000000000006044820152606401610a6a565b60008451116139b557600080fd5b6139be33610c5a565b601880546001600160a01b031916339081179091556040805163dfb8bae760e01b8152905163dfb8bae791600480820192602092909190829003018186803b158015613a0957600080fd5b505afa158015613a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a419190615007565b601960006101000a8154816001600160a01b0302191690836001600160a01b03160217905550613ac88a8a8a8a8a8a8a89600081518110613a9257634e487b7160e01b600052603260045260246000fd5b60200260200101518a600181518110613abb57634e487b7160e01b600052603260045260246000fd5b60200260200101516149e4565b6002831115613b205760025b83811015613b1e57613b0c838281518110613aff57634e487b7160e01b600052603260045260246000fd5b6020026020010151614abb565b80613b168161547d565b915050613ad4565b505b601860009054906101000a90046001600160a01b03166001600160a01b03166389265ca76040518163ffffffff1660e01b815260040160206040518083038186803b158015613b6e57600080fd5b505afa158015613b82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ba69190615198565b60125560185460408051636da19c3560e01b815290516001600160a01b0390921691636da19c3591600480820192602092909190829003018186803b158015613bee57600080fd5b505afa158015613c02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c269190615198565b6013556018546040805163b0092db760e01b815290516001600160a01b039092169163b0092db791600480820192602092909190829003018186803b158015613c6e57600080fd5b505afa158015613c82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ca69190615198565b6014556018546040805163465591f960e01b815290516001600160a01b039092169163465591f991600480820192602092909190829003018186803b158015613cee57600080fd5b505afa158015613d02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d269190615198565b601555601854604080516326c4422360e21b81529051613dae926001600160a01b031691639b11088c916004808301926020929190829003018186803b158015613d6f57600080fd5b505afa158015613d83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613da79190615198565b889061469f565b6016558015613dc3576000805461ff00191690555b50505050505050505050565b6000818152601c6020526040812054600c54610c5491614501565b6000600a544210158015613e0057506000600654115b8015613e145750601754610100900460ff16155b8015610a1a57505060175462010000900460ff161590565b601d6020526000908152604090208054610b8b90615442565b613e4d614514565b600d8190556040518181527f8eefe2f226fd813871fb3411baeb5a5752dfd5b97c49c5ec9fb5228fe79aaf5090602001610d8a565b601754600090610100900460ff1615613e9b5750600090565b600e54600114613ebb576001600e5411613eb55750600190565b50600090565b60185460405163677755bb60e01b8152306004820152600091601a9183916001600160a01b03169063677755bb9060240160206040518083038186803b158015613f0457600080fd5b505afa158015613f18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3c9190615007565b6001600160a01b03166001600160a01b031681526020019081526020016000205411613f685750600090565b50600190565b6000600e5460001480613f8a575060175462010000900460ff16155b80613fb2575060175460ff16158015613fb257506010546000908152601c6020526040902054155b15613fbd5750600090565b60175460ff1615613fd657610a1a600e5461188e612be0565b60105415613ffc576010546000908152601c6020526040902054610a1a9061188e612be0565b50600c5490565b60055460ff161561404c5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610a6a565b6005805460ff19166001908117909155600455565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140af57600080fd5b505afa1580156140c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140e7919061503f565b156141045760405162461bcd60e51b8152600401610a6a906152f3565b60035460ff16156141275760405162461bcd60e51b8152600401610a6a9061531c565b60016004600082825461413a91906153d4565b9091555050600454846141825760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b2103837b9b4ba34b7b760811b6044820152606401610a6a565b6009548511156141cd5760405162461bcd60e51b8152602060048201526016602482015275141bdcda5d1a5bdb881d985b1d59481a5b9d985b1a5960521b6044820152606401610a6a565b6141d56143bc565b61422d5760405162461bcd60e51b8152602060048201526024808201527f506f736974696f6e696e672066696e69736865642f6d61726b6574207265736f6044820152631b1d995960e21b6064820152608401610a6a565b6000601754600160d01b900460ff16600181111561425b57634e487b7160e01b600052602160045260246000fd5b146142995760405162461bcd60e51b815260206004820152600e60248201526d4e6f74204669786564207479706560901b6044820152606401610a6a565b336000908152601a60205260409020546142d2576142bc33600c54868686614ba5565b600e546142ca906001614687565b600e55614318565b336000908152601a60209081526040808320548352601c9091529020546142fa90600161469f565b336000908152601a60209081526040808320548352601c9091529020555b6000858152601c6020526040902054614332906001614687565b6000868152601c602090815260408083209390935533808352601a825291839020889055600c5483519283529082018890528183015290517f28cef51ef06214503aa7e16bc05ab053593ca414883ea278a418ccacb53e91cd9181900360600190a160045481146143b55760405162461bcd60e51b8152600401610a6a90615348565b5050505050565b6000600a544211158015613e1457506000600654118015610a1a57505060175462010000900460ff161590565b6001600160a01b0381166000908152601a602052604090205460609061441e5760405180602001604052806000815250610c54565b6001600160a01b0382166000908152601a60209081526040808320548352601d9091529020805461280990615442565b614456614514565b601754610100900460ff1661449c5760405162461bcd60e51b815260206004820152600c60248201526b139bdd08191a5cdc1d5d195960a21b6044820152606401610a6a565b426011556017546301000000900460ff16156144c4576017805463ff00ff00191690556144d0565b6017805461ff00191690555b604051600081527fcdb418bb756a3b142eb851c0930a83cb41387b1c2433a64e50a298c63b09728690602001611c29565b600061450d828461540c565b9392505050565b6000546201000090046001600160a01b0316331461458c5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610a6a565b565b6000600e54600014156145a35750600061450d565b6000848152601c60205260409020546145e957826145cb576145c6612c066109fa565b6145e2565b6145e2612c06600c546145dc6109fa565b90614687565b905061450d565b821561461e576000848152601c60205260409020546145e29061460d906001614687565b61188e612c06600c546145dc6109fa565b600082801561463a57506000858152601c602052604090205415155b61465d576000858152601c6020526040902054614658906001614687565b61466d565b6000858152601c60205260409020545b905061467e8161188e612c066109fa565b95945050505050565b600061450d82846153d4565b600061450d82846153ec565b600061450d828461542b565b6000610a1a670de0b6b3a764000061188e662386f26fc10000611888601860009054906101000a90046001600160a01b03166001600160a01b031663f071bf4f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561471557600080fd5b505afa158015614729573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061474d9190615198565b6118886109fa565b6000610a1a670de0b6b3a764000061188e662386f26fc10000611888601860009054906101000a90046001600160a01b03166001600160a01b031663f4bfd3db6040518163ffffffff1660e01b815260040160206040518083038186803b15801561471557600080fd5b6000610a1a670de0b6b3a764000061188e662386f26fc10000611888601860009054906101000a90046001600160a01b03166001600160a01b031663a131bdfe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561471557600080fd5b6000610c54670de0b6b3a764000061188e662386f26fc100006118886149dd6149d5601860009054906101000a90046001600160a01b03166001600160a01b031663f4bfd3db6040518163ffffffff1660e01b815260040160206040518083038186803b15801561489957600080fd5b505afa1580156148ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148d19190615198565b6018546040805163f071bf4f60e01b815290516145dc926001600160a01b03169163f071bf4f916004808301926020929190829003018186803b15801561491757600080fd5b505afa15801561492b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061494f9190615198565b601860009054906101000a90046001600160a01b03166001600160a01b031663a131bdfe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561499d57600080fd5b505afa1580156149b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145dc9190615198565b60649061469f565b8790614501565b4260065588516149fb90601f9060208c0190614dae565b508751614a0e90602090818b0190614dae565b508651614a229060219060208a0190614dae565b50600a86905584614a34576001614a37565b60005b6017805460ff60d01b1916600160d01b836001811115614a6757634e487b7160e01b600052602160045260246000fd5b0217905550600c8590556017805465ff00000000001916600160281b861515021790558251614a9d90601e906020860190614e32565b50614aa782614abb565b614ab081614abb565b505050505050505050565b604051602001614ad690602080825260009082015260400190565b6040516020818303038152906040528051906020012081604051602001614afd91906152a0565b604051602081830303815290604052805190602001201415614b6f5760405162461bcd60e51b815260206004820152602560248201527f496e76616c696420706f736974696f6e206c6162656c2028656d70747920737460448201526472696e672960d81b6064820152608401610a6a565b600954614b7d906001614687565b60098190556000908152601d602090815260409091208251614ba192840190614dae565b5050565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614bf357600080fd5b505afa158015614c07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614c2b919061503f565b15614c485760405162461bcd60e51b8152600401610a6a906152f3565b60035460ff1615614c6b5760405162461bcd60e51b8152600401610a6a9061531c565b6001600160a01b038516614cb25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b2b73232b960911b6044820152606401610a6a565b601860009054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015614d0057600080fd5b505afa158015614d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d389190615007565b60405163579175bf60e01b81526001600160a01b0387811660048301526024820187905285811660448301526064820185905260848201849052919091169063579175bf9060a401600060405180830381600087803b158015614d9a57600080fd5b505af1158015614ab0573d6000803e3d6000fd5b828054614dba90615442565b90600052602060002090601f016020900481019282614ddc5760008555614e22565b82601f10614df557805160ff1916838001178555614e22565b82800160010185558215614e22579182015b82811115614e22578251825591602001919060010190614e07565b50614e2e929150614e6c565b5090565b828054828255906000526020600020908101928215614e225791602002820182811115614e22578251825591602001919060010190614e07565b5b80821115614e2e5760008155600101614e6d565b600082601f830112614e91578081fd5b81356020614ea6614ea1836153b0565b61537f565b80838252828201915082860187848660051b8901011115614ec5578586fd5b855b85811015614f0657813567ffffffffffffffff811115614ee5578788fd5b614ef38a87838c0101614f80565b8552509284019290840190600101614ec7565b5090979650505050505050565b600082601f830112614f23578081fd5b81356020614f33614ea1836153b0565b80838252828201915082860187848660051b8901011115614f52578586fd5b855b85811015614f0657813584529284019290840190600101614f54565b8035614f7b816154d9565b919050565b600082601f830112614f90578081fd5b813567ffffffffffffffff811115614faa57614faa6154ae565b614fbd601f8201601f191660200161537f565b818152846020838601011115614fd1578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215614ffc578081fd5b813561450d816154c4565b600060208284031215615018578081fd5b815161450d816154c4565b600060208284031215615034578081fd5b813561450d816154d9565b600060208284031215615050578081fd5b815161450d816154d9565b6000806040838503121561506d578081fd5b8235615078816154d9565b946020939093013593505050565b60008060008060008060008060006101208a8c0312156150a4578485fd5b893567ffffffffffffffff808211156150bb578687fd5b6150c78d838e01614f80565b9a5060208c01359150808211156150dc578687fd5b6150e88d838e01614f80565b995060408c01359150808211156150fd578687fd5b6151098d838e01614f80565b985060608c0135975060808c0135965061512560a08d01614f70565b955060c08c013591508082111561513a578485fd5b6151468d838e01614f13565b945060e08c013593506101008c0135915080821115615163578283fd5b506151708c828d01614e81565b9150509295985092959850929598565b600060208284031215615191578081fd5b5035919050565b6000602082840312156151a9578081fd5b5051919050565b600080604083850312156151c2578182fd5b8235915060208301356151d4816154c4565b809150509250929050565b600080600080608085870312156151f4578384fd5b843593506020850135615206816154c4565b93969395505050506040820135916060013590565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b8181101561526c57835183529284019291840191600101615250565b50909695505050505050565b602081016002831061529a57634e487b7160e01b600052602160045260246000fd5b91905290565b6000602080835283518082850152825b818110156152cc578581018301518582016040015282016152b0565b818111156152dd5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252600f908201526e26b0b730b3b2b9103830bab9b2b21760891b604082015260600190565b60208082526012908201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156153a8576153a86154ae565b604052919050565b600067ffffffffffffffff8211156153ca576153ca6154ae565b5060051b60200190565b600082198211156153e7576153e7615498565b500190565b60008261540757634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561542657615426615498565b500290565b60008282101561543d5761543d615498565b500390565b600181811c9082168061545657607f821691505b6020821081141561547757634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561549157615491615498565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146110b657600080fd5b80151581146110b657600080fdfea2646970667358221220ab743c55de09b5e624a4f96899e3777b1b515023a0e86d5bb10fbc4987c4a8d664736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106104c15760003560e01c8063833c26d711610278578063caf14b951161015c578063e3b22130116100ce578063f02a594c11610092578063f02a594c146109b2578063f2af88d4146109c5578063f44e7fba146109ce578063f6ac7d9f146109d6578063fd5d01be146109e9578063ffe39fbd146109f257600080fd5b8063e3b2213014610971578063e7702d0514610979578063e943a26414610982578063ebc797721461098a578063ee26eed11461099257600080fd5b8063d9158ecc11610120578063d9158ecc14610907578063dcd295ce14610910578063dde27c3a14610930578063dfb8bae714610938578063e0cd6de61461094b578063e18f0fa61461095e57600080fd5b8063caf14b95146108be578063d1a702ae146108cf578063d7da5788146108e2578063d8270dce146108eb578063d8c4dc8b146108f457600080fd5b8063a9daaed5116101f5578063b7c8318e116101b9578063b7c8318e14610877578063bca7093d1461088a578063bcd7b35214610893578063c0fda0ec1461089b578063c3b83f5f146108a3578063c747b193146108b657600080fd5b8063a9daaed51461081a578063ae3e420e14610824578063b0092db71461082c578063b1db5bec14610835578063b20feaaf1461084f57600080fd5b806391b4ded91161023c57806391b4ded9146107c857806393a12402146107d157806398c185e3146107f1578063995d9ab7146107fe578063a1d193611461080657600080fd5b8063833c26d71461078357806389265ca71461078b5780638a15a277146107945780638da5cb5b146107a75780638e2b2767146107c057600080fd5b80633f6fa655116103aa5780635fcf27be1161031c5780636da19c35116102e05780636da19c351461073b5780636f9b601a1461074457806371cd005a1461074c57806371e0c7421461075f57806379ba50971461076857806379c8215e1461077057600080fd5b80635fcf27be14610706578063627820441461070f578063642bc7db14610717578063694965071461072a5780636bfefd6b1461073357600080fd5b80634fd6137c1161036e5780634fd6137c1461068e578063525aabc91461069657806353a47bb7146106aa5780635a999bea146106bd5780635b7c2dad146106d05780635c975abb146106f957600080fd5b80633f6fa6551461062b5780634063c8651461063e57806341ed2c1214610646578063465591f9146106715780634d08cfdc1461067a57600080fd5b80631897c8fe116104435780632d178964116104075780632d178964146105e35780632ee95349146105eb57806339cdf4ed146105fe5780633af04f50146106115780633bfe56071461061a5780633ccfd60b1461062357600080fd5b80631897c8fe1461059757806319b22f4d1461059f57806320822abc146105bf5780632486d671146105d2578063253772d9146105db57600080fd5b80631024e95d1161048a5780631024e95d1461054357806313af4035146105565780631627540c1461056957806316c38b3c1461057c578063174478361461058f57600080fd5b8062f367a8146104c657806303bb87d7146104e1578063066f69af146104eb5780630695c46c146105005780630c737add14610522575b600080fd5b6104ce6109fa565b6040519081526020015b60405180910390f35b6104e9610a1f565b005b6104f3610b7e565b6040516104d891906152a0565b60175461051290610100900460ff1681565b60405190151581526020016104d8565b60175461053690600160d01b900460ff1681565b6040516104d89190615278565b6104ce610551366004614feb565b610c0c565b6104e9610564366004614feb565b610c5a565b6104e9610577366004614feb565b610d95565b6104e961058a366004615023565b610deb565b6104f36110b9565b6105126110c6565b6105b26105ad36600461505b565b6111cc565b6040516104d89190615234565b6104ce6105cd366004615180565b61128d565b6104ce60105481565b6105126112ae565b6104ce6113cb565b6105126105f9366004614feb565b6113fa565b61051261060c366004614feb565b6114e9565b6104ce60085481565b6104ce600c5481565b6104e961150c565b6017546105129062010000900460ff1681565b6104f3611b28565b601854610659906001600160a01b031681565b6040516001600160a01b0390911681526020016104d8565b6104ce60155481565b60175461051290600160201b900460ff1681565b6104e9611b35565b601754610512906301000000900460ff1681565b600154610659906001600160a01b031681565b6105b26106cb366004614feb565b611c33565b6104ce6106de366004614feb565b6001600160a01b03166000908152601a602052604090205490565b6003546105129060ff1681565b6104ce600a5481565b610512611cea565b6104e96107253660046151b0565b611d08565b6104ce600b5481565b6104e9611ec7565b6104ce60135481565b610512612010565b6104e961075a366004614feb565b61203d565b6104ce60115481565b6104e96126c6565b6104f361077e366004615180565b6127c3565b61051261288d565b6104ce60125481565b6104e96107a2366004615180565b61292d565b600054610659906201000090046001600160a01b031681565b6104ce612be0565b6104ce60025481565b6104ce6107df366004615180565b601c6020526000908152604090205481565b6017546105129060ff1681565b6105b2612c13565b60175461051290600160281b900460ff1681565b6006541515610512565b6104e9612c6b565b6104ce60145481565b60175461065990600160301b90046001600160a01b031681565b6108576130e3565b6040805194855260208501939093529183015260608201526080016104d8565b6104ce610885366004614feb565b613117565b6104ce60165481565b6104e9613181565b601e546104ce565b6104e96108b1366004614feb565b613702565b6104ce61381b565b601254601354601454601554610857565b6104e96108dd366004615086565b613836565b6104ce600e5481565b6104ce60065481565b6104ce610902366004615180565b613dcf565b6104ce600d5481565b6104ce61091e366004614feb565b601b6020526000908152604090205481565b610512613dea565b601954610659906001600160a01b031681565b6104f3610959366004615180565b613e2c565b6104e961096c366004615180565b613e45565b610512613e82565b6104ce60095481565b6104ce613f6e565b6104e9614003565b6104ce6109a0366004614feb565b601a6020526000908152604090205481565b6104e96109c03660046151df565b614061565b6104ce600f5481565b6105126143bc565b6104f36109e4366004614feb565b6143e9565b6104ce60075481565b6104e961444e565b600080600e5411610a0b5750600090565b600e54600c54610a1a91614501565b905090565b610a27614514565b60175462010000900460ff16610a735760405162461bcd60e51b815260206004820152600c60248201526b139bdd081c995cdbdb1d995960a21b60448201526064015b60405180910390fd5b601054610a8d576010546000908152601c60205260408120555b60006010819055600f8190556017805462ff00ff191690556007556018546040805163543f171560e01b815290516001600160a01b039092169163543f171591600480820192602092909190829003018186803b158015610aed57600080fd5b505afa158015610b01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b259190615007565b601780546001600160a01b0392909216600160301b026601000000000000600160d01b03199092169190911790556040517faa376e3d0f974d7040008c204f57c3d1aa22962963ba8f9f12dc3701aca13f7e90600090a1565b601f8054610b8b90615442565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb790615442565b8015610c045780601f10610bd957610100808354040283529160200191610c04565b820191906000526020600020905b815481529060010190602001808311610be757829003601f168201915b505050505081565b6001600160a01b0381166000908152601a6020526040812054610c30576000610c54565b6001600160a01b0382166000908152601a6020526040812054610c5491600161458e565b92915050565b6001600160a01b038116610cb05760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f742062652030000000000000006044820152606401610a6a565b600154600160a01b900460ff1615610d1c5760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b6064820152608401610a6a565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b610d9d614514565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610d8a565b600054604051636e57728160e11b8152336004820152620100009091046001600160a01b03169063dcaee5029060240160206040518083038186803b158015610e3357600080fd5b505afa158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6b919061503f565b80610efe575060005460408051638da5cb5b60e01b8152905133926201000090046001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015610ebb57600080fd5b505afa158015610ecf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef39190615007565b6001600160a01b0316145b80610f1957506000546201000090046001600160a01b031633145b610f5a5760405162461bcd60e51b81526020600482015260126024820152714e6f6e2d706175736572206164647265737360701b6044820152606401610a6a565b60035460ff1615158115151415610f6e5750565b60035460ff161561105f57600060029054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610fc757600080fd5b505afa158015610fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fff9190615007565b6001600160a01b0316336001600160a01b03161461105f5760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c792050726f746f636f6c2044414f2063616e20756e70617573650000006044820152606401610a6a565b6003805460ff191682151590811790915560ff161561107d57426002555b60035460405160ff909116151581527f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec590602001610d8a565b50565b60208054610b8b90615442565b60175460009062010000900460ff1680156110e95750601754610100900460ff16155b8015610a1a57506000600754118015611187575060185460408051637b6e7f4160e11b81529051611184926001600160a01b03169163f6dcfe82916004808301926020929190829003018186803b15801561114357600080fd5b505afa158015611157573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117b9190615198565b60075490614687565b42115b80610a1a57506000600d541180156111a157506000600754115b80156111af57506000601154115b8015610a1a5750600d546011546111c591614687565b4211905090565b6060600060095467ffffffffffffffff8111156111f957634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611222578160200160208202803683370190505b50905060015b60095481116112855761123e818683871461458e565b8261124a60018461542b565b8151811061126857634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061127d8161547d565b915050611228565b509392505050565b601e818154811061129d57600080fd5b600091825260209091200154905081565b601754600090600160201b900460ff16158015610a1a5750601954604051632c21134b60e11b81523060048201526000916001600160a01b03169063584226969060240160206040518083038186803b15801561130a57600080fd5b505afa15801561131e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113429190615198565b1180610a1a575060195460405163f29e0d0f60e01b81523060048201526000916001600160a01b03169063f29e0d0f9060240160206040518083038186803b15801561138d57600080fd5b505afa1580156113a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c59190615198565b11905090565b601754600090600160d01b900460ff166001811115610a1a57634e487b7160e01b600052602160045260246000fd5b60185460405163677755bb60e01b81523060048201526000916001600160a01b03169063677755bb9060240160206040518083038186803b15801561143e57600080fd5b505afa158015611452573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114769190615007565b6001600160a01b0316826001600160a01b0316141561149757506000919050565b601754600160281b900460ff1680156114b357506114b36143bc565b80156114d657506001600160a01b0382166000908152601a602052604090205415155b8015610c54575060165442111592915050565b60006114f36110c6565b8015610c545750600061150583613117565b1192915050565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561155a57600080fd5b505afa15801561156e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611592919061503f565b156115af5760405162461bcd60e51b8152600401610a6a906152f3565b60035460ff16156115d25760405162461bcd60e51b8152600401610a6a9061531c565b6001600460008282546115e591906153d4565b9091555050600454601754600160281b900460ff166116345760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610a6a565b61163c6143bc565b61167a5760405162461bcd60e51b815260206004820152600f60248201526e13585c9ad95d081c995cdbdb1d9959608a1b6044820152606401610a6a565b6016544211156116c15760405162461bcd60e51b815260206004820152601260248201527115da5d1a191c985dd85b08195e1c1a5c995960721b6044820152606401610a6a565b336000908152601a60205260409020546117135760405162461bcd60e51b81526020600482015260136024820152722737ba1030903a34b1b5b2ba103437b63232b960691b6044820152606401610a6a565b60185460405163677755bb60e01b81523060048201526000916001600160a01b03169063677755bb9060240160206040518083038186803b15801561175757600080fd5b505afa15801561176b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178f9190615007565b9050336001600160a01b03821614156117dd5760405162461bcd60e51b815260206004820152601060248201526f43616e206e6f7420776974686472617760801b6044820152606401610a6a565b6000611894670de0b6b3a764000061188e662386f26fc10000611888601860009054906101000a90046001600160a01b03166001600160a01b0316632c3319576040518163ffffffff1660e01b815260040160206040518083038186803b15801561184757600080fd5b505afa15801561185b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187f9190615198565b600c5490614501565b90614501565b90614693565b600e549091506118a590600161469f565b600e55336000908152601a60209081526040808320548352601c9091529020546118d090600161469f565b336000818152601a6020818152604080842080548552601c8352818520969096559383529081529255601954601854825163543f171560e01b815292516001600160a01b03928316946317f7a1e494929093169263543f17159260048082019391829003018186803b15801561194557600080fd5b505afa158015611959573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197d9190615007565b611988846002614693565b6040518363ffffffff1660e01b81526004016119a592919061521b565b600060405180830381600087803b1580156119bf57600080fd5b505af11580156119d3573d6000803e3d6000fd5b50506019546001600160a01b031691506317f7a1e49050836119f6846002614693565b6040518363ffffffff1660e01b8152600401611a1392919061521b565b600060405180830381600087803b158015611a2d57600080fd5b505af1158015611a41573d6000803e3d6000fd5b5050601954600c546001600160a01b0390911692506317f7a1e491503390611a69908561469f565b6040518363ffffffff1660e01b8152600401611a8692919061521b565b600060405180830381600087803b158015611aa057600080fd5b505af1158015611ab4573d6000803e3d6000fd5b505050507fdcde81133cdcbee60c608a65b8ac850ce5966c16a94e8ff9e2798a778a86ca6d33611aef83600c5461469f90919063ffffffff16565b604051611afd92919061521b565b60405180910390a1505060045481146110b65760405162461bcd60e51b8152600401610a6a90615348565b60218054610b8b90615442565b611b3d614514565b600654611b7a5760405162461bcd60e51b815260206004820152600b60248201526a139bdd0818dc99585d195960aa1b6044820152606401610a6a565b601754610100900460ff1615611bc55760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e48191a5cdc1d5d195960821b6044820152606401610a6a565b6017805461ff001916610100179055611bdc6143bc565b6017805491151563010000000263ff0000001990921691909117905542600855604051600181527fcdb418bb756a3b142eb851c0930a83cb41387b1c2433a64e50a298c63b097286906020015b60405180910390a1565b6060600060095467ffffffffffffffff811115611c6057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611c89578160200160208202803683370190505b50905060095460001415611c9d5792915050565b6001600160a01b0383166000908152601a6020526040902054815160019183918110611cd957634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b60175460009062010000900460ff168015610a1a5750506010541590565b611d10614514565b611d18612010565b611d705760405162461bcd60e51b8152602060048201526024808201527f4e6f74207265736f6c7661626c652e2044697370757465642f6e6f74206d61746044820152631d5c995960e21b6064820152608401610a6a565b600954821115611dc25760405162461bcd60e51b815260206004820152601a60248201527f4f7574636f6d652065786565647320706f736974696f6e4e756d0000000000006044820152606401610a6a565b601082905581611deb57600e54600f8190556010546000908152601c6020526040902055611e33565b6000828152601c6020526040902054611e1657600e54600f556017805460ff19166001179055611e33565b6000828152601c6020526040902054600f556017805460ff191690555b60178054426007556001600160a01b038316600160301b0265ffffff010000600160d01b0319909116176201000017908190556040517fdd895f8f5d520ca7db3fc8259b53d471f0b9c249e49b40c20278f880824e5bb291611ebb918591859160ff91909116909283526001600160a01b039190911660208301521515604082015260600190565b60405180910390a15050565b611ecf614514565b60006010819055600e54600f819055908052601c60209081527fb9c6de81004e18dedadca3e5eabaab449ca91dff6f58efc9461da635fe77f849919091556017805462ff00ff191662010000179055426007556018546040805163543f171560e01b815290516001600160a01b039092169263543f171592600480840193829003018186803b158015611f6157600080fd5b505afa158015611f75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f999190615007565b601780546001600160a01b0392909216600160301b026601000000000000600160d01b031983168117909155604080516000815233602082015260ff92831692909316919091171515908201527fdd895f8f5d520ca7db3fc8259b53d471f0b9c249e49b40c20278f880824e5bb290606001611c29565b6000600a54421015801561202657506000600654115b8015610a1a575050601754610100900460ff161590565b612045614514565b61204d6110c6565b806120ce575060185460405163fbdec41360e01b81523060048201526001600160a01b039091169063fbdec4139060240160206040518083038186803b15801561209657600080fd5b505afa1580156120aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ce919061503f565b61210b5760405162461bcd60e51b815260206004820152600e60248201526d2737ba103334b730b634bd32b21760911b6044820152606401610a6a565b600061211682613117565b90506000811161215a5760405162461bcd60e51b815260206004820152600f60248201526e2d32b9379031b630b4b6b0b136329760891b6044820152606401610a6a565b600f5461216890600161469f565b600f556001600160a01b038083166000908152601a60205260408082209190915560195490516305fde87960e21b81529116906317f7a1e4906121b1908590859060040161521b565b600060405180830381600087803b1580156121cb57600080fd5b505af11580156121df573d6000803e3d6000fd5b50505050600060105414801561226b575060185460405163fbdec41360e01b81523060048201526001600160a01b039091169063fbdec4139060240160206040518083038186803b15801561223357600080fd5b505afa158015612247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226b919061503f565b80156122f05750601954604051632c21134b60e11b81523060048201526000916001600160a01b03169063584226969060240160206040518083038186803b1580156122b657600080fd5b505afa1580156122ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ee9190615198565b115b1561236c57601854604051636fcccfb160e11b81523060048201526001600160a01b039091169063df999f6290602401600060405180830381600087803b15801561233a57600080fd5b505af115801561234e573d6000803e3d6000fd5b50506017805464ff000000001916600160201b179055506126679050565b601754600160201b900460ff1661266757601054156125bb5760195460185460405163677755bb60e01b81523060048201526001600160a01b03928316926317f7a1e492169063677755bb9060240160206040518083038186803b1580156123d357600080fd5b505afa1580156123e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240b9190615007565b6124136146ab565b6040518363ffffffff1660e01b815260040161243092919061521b565b600060405180830381600087803b15801561244a57600080fd5b505af115801561245e573d6000803e3d6000fd5b50506019546017546001600160a01b0391821693506317f7a1e49250600160301b90041661248a614755565b6040518363ffffffff1660e01b81526004016124a792919061521b565b600060405180830381600087803b1580156124c157600080fd5b505af11580156124d5573d6000803e3d6000fd5b50506019546018546040805163543f171560e01b815290516001600160a01b0393841695506317f7a1e49450919092169163543f1715916004808301926020929190829003018186803b15801561252b57600080fd5b505afa15801561253f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125639190615007565b61256b6147bf565b6040518363ffffffff1660e01b815260040161258892919061521b565b600060405180830381600087803b1580156125a257600080fd5b505af11580156125b6573d6000803e3d6000fd5b505050505b601854604051636fcccfb160e11b81523060048201526001600160a01b039091169063df999f6290602401600060405180830381600087803b15801561260057600080fd5b505af1158015612614573d6000803e3d6000fd5b50506017805464ff000000001916600160201b179055507ec2b3f8810fd0ab08df7f2fd1d7250a9633ebcb21787e4a8a3d934e2f2153c4905061265561381b565b60405190815260200160405180910390a15b336000908152601b60205260409020546126819082614687565b336000908152601b60205260409081902091909155517f8f76a3afa3078a92f595673647cdaef4b54481fd8a6f8d3f2008c0fc4fb52fc590611ebb908490849061521b565b6001546001600160a01b0316331461273e5760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610a6a565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b606060095482111580156127d75750600082115b6127f05760405180602001604052806000815250610c54565b6000828152601d60205260409020805461280990615442565b80601f016020809104026020016040519081016040528092919081815260200182805461283590615442565b80156128825780601f1061285757610100808354040283529160200191612882565b820191906000526020600020905b81548152906001019060200180831161286557829003601f168201915b505050505092915050565b6000612897612010565b8015610a1a575060185460408051632b5cd01f60e01b81529051612925926001600160a01b031691632b5cd01f916004808301926020929190829003018186803b1580156128e457600080fd5b505afa1580156128f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061291c9190615198565b600a5490614687565b421015905090565b612935614514565b60008111801561294757506009548111155b6129835760405162461bcd60e51b815260206004820152600d60248201526c15985b1d59481a5b9d985b1a59609a1b6044820152606401610a6a565b6000601754600160d01b900460ff1660018111156129b157634e487b7160e01b600052602160045260246000fd5b146129ef5760405162461bcd60e51b815260206004820152600e60248201526d4e6f74204669786564207479706560901b6044820152606401610a6a565b600e546129fd906001614687565b600e5560185460405163677755bb60e01b81523060048201526000916001600160a01b03169063677755bb9060240160206040518083038186803b158015612a4457600080fd5b505afa158015612a58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7c9190615007565b6000838152601c6020526040902054909150612a99906001614687565b6000838152601c60209081526040808320939093556001600160a01b038085168352601a825291839020859055601854835163dfb8bae760e01b8152935192169263dfb8bae79260048083019392829003018186803b158015612afb57600080fd5b505afa158015612b0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b339190615007565b6001600160a01b031663e03e2d0282600c546040518363ffffffff1660e01b8152600401612b6292919061521b565b600060405180830381600087803b158015612b7c57600080fd5b505af1158015612b90573d6000803e3d6000fd5b5050600c54604080516001600160a01b038616815260208101879052908101919091527f28cef51ef06214503aa7e16bc05ab053593ca414883ea278a418ccacb53e91cd92506060019050611ebb565b6000600e5460001415612bf35750600090565b60105415612c0b57610a1a612c066109fa565b614829565b610a1a6109fa565b6060601e805480602002602001604051908101604052809291908181526020018280548015612c6157602002820191906000526020600020905b815481526020019060010190808311612c4d575b5050505050905090565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015612cb957600080fd5b505afa158015612ccd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cf1919061503f565b15612d0e5760405162461bcd60e51b8152600401610a6a906152f3565b60035460ff1615612d315760405162461bcd60e51b8152600401610a6a9061531c565b600160046000828254612d4491906153d4565b9091555050600454612d546110c6565b612d905760405162461bcd60e51b815260206004820152600d60248201526c139bdd08199a5b985b1a5e9959609a1b6044820152606401610a6a565b601754600160201b900460ff1615612dd95760405162461bcd60e51b815260206004820152600c60248201526b1199595cc818db185a5b595960a21b6044820152606401610a6a565b601054156130175760195460185460405163677755bb60e01b81523060048201526001600160a01b03928316926317f7a1e492169063677755bb9060240160206040518083038186803b158015612e2f57600080fd5b505afa158015612e43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e679190615007565b612e6f6146ab565b6040518363ffffffff1660e01b8152600401612e8c92919061521b565b600060405180830381600087803b158015612ea657600080fd5b505af1158015612eba573d6000803e3d6000fd5b50506019546017546001600160a01b0391821693506317f7a1e49250600160301b900416612ee6614755565b6040518363ffffffff1660e01b8152600401612f0392919061521b565b600060405180830381600087803b158015612f1d57600080fd5b505af1158015612f31573d6000803e3d6000fd5b50506019546018546040805163543f171560e01b815290516001600160a01b0393841695506317f7a1e49450919092169163543f1715916004808301926020929190829003018186803b158015612f8757600080fd5b505afa158015612f9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fbf9190615007565b612fc76147bf565b6040518363ffffffff1660e01b8152600401612fe492919061521b565b600060405180830381600087803b158015612ffe57600080fd5b505af1158015613012573d6000803e3d6000fd5b505050505b601854604051636fcccfb160e11b81523060048201526001600160a01b039091169063df999f6290602401600060405180830381600087803b15801561305c57600080fd5b505af1158015613070573d6000803e3d6000fd5b50506017805464ff000000001916600160201b179055507ec2b3f8810fd0ab08df7f2fd1d7250a9633ebcb21787e4a8a3d934e2f2153c490506130b161381b565b60405190815260200160405180910390a160045481146110b65760405162461bcd60e51b8152600401610a6a90615348565b6000806000806130f16146ab565b6130f9614755565b6131016147bf565b61310961381b565b935093509350935090919293565b6001600160a01b0381166000908152601a60205260408120541580159061316e575060175460ff168061316357506010546001600160a01b0383166000908152601a6020526040902054145b8061316e5750601054155b613179576000610c54565b610c54613f6e565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131cf57600080fd5b505afa1580156131e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613207919061503f565b156132245760405162461bcd60e51b8152600401610a6a906152f3565b60035460ff16156132475760405162461bcd60e51b8152600401610a6a9061531c565b60016004600082825461325a91906153d4565b909155505060045461326a6110c6565b6132a75760405162461bcd60e51b815260206004820152600e60248201526d2737ba103334b730b634bd32b21760911b6044820152606401610a6a565b60006132b233613117565b9050600081116132f65760405162461bcd60e51b815260206004820152600f60248201526e2d32b9379031b630b4b6b0b136329760891b6044820152606401610a6a565b600f5461330490600161469f565b600f55336000818152601a60205260408082209190915560195490516305fde87960e21b81526001600160a01b03909116916317f7a1e49161334b9190859060040161521b565b600060405180830381600087803b15801561336557600080fd5b505af1158015613379573d6000803e3d6000fd5b5050601754600160201b900460ff16915061367a905057601054156135ce5760195460185460405163677755bb60e01b81523060048201526001600160a01b03928316926317f7a1e492169063677755bb9060240160206040518083038186803b1580156133e657600080fd5b505afa1580156133fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061341e9190615007565b6134266146ab565b6040518363ffffffff1660e01b815260040161344392919061521b565b600060405180830381600087803b15801561345d57600080fd5b505af1158015613471573d6000803e3d6000fd5b50506019546017546001600160a01b0391821693506317f7a1e49250600160301b90041661349d614755565b6040518363ffffffff1660e01b81526004016134ba92919061521b565b600060405180830381600087803b1580156134d457600080fd5b505af11580156134e8573d6000803e3d6000fd5b50506019546018546040805163543f171560e01b815290516001600160a01b0393841695506317f7a1e49450919092169163543f1715916004808301926020929190829003018186803b15801561353e57600080fd5b505afa158015613552573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135769190615007565b61357e6147bf565b6040518363ffffffff1660e01b815260040161359b92919061521b565b600060405180830381600087803b1580156135b557600080fd5b505af11580156135c9573d6000803e3d6000fd5b505050505b601854604051636fcccfb160e11b81523060048201526001600160a01b039091169063df999f6290602401600060405180830381600087803b15801561361357600080fd5b505af1158015613627573d6000803e3d6000fd5b50506017805464ff000000001916600160201b179055507ec2b3f8810fd0ab08df7f2fd1d7250a9633ebcb21787e4a8a3d934e2f2153c4905061366861381b565b60405190815260200160405180910390a15b336000908152601b60205260409020546136949082614687565b336000818152601b6020526040908190209290925590517f8f76a3afa3078a92f595673647cdaef4b54481fd8a6f8d3f2008c0fc4fb52fc5916136d891849061521b565b60405180910390a15060045481146110b65760405162461bcd60e51b8152600401610a6a90615348565b61370a614514565b6001600160a01b0381166137525760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610a6a565b600154600160a81b900460ff16156137a25760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b6044820152606401610a6a565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610d8a565b6000610a1a613828612be0565b6138306109fa565b9061469f565b600054610100900460ff166138515760005460ff1615613855565b303b155b6138b85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a6a565b600054610100900460ff161580156138da576000805461ffff19166101011790555b6002831015801561395b5750336001600160a01b0316636f191fd96040518163ffffffff1660e01b815260040160206040518083038186803b15801561391f57600080fd5b505afa158015613933573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139579190615198565b8311155b6139a75760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964206e756d206f6620706f736974696f6e7300000000000000006044820152606401610a6a565b60008451116139b557600080fd5b6139be33610c5a565b601880546001600160a01b031916339081179091556040805163dfb8bae760e01b8152905163dfb8bae791600480820192602092909190829003018186803b158015613a0957600080fd5b505afa158015613a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a419190615007565b601960006101000a8154816001600160a01b0302191690836001600160a01b03160217905550613ac88a8a8a8a8a8a8a89600081518110613a9257634e487b7160e01b600052603260045260246000fd5b60200260200101518a600181518110613abb57634e487b7160e01b600052603260045260246000fd5b60200260200101516149e4565b6002831115613b205760025b83811015613b1e57613b0c838281518110613aff57634e487b7160e01b600052603260045260246000fd5b6020026020010151614abb565b80613b168161547d565b915050613ad4565b505b601860009054906101000a90046001600160a01b03166001600160a01b03166389265ca76040518163ffffffff1660e01b815260040160206040518083038186803b158015613b6e57600080fd5b505afa158015613b82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ba69190615198565b60125560185460408051636da19c3560e01b815290516001600160a01b0390921691636da19c3591600480820192602092909190829003018186803b158015613bee57600080fd5b505afa158015613c02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c269190615198565b6013556018546040805163b0092db760e01b815290516001600160a01b039092169163b0092db791600480820192602092909190829003018186803b158015613c6e57600080fd5b505afa158015613c82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ca69190615198565b6014556018546040805163465591f960e01b815290516001600160a01b039092169163465591f991600480820192602092909190829003018186803b158015613cee57600080fd5b505afa158015613d02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d269190615198565b601555601854604080516326c4422360e21b81529051613dae926001600160a01b031691639b11088c916004808301926020929190829003018186803b158015613d6f57600080fd5b505afa158015613d83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613da79190615198565b889061469f565b6016558015613dc3576000805461ff00191690555b50505050505050505050565b6000818152601c6020526040812054600c54610c5491614501565b6000600a544210158015613e0057506000600654115b8015613e145750601754610100900460ff16155b8015610a1a57505060175462010000900460ff161590565b601d6020526000908152604090208054610b8b90615442565b613e4d614514565b600d8190556040518181527f8eefe2f226fd813871fb3411baeb5a5752dfd5b97c49c5ec9fb5228fe79aaf5090602001610d8a565b601754600090610100900460ff1615613e9b5750600090565b600e54600114613ebb576001600e5411613eb55750600190565b50600090565b60185460405163677755bb60e01b8152306004820152600091601a9183916001600160a01b03169063677755bb9060240160206040518083038186803b158015613f0457600080fd5b505afa158015613f18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3c9190615007565b6001600160a01b03166001600160a01b031681526020019081526020016000205411613f685750600090565b50600190565b6000600e5460001480613f8a575060175462010000900460ff16155b80613fb2575060175460ff16158015613fb257506010546000908152601c6020526040902054155b15613fbd5750600090565b60175460ff1615613fd657610a1a600e5461188e612be0565b60105415613ffc576010546000908152601c6020526040902054610a1a9061188e612be0565b50600c5490565b60055460ff161561404c5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610a6a565b6005805460ff19166001908117909155600455565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140af57600080fd5b505afa1580156140c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140e7919061503f565b156141045760405162461bcd60e51b8152600401610a6a906152f3565b60035460ff16156141275760405162461bcd60e51b8152600401610a6a9061531c565b60016004600082825461413a91906153d4565b9091555050600454846141825760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b2103837b9b4ba34b7b760811b6044820152606401610a6a565b6009548511156141cd5760405162461bcd60e51b8152602060048201526016602482015275141bdcda5d1a5bdb881d985b1d59481a5b9d985b1a5960521b6044820152606401610a6a565b6141d56143bc565b61422d5760405162461bcd60e51b8152602060048201526024808201527f506f736974696f6e696e672066696e69736865642f6d61726b6574207265736f6044820152631b1d995960e21b6064820152608401610a6a565b6000601754600160d01b900460ff16600181111561425b57634e487b7160e01b600052602160045260246000fd5b146142995760405162461bcd60e51b815260206004820152600e60248201526d4e6f74204669786564207479706560901b6044820152606401610a6a565b336000908152601a60205260409020546142d2576142bc33600c54868686614ba5565b600e546142ca906001614687565b600e55614318565b336000908152601a60209081526040808320548352601c9091529020546142fa90600161469f565b336000908152601a60209081526040808320548352601c9091529020555b6000858152601c6020526040902054614332906001614687565b6000868152601c602090815260408083209390935533808352601a825291839020889055600c5483519283529082018890528183015290517f28cef51ef06214503aa7e16bc05ab053593ca414883ea278a418ccacb53e91cd9181900360600190a160045481146143b55760405162461bcd60e51b8152600401610a6a90615348565b5050505050565b6000600a544211158015613e1457506000600654118015610a1a57505060175462010000900460ff161590565b6001600160a01b0381166000908152601a602052604090205460609061441e5760405180602001604052806000815250610c54565b6001600160a01b0382166000908152601a60209081526040808320548352601d9091529020805461280990615442565b614456614514565b601754610100900460ff1661449c5760405162461bcd60e51b815260206004820152600c60248201526b139bdd08191a5cdc1d5d195960a21b6044820152606401610a6a565b426011556017546301000000900460ff16156144c4576017805463ff00ff00191690556144d0565b6017805461ff00191690555b604051600081527fcdb418bb756a3b142eb851c0930a83cb41387b1c2433a64e50a298c63b09728690602001611c29565b600061450d828461540c565b9392505050565b6000546201000090046001600160a01b0316331461458c5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610a6a565b565b6000600e54600014156145a35750600061450d565b6000848152601c60205260409020546145e957826145cb576145c6612c066109fa565b6145e2565b6145e2612c06600c546145dc6109fa565b90614687565b905061450d565b821561461e576000848152601c60205260409020546145e29061460d906001614687565b61188e612c06600c546145dc6109fa565b600082801561463a57506000858152601c602052604090205415155b61465d576000858152601c6020526040902054614658906001614687565b61466d565b6000858152601c60205260409020545b905061467e8161188e612c066109fa565b95945050505050565b600061450d82846153d4565b600061450d82846153ec565b600061450d828461542b565b6000610a1a670de0b6b3a764000061188e662386f26fc10000611888601860009054906101000a90046001600160a01b03166001600160a01b031663f071bf4f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561471557600080fd5b505afa158015614729573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061474d9190615198565b6118886109fa565b6000610a1a670de0b6b3a764000061188e662386f26fc10000611888601860009054906101000a90046001600160a01b03166001600160a01b031663f4bfd3db6040518163ffffffff1660e01b815260040160206040518083038186803b15801561471557600080fd5b6000610a1a670de0b6b3a764000061188e662386f26fc10000611888601860009054906101000a90046001600160a01b03166001600160a01b031663a131bdfe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561471557600080fd5b6000610c54670de0b6b3a764000061188e662386f26fc100006118886149dd6149d5601860009054906101000a90046001600160a01b03166001600160a01b031663f4bfd3db6040518163ffffffff1660e01b815260040160206040518083038186803b15801561489957600080fd5b505afa1580156148ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148d19190615198565b6018546040805163f071bf4f60e01b815290516145dc926001600160a01b03169163f071bf4f916004808301926020929190829003018186803b15801561491757600080fd5b505afa15801561492b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061494f9190615198565b601860009054906101000a90046001600160a01b03166001600160a01b031663a131bdfe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561499d57600080fd5b505afa1580156149b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145dc9190615198565b60649061469f565b8790614501565b4260065588516149fb90601f9060208c0190614dae565b508751614a0e90602090818b0190614dae565b508651614a229060219060208a0190614dae565b50600a86905584614a34576001614a37565b60005b6017805460ff60d01b1916600160d01b836001811115614a6757634e487b7160e01b600052602160045260246000fd5b0217905550600c8590556017805465ff00000000001916600160281b861515021790558251614a9d90601e906020860190614e32565b50614aa782614abb565b614ab081614abb565b505050505050505050565b604051602001614ad690602080825260009082015260400190565b6040516020818303038152906040528051906020012081604051602001614afd91906152a0565b604051602081830303815290604052805190602001201415614b6f5760405162461bcd60e51b815260206004820152602560248201527f496e76616c696420706f736974696f6e206c6162656c2028656d70747920737460448201526472696e672960d81b6064820152608401610a6a565b600954614b7d906001614687565b60098190556000908152601d602090815260409091208251614ba192840190614dae565b5050565b600060029054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614bf357600080fd5b505afa158015614c07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614c2b919061503f565b15614c485760405162461bcd60e51b8152600401610a6a906152f3565b60035460ff1615614c6b5760405162461bcd60e51b8152600401610a6a9061531c565b6001600160a01b038516614cb25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b2b73232b960911b6044820152606401610a6a565b601860009054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015614d0057600080fd5b505afa158015614d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d389190615007565b60405163579175bf60e01b81526001600160a01b0387811660048301526024820187905285811660448301526064820185905260848201849052919091169063579175bf9060a401600060405180830381600087803b158015614d9a57600080fd5b505af1158015614ab0573d6000803e3d6000fd5b828054614dba90615442565b90600052602060002090601f016020900481019282614ddc5760008555614e22565b82601f10614df557805160ff1916838001178555614e22565b82800160010185558215614e22579182015b82811115614e22578251825591602001919060010190614e07565b50614e2e929150614e6c565b5090565b828054828255906000526020600020908101928215614e225791602002820182811115614e22578251825591602001919060010190614e07565b5b80821115614e2e5760008155600101614e6d565b600082601f830112614e91578081fd5b81356020614ea6614ea1836153b0565b61537f565b80838252828201915082860187848660051b8901011115614ec5578586fd5b855b85811015614f0657813567ffffffffffffffff811115614ee5578788fd5b614ef38a87838c0101614f80565b8552509284019290840190600101614ec7565b5090979650505050505050565b600082601f830112614f23578081fd5b81356020614f33614ea1836153b0565b80838252828201915082860187848660051b8901011115614f52578586fd5b855b85811015614f0657813584529284019290840190600101614f54565b8035614f7b816154d9565b919050565b600082601f830112614f90578081fd5b813567ffffffffffffffff811115614faa57614faa6154ae565b614fbd601f8201601f191660200161537f565b818152846020838601011115614fd1578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215614ffc578081fd5b813561450d816154c4565b600060208284031215615018578081fd5b815161450d816154c4565b600060208284031215615034578081fd5b813561450d816154d9565b600060208284031215615050578081fd5b815161450d816154d9565b6000806040838503121561506d578081fd5b8235615078816154d9565b946020939093013593505050565b60008060008060008060008060006101208a8c0312156150a4578485fd5b893567ffffffffffffffff808211156150bb578687fd5b6150c78d838e01614f80565b9a5060208c01359150808211156150dc578687fd5b6150e88d838e01614f80565b995060408c01359150808211156150fd578687fd5b6151098d838e01614f80565b985060608c0135975060808c0135965061512560a08d01614f70565b955060c08c013591508082111561513a578485fd5b6151468d838e01614f13565b945060e08c013593506101008c0135915080821115615163578283fd5b506151708c828d01614e81565b9150509295985092959850929598565b600060208284031215615191578081fd5b5035919050565b6000602082840312156151a9578081fd5b5051919050565b600080604083850312156151c2578182fd5b8235915060208301356151d4816154c4565b809150509250929050565b600080600080608085870312156151f4578384fd5b843593506020850135615206816154c4565b93969395505050506040820135916060013590565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b8181101561526c57835183529284019291840191600101615250565b50909695505050505050565b602081016002831061529a57634e487b7160e01b600052602160045260246000fd5b91905290565b6000602080835283518082850152825b818110156152cc578581018301518582016040015282016152b0565b818111156152dd5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252600f908201526e26b0b730b3b2b9103830bab9b2b21760891b604082015260600190565b60208082526012908201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156153a8576153a86154ae565b604052919050565b600067ffffffffffffffff8211156153ca576153ca6154ae565b5060051b60200190565b600082198211156153e7576153e7615498565b500190565b60008261540757634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561542657615426615498565b500290565b60008282101561543d5761543d615498565b500390565b600181811c9082168061545657607f821691505b6020821081141561547757634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561549157615491615498565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146110b657600080fd5b80151581146110b657600080fdfea2646970667358221220ab743c55de09b5e624a4f96899e3777b1b515023a0e86d5bb10fbc4987c4a8d664736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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