ETH Price: $3,249.19 (+2.29%)

Contract

0x1d70B630303ad656697719B5eC78b93855236324
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x60806040319093472022-10-27 8:01:58544 days ago1666857718IN
 Create: ThalesOracleCouncil
0 ETH0.0000050.001

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ThalesOracleCouncil

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : ThalesOracleCouncil.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 "@openzeppelin/contracts-4.4.1/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";

import "../utils/proxy/solidity-0.8.0/ProxyReentrancyGuard.sol";
import "../utils/proxy/solidity-0.8.0/ProxyOwned.sol";
import "../interfaces/IExoticPositionalMarket.sol";
import "../interfaces/IExoticPositionalMarketManager.sol";
import "../interfaces/IThalesBonds.sol";

contract ThalesOracleCouncil is Initializable, ProxyOwned, PausableUpgradeable, ProxyReentrancyGuard {
    using SafeMath for uint;
    uint private constant COUNCIL_MAX_MEMBERS = 5;
    uint private constant VOTING_OPTIONS = 7;

    uint private constant ACCEPT_SLASH = 1;
    uint private constant ACCEPT_NO_SLASH = 2;
    uint private constant REFUSE_ON_POSITIONING = 3;
    uint private constant ACCEPT_RESULT = 4;
    uint private constant ACCEPT_RESET = 5;
    uint private constant REFUSE_MATURE = 6;

    uint private constant CREATOR_BOND = 101;
    uint private constant RESOLVER_BOND = 102;
    uint private constant DISPUTOR_BOND = 103;
    uint private constant CREATOR_AND_DISPUTOR = 104;
    uint private constant RESOLVER_AND_DISPUTOR = 105;

    uint private constant TEN_SUSD = 10 * 1e18;

    struct Dispute {
        address disputorAddress;
        string disputeString;
        uint disputeCode;
        uint disputeTimestamp;
        bool disputeInPositioningPhase;
    }

    IExoticPositionalMarketManager public marketManager;
    uint public councilMemberCount;
    mapping(uint => address) public councilMemberAddress;
    mapping(address => uint) public councilMemberIndex;
    mapping(address => uint) public marketTotalDisputes;
    mapping(address => uint) public marketLastClosedDispute;
    mapping(address => uint) public allOpenDisputesCancelledToIndexForMarket;
    mapping(address => uint) public marketOpenDisputesCount;
    mapping(address => bool) public marketClosedForDisputes;
    mapping(address => address) public firstMemberThatChoseWinningPosition;

    mapping(address => mapping(uint => Dispute)) public dispute;
    mapping(address => mapping(uint => uint[])) public disputeVote;
    mapping(address => mapping(uint => uint[VOTING_OPTIONS])) public disputeVotesCount;
    mapping(address => mapping(uint => uint)) public disputeWinningPositionChoosen;
    mapping(address => mapping(uint => mapping(address => uint))) public disputeWinningPositionChoosenByMember;
    mapping(address => mapping(uint => mapping(uint => uint))) public disputeWinningPositionVotes;

    function initialize(address _owner, address _marketManager) public initializer {
        setOwner(_owner);
        initNonReentrant();
        marketManager = IExoticPositionalMarketManager(_marketManager);
    }

    /* ========== VIEWS ========== */

    function canMarketBeDisputed(address _market) public view returns (bool) {
        return !marketClosedForDisputes[_market] && IExoticPositionalMarket(_market).isMarketCreated();
    }

    function getMarketOpenDisputes(address _market) external view returns (uint) {
        return marketOpenDisputesCount[_market];
    }

    function getMarketLastClosedDispute(address _market) external view returns (uint) {
        return marketLastClosedDispute[_market];
    }

    function getNumberOfCouncilMembersForMarketDispute(address _market, uint _index) external view returns (uint) {
        return disputeVote[_market][_index].length.sub(1);
    }

    function getVotesCountForMarketDispute(address _market, uint _index) public view returns (uint) {
        uint count = 0;
        for (uint i = 1; i < disputeVote[_market][_index].length; i++) {
            count += disputeVote[_market][_index][i] > 0 ? 1 : 0;
        }
        return count;
    }

    function getVotesMissingForMarketDispute(address _market, uint _index) external view returns (uint) {
        return disputeVote[_market][_index].length.sub(1).sub(getVotesCountForMarketDispute(_market, _index));
    }

    function getDispute(address _market, uint _index) external view returns (Dispute memory) {
        return dispute[_market][_index];
    }

    function getDisputeTimestamp(address _market, uint _index) external view returns (uint) {
        return dispute[_market][_index].disputeTimestamp;
    }

    function getDisputeAddressOfDisputor(address _market, uint _index) external view returns (address) {
        return dispute[_market][_index].disputorAddress;
    }

    function getDisputeString(address _market, uint _index) external view returns (string memory) {
        return dispute[_market][_index].disputeString;
    }

    function getDisputeCode(address _market, uint _index) external view returns (uint) {
        return dispute[_market][_index].disputeCode;
    }

    function getDisputeVotes(address _market, uint _index) external view returns (uint[] memory) {
        return disputeVote[_market][_index];
    }

    function getDisputeVoteOfCouncilMember(
        address _market,
        uint _index,
        address _councilMember
    ) external view returns (uint) {
        if (isOracleCouncilMember(_councilMember)) {
            return disputeVote[_market][_index][councilMemberIndex[_councilMember]];
        } else {
            require(isOracleCouncilMember(_councilMember), "Not OC");
            return 1e18;
        }
    }

    function isDisputeOpen(address _market, uint _index) external view returns (bool) {
        return dispute[_market][_index].disputeCode == 0;
    }

    function isDisputeCancelled(address _market, uint _index) external view returns (bool) {
        return
            dispute[_market][_index].disputeCode == REFUSE_ON_POSITIONING ||
            dispute[_market][_index].disputeCode == REFUSE_MATURE;
    }

    function isOpenDisputeCancelled(address _market, uint _disputeIndex) external view returns (bool) {
        return
            (marketClosedForDisputes[_market] || _disputeIndex <= allOpenDisputesCancelledToIndexForMarket[_market]) &&
            dispute[_market][_disputeIndex].disputeCode == 0 &&
            marketLastClosedDispute[_market] != _disputeIndex;
    }

    function canDisputorClaimbackBondFromUnclosedDispute(
        address _market,
        uint _disputeIndex,
        address _disputorAddress
    ) public view returns (bool) {
        if (
            marketManager.isActiveMarket(_market) &&
            _disputeIndex <= marketTotalDisputes[_market] &&
            (marketClosedForDisputes[_market] ||
                _disputeIndex <= allOpenDisputesCancelledToIndexForMarket[_market] ||
                marketManager.cancelledByCreator(_market)) &&
            dispute[_market][_disputeIndex].disputorAddress == _disputorAddress &&
            dispute[_market][_disputeIndex].disputeCode == 0 &&
            marketLastClosedDispute[_market] != _disputeIndex &&
            IThalesBonds(marketManager.thalesBonds()).getDisputorBondForMarket(_market, _disputorAddress) > 0
        ) {
            return true;
        } else {
            return false;
        }
    }

    function isOracleCouncilMember(address _councilMember) public view returns (bool) {
        return (councilMemberIndex[_councilMember] > 0);
    }

    function isMarketClosedForDisputes(address _market) public view returns (bool) {
        return marketClosedForDisputes[_market] || IExoticPositionalMarket(_market).canUsersClaim();
    }

    function setMarketManager(address _marketManager) external onlyOwner {
        require(_marketManager != address(0), "Invalid address");
        marketManager = IExoticPositionalMarketManager(_marketManager);
        emit NewMarketManager(_marketManager);
    }

    function addOracleCouncilMember(address _councilMember) external onlyOwner {
        require(_councilMember != address(0), "Invalid address.");
        require(councilMemberCount <= marketManager.maxOracleCouncilMembers(), "OC members exceeded");
        require(!isOracleCouncilMember(_councilMember), "Already OC");
        councilMemberCount = councilMemberCount.add(1);
        councilMemberAddress[councilMemberCount] = _councilMember;
        councilMemberIndex[_councilMember] = councilMemberCount;
        // marketManager.addPauserAddress(_councilMember);
        emit NewOracleCouncilMember(_councilMember, councilMemberCount);
    }

    function removeOracleCouncilMember(address _councilMember) external onlyOwner {
        require(isOracleCouncilMember(_councilMember), "Not OC");
        councilMemberAddress[councilMemberIndex[_councilMember]] = councilMemberAddress[councilMemberCount];
        councilMemberIndex[councilMemberAddress[councilMemberCount]] = councilMemberIndex[_councilMember];
        councilMemberCount = councilMemberCount.sub(1);
        councilMemberIndex[_councilMember] = 0;
        marketManager.removePauserAddress(_councilMember);
        emit OracleCouncilMemberRemoved(_councilMember, councilMemberCount);
    }

    function openDispute(address _market, string memory _disputeString) external whenNotPaused {
        require(marketManager.isActiveMarket(_market), "Not Active");
        require(!isMarketClosedForDisputes(_market), "Closed for disputes");
        require(marketManager.creatorAddress(_market) != msg.sender, "Creator can not dispute");
        require(!isOracleCouncilMember(msg.sender), "OC can not dispute.");
        require(
            IERC20(marketManager.paymentToken()).balanceOf(msg.sender) >= IExoticPositionalMarket(_market).disputePrice(),
            "Low amount for dispute"
        );
        require(
            IERC20(marketManager.paymentToken()).allowance(msg.sender, marketManager.thalesBonds()) >=
                IExoticPositionalMarket(_market).disputePrice(),
            "No allowance."
        );
        require(keccak256(abi.encode(_disputeString)) != keccak256(abi.encode("")), "Invalid dispute string");
        require(
            bytes(_disputeString).length < marketManager.disputeStringLengthLimit() || bytes(_disputeString).length < 110,
            "String exceeds length"
        );

        marketTotalDisputes[_market] = marketTotalDisputes[_market].add(1);
        marketOpenDisputesCount[_market] = marketOpenDisputesCount[_market].add(1);
        dispute[_market][marketTotalDisputes[_market]].disputorAddress = msg.sender;
        dispute[_market][marketTotalDisputes[_market]].disputeString = _disputeString;
        dispute[_market][marketTotalDisputes[_market]].disputeTimestamp = block.timestamp;
        disputeVote[_market][marketTotalDisputes[_market]] = new uint[](councilMemberCount + 1);
        if (!IExoticPositionalMarket(_market).resolved()) {
            dispute[_market][marketTotalDisputes[_market]].disputeInPositioningPhase = true;
        }
        marketManager.disputeMarket(_market, msg.sender);
        emit NewDispute(
            _market,
            _disputeString,
            dispute[_market][marketTotalDisputes[_market]].disputeInPositioningPhase,
            msg.sender
        );
    }

    function voteForDispute(
        address _market,
        uint _disputeIndex,
        uint _disputeCodeVote,
        uint _winningPosition
    ) external onlyCouncilMembers {
        require(marketManager.isActiveMarket(_market), "Not active market.");
        require(!isMarketClosedForDisputes(_market), "Closed for disputes.");
        require(_disputeIndex > 0, "Dispute non existent");
        require(dispute[_market][_disputeIndex].disputeCode == 0, "Dispute closed.");
        require(_disputeCodeVote <= VOTING_OPTIONS && _disputeCodeVote > 0, "Invalid dispute code.");
        if (dispute[_market][_disputeIndex].disputeInPositioningPhase) {
            require(_disputeCodeVote < ACCEPT_RESULT, "Invalid code.");
        } else {
            require(_disputeCodeVote >= ACCEPT_RESULT, "Invalid code in maturity");
            require(_disputeIndex > allOpenDisputesCancelledToIndexForMarket[_market], "Already cancelled");
        }
        if (_winningPosition > 0 && _disputeCodeVote == ACCEPT_RESULT) {
            require(
                _winningPosition != IExoticPositionalMarket(_market).winningPosition(),
                "OC can not vote for the resolved position"
            );
            require(
                disputeWinningPositionChoosenByMember[_market][_disputeIndex][msg.sender] != _winningPosition,
                "Same winning position"
            );
            if (disputeWinningPositionChoosenByMember[_market][_disputeIndex][msg.sender] == 0) {
                disputeWinningPositionChoosenByMember[_market][_disputeIndex][msg.sender] = _winningPosition;
                disputeWinningPositionVotes[_market][_disputeIndex][_winningPosition] = disputeWinningPositionVotes[_market][
                    _disputeIndex
                ][_winningPosition].add(1);
            } else {
                disputeWinningPositionVotes[_market][_disputeIndex][
                    disputeWinningPositionChoosenByMember[_market][_disputeIndex][msg.sender]
                ] = disputeWinningPositionVotes[_market][_disputeIndex][
                    disputeWinningPositionChoosenByMember[_market][_disputeIndex][msg.sender]
                ].sub(1);
                disputeWinningPositionChoosenByMember[_market][_disputeIndex][msg.sender] = _winningPosition;
                disputeWinningPositionVotes[_market][_disputeIndex][_winningPosition] = disputeWinningPositionVotes[_market][
                    _disputeIndex
                ][_winningPosition].add(1);
            }
        }

        // check if already has voted for another option, and revert the vote
        if (disputeVote[_market][_disputeIndex][councilMemberIndex[msg.sender]] > 0) {
            disputeVotesCount[_market][_disputeIndex][
                disputeVote[_market][_disputeIndex][councilMemberIndex[msg.sender]]
            ] = disputeVotesCount[_market][_disputeIndex][
                disputeVote[_market][_disputeIndex][councilMemberIndex[msg.sender]]
            ].sub(1);
        }

        // record the voting option
        disputeVote[_market][_disputeIndex][councilMemberIndex[msg.sender]] = _disputeCodeVote;
        disputeVotesCount[_market][_disputeIndex][_disputeCodeVote] = disputeVotesCount[_market][_disputeIndex][
            _disputeCodeVote
        ].add(1);

        emit VotedAddedForDispute(_market, _disputeIndex, _disputeCodeVote, _winningPosition, msg.sender);

        if (disputeVotesCount[_market][_disputeIndex][_disputeCodeVote] > (councilMemberCount.div(2))) {
            if (_disputeCodeVote == ACCEPT_RESULT) {
                (uint maxVotesForPosition, uint chosenPosition) = calculateWinningPositionBasedOnVotes(
                    _market,
                    _disputeIndex
                );
                if (maxVotesForPosition > (councilMemberCount.div(2))) {
                    disputeWinningPositionChoosen[_market][_disputeIndex] = chosenPosition;
                    closeDispute(_market, _disputeIndex, _disputeCodeVote);
                }
            } else {
                closeDispute(_market, _disputeIndex, _disputeCodeVote);
            }
        }
    }

    function closeDispute(
        address _market,
        uint _disputeIndex,
        uint _decidedOption
    ) internal nonReentrant {
        require(dispute[_market][_disputeIndex].disputeCode == 0, "Already closed");
        require(_decidedOption > 0, "Invalid option");
        dispute[_market][_disputeIndex].disputeCode = _decidedOption;
        marketOpenDisputesCount[_market] = marketOpenDisputesCount[_market] > 0
            ? marketOpenDisputesCount[_market].sub(1)
            : 0;
        if (_decidedOption == REFUSE_ON_POSITIONING || _decidedOption == REFUSE_MATURE) {
            // set dispute to false
            // send disputor BOND to SafeBox
            // marketManager.getMarketBondAmount(_market);
            IThalesBonds(marketManager.thalesBonds()).sendBondFromMarketToUser(
                _market,
                marketManager.safeBoxAddress(),
                IExoticPositionalMarket(_market).disputePrice(),
                DISPUTOR_BOND,
                dispute[_market][_disputeIndex].disputorAddress
            );
            marketLastClosedDispute[_market] = _disputeIndex;
            //if it is the last dispute
            if (_decidedOption == REFUSE_MATURE) {
                marketManager.setBackstopTimeout(_market);
            }
            if (marketOpenDisputesCount[_market] == 0) {
                marketManager.closeDispute(_market);
            }
            emit DisputeClosed(_market, _disputeIndex, _decidedOption);
        } else if (_decidedOption == ACCEPT_SLASH) {
            // 4 hours
            marketManager.setBackstopTimeout(_market);
            // close dispute flag
            marketManager.closeDispute(_market);
            // cancel market
            marketManager.cancelMarket(_market);
            marketClosedForDisputes[_market] = true;
            // send bond to disputor and safeBox
            IThalesBonds(marketManager.thalesBonds()).sendBondFromMarketToUser(
                _market,
                marketManager.safeBoxAddress(),
                IExoticPositionalMarket(_market).safeBoxLowAmount(),
                CREATOR_BOND,
                dispute[_market][_disputeIndex].disputorAddress
            );
            IThalesBonds(marketManager.thalesBonds()).sendBondFromMarketToUser(
                _market,
                dispute[_market][_disputeIndex].disputorAddress,
                (IExoticPositionalMarket(_market).fixedBondAmount().add(IExoticPositionalMarket(_market).disputePrice()))
                    .sub(IExoticPositionalMarket(_market).safeBoxLowAmount()),
                CREATOR_AND_DISPUTOR,
                dispute[_market][_disputeIndex].disputorAddress
            );

            marketLastClosedDispute[_market] = _disputeIndex;
            emit MarketClosedForDisputes(_market, _decidedOption);
            emit DisputeClosed(_market, _disputeIndex, _decidedOption);
        } else if (_decidedOption == ACCEPT_NO_SLASH) {
            marketManager.setBackstopTimeout(_market);
            marketManager.closeDispute(_market);
            marketManager.cancelMarket(_market);
            marketClosedForDisputes[_market] = true;
            IThalesBonds(marketManager.thalesBonds()).sendBondFromMarketToUser(
                _market,
                marketManager.creatorAddress(_market),
                IExoticPositionalMarket(_market).fixedBondAmount(),
                CREATOR_BOND,
                dispute[_market][_disputeIndex].disputorAddress
            );
            IThalesBonds(marketManager.thalesBonds()).sendBondFromMarketToUser(
                _market,
                dispute[_market][_disputeIndex].disputorAddress,
                IExoticPositionalMarket(_market).disputePrice(),
                DISPUTOR_BOND,
                dispute[_market][_disputeIndex].disputorAddress
            );
            marketManager.sendRewardToDisputor(
                _market,
                dispute[_market][_disputeIndex].disputorAddress,
                IExoticPositionalMarket(_market).arbitraryRewardForDisputor()
            );

            marketLastClosedDispute[_market] = _disputeIndex;
            emit MarketClosedForDisputes(_market, _decidedOption);
            emit DisputeClosed(_market, _disputeIndex, _decidedOption);
        } else if (_decidedOption == ACCEPT_RESULT) {
            marketManager.setBackstopTimeout(_market);
            marketManager.closeDispute(_market);
            marketManager.resolveMarket(_market, disputeWinningPositionChoosen[_market][_disputeIndex]);
            IThalesBonds(marketManager.thalesBonds()).sendBondFromMarketToUser(
                _market,
                marketManager.safeBoxAddress(),
                IExoticPositionalMarket(_market).fixedBondAmount(),
                RESOLVER_BOND,
                dispute[_market][_disputeIndex].disputorAddress
            );
            IThalesBonds(marketManager.thalesBonds()).sendBondFromMarketToUser(
                _market,
                dispute[_market][_disputeIndex].disputorAddress,
                IExoticPositionalMarket(_market).disputePrice(),
                DISPUTOR_BOND,
                dispute[_market][_disputeIndex].disputorAddress
            );

            marketClosedForDisputes[_market] = true;
            marketLastClosedDispute[_market] = _disputeIndex;
            emit MarketClosedForDisputes(_market, _decidedOption);
            emit DisputeClosed(_market, _disputeIndex, _decidedOption);
        } else if (_decidedOption == ACCEPT_RESET) {
            marketManager.closeDispute(_market);
            marketManager.resetMarket(_market);
            IThalesBonds(marketManager.thalesBonds()).sendBondFromMarketToUser(
                _market,
                marketManager.safeBoxAddress(),
                IExoticPositionalMarket(_market).safeBoxLowAmount(),
                RESOLVER_BOND,
                dispute[_market][_disputeIndex].disputorAddress
            );
            IThalesBonds(marketManager.thalesBonds()).sendBondFromMarketToUser(
                _market,
                dispute[_market][_disputeIndex].disputorAddress,
                IExoticPositionalMarket(_market).fixedBondAmount().add(IExoticPositionalMarket(_market).disputePrice()).sub(
                    IExoticPositionalMarket(_market).safeBoxLowAmount()
                ),
                RESOLVER_AND_DISPUTOR,
                dispute[_market][_disputeIndex].disputorAddress
            );
            allOpenDisputesCancelledToIndexForMarket[_market] = marketTotalDisputes[_market];
            marketOpenDisputesCount[_market] = 0;
            marketLastClosedDispute[_market] = _disputeIndex;
            emit DisputeClosed(_market, _disputeIndex, _decidedOption);
        } else {
            // (CANCEL)
        }
    }

    function claimUnclosedDisputeBonds(address _market, uint _disputeIndex) external whenNotPaused {
        require(canDisputorClaimbackBondFromUnclosedDispute(_market, _disputeIndex, msg.sender), "Unable to claim.");

        if (marketManager.cancelledByCreator(_market)) {
            marketOpenDisputesCount[_market] = 0;
            marketLastClosedDispute[_market] = _disputeIndex;
            emit DisputeClosed(_market, _disputeIndex, REFUSE_MATURE);
        }
        IThalesBonds(marketManager.thalesBonds()).sendOpenDisputeBondFromMarketToDisputor(
            _market,
            msg.sender,
            IThalesBonds(marketManager.thalesBonds()).getDisputorBondForMarket(_market, msg.sender)
        );
    }

    function calculateWinningPositionBasedOnVotes(address _market, uint _disputeIndex) internal view returns (uint, uint) {
        uint maxVotes;
        uint position;
        for (uint i = 0; i <= IExoticPositionalMarket(_market).positionCount(); i++) {
            if (disputeWinningPositionVotes[_market][_disputeIndex][i] > maxVotes) {
                maxVotes = disputeWinningPositionVotes[_market][_disputeIndex][i];
                position = i;
            }
        }

        return (maxVotes, position);
    }

    function closeMarketForDisputes(address _market) external {
        require(msg.sender == owner || msg.sender == address(marketManager), "Only manager/owner");
        require(!marketClosedForDisputes[_market], "Closed already");
        marketClosedForDisputes[_market] = true;
        emit MarketClosedForDisputes(_market, 0);
    }

    function reopenMarketForDisputes(address _market) external onlyOwner {
        require(marketClosedForDisputes[_market], "Open already");
        marketClosedForDisputes[_market] = false;
        emit MarketReopenedForDisputes(_market);
    }

    modifier onlyCouncilMembers() {
        require(isOracleCouncilMember(msg.sender), "Not OC");
        _;
    }
    event NewOracleCouncilMember(address councilMember, uint councilMemberCount);
    event OracleCouncilMemberRemoved(address councilMember, uint councilMemberCount);
    event NewMarketManager(address marketManager);
    event NewDispute(address market, string disputeString, bool disputeInPositioningPhase, address disputorAccount);
    event VotedAddedForDispute(address market, uint disputeIndex, uint disputeCodeVote, uint winningPosition, address voter);
    event MarketClosedForDisputes(address market, uint disputeFinalCode);
    event MarketReopenedForDisputes(address market);
    event DisputeClosed(address market, uint disputeIndex, uint decidedOption);
}

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

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Context_init_unchained();
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        _paused = false;
    }

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

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

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

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

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

File 6 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 7 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 8 of 12 : IExoticPositionalMarket.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IExoticPositionalMarket {
    /* ========== VIEWS / VARIABLES ========== */
    function isMarketCreated() external view returns (bool);

    function creatorAddress() external view returns (address);

    function resolverAddress() external view returns (address);

    function totalBondAmount() external view returns (uint);

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

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

    function positionPhrase(uint index) external view returns (string memory);

    function getTicketType() external view returns (uint);

    function positionCount() external view returns (uint);

    function endOfPositioning() external view returns (uint);

    function resolvedTime() external view returns (uint);

    function fixedTicketPrice() external view returns (uint);

    function creationTime() external view returns (uint);

    function winningPosition() external view returns (uint);

    function getTags() external view returns (uint[] memory);

    function getTotalPlacedAmount() external view returns (uint);

    function getTotalClaimableAmount() external view returns (uint);

    function getPlacedAmountPerPosition(uint index) 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 backstopTimeout() external view returns (uint);

    function disputeClosedTime() external view returns (uint);

    function totalUsersTakenPositions() external view returns (uint);

    function withdrawalAllowed() external view returns (bool);

    function disputed() external view returns (bool);

    function resolved() external view returns (bool);

    function canUsersPlacePosition() external view returns (bool);

    function canMarketBeResolvedByPDAO() external view returns (bool);

    function canMarketBeResolved() external view returns (bool);

    function canUsersClaim() external view returns (bool);

    function isMarketCancelled() external view returns (bool);

    function paused() external view returns (bool);

    function canCreatorCancelMarket() external view returns (bool);

    function getAllFees()
        external
        view
        returns (
            uint,
            uint,
            uint,
            uint
        );

    function canIssueFees() external view returns (bool);

    function noWinners() external view returns (bool);

    function transferBondToMarket(address _sender, uint _amount) external;

    function resolveMarket(uint _outcomePosition, address _resolverAddress) external;

    function cancelMarket() external;

    function resetMarket() external;

    function claimWinningTicketOnBehalf(address _user) external;

    function openDispute() external;

    function closeDispute() external;

    function setBackstopTimeout(uint _timeoutPeriod) external;
}

File 9 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 10 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 11 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 12 of 12 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

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

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"market","type":"address"},{"indexed":false,"internalType":"uint256","name":"disputeIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"decidedOption","type":"uint256"}],"name":"DisputeClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"market","type":"address"},{"indexed":false,"internalType":"uint256","name":"disputeFinalCode","type":"uint256"}],"name":"MarketClosedForDisputes","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"market","type":"address"}],"name":"MarketReopenedForDisputes","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"market","type":"address"},{"indexed":false,"internalType":"string","name":"disputeString","type":"string"},{"indexed":false,"internalType":"bool","name":"disputeInPositioningPhase","type":"bool"},{"indexed":false,"internalType":"address","name":"disputorAccount","type":"address"}],"name":"NewDispute","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"marketManager","type":"address"}],"name":"NewMarketManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"councilMember","type":"address"},{"indexed":false,"internalType":"uint256","name":"councilMemberCount","type":"uint256"}],"name":"NewOracleCouncilMember","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"councilMember","type":"address"},{"indexed":false,"internalType":"uint256","name":"councilMemberCount","type":"uint256"}],"name":"OracleCouncilMemberRemoved","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":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"market","type":"address"},{"indexed":false,"internalType":"uint256","name":"disputeIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"disputeCodeVote","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"winningPosition","type":"uint256"},{"indexed":false,"internalType":"address","name":"voter","type":"address"}],"name":"VotedAddedForDispute","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_councilMember","type":"address"}],"name":"addOracleCouncilMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allOpenDisputesCancelledToIndexForMarket","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_disputeIndex","type":"uint256"},{"internalType":"address","name":"_disputorAddress","type":"address"}],"name":"canDisputorClaimbackBondFromUnclosedDispute","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"}],"name":"canMarketBeDisputed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_disputeIndex","type":"uint256"}],"name":"claimUnclosedDisputeBonds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"}],"name":"closeMarketForDisputes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"councilMemberAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"councilMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"councilMemberIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"dispute","outputs":[{"internalType":"address","name":"disputorAddress","type":"address"},{"internalType":"string","name":"disputeString","type":"string"},{"internalType":"uint256","name":"disputeCode","type":"uint256"},{"internalType":"uint256","name":"disputeTimestamp","type":"uint256"},{"internalType":"bool","name":"disputeInPositioningPhase","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"disputeVote","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"disputeVotesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"disputeWinningPositionChoosen","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"disputeWinningPositionChoosenByMember","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"disputeWinningPositionVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"firstMemberThatChoseWinningPosition","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getDispute","outputs":[{"components":[{"internalType":"address","name":"disputorAddress","type":"address"},{"internalType":"string","name":"disputeString","type":"string"},{"internalType":"uint256","name":"disputeCode","type":"uint256"},{"internalType":"uint256","name":"disputeTimestamp","type":"uint256"},{"internalType":"bool","name":"disputeInPositioningPhase","type":"bool"}],"internalType":"struct ThalesOracleCouncil.Dispute","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getDisputeAddressOfDisputor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getDisputeCode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getDisputeString","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getDisputeTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"address","name":"_councilMember","type":"address"}],"name":"getDisputeVoteOfCouncilMember","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getDisputeVotes","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"}],"name":"getMarketLastClosedDispute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"}],"name":"getMarketOpenDisputes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getNumberOfCouncilMembersForMarketDispute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getVotesCountForMarketDispute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getVotesMissingForMarketDispute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initNonReentrant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_marketManager","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"isDisputeCancelled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"isDisputeOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"}],"name":"isMarketClosedForDisputes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_disputeIndex","type":"uint256"}],"name":"isOpenDisputeCancelled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_councilMember","type":"address"}],"name":"isOracleCouncilMember","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"marketClosedForDisputes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"marketLastClosedDispute","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":[{"internalType":"address","name":"","type":"address"}],"name":"marketOpenDisputesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"marketTotalDisputes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"string","name":"_disputeString","type":"string"}],"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":[{"internalType":"address","name":"_councilMember","type":"address"}],"name":"removeOracleCouncilMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"}],"name":"reopenMarketForDisputes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_marketManager","type":"address"}],"name":"setMarketManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"transferOwnershipAtInit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_market","type":"address"},{"internalType":"uint256","name":"_disputeIndex","type":"uint256"},{"internalType":"uint256","name":"_disputeCodeVote","type":"uint256"},{"internalType":"uint256","name":"_winningPosition","type":"uint256"}],"name":"voteForDispute","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061599780620000216000396000f3fe608060405234801561001057600080fd5b506004361061030c5760003560e01c806379ba50971161019d578063a8cca32a116100e9578063c69d81d7116100a2578063ebc797721161007c578063ebc7977214610887578063eee7b0c11461088f578063f48bb534146108a2578063f68246ce146108c557600080fd5b8063c69d81d71461084e578063cf65e30f14610861578063d82aff111461087457600080fd5b8063a8cca32a146107b9578063aa7839e8146107cc578063b35bf5db146107df578063c3b2b6e4146107ff578063c3b83f5f14610828578063c63011b21461083b57600080fd5b80638a6ef9841161015657806395e7f02d1161013057806395e7f02d146107425780639906a1f514610766578063a24536f914610786578063a6182c981461079957600080fd5b80638a6ef984146106e05780638da5cb5b14610709578063944450391461072257600080fd5b806379ba5097146106695780637b6cfe9d146106715780637bd72d811461067a578063815feffd1461068d578063876ae352146106ad57806389c0b25c146106cd57600080fd5b806341ed2c121161025c578063677445471161021557806371dba48d116101ef57806371dba48d146105e15780637210cceb1461061a57806375969e321461062d57806375e2570b1461065657600080fd5b8063677445471461058e5780636cd431dd146105a157806371720212146105c157600080fd5b806341ed2c12146104e4578063485cc955146105145780634ee05dd61461052757806353a47bb71461055d578063580a913d146105705780635c975abb1461058357600080fd5b806322cdda1a116102c95780633878970f116102a35780633878970f1461043b57806339672ba3146104755780633baebf43146104a05780633c794933146104d157600080fd5b806322cdda1a146103f25780632db4c70814610415578063380d96221461042857600080fd5b8063084739e41461031157806313af40351461034d57806314ec9a1f146103625780631627540c146103755780631eb4370a1461038857806320564334146103c1575b600080fd5b61033a61031f366004615414565b6001600160a01b03166000908152606c602052604090205490565b6040519081526020015b60405180910390f35b61036061035b366004615414565b6108d8565b005b61033a6103703660046155af565b610a18565b610360610383366004615414565b610a4a565b61033a610396366004615543565b6001600160a01b03919091166000908152607160209081526040808320938352929052206003015490565b61033a6103cf3660046155af565b607660209081526000938452604080852082529284528284209052825290205481565b610405610400366004615543565b610aa0565b6040519015158152602001610344565b610360610423366004615543565b610b02565b61040561043636600461556e565b610e76565b610405610449366004615543565b6001600160a01b0391909116600090815260716020908152604080832093835292905220600201541590565b61033a610483366004615543565b607460209081526000928352604080842090915290825290205481565b61033a6104ae36600461556e565b607560209081526000938452604080852082529284528284209052825290205481565b61033a6104df366004615543565b61119e565b6067546104fc9061010090046001600160a01b031681565b6040516001600160a01b039091168152602001610344565b61036061052236600461544c565b6111cd565b6104fc610535366004615543565b6001600160a01b03918216600090815260716020908152604080832093835292905220541690565b6001546104fc906001600160a01b031681565b61033a61057e366004615543565b6112b9565b60345460ff16610405565b61033a61059c3660046155af565b6112fd565b61033a6105af366004615414565b606c6020526000908152604090205481565b61033a6105cf366004615414565b606d6020526000908152604090205481565b61033a6105ef366004615543565b6001600160a01b03919091166000908152607160209081526040808320938352929052206002015490565b610405610628366004615543565b61133b565b6104fc61063b366004615414565b6070602052600090815260409020546001600160a01b031681565b610360610664366004615414565b6113d2565b61036061152d565b61033a60685481565b610405610688366004615414565b61162a565b61033a61069b366004615414565b606e6020526000908152604090205481565b6106c06106bb366004615543565b6116c5565b60405161034491906157fe565b6103606106db366004615484565b6117fa565b6104fc6106ee36600461563d565b6069602052600090815260409020546001600160a01b031681565b6000546104fc906201000090046001600160a01b031681565b610735610730366004615543565b6122f5565b6040516103449190615787565b610755610750366004615543565b61236a565b604051610344959493929190615723565b61033a610774366004615414565b606a6020526000908152604090205481565b61033a610794366004615543565b61243b565b61033a6107a7366004615414565b606b6020526000908152604090205481565b6104056107c7366004615414565b6124f2565b6103606107da366004615414565b61250f565b6107f26107ed366004615543565b6125bf565b60405161034491906157cb565b61033a61080d366004615414565b6001600160a01b03166000908152606e602052604090205490565b610360610836366004615414565b612670565b610405610849366004615414565b612789565b61036061085c366004615414565b6127e4565b61036061086f366004615414565b6129c9565b610360610882366004615414565b612aec565b610360612b92565b61036061089d3660046155e3565b612bf0565b6104056108b0366004615414565b606f6020526000908152604090205460ff1681565b61033a6108d336600461556e565b6135cd565b6001600160a01b0381166109335760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600154600160a01b900460ff161561099f5760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b606482015260840161092a565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b60736020528260005260406000206020528160005260406000208160078110610a4057600080fd5b0154925083915050565b610a52613672565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610a0d565b6001600160a01b038216600090815260716020908152604080832084845290915281206002015460031480610afb57506001600160a01b03831660009081526071602090815260408083208584529091529020600201546006145b9392505050565b60345460ff1615610b485760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161092a565b610b53828233610e76565b610b925760405162461bcd60e51b815260206004820152601060248201526f2ab730b13632903a379031b630b4b69760811b604482015260640161092a565b60675460405163fbdec41360e01b81526001600160a01b0384811660048301526101009092049091169063fbdec4139060240160206040518083038186803b158015610bdd57600080fd5b505afa158015610bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c15919061561d565b15610c6e576001600160a01b0382166000908152606e60209081526040808320839055606c909152908190208290555160008051602061594283398151915290610c659084908490600690615766565b60405180910390a15b606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015610cbc57600080fd5b505afa158015610cd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf49190615430565b6001600160a01b031663403b14128333606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5257600080fd5b505afa158015610d66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8a9190615430565b6040516380af208b60e01b81526001600160a01b03888116600483015233602483015291909116906380af208b9060440160206040518083038186803b158015610dd357600080fd5b505afa158015610de7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0b9190615655565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610e5a57600080fd5b505af1158015610e6e573d6000803e3d6000fd5b505050505050565b606754604051633761c52760e11b81526001600160a01b03858116600483015260009261010090041690636ec38a4e9060240160206040518083038186803b158015610ec157600080fd5b505afa158015610ed5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef9919061561d565b8015610f1d57506001600160a01b0384166000908152606b60205260409020548311155b8015610fec57506001600160a01b0384166000908152606f602052604090205460ff1680610f6357506001600160a01b0384166000908152606d60205260409020548311155b80610fec575060675460405163fbdec41360e01b81526001600160a01b0386811660048301526101009092049091169063fbdec4139060240160206040518083038186803b158015610fb457600080fd5b505afa158015610fc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fec919061561d565b801561101f57506001600160a01b0384811660009081526071602090815260408083208784529091529020548116908316145b801561104f57506001600160a01b0384166000908152607160209081526040808320868452909152902060020154155b801561107357506001600160a01b0384166000908152606c60205260409020548314155b801561118757506000606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ca57600080fd5b505afa1580156110de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111029190615430565b6040516380af208b60e01b81526001600160a01b038781166004830152858116602483015291909116906380af208b9060440160206040518083038186803b15801561114d57600080fd5b505afa158015611161573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111859190615655565b115b1561119457506001610afb565b5060009392505050565b6001600160a01b0382166000908152607260209081526040808320848452909152812054610afb9060016136ec565b600054610100900460ff166111e85760005460ff16156111ec565b303b155b61124f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161092a565b600054610100900460ff16158015611271576000805461ffff19166101011790555b61127a836108d8565b611282612b92565b60678054610100600160a81b0319166101006001600160a01b0385160217905580156112b4576000805461ff00191690555b505050565b6000610afb6112c8848461243b565b6001600160a01b03851660009081526072602090815260408083208784529091529020546112f79060016136ec565b906136ec565b6072602052826000526040600020602052816000526040600020818154811061132557600080fd5b9060005260206000200160009250925050505481565b6001600160a01b0382166000908152606f602052604081205460ff168061137a57506001600160a01b0383166000908152606d60205260409020548211155b80156113aa57506001600160a01b0383166000908152607160209081526040808320858452909152902060020154155b8015610afb5750506001600160a01b03919091166000908152606c6020526040902054141590565b6113da613672565b6113e3816124f2565b6113ff5760405162461bcd60e51b815260040161092a906157de565b606880546000908152606960208181526040808420546001600160a01b038781168652606a8085528387208054885286865284882080546001600160a01b0319169484169490941790935591548754875294845282862054168552909152909120555461146d9060016136ec565b6068556001600160a01b038181166000818152606a6020526040808220919091556067549051631404a95d60e11b8152600481019290925261010090049091169063280952ba90602401600060405180830381600087803b1580156114d157600080fd5b505af11580156114e5573d6000803e3d6000fd5b5050606854604080516001600160a01b038616815260208101929092527f86d1787a7c5d5a35ae49625fd6b646c884e5449312f20d0068fba244a8c657bb9350019050610a0d565b6001546001600160a01b031633146115a55760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b606482015260840161092a565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b6001600160a01b0381166000908152606f602052604081205460ff161580156116bf5750816001600160a01b031663a9daaed56040518163ffffffff1660e01b815260040160206040518083038186803b15801561168757600080fd5b505afa15801561169b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bf919061561d565b92915050565b6117026040518060a0016040528060006001600160a01b031681526020016060815260200160008152602001600081526020016000151581525090565b6001600160a01b038084166000908152607160209081526040808320868452825291829020825160a08101909352805490931682526001830180549293929184019161174d906158a7565b80601f0160208091040260200160405190810160405280929190818152602001828054611779906158a7565b80156117c65780601f1061179b576101008083540402835291602001916117c6565b820191906000526020600020905b8154815290600101906020018083116117a957829003601f168201915b5050509183525050600282015460208201526003820154604082015260049091015460ff1615156060909101529392505050565b60345460ff16156118405760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161092a565b606754604051633761c52760e11b81526001600160a01b03848116600483015261010090920490911690636ec38a4e9060240160206040518083038186803b15801561188b57600080fd5b505afa15801561189f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c3919061561d565b6118fc5760405162461bcd60e51b815260206004820152600a6024820152694e6f742041637469766560b01b604482015260640161092a565b61190582612789565b156119485760405162461bcd60e51b8152602060048201526013602482015272436c6f73656420666f7220646973707574657360681b604482015260640161092a565b60675460405163677755bb60e01b81526001600160a01b03848116600483015233926101009004169063677755bb9060240160206040518083038186803b15801561199257600080fd5b505afa1580156119a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119ca9190615430565b6001600160a01b03161415611a215760405162461bcd60e51b815260206004820152601760248201527f43726561746f722063616e206e6f742064697370757465000000000000000000604482015260640161092a565b611a2a336124f2565b15611a6d5760405162461bcd60e51b815260206004820152601360248201527227a19031b0b7103737ba103234b9b83aba329760691b604482015260640161092a565b816001600160a01b0316636da19c356040518163ffffffff1660e01b815260040160206040518083038186803b158015611aa657600080fd5b505afa158015611aba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ade9190615655565b606760019054906101000a90046001600160a01b03166001600160a01b0316633013ce296040518163ffffffff1660e01b815260040160206040518083038186803b158015611b2c57600080fd5b505afa158015611b40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b649190615430565b6040516370a0823160e01b81523360048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015611ba557600080fd5b505afa158015611bb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bdd9190615655565b1015611c245760405162461bcd60e51b81526020600482015260166024820152754c6f7720616d6f756e7420666f72206469737075746560501b604482015260640161092a565b816001600160a01b0316636da19c356040518163ffffffff1660e01b815260040160206040518083038186803b158015611c5d57600080fd5b505afa158015611c71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c959190615655565b606760019054906101000a90046001600160a01b03166001600160a01b0316633013ce296040518163ffffffff1660e01b815260040160206040518083038186803b158015611ce357600080fd5b505afa158015611cf7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d1b9190615430565b6001600160a01b031663dd62ed3e33606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7857600080fd5b505afa158015611d8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db09190615430565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260440160206040518083038186803b158015611df657600080fd5b505afa158015611e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2e9190615655565b1015611e6c5760405162461bcd60e51b815260206004820152600d60248201526c27379030b63637bbb0b731b29760991b604482015260640161092a565b604051602001611e8790602080825260009082015260400190565b6040516020818303038152906040528051906020012081604051602001611eae91906157cb565b604051602081830303815290604052805190602001201415611f0b5760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206469737075746520737472696e6760501b604482015260640161092a565b606760019054906101000a90046001600160a01b03166001600160a01b031663592740b26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5957600080fd5b505afa158015611f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f919190615655565b81511080611fa05750606e8151105b611fe45760405162461bcd60e51b81526020600482015260156024820152740a6e8e4d2dcce40caf0c6cacac8e640d8cadccee8d605b1b604482015260640161092a565b6001600160a01b0382166000908152606b60205260409020546120089060016136f8565b6001600160a01b0383166000908152606b6020908152604080832093909355606e905220546120389060016136f8565b6001600160a01b0383166000908152606e602090815260408083209390935560718152828220606b82528383208054845281835284842080546001600160a01b031916331790555483528152919020825161209c9260019290920191840190615341565b506001600160a01b0382166000908152607160209081526040808320606b83528184205484529091529020426003909101556068546120dc906001615858565b67ffffffffffffffff81111561210257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561212b578160200160208202803683370190505b506001600160a01b0383166000908152607260209081526040808320606b83528184205484528252909120825161216893919291909101906153c5565b50816001600160a01b0316633f6fa6556040518163ffffffff1660e01b815260040160206040518083038186803b1580156121a257600080fd5b505afa1580156121b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121da919061561d565b612217576001600160a01b0382166000908152607160209081526040808320606b83528184205484529091529020600401805460ff191660011790555b60675460405163019e079960e61b81526001600160a01b03848116600483015233602483015261010090920490911690636781e64090604401600060405180830381600087803b15801561226a57600080fd5b505af115801561227e573d6000803e3d6000fd5b5050506001600160a01b0383166000908152607160209081526040808320606b8352818420548452909152908190206004015490517ffd91eaa9167cff43800cbd454f3b6fb7051298a311ed47ec4f7fcf2c5a78738792506122e9918591859160ff169033906156e8565b60405180910390a15050565b6001600160a01b038216600090815260726020908152604080832084845282529182902080548351818402810184019094528084526060939283018282801561235d57602002820191906000526020600020905b815481526020019060010190808311612349575b5050505050905092915050565b6071602090815260009283526040808420909152908252902080546001820180546001600160a01b0390921692916123a1906158a7565b80601f01602080910402602001604051908101604052809291908181526020018280546123cd906158a7565b801561241a5780601f106123ef5761010080835404028352916020019161241a565b820191906000526020600020905b8154815290600101906020018083116123fd57829003601f168201915b50505050600283015460038401546004909401549293909290915060ff1685565b60008060015b6001600160a01b03851660009081526072602090815260408083208784529091529020548110156124ea576001600160a01b038516600090815260726020908152604080832087845290915281208054839081106124af57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154116124c65760006124c9565b60015b6124d69060ff1683615858565b9150806124e2816158e2565b915050612441565b509392505050565b6001600160a01b03166000908152606a6020526040902054151590565b612517613672565b6001600160a01b0381166000908152606f602052604090205460ff1661256e5760405162461bcd60e51b815260206004820152600c60248201526b4f70656e20616c726561647960a01b604482015260640161092a565b6001600160a01b0381166000818152606f6020908152604091829020805460ff1916905590519182527fba1dc3bb562a92f019150e93749bcdeeb5d64787f37a856f4563f38a12877b0e9101610a0d565b6001600160a01b038216600090815260716020908152604080832084845290915290206001018054606091906125f4906158a7565b80601f0160208091040260200160405190810160405280929190818152602001828054612620906158a7565b801561235d5780601f106126425761010080835404028352916020019161235d565b820191906000526020600020905b815481529060010190602001808311612650575093979650505050505050565b612678613672565b6001600160a01b0381166126c05760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015260640161092a565b600154600160a81b900460ff16156127105760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b604482015260640161092a565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610a0d565b6001600160a01b0381166000908152606f602052604081205460ff16806116bf5750816001600160a01b0316631897c8fe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561168757600080fd5b6127ec613672565b6001600160a01b0381166128355760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b21030b2323932b9b99760811b604482015260640161092a565b606760019054906101000a90046001600160a01b03166001600160a01b0316634d736d586040518163ffffffff1660e01b815260040160206040518083038186803b15801561288357600080fd5b505afa158015612897573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128bb9190615655565b60685411156129025760405162461bcd60e51b815260206004820152601360248201527213d0c81b595b58995c9cc8195e18d959591959606a1b604482015260640161092a565b61290b816124f2565b156129455760405162461bcd60e51b815260206004820152600a602482015269416c7265616479204f4360b01b604482015260640161092a565b6068546129539060016136f8565b6068818155600091825260696020908152604080842080546001600160a01b0319166001600160a01b0387169081179091559254838552606a8352938190208490558051928352908201929092527f7b669209e50faed123ff5edb840280b4529293d7408675dbe630eb19cc12e5bb9101610a0d565b6000546201000090046001600160a01b03163314806129f7575060675461010090046001600160a01b031633145b612a385760405162461bcd60e51b815260206004820152601260248201527127b7363c9036b0b730b3b2b917b7bbb732b960711b604482015260640161092a565b6001600160a01b0381166000908152606f602052604090205460ff1615612a925760405162461bcd60e51b815260206004820152600e60248201526d436c6f73656420616c726561647960901b604482015260640161092a565b6001600160a01b0381166000818152606f60209081526040808320805460ff191660011790558051938452908301919091527f72ae4e77c5952790aabb8be5b30e11bc87653ea8bb7558b88a1f8bf466fb71c59101610a0d565b612af4613672565b6001600160a01b038116612b3c5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015260640161092a565b60678054610100600160a81b0319166101006001600160a01b038416908102919091179091556040519081527f23e455350850b05998316f502175b427a275f4d5be9e2a04d530ea39239e1b6f90602001610a0d565b60675460ff1615612bdb5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015260640161092a565b6067805460ff19166001908117909155606655565b612bf9336124f2565b612c155760405162461bcd60e51b815260040161092a906157de565b606754604051633761c52760e11b81526001600160a01b03868116600483015261010090920490911690636ec38a4e9060240160206040518083038186803b158015612c6057600080fd5b505afa158015612c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c98919061561d565b612cd95760405162461bcd60e51b81526020600482015260126024820152712737ba1030b1ba34bb329036b0b935b2ba1760711b604482015260640161092a565b612ce284612789565b15612d265760405162461bcd60e51b815260206004820152601460248201527321b637b9b2b2103337b9103234b9b83aba32b99760611b604482015260640161092a565b60008311612d6d5760405162461bcd60e51b8152602060048201526014602482015273111a5cdc1d5d19481b9bdb88195e1a5cdd195b9d60621b604482015260640161092a565b6001600160a01b038416600090815260716020908152604080832086845290915290206002015415612dd35760405162461bcd60e51b815260206004820152600f60248201526e2234b9b83aba329031b637b9b2b21760891b604482015260640161092a565b60078211158015612de45750600082115b612e285760405162461bcd60e51b815260206004820152601560248201527424b73b30b634b2103234b9b83aba329031b7b2329760591b604482015260640161092a565b6001600160a01b038416600090815260716020908152604080832086845290915290206004015460ff1615612e9c5760048210612e975760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21031b7b2329760991b604482015260640161092a565b612f48565b6004821015612eed5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420636f646520696e206d617475726974790000000000000000604482015260640161092a565b6001600160a01b0384166000908152606d60205260409020548311612f485760405162461bcd60e51b8152602060048201526011602482015270105b1c9958591e4818d85b98d95b1b1959607a1b604482015260640161092a565b600081118015612f585750600482145b1561323257836001600160a01b0316632486d6716040518163ffffffff1660e01b815260040160206040518083038186803b158015612f9657600080fd5b505afa158015612faa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fce9190615655565b81141561302f5760405162461bcd60e51b815260206004820152602960248201527f4f432063616e206e6f7420766f746520666f7220746865207265736f6c766564604482015268103837b9b4ba34b7b760b91b606482015260840161092a565b6001600160a01b038416600090815260756020908152604080832086845282528083203384529091529020548114156130a25760405162461bcd60e51b815260206004820152601560248201527429b0b6b2903bb4b73734b733903837b9b4ba34b7b760591b604482015260640161092a565b6001600160a01b03841660009081526075602090815260408083208684528252808320338452909152902054613155576001600160a01b038416600081815260756020908152604080832087845282528083203384528252808320859055928252607681528282208683528152828220848352905220546131249060016136f8565b6001600160a01b03851660009081526076602090815260408083208784528252808320858452909152902055613232565b6001600160a01b03841660008181526076602090815260408083208784528252808320938352607582528083208784528252808320338452825280832054835292905220546131a59060016136ec565b6001600160a01b0385166000818152607660209081526040808320888452825280832093835260758252808320888452825280832033845282528083208054845293909152808220939093559083905582815220546132059060016136f8565b6001600160a01b038516600090815260766020908152604080832087845282528083208584529091529020555b6001600160a01b03841660009081526072602090815260408083208684528252808320338452606a9092528220548154811061327e57634e487b7160e01b600052603260045260246000fd5b906000526020600020015411156133b5576001600160a01b03841660008181526073602090815260408083208784528252808320938352607282528083208784528252808320338452606a90925290912054815461332a936001939092909181106132f957634e487b7160e01b600052603260045260246000fd5b90600052602060002001546007811061332257634e487b7160e01b600052603260045260246000fd5b0154906136ec565b6001600160a01b03851660008181526073602090815260408083208884528252808320938352607282528083208884528252808320338452606a909252909120548154811061338957634e487b7160e01b600052603260045260246000fd5b9060005260206000200154600781106133b257634e487b7160e01b600052603260045260246000fd5b01555b6001600160a01b03841660009081526072602090815260408083208684528252808320338452606a90925290912054815484929190811061340657634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092556001600160a01b03861681526073825260408082208683529092522061346190600190846007811061345957634e487b7160e01b600052603260045260246000fd5b0154906136f8565b6001600160a01b0385166000908152607360209081526040808320878452909152902083600781106134a357634e487b7160e01b600052603260045260246000fd5b0155604080516001600160a01b038616815260208101859052908101839052606081018290523360808201527fe5a4e79fc191615470d7a161db08d0e2f18b21da5df60451d35a2fcac7524a8e9060a00160405180910390a160685461350a906002613704565b6001600160a01b03851660009081526073602090815260408083208784529091529020836007811061354c57634e487b7160e01b600052603260045260246000fd5b015411156135c75760048214156135bc5760008061356a8686613710565b606854919350915061357d906002613704565b8211156135b5576001600160a01b038616600090815260746020908152604080832088845290915290208190556135b5868686613813565b50506135c7565b6135c7848484613813565b50505050565b60006135d8826124f2565b1561363e576001600160a01b03808516600090815260726020908152604080832087845282528083209386168352606a9091529020548154811061362c57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050610afb565b613647826124f2565b6136635760405162461bcd60e51b815260040161092a906157de565b50670de0b6b3a7640000610afb565b6000546201000090046001600160a01b031633146136ea5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b606482015260840161092a565b565b6000610afb8284615890565b6000610afb8284615858565b6000610afb8284615870565b60008060008060005b866001600160a01b031663e7702d056040518163ffffffff1660e01b815260040160206040518083038186803b15801561375257600080fd5b505afa158015613766573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061378a9190615655565b8111613807576001600160a01b038716600090815260766020908152604080832089845282528083208484529091529020548310156137f5576001600160a01b0387166000908152607660209081526040808320898452825280832084845290915290205492509050805b806137ff816158e2565b915050613719565b50909590945092505050565b6001606660008282546138269190615858565b90915550506066546001600160a01b0384166000908152607160209081526040808320868452909152902060020154156138935760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e4818db1bdcd95960921b604482015260640161092a565b600082116138d45760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21037b83a34b7b760911b604482015260640161092a565b6001600160a01b03841660008181526071602090815260408083208784528252808320600201869055928252606e90522054613911576000613935565b6001600160a01b0384166000908152606e60205260409020546139359060016136ec565b6001600160a01b0385166000908152606e6020526040902055600382148061395d5750600682145b15613ca957606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b1580156139b057600080fd5b505afa1580156139c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139e89190615430565b6001600160a01b03166327b153a085606760019054906101000a90046001600160a01b03166001600160a01b031663543f17156040518163ffffffff1660e01b815260040160206040518083038186803b158015613a4557600080fd5b505afa158015613a59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a7d9190615430565b876001600160a01b0316636da19c356040518163ffffffff1660e01b815260040160206040518083038186803b158015613ab657600080fd5b505afa158015613aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aee9190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b168152613b3c9594939260679216906004016156b8565b600060405180830381600087803b158015613b5657600080fd5b505af1158015613b6a573d6000803e3d6000fd5b5050506001600160a01b0385166000908152606c60205260409020849055506006821415613bf857606754604051630bbd647b60e11b81526001600160a01b0386811660048301526101009092049091169063177ac8f690602401600060405180830381600087803b158015613bdf57600080fd5b505af1158015613bf3573d6000803e3d6000fd5b505050505b6001600160a01b0384166000908152606e6020526040902054613c7b576067546040516305c6035560e11b81526001600160a01b03868116600483015261010090920490911690630b8c06aa90602401600060405180830381600087803b158015613c6257600080fd5b505af1158015613c76573d6000803e3d6000fd5b505050505b600080516020615942833981519152848484604051613c9c93929190615766565b60405180910390a16152f0565b600182141561430857606754604051630bbd647b60e11b81526001600160a01b0386811660048301526101009092049091169063177ac8f690602401600060405180830381600087803b158015613cff57600080fd5b505af1158015613d13573d6000803e3d6000fd5b50506067546040516305c6035560e11b81526001600160a01b0388811660048301526101009092049091169250630b8c06aa9150602401600060405180830381600087803b158015613d6457600080fd5b505af1158015613d78573d6000803e3d6000fd5b5050606754604051630fe40c4760e41b81526001600160a01b038881166004830152610100909204909116925063fe40c4709150602401600060405180830381600087803b158015613dc957600080fd5b505af1158015613ddd573d6000803e3d6000fd5b5050506001600160a01b038086166000908152606f6020908152604091829020805460ff19166001179055606754825163dfb8bae760e01b81529251610100909104909316935063dfb8bae792600480840193829003018186803b158015613e4457600080fd5b505afa158015613e58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e7c9190615430565b6001600160a01b03166327b153a085606760019054906101000a90046001600160a01b03166001600160a01b031663543f17156040518163ffffffff1660e01b815260040160206040518083038186803b158015613ed957600080fd5b505afa158015613eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f119190615430565b876001600160a01b031663b0092db76040518163ffffffff1660e01b815260040160206040518083038186803b158015613f4a57600080fd5b505afa158015613f5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f829190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b168152613fd09594939260659216906004016156b8565b600060405180830381600087803b158015613fea57600080fd5b505af1158015613ffe573d6000803e3d6000fd5b50505050606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b15801561405057600080fd5b505afa158015614064573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140889190615430565b6001600160a01b03858116600081815260716020908152604080832089845282529182902054825163b0092db760e01b81529251958516956327b153a0958b959216936142129363b0092db792600480840193829003018186803b1580156140ef57600080fd5b505afa158015614103573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141279190615655565b6112f78a6001600160a01b0316636da19c356040518163ffffffff1660e01b815260040160206040518083038186803b15801561416357600080fd5b505afa158015614177573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061419b9190615655565b8b6001600160a01b03166389265ca76040518163ffffffff1660e01b815260040160206040518083038186803b1580156141d457600080fd5b505afa1580156141e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061420c9190615655565b906136f8565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b1681526142609594939260689216906004016156b8565b600060405180830381600087803b15801561427a57600080fd5b505af115801561428e573d6000803e3d6000fd5b505050506001600160a01b0384166000818152606c6020908152604091829020869055815192835282018490527f72ae4e77c5952790aabb8be5b30e11bc87653ea8bb7558b88a1f8bf466fb71c591015b60405180910390a1600080516020615942833981519152848484604051613c9c93929190615766565b60028214156148de57606754604051630bbd647b60e11b81526001600160a01b0386811660048301526101009092049091169063177ac8f690602401600060405180830381600087803b15801561435e57600080fd5b505af1158015614372573d6000803e3d6000fd5b50506067546040516305c6035560e11b81526001600160a01b0388811660048301526101009092049091169250630b8c06aa9150602401600060405180830381600087803b1580156143c357600080fd5b505af11580156143d7573d6000803e3d6000fd5b5050606754604051630fe40c4760e41b81526001600160a01b038881166004830152610100909204909116925063fe40c4709150602401600060405180830381600087803b15801561442857600080fd5b505af115801561443c573d6000803e3d6000fd5b5050506001600160a01b038086166000908152606f6020908152604091829020805460ff19166001179055606754825163dfb8bae760e01b81529251610100909104909316935063dfb8bae792600480840193829003018186803b1580156144a357600080fd5b505afa1580156144b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144db9190615430565b60675460405163677755bb60e01b81526001600160a01b038781166004830152928316926327b153a09288926101009091049091169063677755bb9060240160206040518083038186803b15801561453257600080fd5b505afa158015614546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061456a9190615430565b876001600160a01b03166389265ca76040518163ffffffff1660e01b815260040160206040518083038186803b1580156145a357600080fd5b505afa1580156145b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145db9190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b1681526146299594939260659216906004016156b8565b600060405180830381600087803b15801561464357600080fd5b505af1158015614657573d6000803e3d6000fd5b50505050606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b1580156146a957600080fd5b505afa1580156146bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146e19190615430565b6001600160a01b038581166000818152607160209081526040808320898452825291829020548251636da19c3560e01b81529251958516956327b153a0958b959216939192636da19c359260048082019391829003018186803b15801561474757600080fd5b505afa15801561475b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061477f9190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b1681526147cd9594939260679216906004016156b8565b600060405180830381600087803b1580156147e757600080fd5b505af11580156147fb573d6000803e3d6000fd5b50506067546001600160a01b0387811660008181526071602090815260408083208b845282529182902054825163465591f960e01b815292516101009096048516975063b33e3afb96508b9594169363465591f9926004808201939291829003018186803b15801561486c57600080fd5b505afa158015614880573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148a49190615655565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401614260565b6004821415614e4a57606754604051630bbd647b60e11b81526001600160a01b0386811660048301526101009092049091169063177ac8f690602401600060405180830381600087803b15801561493457600080fd5b505af1158015614948573d6000803e3d6000fd5b50506067546040516305c6035560e11b81526001600160a01b0388811660048301526101009092049091169250630b8c06aa9150602401600060405180830381600087803b15801561499957600080fd5b505af11580156149ad573d6000803e3d6000fd5b50506067546001600160a01b0387811660008181526074602090815260408083208b84529091529081902054905163b91f5e3560e01b81526004810192909252602482015261010090920416925063b91f5e359150604401600060405180830381600087803b158015614a1f57600080fd5b505af1158015614a33573d6000803e3d6000fd5b50505050606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015614a8557600080fd5b505afa158015614a99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614abd9190615430565b6001600160a01b03166327b153a085606760019054906101000a90046001600160a01b03166001600160a01b031663543f17156040518163ffffffff1660e01b815260040160206040518083038186803b158015614b1a57600080fd5b505afa158015614b2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614b529190615430565b876001600160a01b03166389265ca76040518163ffffffff1660e01b815260040160206040518083038186803b158015614b8b57600080fd5b505afa158015614b9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614bc39190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b168152614c119594939260669216906004016156b8565b600060405180830381600087803b158015614c2b57600080fd5b505af1158015614c3f573d6000803e3d6000fd5b50505050606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015614c9157600080fd5b505afa158015614ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614cc99190615430565b6001600160a01b038581166000818152607160209081526040808320898452825291829020548251636da19c3560e01b81529251958516956327b153a0958b959216939192636da19c359260048082019391829003018186803b158015614d2f57600080fd5b505afa158015614d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d679190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b168152614db59594939260679216906004016156b8565b600060405180830381600087803b158015614dcf57600080fd5b505af1158015614de3573d6000803e3d6000fd5b505050506001600160a01b0384166000818152606f60209081526040808320805460ff19166001179055606c825291829020869055815192835282018490527f72ae4e77c5952790aabb8be5b30e11bc87653ea8bb7558b88a1f8bf466fb71c591016142df565b60058214156152f0576067546040516305c6035560e11b81526001600160a01b03868116600483015261010090920490911690630b8c06aa90602401600060405180830381600087803b158015614ea057600080fd5b505af1158015614eb4573d6000803e3d6000fd5b50506067546040516304268b7560e31b81526001600160a01b03888116600483015261010090920490911692506321345ba89150602401600060405180830381600087803b158015614f0557600080fd5b505af1158015614f19573d6000803e3d6000fd5b50505050606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015614f6b57600080fd5b505afa158015614f7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614fa39190615430565b6001600160a01b03166327b153a085606760019054906101000a90046001600160a01b03166001600160a01b031663543f17156040518163ffffffff1660e01b815260040160206040518083038186803b15801561500057600080fd5b505afa158015615014573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906150389190615430565b876001600160a01b031663b0092db76040518163ffffffff1660e01b815260040160206040518083038186803b15801561507157600080fd5b505afa158015615085573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906150a99190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b1681526150f79594939260669216906004016156b8565b600060405180830381600087803b15801561511157600080fd5b505af1158015615125573d6000803e3d6000fd5b50505050606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b15801561517757600080fd5b505afa15801561518b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906151af9190615430565b6001600160a01b03858116600081815260716020908152604080832089845282529182902054825163b0092db760e01b81529251958516956327b153a0958b959216936152169363b0092db792600480840193829003018186803b1580156140ef57600080fd5b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b1681526152649594939260699216906004016156b8565b600060405180830381600087803b15801561527e57600080fd5b505af1158015615292573d6000803e3d6000fd5b5050506001600160a01b0385166000908152606b6020908152604080832054606d835281842055606e8252808320839055606c90915290819020859055516000805160206159428339815191529150613c9c90869086908690615766565b60665481146135c75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161092a565b82805461534d906158a7565b90600052602060002090601f01602090048101928261536f57600085556153b5565b82601f1061538857805160ff19168380011785556153b5565b828001600101855582156153b5579182015b828111156153b557825182559160200191906001019061539a565b506153c19291506153ff565b5090565b8280548282559060005260206000209081019282156153b557916020028201828111156153b557825182559160200191906001019061539a565b5b808211156153c15760008155600101615400565b600060208284031215615425578081fd5b8135610afb81615929565b600060208284031215615441578081fd5b8151610afb81615929565b6000806040838503121561545e578081fd5b823561546981615929565b9150602083013561547981615929565b809150509250929050565b60008060408385031215615496578182fd5b82356154a181615929565b9150602083013567ffffffffffffffff808211156154bd578283fd5b818501915085601f8301126154d0578283fd5b8135818111156154e2576154e2615913565b604051601f8201601f19908116603f0116810190838211818310171561550a5761550a615913565b81604052828152886020848701011115615522578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215615555578182fd5b823561556081615929565b946020939093013593505050565b600080600060608486031215615582578081fd5b833561558d81615929565b92506020840135915060408401356155a481615929565b809150509250925092565b6000806000606084860312156155c3578283fd5b83356155ce81615929565b95602085013595506040909401359392505050565b600080600080608085870312156155f8578081fd5b843561560381615929565b966020860135965060408601359560600135945092505050565b60006020828403121561562e578081fd5b81518015158114610afb578182fd5b60006020828403121561564e578081fd5b5035919050565b600060208284031215615666578081fd5b5051919050565b60008151808452815b8181101561569257602081850181015186830182015201615676565b818111156156a35782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b039586168152938516602085015260408401929092526060830152909116608082015260a00190565b600060018060a01b0380871683526080602084015261570a608084018761566d565b9415156040840152929092166060909101525092915050565b6001600160a01b038616815260a0602082018190526000906157479083018761566d565b6040830195909552506060810192909252151560809091015292915050565b6001600160a01b039390931683526020830191909152604082015260600190565b6020808252825182820181905260009190848201906040850190845b818110156157bf578351835292840192918401916001016157a3565b50909695505050505050565b602081526000610afb602083018461566d565b6020808252600690820152654e6f74204f4360d01b604082015260600190565b602080825282516001600160a01b03168282015282015160a0604083015260009061582c60c084018261566d565b905060408401516060840152606084015160808401526080840151151560a08401528091505092915050565b6000821982111561586b5761586b6158fd565b500190565b60008261588b57634e487b7160e01b81526012600452602481fd5b500490565b6000828210156158a2576158a26158fd565b500390565b600181811c908216806158bb57607f821691505b602082108114156158dc57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156158f6576158f66158fd565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461593e57600080fd5b5056fe22030d24c56fdfb5edf6a4fc074d3ae64f4a1de374968f0a0871f9fa5d494c4ea2646970667358221220e4f54674cd54894aa723c787a8297e6e3c5b1d054eb51d458fff5b1d0a9ae94d64736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061030c5760003560e01c806379ba50971161019d578063a8cca32a116100e9578063c69d81d7116100a2578063ebc797721161007c578063ebc7977214610887578063eee7b0c11461088f578063f48bb534146108a2578063f68246ce146108c557600080fd5b8063c69d81d71461084e578063cf65e30f14610861578063d82aff111461087457600080fd5b8063a8cca32a146107b9578063aa7839e8146107cc578063b35bf5db146107df578063c3b2b6e4146107ff578063c3b83f5f14610828578063c63011b21461083b57600080fd5b80638a6ef9841161015657806395e7f02d1161013057806395e7f02d146107425780639906a1f514610766578063a24536f914610786578063a6182c981461079957600080fd5b80638a6ef984146106e05780638da5cb5b14610709578063944450391461072257600080fd5b806379ba5097146106695780637b6cfe9d146106715780637bd72d811461067a578063815feffd1461068d578063876ae352146106ad57806389c0b25c146106cd57600080fd5b806341ed2c121161025c578063677445471161021557806371dba48d116101ef57806371dba48d146105e15780637210cceb1461061a57806375969e321461062d57806375e2570b1461065657600080fd5b8063677445471461058e5780636cd431dd146105a157806371720212146105c157600080fd5b806341ed2c12146104e4578063485cc955146105145780634ee05dd61461052757806353a47bb71461055d578063580a913d146105705780635c975abb1461058357600080fd5b806322cdda1a116102c95780633878970f116102a35780633878970f1461043b57806339672ba3146104755780633baebf43146104a05780633c794933146104d157600080fd5b806322cdda1a146103f25780632db4c70814610415578063380d96221461042857600080fd5b8063084739e41461031157806313af40351461034d57806314ec9a1f146103625780631627540c146103755780631eb4370a1461038857806320564334146103c1575b600080fd5b61033a61031f366004615414565b6001600160a01b03166000908152606c602052604090205490565b6040519081526020015b60405180910390f35b61036061035b366004615414565b6108d8565b005b61033a6103703660046155af565b610a18565b610360610383366004615414565b610a4a565b61033a610396366004615543565b6001600160a01b03919091166000908152607160209081526040808320938352929052206003015490565b61033a6103cf3660046155af565b607660209081526000938452604080852082529284528284209052825290205481565b610405610400366004615543565b610aa0565b6040519015158152602001610344565b610360610423366004615543565b610b02565b61040561043636600461556e565b610e76565b610405610449366004615543565b6001600160a01b0391909116600090815260716020908152604080832093835292905220600201541590565b61033a610483366004615543565b607460209081526000928352604080842090915290825290205481565b61033a6104ae36600461556e565b607560209081526000938452604080852082529284528284209052825290205481565b61033a6104df366004615543565b61119e565b6067546104fc9061010090046001600160a01b031681565b6040516001600160a01b039091168152602001610344565b61036061052236600461544c565b6111cd565b6104fc610535366004615543565b6001600160a01b03918216600090815260716020908152604080832093835292905220541690565b6001546104fc906001600160a01b031681565b61033a61057e366004615543565b6112b9565b60345460ff16610405565b61033a61059c3660046155af565b6112fd565b61033a6105af366004615414565b606c6020526000908152604090205481565b61033a6105cf366004615414565b606d6020526000908152604090205481565b61033a6105ef366004615543565b6001600160a01b03919091166000908152607160209081526040808320938352929052206002015490565b610405610628366004615543565b61133b565b6104fc61063b366004615414565b6070602052600090815260409020546001600160a01b031681565b610360610664366004615414565b6113d2565b61036061152d565b61033a60685481565b610405610688366004615414565b61162a565b61033a61069b366004615414565b606e6020526000908152604090205481565b6106c06106bb366004615543565b6116c5565b60405161034491906157fe565b6103606106db366004615484565b6117fa565b6104fc6106ee36600461563d565b6069602052600090815260409020546001600160a01b031681565b6000546104fc906201000090046001600160a01b031681565b610735610730366004615543565b6122f5565b6040516103449190615787565b610755610750366004615543565b61236a565b604051610344959493929190615723565b61033a610774366004615414565b606a6020526000908152604090205481565b61033a610794366004615543565b61243b565b61033a6107a7366004615414565b606b6020526000908152604090205481565b6104056107c7366004615414565b6124f2565b6103606107da366004615414565b61250f565b6107f26107ed366004615543565b6125bf565b60405161034491906157cb565b61033a61080d366004615414565b6001600160a01b03166000908152606e602052604090205490565b610360610836366004615414565b612670565b610405610849366004615414565b612789565b61036061085c366004615414565b6127e4565b61036061086f366004615414565b6129c9565b610360610882366004615414565b612aec565b610360612b92565b61036061089d3660046155e3565b612bf0565b6104056108b0366004615414565b606f6020526000908152604090205460ff1681565b61033a6108d336600461556e565b6135cd565b6001600160a01b0381166109335760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600154600160a01b900460ff161561099f5760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b606482015260840161092a565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b60736020528260005260406000206020528160005260406000208160078110610a4057600080fd5b0154925083915050565b610a52613672565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610a0d565b6001600160a01b038216600090815260716020908152604080832084845290915281206002015460031480610afb57506001600160a01b03831660009081526071602090815260408083208584529091529020600201546006145b9392505050565b60345460ff1615610b485760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161092a565b610b53828233610e76565b610b925760405162461bcd60e51b815260206004820152601060248201526f2ab730b13632903a379031b630b4b69760811b604482015260640161092a565b60675460405163fbdec41360e01b81526001600160a01b0384811660048301526101009092049091169063fbdec4139060240160206040518083038186803b158015610bdd57600080fd5b505afa158015610bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c15919061561d565b15610c6e576001600160a01b0382166000908152606e60209081526040808320839055606c909152908190208290555160008051602061594283398151915290610c659084908490600690615766565b60405180910390a15b606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015610cbc57600080fd5b505afa158015610cd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf49190615430565b6001600160a01b031663403b14128333606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5257600080fd5b505afa158015610d66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8a9190615430565b6040516380af208b60e01b81526001600160a01b03888116600483015233602483015291909116906380af208b9060440160206040518083038186803b158015610dd357600080fd5b505afa158015610de7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0b9190615655565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610e5a57600080fd5b505af1158015610e6e573d6000803e3d6000fd5b505050505050565b606754604051633761c52760e11b81526001600160a01b03858116600483015260009261010090041690636ec38a4e9060240160206040518083038186803b158015610ec157600080fd5b505afa158015610ed5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef9919061561d565b8015610f1d57506001600160a01b0384166000908152606b60205260409020548311155b8015610fec57506001600160a01b0384166000908152606f602052604090205460ff1680610f6357506001600160a01b0384166000908152606d60205260409020548311155b80610fec575060675460405163fbdec41360e01b81526001600160a01b0386811660048301526101009092049091169063fbdec4139060240160206040518083038186803b158015610fb457600080fd5b505afa158015610fc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fec919061561d565b801561101f57506001600160a01b0384811660009081526071602090815260408083208784529091529020548116908316145b801561104f57506001600160a01b0384166000908152607160209081526040808320868452909152902060020154155b801561107357506001600160a01b0384166000908152606c60205260409020548314155b801561118757506000606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ca57600080fd5b505afa1580156110de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111029190615430565b6040516380af208b60e01b81526001600160a01b038781166004830152858116602483015291909116906380af208b9060440160206040518083038186803b15801561114d57600080fd5b505afa158015611161573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111859190615655565b115b1561119457506001610afb565b5060009392505050565b6001600160a01b0382166000908152607260209081526040808320848452909152812054610afb9060016136ec565b600054610100900460ff166111e85760005460ff16156111ec565b303b155b61124f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161092a565b600054610100900460ff16158015611271576000805461ffff19166101011790555b61127a836108d8565b611282612b92565b60678054610100600160a81b0319166101006001600160a01b0385160217905580156112b4576000805461ff00191690555b505050565b6000610afb6112c8848461243b565b6001600160a01b03851660009081526072602090815260408083208784529091529020546112f79060016136ec565b906136ec565b6072602052826000526040600020602052816000526040600020818154811061132557600080fd5b9060005260206000200160009250925050505481565b6001600160a01b0382166000908152606f602052604081205460ff168061137a57506001600160a01b0383166000908152606d60205260409020548211155b80156113aa57506001600160a01b0383166000908152607160209081526040808320858452909152902060020154155b8015610afb5750506001600160a01b03919091166000908152606c6020526040902054141590565b6113da613672565b6113e3816124f2565b6113ff5760405162461bcd60e51b815260040161092a906157de565b606880546000908152606960208181526040808420546001600160a01b038781168652606a8085528387208054885286865284882080546001600160a01b0319169484169490941790935591548754875294845282862054168552909152909120555461146d9060016136ec565b6068556001600160a01b038181166000818152606a6020526040808220919091556067549051631404a95d60e11b8152600481019290925261010090049091169063280952ba90602401600060405180830381600087803b1580156114d157600080fd5b505af11580156114e5573d6000803e3d6000fd5b5050606854604080516001600160a01b038616815260208101929092527f86d1787a7c5d5a35ae49625fd6b646c884e5449312f20d0068fba244a8c657bb9350019050610a0d565b6001546001600160a01b031633146115a55760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b606482015260840161092a565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b6001600160a01b0381166000908152606f602052604081205460ff161580156116bf5750816001600160a01b031663a9daaed56040518163ffffffff1660e01b815260040160206040518083038186803b15801561168757600080fd5b505afa15801561169b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bf919061561d565b92915050565b6117026040518060a0016040528060006001600160a01b031681526020016060815260200160008152602001600081526020016000151581525090565b6001600160a01b038084166000908152607160209081526040808320868452825291829020825160a08101909352805490931682526001830180549293929184019161174d906158a7565b80601f0160208091040260200160405190810160405280929190818152602001828054611779906158a7565b80156117c65780601f1061179b576101008083540402835291602001916117c6565b820191906000526020600020905b8154815290600101906020018083116117a957829003601f168201915b5050509183525050600282015460208201526003820154604082015260049091015460ff1615156060909101529392505050565b60345460ff16156118405760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161092a565b606754604051633761c52760e11b81526001600160a01b03848116600483015261010090920490911690636ec38a4e9060240160206040518083038186803b15801561188b57600080fd5b505afa15801561189f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c3919061561d565b6118fc5760405162461bcd60e51b815260206004820152600a6024820152694e6f742041637469766560b01b604482015260640161092a565b61190582612789565b156119485760405162461bcd60e51b8152602060048201526013602482015272436c6f73656420666f7220646973707574657360681b604482015260640161092a565b60675460405163677755bb60e01b81526001600160a01b03848116600483015233926101009004169063677755bb9060240160206040518083038186803b15801561199257600080fd5b505afa1580156119a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119ca9190615430565b6001600160a01b03161415611a215760405162461bcd60e51b815260206004820152601760248201527f43726561746f722063616e206e6f742064697370757465000000000000000000604482015260640161092a565b611a2a336124f2565b15611a6d5760405162461bcd60e51b815260206004820152601360248201527227a19031b0b7103737ba103234b9b83aba329760691b604482015260640161092a565b816001600160a01b0316636da19c356040518163ffffffff1660e01b815260040160206040518083038186803b158015611aa657600080fd5b505afa158015611aba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ade9190615655565b606760019054906101000a90046001600160a01b03166001600160a01b0316633013ce296040518163ffffffff1660e01b815260040160206040518083038186803b158015611b2c57600080fd5b505afa158015611b40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b649190615430565b6040516370a0823160e01b81523360048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015611ba557600080fd5b505afa158015611bb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bdd9190615655565b1015611c245760405162461bcd60e51b81526020600482015260166024820152754c6f7720616d6f756e7420666f72206469737075746560501b604482015260640161092a565b816001600160a01b0316636da19c356040518163ffffffff1660e01b815260040160206040518083038186803b158015611c5d57600080fd5b505afa158015611c71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c959190615655565b606760019054906101000a90046001600160a01b03166001600160a01b0316633013ce296040518163ffffffff1660e01b815260040160206040518083038186803b158015611ce357600080fd5b505afa158015611cf7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d1b9190615430565b6001600160a01b031663dd62ed3e33606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7857600080fd5b505afa158015611d8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db09190615430565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260440160206040518083038186803b158015611df657600080fd5b505afa158015611e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2e9190615655565b1015611e6c5760405162461bcd60e51b815260206004820152600d60248201526c27379030b63637bbb0b731b29760991b604482015260640161092a565b604051602001611e8790602080825260009082015260400190565b6040516020818303038152906040528051906020012081604051602001611eae91906157cb565b604051602081830303815290604052805190602001201415611f0b5760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206469737075746520737472696e6760501b604482015260640161092a565b606760019054906101000a90046001600160a01b03166001600160a01b031663592740b26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5957600080fd5b505afa158015611f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f919190615655565b81511080611fa05750606e8151105b611fe45760405162461bcd60e51b81526020600482015260156024820152740a6e8e4d2dcce40caf0c6cacac8e640d8cadccee8d605b1b604482015260640161092a565b6001600160a01b0382166000908152606b60205260409020546120089060016136f8565b6001600160a01b0383166000908152606b6020908152604080832093909355606e905220546120389060016136f8565b6001600160a01b0383166000908152606e602090815260408083209390935560718152828220606b82528383208054845281835284842080546001600160a01b031916331790555483528152919020825161209c9260019290920191840190615341565b506001600160a01b0382166000908152607160209081526040808320606b83528184205484529091529020426003909101556068546120dc906001615858565b67ffffffffffffffff81111561210257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561212b578160200160208202803683370190505b506001600160a01b0383166000908152607260209081526040808320606b83528184205484528252909120825161216893919291909101906153c5565b50816001600160a01b0316633f6fa6556040518163ffffffff1660e01b815260040160206040518083038186803b1580156121a257600080fd5b505afa1580156121b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121da919061561d565b612217576001600160a01b0382166000908152607160209081526040808320606b83528184205484529091529020600401805460ff191660011790555b60675460405163019e079960e61b81526001600160a01b03848116600483015233602483015261010090920490911690636781e64090604401600060405180830381600087803b15801561226a57600080fd5b505af115801561227e573d6000803e3d6000fd5b5050506001600160a01b0383166000908152607160209081526040808320606b8352818420548452909152908190206004015490517ffd91eaa9167cff43800cbd454f3b6fb7051298a311ed47ec4f7fcf2c5a78738792506122e9918591859160ff169033906156e8565b60405180910390a15050565b6001600160a01b038216600090815260726020908152604080832084845282529182902080548351818402810184019094528084526060939283018282801561235d57602002820191906000526020600020905b815481526020019060010190808311612349575b5050505050905092915050565b6071602090815260009283526040808420909152908252902080546001820180546001600160a01b0390921692916123a1906158a7565b80601f01602080910402602001604051908101604052809291908181526020018280546123cd906158a7565b801561241a5780601f106123ef5761010080835404028352916020019161241a565b820191906000526020600020905b8154815290600101906020018083116123fd57829003601f168201915b50505050600283015460038401546004909401549293909290915060ff1685565b60008060015b6001600160a01b03851660009081526072602090815260408083208784529091529020548110156124ea576001600160a01b038516600090815260726020908152604080832087845290915281208054839081106124af57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154116124c65760006124c9565b60015b6124d69060ff1683615858565b9150806124e2816158e2565b915050612441565b509392505050565b6001600160a01b03166000908152606a6020526040902054151590565b612517613672565b6001600160a01b0381166000908152606f602052604090205460ff1661256e5760405162461bcd60e51b815260206004820152600c60248201526b4f70656e20616c726561647960a01b604482015260640161092a565b6001600160a01b0381166000818152606f6020908152604091829020805460ff1916905590519182527fba1dc3bb562a92f019150e93749bcdeeb5d64787f37a856f4563f38a12877b0e9101610a0d565b6001600160a01b038216600090815260716020908152604080832084845290915290206001018054606091906125f4906158a7565b80601f0160208091040260200160405190810160405280929190818152602001828054612620906158a7565b801561235d5780601f106126425761010080835404028352916020019161235d565b820191906000526020600020905b815481529060010190602001808311612650575093979650505050505050565b612678613672565b6001600160a01b0381166126c05760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015260640161092a565b600154600160a81b900460ff16156127105760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b604482015260640161092a565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610a0d565b6001600160a01b0381166000908152606f602052604081205460ff16806116bf5750816001600160a01b0316631897c8fe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561168757600080fd5b6127ec613672565b6001600160a01b0381166128355760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b21030b2323932b9b99760811b604482015260640161092a565b606760019054906101000a90046001600160a01b03166001600160a01b0316634d736d586040518163ffffffff1660e01b815260040160206040518083038186803b15801561288357600080fd5b505afa158015612897573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128bb9190615655565b60685411156129025760405162461bcd60e51b815260206004820152601360248201527213d0c81b595b58995c9cc8195e18d959591959606a1b604482015260640161092a565b61290b816124f2565b156129455760405162461bcd60e51b815260206004820152600a602482015269416c7265616479204f4360b01b604482015260640161092a565b6068546129539060016136f8565b6068818155600091825260696020908152604080842080546001600160a01b0319166001600160a01b0387169081179091559254838552606a8352938190208490558051928352908201929092527f7b669209e50faed123ff5edb840280b4529293d7408675dbe630eb19cc12e5bb9101610a0d565b6000546201000090046001600160a01b03163314806129f7575060675461010090046001600160a01b031633145b612a385760405162461bcd60e51b815260206004820152601260248201527127b7363c9036b0b730b3b2b917b7bbb732b960711b604482015260640161092a565b6001600160a01b0381166000908152606f602052604090205460ff1615612a925760405162461bcd60e51b815260206004820152600e60248201526d436c6f73656420616c726561647960901b604482015260640161092a565b6001600160a01b0381166000818152606f60209081526040808320805460ff191660011790558051938452908301919091527f72ae4e77c5952790aabb8be5b30e11bc87653ea8bb7558b88a1f8bf466fb71c59101610a0d565b612af4613672565b6001600160a01b038116612b3c5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015260640161092a565b60678054610100600160a81b0319166101006001600160a01b038416908102919091179091556040519081527f23e455350850b05998316f502175b427a275f4d5be9e2a04d530ea39239e1b6f90602001610a0d565b60675460ff1615612bdb5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015260640161092a565b6067805460ff19166001908117909155606655565b612bf9336124f2565b612c155760405162461bcd60e51b815260040161092a906157de565b606754604051633761c52760e11b81526001600160a01b03868116600483015261010090920490911690636ec38a4e9060240160206040518083038186803b158015612c6057600080fd5b505afa158015612c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c98919061561d565b612cd95760405162461bcd60e51b81526020600482015260126024820152712737ba1030b1ba34bb329036b0b935b2ba1760711b604482015260640161092a565b612ce284612789565b15612d265760405162461bcd60e51b815260206004820152601460248201527321b637b9b2b2103337b9103234b9b83aba32b99760611b604482015260640161092a565b60008311612d6d5760405162461bcd60e51b8152602060048201526014602482015273111a5cdc1d5d19481b9bdb88195e1a5cdd195b9d60621b604482015260640161092a565b6001600160a01b038416600090815260716020908152604080832086845290915290206002015415612dd35760405162461bcd60e51b815260206004820152600f60248201526e2234b9b83aba329031b637b9b2b21760891b604482015260640161092a565b60078211158015612de45750600082115b612e285760405162461bcd60e51b815260206004820152601560248201527424b73b30b634b2103234b9b83aba329031b7b2329760591b604482015260640161092a565b6001600160a01b038416600090815260716020908152604080832086845290915290206004015460ff1615612e9c5760048210612e975760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21031b7b2329760991b604482015260640161092a565b612f48565b6004821015612eed5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420636f646520696e206d617475726974790000000000000000604482015260640161092a565b6001600160a01b0384166000908152606d60205260409020548311612f485760405162461bcd60e51b8152602060048201526011602482015270105b1c9958591e4818d85b98d95b1b1959607a1b604482015260640161092a565b600081118015612f585750600482145b1561323257836001600160a01b0316632486d6716040518163ffffffff1660e01b815260040160206040518083038186803b158015612f9657600080fd5b505afa158015612faa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fce9190615655565b81141561302f5760405162461bcd60e51b815260206004820152602960248201527f4f432063616e206e6f7420766f746520666f7220746865207265736f6c766564604482015268103837b9b4ba34b7b760b91b606482015260840161092a565b6001600160a01b038416600090815260756020908152604080832086845282528083203384529091529020548114156130a25760405162461bcd60e51b815260206004820152601560248201527429b0b6b2903bb4b73734b733903837b9b4ba34b7b760591b604482015260640161092a565b6001600160a01b03841660009081526075602090815260408083208684528252808320338452909152902054613155576001600160a01b038416600081815260756020908152604080832087845282528083203384528252808320859055928252607681528282208683528152828220848352905220546131249060016136f8565b6001600160a01b03851660009081526076602090815260408083208784528252808320858452909152902055613232565b6001600160a01b03841660008181526076602090815260408083208784528252808320938352607582528083208784528252808320338452825280832054835292905220546131a59060016136ec565b6001600160a01b0385166000818152607660209081526040808320888452825280832093835260758252808320888452825280832033845282528083208054845293909152808220939093559083905582815220546132059060016136f8565b6001600160a01b038516600090815260766020908152604080832087845282528083208584529091529020555b6001600160a01b03841660009081526072602090815260408083208684528252808320338452606a9092528220548154811061327e57634e487b7160e01b600052603260045260246000fd5b906000526020600020015411156133b5576001600160a01b03841660008181526073602090815260408083208784528252808320938352607282528083208784528252808320338452606a90925290912054815461332a936001939092909181106132f957634e487b7160e01b600052603260045260246000fd5b90600052602060002001546007811061332257634e487b7160e01b600052603260045260246000fd5b0154906136ec565b6001600160a01b03851660008181526073602090815260408083208884528252808320938352607282528083208884528252808320338452606a909252909120548154811061338957634e487b7160e01b600052603260045260246000fd5b9060005260206000200154600781106133b257634e487b7160e01b600052603260045260246000fd5b01555b6001600160a01b03841660009081526072602090815260408083208684528252808320338452606a90925290912054815484929190811061340657634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092556001600160a01b03861681526073825260408082208683529092522061346190600190846007811061345957634e487b7160e01b600052603260045260246000fd5b0154906136f8565b6001600160a01b0385166000908152607360209081526040808320878452909152902083600781106134a357634e487b7160e01b600052603260045260246000fd5b0155604080516001600160a01b038616815260208101859052908101839052606081018290523360808201527fe5a4e79fc191615470d7a161db08d0e2f18b21da5df60451d35a2fcac7524a8e9060a00160405180910390a160685461350a906002613704565b6001600160a01b03851660009081526073602090815260408083208784529091529020836007811061354c57634e487b7160e01b600052603260045260246000fd5b015411156135c75760048214156135bc5760008061356a8686613710565b606854919350915061357d906002613704565b8211156135b5576001600160a01b038616600090815260746020908152604080832088845290915290208190556135b5868686613813565b50506135c7565b6135c7848484613813565b50505050565b60006135d8826124f2565b1561363e576001600160a01b03808516600090815260726020908152604080832087845282528083209386168352606a9091529020548154811061362c57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050610afb565b613647826124f2565b6136635760405162461bcd60e51b815260040161092a906157de565b50670de0b6b3a7640000610afb565b6000546201000090046001600160a01b031633146136ea5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b606482015260840161092a565b565b6000610afb8284615890565b6000610afb8284615858565b6000610afb8284615870565b60008060008060005b866001600160a01b031663e7702d056040518163ffffffff1660e01b815260040160206040518083038186803b15801561375257600080fd5b505afa158015613766573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061378a9190615655565b8111613807576001600160a01b038716600090815260766020908152604080832089845282528083208484529091529020548310156137f5576001600160a01b0387166000908152607660209081526040808320898452825280832084845290915290205492509050805b806137ff816158e2565b915050613719565b50909590945092505050565b6001606660008282546138269190615858565b90915550506066546001600160a01b0384166000908152607160209081526040808320868452909152902060020154156138935760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e4818db1bdcd95960921b604482015260640161092a565b600082116138d45760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21037b83a34b7b760911b604482015260640161092a565b6001600160a01b03841660008181526071602090815260408083208784528252808320600201869055928252606e90522054613911576000613935565b6001600160a01b0384166000908152606e60205260409020546139359060016136ec565b6001600160a01b0385166000908152606e6020526040902055600382148061395d5750600682145b15613ca957606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b1580156139b057600080fd5b505afa1580156139c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139e89190615430565b6001600160a01b03166327b153a085606760019054906101000a90046001600160a01b03166001600160a01b031663543f17156040518163ffffffff1660e01b815260040160206040518083038186803b158015613a4557600080fd5b505afa158015613a59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a7d9190615430565b876001600160a01b0316636da19c356040518163ffffffff1660e01b815260040160206040518083038186803b158015613ab657600080fd5b505afa158015613aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aee9190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b168152613b3c9594939260679216906004016156b8565b600060405180830381600087803b158015613b5657600080fd5b505af1158015613b6a573d6000803e3d6000fd5b5050506001600160a01b0385166000908152606c60205260409020849055506006821415613bf857606754604051630bbd647b60e11b81526001600160a01b0386811660048301526101009092049091169063177ac8f690602401600060405180830381600087803b158015613bdf57600080fd5b505af1158015613bf3573d6000803e3d6000fd5b505050505b6001600160a01b0384166000908152606e6020526040902054613c7b576067546040516305c6035560e11b81526001600160a01b03868116600483015261010090920490911690630b8c06aa90602401600060405180830381600087803b158015613c6257600080fd5b505af1158015613c76573d6000803e3d6000fd5b505050505b600080516020615942833981519152848484604051613c9c93929190615766565b60405180910390a16152f0565b600182141561430857606754604051630bbd647b60e11b81526001600160a01b0386811660048301526101009092049091169063177ac8f690602401600060405180830381600087803b158015613cff57600080fd5b505af1158015613d13573d6000803e3d6000fd5b50506067546040516305c6035560e11b81526001600160a01b0388811660048301526101009092049091169250630b8c06aa9150602401600060405180830381600087803b158015613d6457600080fd5b505af1158015613d78573d6000803e3d6000fd5b5050606754604051630fe40c4760e41b81526001600160a01b038881166004830152610100909204909116925063fe40c4709150602401600060405180830381600087803b158015613dc957600080fd5b505af1158015613ddd573d6000803e3d6000fd5b5050506001600160a01b038086166000908152606f6020908152604091829020805460ff19166001179055606754825163dfb8bae760e01b81529251610100909104909316935063dfb8bae792600480840193829003018186803b158015613e4457600080fd5b505afa158015613e58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e7c9190615430565b6001600160a01b03166327b153a085606760019054906101000a90046001600160a01b03166001600160a01b031663543f17156040518163ffffffff1660e01b815260040160206040518083038186803b158015613ed957600080fd5b505afa158015613eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f119190615430565b876001600160a01b031663b0092db76040518163ffffffff1660e01b815260040160206040518083038186803b158015613f4a57600080fd5b505afa158015613f5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f829190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b168152613fd09594939260659216906004016156b8565b600060405180830381600087803b158015613fea57600080fd5b505af1158015613ffe573d6000803e3d6000fd5b50505050606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b15801561405057600080fd5b505afa158015614064573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140889190615430565b6001600160a01b03858116600081815260716020908152604080832089845282529182902054825163b0092db760e01b81529251958516956327b153a0958b959216936142129363b0092db792600480840193829003018186803b1580156140ef57600080fd5b505afa158015614103573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141279190615655565b6112f78a6001600160a01b0316636da19c356040518163ffffffff1660e01b815260040160206040518083038186803b15801561416357600080fd5b505afa158015614177573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061419b9190615655565b8b6001600160a01b03166389265ca76040518163ffffffff1660e01b815260040160206040518083038186803b1580156141d457600080fd5b505afa1580156141e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061420c9190615655565b906136f8565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b1681526142609594939260689216906004016156b8565b600060405180830381600087803b15801561427a57600080fd5b505af115801561428e573d6000803e3d6000fd5b505050506001600160a01b0384166000818152606c6020908152604091829020869055815192835282018490527f72ae4e77c5952790aabb8be5b30e11bc87653ea8bb7558b88a1f8bf466fb71c591015b60405180910390a1600080516020615942833981519152848484604051613c9c93929190615766565b60028214156148de57606754604051630bbd647b60e11b81526001600160a01b0386811660048301526101009092049091169063177ac8f690602401600060405180830381600087803b15801561435e57600080fd5b505af1158015614372573d6000803e3d6000fd5b50506067546040516305c6035560e11b81526001600160a01b0388811660048301526101009092049091169250630b8c06aa9150602401600060405180830381600087803b1580156143c357600080fd5b505af11580156143d7573d6000803e3d6000fd5b5050606754604051630fe40c4760e41b81526001600160a01b038881166004830152610100909204909116925063fe40c4709150602401600060405180830381600087803b15801561442857600080fd5b505af115801561443c573d6000803e3d6000fd5b5050506001600160a01b038086166000908152606f6020908152604091829020805460ff19166001179055606754825163dfb8bae760e01b81529251610100909104909316935063dfb8bae792600480840193829003018186803b1580156144a357600080fd5b505afa1580156144b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144db9190615430565b60675460405163677755bb60e01b81526001600160a01b038781166004830152928316926327b153a09288926101009091049091169063677755bb9060240160206040518083038186803b15801561453257600080fd5b505afa158015614546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061456a9190615430565b876001600160a01b03166389265ca76040518163ffffffff1660e01b815260040160206040518083038186803b1580156145a357600080fd5b505afa1580156145b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145db9190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b1681526146299594939260659216906004016156b8565b600060405180830381600087803b15801561464357600080fd5b505af1158015614657573d6000803e3d6000fd5b50505050606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b1580156146a957600080fd5b505afa1580156146bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146e19190615430565b6001600160a01b038581166000818152607160209081526040808320898452825291829020548251636da19c3560e01b81529251958516956327b153a0958b959216939192636da19c359260048082019391829003018186803b15801561474757600080fd5b505afa15801561475b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061477f9190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b1681526147cd9594939260679216906004016156b8565b600060405180830381600087803b1580156147e757600080fd5b505af11580156147fb573d6000803e3d6000fd5b50506067546001600160a01b0387811660008181526071602090815260408083208b845282529182902054825163465591f960e01b815292516101009096048516975063b33e3afb96508b9594169363465591f9926004808201939291829003018186803b15801561486c57600080fd5b505afa158015614880573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148a49190615655565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401614260565b6004821415614e4a57606754604051630bbd647b60e11b81526001600160a01b0386811660048301526101009092049091169063177ac8f690602401600060405180830381600087803b15801561493457600080fd5b505af1158015614948573d6000803e3d6000fd5b50506067546040516305c6035560e11b81526001600160a01b0388811660048301526101009092049091169250630b8c06aa9150602401600060405180830381600087803b15801561499957600080fd5b505af11580156149ad573d6000803e3d6000fd5b50506067546001600160a01b0387811660008181526074602090815260408083208b84529091529081902054905163b91f5e3560e01b81526004810192909252602482015261010090920416925063b91f5e359150604401600060405180830381600087803b158015614a1f57600080fd5b505af1158015614a33573d6000803e3d6000fd5b50505050606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015614a8557600080fd5b505afa158015614a99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614abd9190615430565b6001600160a01b03166327b153a085606760019054906101000a90046001600160a01b03166001600160a01b031663543f17156040518163ffffffff1660e01b815260040160206040518083038186803b158015614b1a57600080fd5b505afa158015614b2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614b529190615430565b876001600160a01b03166389265ca76040518163ffffffff1660e01b815260040160206040518083038186803b158015614b8b57600080fd5b505afa158015614b9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614bc39190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b168152614c119594939260669216906004016156b8565b600060405180830381600087803b158015614c2b57600080fd5b505af1158015614c3f573d6000803e3d6000fd5b50505050606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015614c9157600080fd5b505afa158015614ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614cc99190615430565b6001600160a01b038581166000818152607160209081526040808320898452825291829020548251636da19c3560e01b81529251958516956327b153a0958b959216939192636da19c359260048082019391829003018186803b158015614d2f57600080fd5b505afa158015614d43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d679190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b168152614db59594939260679216906004016156b8565b600060405180830381600087803b158015614dcf57600080fd5b505af1158015614de3573d6000803e3d6000fd5b505050506001600160a01b0384166000818152606f60209081526040808320805460ff19166001179055606c825291829020869055815192835282018490527f72ae4e77c5952790aabb8be5b30e11bc87653ea8bb7558b88a1f8bf466fb71c591016142df565b60058214156152f0576067546040516305c6035560e11b81526001600160a01b03868116600483015261010090920490911690630b8c06aa90602401600060405180830381600087803b158015614ea057600080fd5b505af1158015614eb4573d6000803e3d6000fd5b50506067546040516304268b7560e31b81526001600160a01b03888116600483015261010090920490911692506321345ba89150602401600060405180830381600087803b158015614f0557600080fd5b505af1158015614f19573d6000803e3d6000fd5b50505050606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b158015614f6b57600080fd5b505afa158015614f7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614fa39190615430565b6001600160a01b03166327b153a085606760019054906101000a90046001600160a01b03166001600160a01b031663543f17156040518163ffffffff1660e01b815260040160206040518083038186803b15801561500057600080fd5b505afa158015615014573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906150389190615430565b876001600160a01b031663b0092db76040518163ffffffff1660e01b815260040160206040518083038186803b15801561507157600080fd5b505afa158015615085573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906150a99190615655565b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b1681526150f79594939260669216906004016156b8565b600060405180830381600087803b15801561511157600080fd5b505af1158015615125573d6000803e3d6000fd5b50505050606760019054906101000a90046001600160a01b03166001600160a01b031663dfb8bae76040518163ffffffff1660e01b815260040160206040518083038186803b15801561517757600080fd5b505afa15801561518b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906151af9190615430565b6001600160a01b03858116600081815260716020908152604080832089845282529182902054825163b0092db760e01b81529251958516956327b153a0958b959216936152169363b0092db792600480840193829003018186803b1580156140ef57600080fd5b6001600160a01b03808a1660009081526071602090815260408083208c8452909152908190205490516001600160e01b031960e088901b1681526152649594939260699216906004016156b8565b600060405180830381600087803b15801561527e57600080fd5b505af1158015615292573d6000803e3d6000fd5b5050506001600160a01b0385166000908152606b6020908152604080832054606d835281842055606e8252808320839055606c90915290819020859055516000805160206159428339815191529150613c9c90869086908690615766565b60665481146135c75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161092a565b82805461534d906158a7565b90600052602060002090601f01602090048101928261536f57600085556153b5565b82601f1061538857805160ff19168380011785556153b5565b828001600101855582156153b5579182015b828111156153b557825182559160200191906001019061539a565b506153c19291506153ff565b5090565b8280548282559060005260206000209081019282156153b557916020028201828111156153b557825182559160200191906001019061539a565b5b808211156153c15760008155600101615400565b600060208284031215615425578081fd5b8135610afb81615929565b600060208284031215615441578081fd5b8151610afb81615929565b6000806040838503121561545e578081fd5b823561546981615929565b9150602083013561547981615929565b809150509250929050565b60008060408385031215615496578182fd5b82356154a181615929565b9150602083013567ffffffffffffffff808211156154bd578283fd5b818501915085601f8301126154d0578283fd5b8135818111156154e2576154e2615913565b604051601f8201601f19908116603f0116810190838211818310171561550a5761550a615913565b81604052828152886020848701011115615522578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215615555578182fd5b823561556081615929565b946020939093013593505050565b600080600060608486031215615582578081fd5b833561558d81615929565b92506020840135915060408401356155a481615929565b809150509250925092565b6000806000606084860312156155c3578283fd5b83356155ce81615929565b95602085013595506040909401359392505050565b600080600080608085870312156155f8578081fd5b843561560381615929565b966020860135965060408601359560600135945092505050565b60006020828403121561562e578081fd5b81518015158114610afb578182fd5b60006020828403121561564e578081fd5b5035919050565b600060208284031215615666578081fd5b5051919050565b60008151808452815b8181101561569257602081850181015186830182015201615676565b818111156156a35782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b039586168152938516602085015260408401929092526060830152909116608082015260a00190565b600060018060a01b0380871683526080602084015261570a608084018761566d565b9415156040840152929092166060909101525092915050565b6001600160a01b038616815260a0602082018190526000906157479083018761566d565b6040830195909552506060810192909252151560809091015292915050565b6001600160a01b039390931683526020830191909152604082015260600190565b6020808252825182820181905260009190848201906040850190845b818110156157bf578351835292840192918401916001016157a3565b50909695505050505050565b602081526000610afb602083018461566d565b6020808252600690820152654e6f74204f4360d01b604082015260600190565b602080825282516001600160a01b03168282015282015160a0604083015260009061582c60c084018261566d565b905060408401516060840152606084015160808401526080840151151560a08401528091505092915050565b6000821982111561586b5761586b6158fd565b500190565b60008261588b57634e487b7160e01b81526012600452602481fd5b500490565b6000828210156158a2576158a26158fd565b500390565b600181811c908216806158bb57607f821691505b602082108114156158dc57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156158f6576158f66158fd565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461593e57600080fd5b5056fe22030d24c56fdfb5edf6a4fc074d3ae64f4a1de374968f0a0871f9fa5d494c4ea2646970667358221220e4f54674cd54894aa723c787a8297e6e3c5b1d054eb51d458fff5b1d0a9ae94d64736f6c63430008040033

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
[ Download: CSV Export  ]

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