false
false
0

Contract Address Details

0x98cee05a9cCFa9798107eF6201525D2aD3CB6Bd6

Contract Name
MasterNodes
Creator
0xc7d98c–7f3521 at 0x48384c–dd0708
Balance
0 CLO
Tokens
Fetching tokens...
Transactions
1 Transactions
Transfers
0 Transfers
Gas Used
166,423
Last Balance Update
16286213
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
MasterNodes




Optimization enabled
true
Compiler version
v0.8.17+commit.8df45f5f




Optimization runs
200
EVM Version
default




Verified at
2024-09-26T15:32:42.021609Z

Contract source code

// File: contracts/Ownable.sol



pragma solidity ^0.8.0;



/**

 * @dev Contract module which provides a basic access control mechanism, where

 * there is an account (an owner) that can be granted exclusive access to

 * specific functions.

 *

 * By default, the owner account will be the one that deploys the contract. This

 * can later be changed with {transferOwnership}.

 *

 * This module is used through inheritance. It will make available the modifier

 * `onlyOwner`, which can be applied to your functions to restrict their use to

 * the owner.

 */

abstract contract Ownable {

    address internal _owner;



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



    /**

     * @dev Initializes the contract setting the deployer as the initial owner.

     */

/*    constructor () {

        _owner = msg.sender;

        emit OwnershipTransferred(address(0), msg.sender);

    }

*/

    /**

     * @dev Returns the address of the current owner.

     */

    function owner() public view virtual returns (address) {

        return _owner;

    }



    /**

     * @dev Throws if called by any account other than the owner.

     */

    modifier onlyOwner() {

        require(owner() == msg.sender, "Ownable: caller is not the owner");

        _;

    }



    /**

     * @dev Transfers ownership of the contract to a new account (`newOwner`).

     * Can only be called by the current owner.

     */

    function transferOwnership(address newOwner) public virtual onlyOwner {

        require(newOwner != address(0), "Ownable: new owner is the zero address");

        emit OwnershipTransferred(_owner, newOwner);

        _owner = newOwner;

    }

}


// File: contracts/TransferHelper.sol



pragma solidity ^0.8.0;



// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false

library TransferHelper {

    function safeApprove(address token, address to, uint value) internal {

        // bytes4(keccak256(bytes('approve(address,uint256)')));

        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));

        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');

    }



    function safeTransfer(address token, address to, uint value) internal {

        // bytes4(keccak256(bytes('transfer(address,uint256)')));

        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));

        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');

    }



    function safeTransferFrom(address token, address from, address to, uint value) internal {

        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));

        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));

        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');

    }



    function safeTransferETH(address to, uint value) internal {

        (bool success,) = to.call{value:value}(new bytes(0));

        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');

    }

}


// File: contracts/EnumerableSet.sol



pragma solidity ^0.8.0;



/**

 * @dev Library for managing

 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive

 * types.

 *

 * Sets have the following properties:

 *

 * - Elements are added, removed, and checked for existence in constant time

 * (O(1)).

 * - Elements are enumerated in O(n). No guarantees are made on the ordering.

 *

 * ```

 * contract Example {

 *     // Add the library methods

 *     using EnumerableSet for EnumerableSet.AddressSet;

 *

 *     // Declare a set state variable

 *     EnumerableSet.AddressSet private mySet;

 * }

 * ```

 *

 * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`

 * (`UintSet`) are supported.

 */

library EnumerableSet {



    struct AddressSet {

        // Storage of set values

        address[] _values;



        // Position of the value in the `values` array, plus 1 because index 0

        // means a value is not in the set.

        mapping (address => uint256) _indexes;

    }



    /**

     * @dev Add a value to a set. O(1).

     *

     * Returns true if the value was added to the set, that is if it was not

     * already present.

     */

    function add(AddressSet storage set, address value) internal returns (bool) {

        if (!contains(set, value)) {

            set._values.push(value);

            // The value is stored at length-1, but we add 1 to all indexes

            // and use 0 as a sentinel value

            set._indexes[value] = set._values.length;

            return true;

        } else {

            return false;

        }

    }



    /**

     * @dev Removes a value from a set. O(1).

     *

     * Returns true if the value was removed from the set, that is if it was

     * present.

     */

    function remove(AddressSet storage set, address value) internal returns (bool) {

        // We read and store the value's index to prevent multiple reads from the same storage slot

        uint256 valueIndex = set._indexes[value];



        if (valueIndex != 0) { // Equivalent to contains(set, value)

            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in

            // the array, and then remove the last element (sometimes called as 'swap and pop').

            // This modifies the order of the array, as noted in {at}.



            uint256 toDeleteIndex = valueIndex - 1;

            uint256 lastIndex = set._values.length - 1;



            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs

            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.



            address lastvalue = set._values[lastIndex];



            // Move the last value to the index where the value to delete is

            set._values[toDeleteIndex] = lastvalue;

            // Update the index for the moved value

            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based



            // Delete the slot where the moved value was stored

            set._values.pop();



            // Delete the index for the deleted slot

            delete set._indexes[value];



            return true;

        } else {

            return false;

        }

    }



    /**

     * @dev Replace a current value from a set with the new value.

     *

     * Returns true if the value was replaced, and false if newValue already in set or currentValue is not in set

     */

    function replace(AddressSet storage set, address currentValue, address newValue) internal returns (bool) {

        uint256 currentIndex = set._indexes[currentValue];

        if (contains(set, newValue) || currentIndex == 0) {

            return false;

        } else {

            set._values[currentIndex - 1] = newValue;

            set._indexes[newValue] = currentIndex;

            delete set._indexes[currentValue];

            return true;

        }

    }



    /**

     * @dev Returns true if the value is in the set. O(1).

     */

    function contains(AddressSet storage set, address value) internal view returns (bool) {

        return set._indexes[value] != 0;

    }



    /**

     * @dev Returns 1-based index of value in the set. O(1).

     */

    function indexOf(AddressSet storage set, address value) internal view returns (uint256) {

        return set._indexes[value];

    }





    /**

     * @dev Returns the number of values on the set. O(1).

     */

    function length(AddressSet storage set) internal view returns (uint256) {

        return set._values.length;

    }



   /**

    * @dev Returns the value stored at position `index` in the set. O(1).

    *

    * Note that there are no guarantees on the ordering of values inside the

    * array, and it may change when more values are added or removed.

    *

    * Requirements:

    *

    * - `index` must be strictly less than {length}.

    */

    function at(AddressSet storage set, uint256 index) internal view returns (address) {

        require(set._values.length > index, "EnumerableSet: index out of bounds");

        return set._values[index];

    }

}


// File: contracts/MasterNodes.sol



pragma solidity 0.8.17;






interface ISimplifiedGlobalFarm {

    function mintFarmingReward(address _localFarm) external;

    function getAllocationX1000(address _farm) external view returns (uint256);

    function getRewardPerSecond() external view returns (uint256);

    function getlastPayment(address _localFarmAddress) external view returns (uint256);

    function next_payment() external view returns (uint256);

    function rewardMintingAvailable(address _farm) external view returns (bool);

    function farmExists(address _farmAddress) external view returns (bool);

    function owner() external view returns (address);

}



interface IERC20 {

    function balanceOf(address who) external view returns (uint256);

}



contract MasterNodes is Ownable {

    using EnumerableSet for EnumerableSet.AddressSet;

    using TransferHelper for address;

    //EnumerableSet.AddressSet _userNodes; // Enumerable list of users authority addresses (should be different then Node owner wallet)

    //EnumerableSet.AddressSet _callistoNodes; // Enumerable list of Callisto Enterprise authority addresses(should be different then Node owner wallet)



    // BEGIN MAIN NET VALUES

    address constant public SOY_TOKEN = 0x9FaE2529863bD691B4A7171bDfCf33C7ebB10a65;

    address constant public CLOE_TOKEN = 0x1eAa43544dAa399b87EEcFcC6Fa579D5ea4A6187;

    address constant public globalFarm = 0x64Fa36ACD0d13472FD786B03afC9C52aD5FCf023;

    // minimum and maximum deposit amount

    uint256 constant public minCLO  = 500000 ether;

    uint256 constant public maxCLO  = 5000000 ether;

    uint256 constant public minCLOE = 150000 ether;

    uint256 constant public maxCLOE = 1500000 ether;

    uint256 constant public minSOY  = 25000 ether;

    uint256 constant public maxSOY  = 250000 ether;

    uint256 constant public inactiveUnlockTime = 14 days;

    // END MAIN NET VALUES



    /*

    // BEGIN TEST NET VALUES

    address constant public SOY_TOKEN = 0x4c20231BCc5dB8D805DB9197C84c8BA8287CbA92;

    address constant public CLOE_TOKEN = 0x3364AD23385E2e71756C4bb29B5E3480f312B368;

    address constant public globalFarm = 0x9F66541abc036503Ae074E1E28638b0Cb6165458;



    // minimum and maximum deposit amount

    uint256 constant public minCLO  = 5 ether;

    uint256 constant public maxCLO  = 50 ether;

    uint256 constant public minCLOE = 15 ether;

    uint256 constant public maxCLOE = 150 ether;

    uint256 constant public minSOY  = 25 ether;

    uint256 constant public maxSOY  = 250 ether;

    uint256 constant public inactiveUnlockTime = 1 hours;

    // END TEST NET VALUES

    */

    

    // part of total reward (%) to split among master nodes belong to users

    uint256 public usersNodesRewardRatio; 

    // Maximum number of nodes belong to users

    //uint256 public maxUserNodes;

    //uint256 public userInactiveNodes;

    // Maximum number of nodes belong to Callisto Enterprise

    //uint256 public maxCallistoNodes;

    //uint256 public callistoInactiveNodes;

    // Total deposited

    //uint256[3] public userDeposits;    // 0 - CLO, 1 - CLOE, 2 - SOY

    // Callisto Enterprise nodes deposits

    //uint256[3] public callistoDeposits;    // 0 - CLO, 1 - CLOE, 2 - SOY

    // reward ratio of 100

    uint256[3] public ratio;   // percent of total rewards per token type (0 - CLO, 1 - CLOE, 2 - SOY)

    uint256[3] public accumulatedRewardPerShare; // 0 - CLO, 1 - CLOE, 2 - SOY

    uint256 public lastRewardTimestamp;



    struct Details {

        EnumerableSet.AddressSet nodes; //list of authority addresses (should be different then Node owner wallet)

        uint256 maxNodes;

        uint256 inactiveNodes;

        uint256[3] totalDeposits;   // 0 - CLO, 1 - CLOE, 2 - SOY

    }



    struct Node {

        address owner;  //  address of master node owner

        bool isActive;

        uint8 isUser;   // master node can belong to users or to Callisto Enterprise (CE)

        uint256[3] balances;    //0 - CLO, 1 - CLOE, 2 - SOY

        uint256[3] rewardPerShares;    //0 - CLO, 1 - CLOE, 2 - SOY

        uint256 unlockTime; // time when user can withdraw collaterals if node isn't active

        string url; // authority URL

    }

    

    Details[2] private _details; // 0 - Callisto Enterprise nodes, 1 - users nodes

    mapping(address => Node) private _nodes; // nodes

    mapping(address => address) public authorityByOwner;   // address(0) - empty, address(1) - belong to Callisto Enterprise, otherwise address of authority

    uint256 public pendingCallistoReward;



    event SetRatios(uint256 _ratioCLO, uint256 _ratioCLOE, uint256 _ratioSOY, uint256 _usersNodesRewardRatio);

    event NodeAdded(address indexed authority, Node node);

    event TokensAdded(address indexed authority, Node node);

    event NodeActivated(address indexed authority);

    event NodeDeactivated(address indexed authority);

    event NodeRemoved(address indexed authority);

    event RewardAdded(uint256 reward);

    event RescueERC20(address token, address to, uint256 value);



    function initialize() external {

        require(_owner == address(0), "Already initialized");

        _owner = msg.sender;

        emit OwnershipTransferred(address(0), msg.sender);

        ratio[0] = 62;  // CLO ratio 62%

        ratio[1] = 27;  // CLOE ratio 27%

        ratio[2] = 11;  // SOY ratio 11%

        usersNodesRewardRatio = 65; // rewards will be split by 65% to master nodes held by users and 35% to master nodes held by Callisto Enterprise

        emit SetRatios(ratio[0],ratio[1], ratio[2], usersNodesRewardRatio);

        _details[0].maxNodes = 11; // 11 nodes may belong to Callisto Enterprise

        _details[1].maxNodes = 10; // 10 nodes may belong to users

    }



    // add master node. If msg.sender is admin, then node belong to Callisto Enterprise otherwise node belong to user

    function addNode(uint256 amountCLOE, uint256 amountSOY, address authority, string calldata url) external payable {

        _checkAmounts(msg.value, amountCLOE, amountSOY);

        uint256 isUser;

        // If added by contract owner then it's Callisto Enterprise node. 

        // All Callisto Enterprise nodes belong to contract owner

        if (owner() != msg.sender) { // user node

            require(authorityByOwner[msg.sender] == address(0), "User already has node");

            require(_nodes[authority].owner == address(0), "authority already added");

            isUser = 1;

            authorityByOwner[msg.sender] = authority;

        }

        require(_details[isUser].nodes.length() < _details[isUser].maxNodes, "All nodes added");

        require(_details[isUser].nodes.contains(authority) == false, "Authority already added");

        _details[isUser].inactiveNodes++;



        CLOE_TOKEN.safeTransferFrom(msg.sender, address(this), amountCLOE);

        SOY_TOKEN.safeTransferFrom(msg.sender, address(this), amountSOY);



        Node memory _node = Node({

            owner: msg.sender,

            isActive: false,

            isUser: uint8(isUser),

            balances: [msg.value, amountCLOE, amountSOY],

            rewardPerShares: [uint256(0), 0, 0],

            unlockTime: block.timestamp + inactiveUnlockTime,

            url: url

        });



        _nodes[authority] = _node;

        emit NodeAdded(authority, _node);



        if(isUser == 0) activateNode(authority);    // automatically active Callisto Enterprise node

    }



    // add more tokens to active user's master node

    function addTokens(uint256 amountCLOE, uint256 amountSOY) external payable {

        update();

        _payRewards(msg.sender);

        address authority = authorityByOwner[msg.sender];

        Node storage n = _nodes[authority];

        require(authority != address(0) && n.isUser == 1, "Only user's node");

        require(n.isActive, "Not active");

        _checkAmounts(msg.value + n.balances[0], amountCLOE + n.balances[1], amountSOY + n.balances[2]);

        CLOE_TOKEN.safeTransferFrom(msg.sender, address(this), amountCLOE);

        SOY_TOKEN.safeTransferFrom(msg.sender, address(this), amountSOY);

        // update user's balances

        n.balances[0] += msg.value;

        n.balances[1] += amountCLOE;

        n.balances[2] += amountSOY;

        // update total deposits

        _details[1].totalDeposits[0] += msg.value;

        _details[1].totalDeposits[1] += amountCLOE;

        _details[1].totalDeposits[2] += amountSOY;

        emit TokensAdded(authority, n);

    }



    // activate node (authority)

    function activateNode (address authority) public onlyOwner{

        update();

        Node storage n = _nodes[authority];

        require(n.owner != address(0) && !n.isActive, "wrong authority");

        uint256 isUser = uint256(n.isUser);

        require(_details[isUser].nodes.length() < _details[isUser].maxNodes, "All nodes added");

        require(_details[isUser].nodes.add(authority), "Authority already added");

        _details[isUser].inactiveNodes--;

        // update total deposits

        _details[isUser].totalDeposits[0] += n.balances[0];

        _details[isUser].totalDeposits[1] += n.balances[1];

        _details[isUser].totalDeposits[2] += n.balances[2];

        if (isUser == 1) n.rewardPerShares = accumulatedRewardPerShare; // save rewardPerShares only for users node

        n.isActive = true;

        emit NodeActivated(authority);

    }



    // deactivate node (authority)

    function deactivateNode (address authority) external {

        update();

        Node storage n = _nodes[authority];

        require(n.owner != address(0) && n.isActive, "wrong authority");

        require(n.owner == msg.sender || owner() == msg.sender, "Only node or contract owner");

        uint256 isUser = uint256(n.isUser);

        if (isUser == 1) _payRewards(n.owner);

        else _payRewards(owner());

        require(_details[isUser].nodes.remove(authority), "Authority not exist");

        _details[isUser].inactiveNodes++;

        // update total deposits

        _details[isUser].totalDeposits[0] -= n.balances[0];

        _details[isUser].totalDeposits[1] -= n.balances[1];

        _details[isUser].totalDeposits[2] -= n.balances[2];

        n.isActive = false;

        n.unlockTime = block.timestamp + inactiveUnlockTime;

        emit NodeDeactivated(authority);

    }



    // remove deactivated node (authority) and receive collateral  (allowed after unlock period)

    function removeNode (address authority) external {

        update();

        Node storage n = _nodes[authority];

        address nodeOwner = n.owner;

        require(nodeOwner != address(0) && !n.isActive, "wrong authority");

        require(nodeOwner == msg.sender || owner() == msg.sender, "Only node or contract owner");

        require(n.unlockTime <= block.timestamp, "Node is locked");

        _details[uint(n.isUser)].inactiveNodes--; // remove node from inactive counter

        uint256 amountCLO = n.balances[0];

        uint256 amountCLOE = n.balances[1];

        uint256 amountSOY = n.balances[2];

        delete _nodes[authority];

        delete authorityByOwner[nodeOwner];

        nodeOwner.safeTransferETH(amountCLO);

        CLOE_TOKEN.safeTransfer(nodeOwner, amountCLOE);

        SOY_TOKEN.safeTransfer(nodeOwner, amountSOY);

        emit NodeRemoved(authority);

    }



    // claim earned reward

    function claimReward() external {

        update();

        _payRewards(msg.sender);

    }



    function _payRewards(address user) internal {

        uint256 reward;

        address authority = authorityByOwner[user];

        if (authority != address(0)) {  // user's node

            Node storage n = _nodes[authority];

            if (n.isActive) {   // reward available only for active nodes

                for (uint256 i = 0; i < 3; i++) {

                    reward = reward + (n.balances[i] * (accumulatedRewardPerShare[i] - n.rewardPerShares[i]) / 1e18);

                }

                n.rewardPerShares = accumulatedRewardPerShare; // save rewardPerShares only for users node

            }

        } else if (user == owner() && _details[0].nodes.length() != 0) {   // callisto's node

            // contract owner receive reward from all nodes belong to Callisto Enterprise

            reward = pendingCallistoReward;

            pendingCallistoReward = 0;

        }

        if (reward != 0) SOY_TOKEN.safeTransfer(user, reward);

    }



    function _checkAmounts(uint256 amountCLO, uint256 amountCLOE,uint256 amountSOY) internal pure {

        require(amountCLO >= minCLO, "Not enough CLO");

        require(amountCLOE >= minCLOE, "Not enough CLOE");

        require(amountSOY >= minSOY, "Not enough SOY");

        require(amountCLO <= maxCLO, "Too many CLO"); 

        require(amountCLOE <= maxCLOE, "Too many CLOE"); 

        require(amountSOY <= maxSOY, "Too many SOY"); 

    }



    // get master node info by authority address

    function getNodeByAuthority(address authority) public view returns (Node memory) {

        return _nodes[authority];

    }



    // get user's master node info by owner address

    function getUsersNodeByOwner(address owner) external view returns (Node memory node, address authority) {

        authority = authorityByOwner[owner];

        node = _nodes[authority];

    }



    // get all Callisto Enterprise nodes

    function getCallistoNodes() external view returns(Node[] memory nodes, address[] memory authorities) {

        uint256 nodeLength = _details[0].nodes.length();

        authorities = new address[](nodeLength);

        nodes = new Node[](nodeLength);

        for (uint i = 0; i < nodeLength; i++) {

            authorities[i] = _details[0].nodes.at(i);

            nodes[i] = _nodes[authorities[i]];

        }

    }



    // get master node info by Id, belongUsers = 1 if get node that belong to users

    function getNodeById(uint256 id, bool belongUsers) external view returns (Node memory node, address authority) {

        if (belongUsers) authority = _details[1].nodes.at(id);

        else authority = _details[0].nodes.at(id);

        node = _nodes[authority];

    }



    // get number of nodes belong to Callisto Enterprise and users

    function getNumberOfNodes() external view returns (uint256 callistoNodes, uint256 usersNodes) {

        callistoNodes = _details[0].nodes.length();

        usersNodes = _details[1].nodes.length();

    }



    // get details (deposits). id = 0 for callisto nodes, 1 for users nodes

    function getDetails(uint256 id) external view returns(uint256 maxNodes, uint256 inactiveNodes, uint256[3] memory totalDeposits) {

        maxNodes = _details[id].maxNodes;

        inactiveNodes = _details[id].inactiveNodes;

        totalDeposits = _details[id].totalDeposits; 

    }



    // Set reward ratios

    function setRatios(uint256 _ratioCLOE, uint256 _ratioSOY, uint256 _usersNodesRewardRatio) external onlyOwner {

        require(_ratioCLOE + _ratioSOY <= 100, "Total ratio > 100%");

        ratio[0] = 100 - _ratioCLOE - _ratioSOY;    // CLO ratio

        ratio[1] = _ratioCLOE;

        ratio[2] = _ratioSOY;

        require(_usersNodesRewardRatio <= 100, "Users ratio > 100%");

        usersNodesRewardRatio = _usersNodesRewardRatio;

        emit SetRatios(ratio[0], _ratioCLOE, _ratioSOY, _usersNodesRewardRatio);

    }



    // farming functions

    function notifyRewardAmount(uint256 reward) external {

        require(msg.sender == globalFarm, "Only globalFarm");

        if (lastRewardTimestamp == 0) {

            lastRewardTimestamp = block.timestamp;

        }

        emit RewardAdded(reward);

    }

    

    function getRewardPerSecond() public view returns (uint256)

    {

        return ISimplifiedGlobalFarm(globalFarm).getRewardPerSecond();

    }

    

    function getAllocationX1000() public view returns (uint256)

    {

        return ISimplifiedGlobalFarm(globalFarm).getAllocationX1000(address(this));

    }



    // get earned reward 

    function getReward(address user) public view returns(uint256 reward) {

        address authority = authorityByOwner[user];

        uint256 _reward = (block.timestamp - lastRewardTimestamp) * getRewardPerSecond() * getAllocationX1000() / 1000;

        if (authority != address(0)) {  // user's node

            Node storage n = _nodes[authority];

            if (n.isActive) {   // reward available only for active nodes

                _reward = _reward * usersNodesRewardRatio / 100;

                for (uint256 i = 0; i < 3; i++) {

                    uint256 r = _reward * ratio[i] / 100;

                    uint256 acc = accumulatedRewardPerShare[i] + (r * 1e18 / _details[1].totalDeposits[i]);

                    reward = reward + (n.balances[i] * (acc - n.rewardPerShares[i]) / 1e18);

                }

            }

        } else if (user == owner() && _details[0].nodes.length() != 0) {   // callisto's node

            // contract owner receive reward from all nodes belong to Callisto Enterprise

            reward = pendingCallistoReward + (_reward * (100 - usersNodesRewardRatio) / 100);

        }

    }



    // increase users rewards pool

    function addRewardToUsersPool(uint256 amountSOY) external onlyOwner {

        SOY_TOKEN.safeTransferFrom(msg.sender, address(this), amountSOY);

        for (uint256 i = 0; i < 3; i++) {

            uint256 r = amountSOY * ratio[i] / 100; // part of reward per token type

            uint256 deposit = _details[1].totalDeposits[i];

            if (deposit != 0)

                accumulatedRewardPerShare[i] = accumulatedRewardPerShare[i] + (r * 1e18 / deposit);

        }        

    }



    // Update reward variables of this Local Farm to be up-to-date.

    function update() public {

        ISimplifiedGlobalFarm(globalFarm).mintFarmingReward(address(this));



        if (block.timestamp <= lastRewardTimestamp) {

            return;

        }



        if (lastRewardTimestamp == 0) return; // start calculate reward from first minting



        uint256 multiplier = block.timestamp - lastRewardTimestamp;

        uint256 _totalReward = multiplier * getRewardPerSecond() * getAllocationX1000() / 1000;

        uint256 _reward = _totalReward * usersNodesRewardRatio / 100;  // users' part of rewards

        pendingCallistoReward = pendingCallistoReward + (_totalReward - _reward);   // callisto's part of rewards

        for (uint256 i = 0; i < 3; i++) {

            uint256 r = _reward * ratio[i] / 100; // part of reward per token type

            uint256 deposit = _details[1].totalDeposits[i];

            if (deposit != 0)

                accumulatedRewardPerShare[i] = accumulatedRewardPerShare[i] + (r * 1e18 / deposit);

        }

        lastRewardTimestamp = block.timestamp;

    }



    // Rescue ERC20 tokens

    function rescueERC20(address token, address to) external onlyOwner {

        uint256 value = IERC20(token).balanceOf(address(this));

        if (token == CLOE_TOKEN) {

            value = value - _details[0].totalDeposits[1] - _details[1].totalDeposits[1];

        } else if (token == SOY_TOKEN) {

            require(

                _details[0].totalDeposits[2] == 0 && _details[1].totalDeposits[2] == 0, 

                "SOY in use"

            ); // allow rescue SOY token only if there is not SOY deposits

        }

        token.safeTransfer(to, value);

        emit RescueERC20(token, to, value);

    }

}

        

Contract ABI

[{"type":"event","name":"NodeActivated","inputs":[{"type":"address","name":"authority","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"NodeAdded","inputs":[{"type":"address","name":"authority","internalType":"address","indexed":true},{"type":"tuple","name":"node","internalType":"struct MasterNodes.Node","indexed":false,"components":[{"type":"address","name":"owner","internalType":"address"},{"type":"bool","name":"isActive","internalType":"bool"},{"type":"uint8","name":"isUser","internalType":"uint8"},{"type":"uint256[3]","name":"balances","internalType":"uint256[3]"},{"type":"uint256[3]","name":"rewardPerShares","internalType":"uint256[3]"},{"type":"uint256","name":"unlockTime","internalType":"uint256"},{"type":"string","name":"url","internalType":"string"}]}],"anonymous":false},{"type":"event","name":"NodeDeactivated","inputs":[{"type":"address","name":"authority","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"NodeRemoved","inputs":[{"type":"address","name":"authority","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RescueERC20","inputs":[{"type":"address","name":"token","internalType":"address","indexed":false},{"type":"address","name":"to","internalType":"address","indexed":false},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"RewardAdded","inputs":[{"type":"uint256","name":"reward","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SetRatios","inputs":[{"type":"uint256","name":"_ratioCLO","internalType":"uint256","indexed":false},{"type":"uint256","name":"_ratioCLOE","internalType":"uint256","indexed":false},{"type":"uint256","name":"_ratioSOY","internalType":"uint256","indexed":false},{"type":"uint256","name":"_usersNodesRewardRatio","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokensAdded","inputs":[{"type":"address","name":"authority","internalType":"address","indexed":true},{"type":"tuple","name":"node","internalType":"struct MasterNodes.Node","indexed":false,"components":[{"type":"address","name":"owner","internalType":"address"},{"type":"bool","name":"isActive","internalType":"bool"},{"type":"uint8","name":"isUser","internalType":"uint8"},{"type":"uint256[3]","name":"balances","internalType":"uint256[3]"},{"type":"uint256[3]","name":"rewardPerShares","internalType":"uint256[3]"},{"type":"uint256","name":"unlockTime","internalType":"uint256"},{"type":"string","name":"url","internalType":"string"}]}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"CLOE_TOKEN","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"SOY_TOKEN","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"accumulatedRewardPerShare","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"activateNode","inputs":[{"type":"address","name":"authority","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"addNode","inputs":[{"type":"uint256","name":"amountCLOE","internalType":"uint256"},{"type":"uint256","name":"amountSOY","internalType":"uint256"},{"type":"address","name":"authority","internalType":"address"},{"type":"string","name":"url","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addRewardToUsersPool","inputs":[{"type":"uint256","name":"amountSOY","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"addTokens","inputs":[{"type":"uint256","name":"amountCLOE","internalType":"uint256"},{"type":"uint256","name":"amountSOY","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"authorityByOwner","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimReward","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deactivateNode","inputs":[{"type":"address","name":"authority","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getAllocationX1000","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"nodes","internalType":"struct MasterNodes.Node[]","components":[{"type":"address","name":"owner","internalType":"address"},{"type":"bool","name":"isActive","internalType":"bool"},{"type":"uint8","name":"isUser","internalType":"uint8"},{"type":"uint256[3]","name":"balances","internalType":"uint256[3]"},{"type":"uint256[3]","name":"rewardPerShares","internalType":"uint256[3]"},{"type":"uint256","name":"unlockTime","internalType":"uint256"},{"type":"string","name":"url","internalType":"string"}]},{"type":"address[]","name":"authorities","internalType":"address[]"}],"name":"getCallistoNodes","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"maxNodes","internalType":"uint256"},{"type":"uint256","name":"inactiveNodes","internalType":"uint256"},{"type":"uint256[3]","name":"totalDeposits","internalType":"uint256[3]"}],"name":"getDetails","inputs":[{"type":"uint256","name":"id","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct MasterNodes.Node","components":[{"type":"address","name":"owner","internalType":"address"},{"type":"bool","name":"isActive","internalType":"bool"},{"type":"uint8","name":"isUser","internalType":"uint8"},{"type":"uint256[3]","name":"balances","internalType":"uint256[3]"},{"type":"uint256[3]","name":"rewardPerShares","internalType":"uint256[3]"},{"type":"uint256","name":"unlockTime","internalType":"uint256"},{"type":"string","name":"url","internalType":"string"}]}],"name":"getNodeByAuthority","inputs":[{"type":"address","name":"authority","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"node","internalType":"struct MasterNodes.Node","components":[{"type":"address","name":"owner","internalType":"address"},{"type":"bool","name":"isActive","internalType":"bool"},{"type":"uint8","name":"isUser","internalType":"uint8"},{"type":"uint256[3]","name":"balances","internalType":"uint256[3]"},{"type":"uint256[3]","name":"rewardPerShares","internalType":"uint256[3]"},{"type":"uint256","name":"unlockTime","internalType":"uint256"},{"type":"string","name":"url","internalType":"string"}]},{"type":"address","name":"authority","internalType":"address"}],"name":"getNodeById","inputs":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"bool","name":"belongUsers","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"callistoNodes","internalType":"uint256"},{"type":"uint256","name":"usersNodes","internalType":"uint256"}],"name":"getNumberOfNodes","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"reward","internalType":"uint256"}],"name":"getReward","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getRewardPerSecond","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"node","internalType":"struct MasterNodes.Node","components":[{"type":"address","name":"owner","internalType":"address"},{"type":"bool","name":"isActive","internalType":"bool"},{"type":"uint8","name":"isUser","internalType":"uint8"},{"type":"uint256[3]","name":"balances","internalType":"uint256[3]"},{"type":"uint256[3]","name":"rewardPerShares","internalType":"uint256[3]"},{"type":"uint256","name":"unlockTime","internalType":"uint256"},{"type":"string","name":"url","internalType":"string"}]},{"type":"address","name":"authority","internalType":"address"}],"name":"getUsersNodeByOwner","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"globalFarm","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"inactiveUnlockTime","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastRewardTimestamp","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxCLO","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxCLOE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxSOY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minCLO","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minCLOE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minSOY","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"notifyRewardAmount","inputs":[{"type":"uint256","name":"reward","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"pendingCallistoReward","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ratio","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeNode","inputs":[{"type":"address","name":"authority","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rescueERC20","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"address","name":"to","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRatios","inputs":[{"type":"uint256","name":"_ratioCLOE","internalType":"uint256"},{"type":"uint256","name":"_ratioSOY","internalType":"uint256"},{"type":"uint256","name":"_usersNodesRewardRatio","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"update","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"usersNodesRewardRatio","inputs":[]}]
              

Contract Creation Code

Verify & Publish
0x608060405234801561001057600080fd5b50613ad8806100206000396000f3fe60806040526004361061022f5760003560e01c8063b199892a1161012e578063da5b4ee7116100ab578063ebd5f9e11161006f578063ebd5f9e11461067a578063f2fde38b14610698578063f8077fae146106b8578063fcceb25a146106ce578063feac1200146106ec57600080fd5b8063da5b4ee7146105ef578063e173bd4514610604578063e22733a214610624578063e80233c614610644578063ea5c285d1461066457600080fd5b8063bbebdcc0116100f2578063bbebdcc014610544578063c00007b014610571578063c23bdaa714610591578063cdfdb7dc146105af578063d096a21b146105cf57600080fd5b8063b199892a146104a3578063b2b99ec9146104b6578063b81c806a146104d6578063b88a802f14610500578063b93a89f71461051557600080fd5b80634f3a1ff8116101bc57806374d43ac41161018057806374d43ac4146104055780638129fc1c146104335780638da5cb5b14610448578063a2e6204514610466578063a9622dc51461047b57600080fd5b80634f3a1ff81461033e5780635b17f5061461037e5780635d799f87146103a657806365814455146103c657806370a1579e146103e657600080fd5b806318a75f521161020357806318a75f52146102b65780631e29653c146102d45780632f4860c9146102e957806336f3d514146102ff5780633c6b16ab1461031e57600080fd5b80628df454146102345780630102609914610267578063135e5d891461027c578063141e93be1461029f575b600080fd5b34801561024057600080fd5b5061025461024f3660046132ff565b610722565b6040519081526020015b60405180910390f35b61027a610275366004613318565b610739565b005b34801561028857600080fd5b50610291610979565b60405161025e92919061341d565b3480156102ab57600080fd5b506102546212750081565b3480156102c257600080fd5b506102546934f086f3b33b6840000081565b3480156102e057600080fd5b50610254610c2c565b3480156102f557600080fd5b5061025460195481565b34801561030b57600080fd5b506102546a013da329b633647180000081565b34801561032a57600080fd5b5061027a6103393660046132ff565b610ca7565b34801561034a57600080fd5b506103667364fa36acd0d13472fd786b03afc9c52ad5fcf02381565b6040516001600160a01b03909116815260200161025e565b34801561038a57600080fd5b50610366739fae2529863bd691b4a7171bdfcf33c7ebb10a6581565b3480156103b257600080fd5b5061027a6103c13660046134dd565b610d41565b3480156103d257600080fd5b5061027a6103e1366004613510565b610f00565b3480156103f257600080fd5b506102546a0422ca8b0a00a42500000081565b34801561041157600080fd5b50610425610420366004613540565b6111da565b60405161025e929190613570565b34801561043f57600080fd5b5061027a611373565b34801561045457600080fd5b506000546001600160a01b0316610366565b34801561047257600080fd5b5061027a61146d565b34801561048757600080fd5b50610366731eaa43544daa399b87eecfcc6fa579d5ea4a618781565b61027a6104b136600461359a565b611632565b3480156104c257600080fd5b5061027a6104d1366004613510565b611a7f565b3480156104e257600080fd5b506104eb611cfa565b6040805192835260208301919091520161025e565b34801561050c57600080fd5b5061027a611d1c565b34801561052157600080fd5b506105356105303660046132ff565b611d2f565b60405161025e9392919061362e565b34801561055057600080fd5b5061056461055f366004613510565b611dc8565b60405161025e919061366f565b34801561057d57600080fd5b5061025461058c366004613510565b611f33565b34801561059d57600080fd5b5061025469054b40b1f852bda0000081565b3480156105bb57600080fd5b5061027a6105ca366004613682565b61215a565b3480156105db57600080fd5b506104256105ea366004613510565b612297565b3480156105fb57600080fd5b5061025461240f565b34801561061057600080fd5b5061025461061f3660046132ff565b612463565b34801561063057600080fd5b5061027a61063f3660046132ff565b612473565b34801561065057600080fd5b5061027a61065f366004613510565b612591565b34801561067057600080fd5b5061025460015481565b34801561068657600080fd5b506102546969e10de76676d080000081565b3480156106a457600080fd5b5061027a6106b3366004613510565b61286f565b3480156106c457600080fd5b5061025460085481565b3480156106da57600080fd5b50610254691fc3842bd1f071c0000081565b3480156106f857600080fd5b50610366610707366004613510565b6018602052600090815260409020546001600160a01b031681565b6002816003811061073257600080fd5b0154905081565b61074161146d565b61074a33612968565b336000908152601860209081526040808320546001600160a01b03168084526017909252909120811580159061078b57508054600160a81b900460ff166001145b6107cf5760405162461bcd60e51b815260206004820152601060248201526f4f6e6c7920757365722773206e6f646560801b60448201526064015b60405180910390fd5b8054600160a01b900460ff166108145760405162461bcd60e51b815260206004820152600a6024820152694e6f742061637469766560b01b60448201526064016107c6565b600181015461084a9061082790346136da565b600283015461083690876136da565b600384015461084590876136da565b612ac3565b61086a731eaa43544daa399b87eecfcc6fa579d5ea4a6187333087612c83565b61088a739fae2529863bd691b4a7171bdfcf33c7ebb10a65333086612c83565b346001820160000160008282546108a191906136da565b9091555084905060018083010160008282546108bd91906136da565b909155508390506001820160020160008282546108da91906136da565b90915550349050601460000160008282546108f591906136da565b909155508490506014600101600082825461091091906136da565b909155508390506014600201600082825461092b91906136da565b92505081905550816001600160a01b03167f6f7579464656d5010911f2a5ddf87eaa7149e87a41834055e651366a6e8f3ec08260405161096b91906137c7565b60405180910390a250505050565b606080600061098d6009825b600702015490565b90508067ffffffffffffffff8111156109a8576109a8613844565b6040519080825280602002602001820160405280156109d1578160200160208202803683370190505b5091508067ffffffffffffffff8111156109ed576109ed613844565b604051908082528060200260200182016040528015610a2657816020015b610a136131dc565b815260200190600190039081610a0b5790505b50925060005b81811015610c2657610a4781600960005b6007020190612db3565b838281518110610a5957610a596136ae565b60200260200101906001600160a01b031690816001600160a01b03168152505060176000848381518110610a8f57610a8f6136ae565b6020908102919091018101516001600160a01b039081168352828201939093526040918201600020825160e0810184528154948516815260ff600160a01b86048116151593820193909352600160a81b909404909116838301528151606080820193849052919291840191600184019060039082845b815481526020019060010190808311610b0557505050918352505060408051606081019182905260209092019190600484019060039082845b815481526020019060010190808311610b3e575050505050815260200160078201548152602001600882018054610b7490613710565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba090613710565b8015610bed5780601f10610bc257610100808354040283529160200191610bed565b820191906000526020600020905b815481529060010190602001808311610bd057829003601f168201915b505050505081525050848281518110610c0857610c086136ae565b60200260200101819052508080610c1e9061385a565b915050610a2c565b50509091565b60405163389bbbfd60e21b81523060048201526000907364fa36acd0d13472fd786b03afc9c52ad5fcf0239063e26eeff490602401602060405180830381865afa158015610c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca29190613873565b905090565b337364fa36acd0d13472fd786b03afc9c52ad5fcf02314610cfc5760405162461bcd60e51b815260206004820152600f60248201526e4f6e6c7920676c6f62616c4661726d60881b60448201526064016107c6565b600854600003610d0b57426008555b6040518181527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a150565b33610d546000546001600160a01b031690565b6001600160a01b031614610d7a5760405162461bcd60e51b81526004016107c69061388c565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de59190613873565b9050731eaa43544daa399b87eecfcc6fa579d5ea4a6186196001600160a01b03841601610e2d57601554600e54610e1c90836138c1565b610e2691906138c1565b9050610e9b565b739fae2529863bd691b4a7171bdfcf33c7ebb10a64196001600160a01b03841601610e9b57600f54158015610e625750601654155b610e9b5760405162461bcd60e51b815260206004820152600a602482015269534f5920696e2075736560b01b60448201526064016107c6565b610eaf6001600160a01b0384168383612e44565b604080516001600160a01b038086168252841660208201529081018290527f9b793652de97f04c5168920587bad4b1c6345295a8f5ad31c59ff946a26f91d2906060015b60405180910390a1505050565b610f0861146d565b6001600160a01b038082166000908152601760205260409020805490911615801590610f3c57508054600160a01b900460ff165b610f585760405162461bcd60e51b81526004016107c6906138d4565b80546001600160a01b0316331480610f89575033610f7e6000546001600160a01b031690565b6001600160a01b0316145b610fd55760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c79206e6f6465206f7220636f6e7472616374206f776e6572000000000060448201526064016107c6565b8054600160a81b900460ff166001819003611003578154610ffe906001600160a01b0316612968565b61101d565b61101d6110186000546001600160a01b031690565b612968565b61103e8360098360028110611034576110346136ae565b6007020190612f5f565b6110805760405162461bcd60e51b8152602060048201526013602482015272105d5d1a1bdc9a5d1e481b9bdd08195e1a5cdd606a1b60448201526064016107c6565b60098160028110611093576110936136ae565b6007020160030160008154809291906110ab9061385a565b90915550506001820154600982600281106110c8576110c86136ae565b600702016004016000600381106110e1576110e16136ae565b0160008282546110f191906138c1565b90915550506001808301015460098260028110611110576111106136ae565b60070201600401600160038110611129576111296136ae565b01600082825461113991906138c1565b9091555050600382015460098260028110611156576111566136ae565b6007020160040160026003811061116f5761116f6136ae565b01600082825461117f91906138c1565b9091555050815460ff60a01b1916825561119c62127500426136da565b60078301556040516001600160a01b038416907fd9957750e6343405c319eb99a4ec67fa11cfd66969318cbc71aa2d45fa53a34990600090a2505050565b6111e26131dc565b600082156111fe576111f78460096001610a3d565b905061120e565b61120b8460096000610a3d565b90505b6001600160a01b03818116600090815260176020908152604091829020825160e0810184528154948516815260ff600160a01b86048116151593820193909352600160a81b909404909116838301528151606080820193849052919291840191600184019060039082845b81548152602001906001019080831161127957505050918352505060408051606081019182905260209092019190600484019060039082845b8154815260200190600101908083116112b25750505050508152602001600782015481526020016008820180546112e890613710565b80601f016020809104026020016040519081016040528092919081815260200182805461131490613710565b80156113615780601f1061133657610100808354040283529160200191611361565b820191906000526020600020905b81548152906001019060200180831161134457829003601f168201915b50505050508152505091509250929050565b6000546001600160a01b0316156113c25760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016107c6565b600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3603e6002819055601b6003819055600b6004819055604160018190556040805194855260208501939093529183015260608201527f9644b6174df1bd5bad31e571d2506445b44f89a0ec9f80f86ad150284c317b5a9060800160405180910390a1600b8055600a601255565b60405163032453f160e51b81523060048201527364fa36acd0d13472fd786b03afc9c52ad5fcf0239063648a7e2090602401600060405180830381600087803b1580156114b957600080fd5b505af11580156114cd573d6000803e3d6000fd5b5050505060085442116114dc57565b6008546000036114e857565b6000600854426114f891906138c1565b905060006103e8611507610c2c565b61150f61240f565b61151990856138fd565b61152391906138fd565b61152d9190613914565b9050600060646001548361154191906138fd565b61154b9190613914565b905061155781836138c1565b60195461156491906136da565b60195560005b600381101561162857600060646002836003811061158a5761158a6136ae565b015461159690856138fd565b6115a09190613914565b90506000601483600381106115b7576115b76136ae565b01549050801561161357806115d483670de0b6b3a76400006138fd565b6115de9190613914565b600584600381106115f1576115f16136ae565b01546115fd91906136da565b60058460038110611610576116106136ae565b01555b505080806116209061385a565b91505061156a565b5050426008555050565b61163d348686612ac3565b6000336116526000546001600160a01b031690565b6001600160a01b03161461175257336000908152601860205260409020546001600160a01b0316156116be5760405162461bcd60e51b81526020600482015260156024820152745573657220616c726561647920686173206e6f646560581b60448201526064016107c6565b6001600160a01b0384811660009081526017602052604090205416156117265760405162461bcd60e51b815260206004820152601760248201527f617574686f7269747920616c726561647920616464656400000000000000000060448201526064016107c6565b5033600090815260186020526040902080546001600160a01b0319166001600160a01b03851617905560015b60098160028110611765576117656136ae565b600702016002015461178360098360028110610985576109856136ae565b106117c25760405162461bcd60e51b815260206004820152600f60248201526e105b1b081b9bd9195cc81859191959608a1b60448201526064016107c6565b6117ff84600983600281106117d9576117d96136ae565b60070201906001600160a01b031660009081526001919091016020526040902054151590565b156118465760405162461bcd60e51b8152602060048201526017602482015276105d5d1a1bdc9a5d1e48185b1c9958591e481859191959604a1b60448201526064016107c6565b60098160028110611859576118596136ae565b6007020160030160008154809291906118719061385a565b909155506118979050731eaa43544daa399b87eecfcc6fa579d5ea4a6187333089612c83565b6118b7739fae2529863bd691b4a7171bdfcf33c7ebb10a65333088612c83565b60006040518060e00160405280336001600160a01b031681526020016000151581526020018360ff16815260200160405180606001604052803481526020018a81526020018981525081526020016040518060600160405280600081526020016000815260200160008152508152602001621275004261193791906136da565b815260200185858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250506001600160a01b0380891682526017602090815260409283902085518154928701519487015160ff16600160a81b0260ff60a81b19951515600160a01b026001600160a81b031990941691909416179190911792909216178155606083015192935083929091506119eb9060018301906003613226565b506080820151611a019060048301906003613226565b5060a0820151600782015560c08201516008820190611a20908261397c565b50905050846001600160a01b03167fb6b552e59896e4d58bd65ecce8af2a09e960820e2a6876d694f15471430d5ca582604051611a5d919061366f565b60405180910390a281600003611a7657611a7685612591565b50505050505050565b611a8761146d565b6001600160a01b03808216600090815260176020526040902080549091168015801590611abd57508154600160a01b900460ff16155b611ad95760405162461bcd60e51b81526004016107c6906138d4565b6001600160a01b038116331480611b09575033611afe6000546001600160a01b031690565b6001600160a01b0316145b611b555760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c79206e6f6465206f7220636f6e7472616374206f776e6572000000000060448201526064016107c6565b4282600701541115611b9a5760405162461bcd60e51b815260206004820152600e60248201526d139bd919481a5cc81b1bd8dad95960921b60448201526064016107c6565b8154600990600160a81b900460ff1660028110611bb957611bb96136ae565b600702016003016000815480929190611bd190613a3c565b90915550506001828101546002808501546003808701546001600160a01b038916600090815260176020526040812080546001600160b01b0319168155968701819055938601849055908501839055600485018390556005850183905560068501839055600785018390559293909291611c4e6008830182613264565b50506001600160a01b038416600081815260186020526040902080546001600160a01b0319169055611c8090846130a1565b611c9f731eaa43544daa399b87eecfcc6fa579d5ea4a61878584612e44565b611cbe739fae2529863bd691b4a7171bdfcf33c7ebb10a658583612e44565b6040516001600160a01b038716907fcfc24166db4bb677e857cacabd1541fb2b30645021b27c5130419589b84db52b90600090a2505050505050565b600080611d08600982610985565b9150611d1660096001610985565b90509091565b611d2461146d565b611d2d33612968565b565b600080611d3a6132a1565b60098460028110611d4d57611d4d6136ae565b6007020160020154925060098460028110611d6a57611d6a6136ae565b6007020160030154915060098460028110611d8757611d876136ae565b604080516060810191829052926007929092029091016004019060039082845b815481526020019060010190808311611da757505050505090509193909250565b611dd06131dc565b6001600160a01b03828116600090815260176020908152604091829020825160e0810184528154948516815260ff600160a01b86048116151593820193909352600160a81b909404909116838301528151606080820193849052919291840191600184019060039082845b815481526020019060010190808311611e3b57505050918352505060408051606081019182905260209092019190600484019060039082845b815481526020019060010190808311611e74575050505050815260200160078201548152602001600882018054611eaa90613710565b80601f0160208091040260200160405190810160405280929190818152602001828054611ed690613710565b8015611f235780601f10611ef857610100808354040283529160200191611f23565b820191906000526020600020905b815481529060010190602001808311611f0657829003601f168201915b5050505050815250509050919050565b6001600160a01b03808216600090815260186020526040812054909116816103e8611f5c610c2c565b611f6461240f565b600854611f7190426138c1565b611f7b91906138fd565b611f8591906138fd565b611f8f9190613914565b90506001600160a01b038216156120f2576001600160a01b03821660009081526017602052604090208054600160a01b900460ff16156120ec57606460015483611fd991906138fd565b611fe39190613914565b915060005b60038110156120ea576000606460028360038110612008576120086136ae565b015461201490866138fd565b61201e9190613914565b9050600060148360038110612035576120356136ae565b015461204983670de0b6b3a76400006138fd565b6120539190613914565b60058460038110612066576120666136ae565b015461207291906136da565b9050670de0b6b3a7640000846004018460038110612092576120926136ae565b015461209e90836138c1565b8560010185600381106120b3576120b36136ae565b01546120bf91906138fd565b6120c99190613914565b6120d390886136da565b9650505080806120e29061385a565b915050611fe8565b505b50612153565b6000546001600160a01b038581169116148015612119575061211660096000610985565b15155b15612153576064600154606461212f91906138c1565b61213990836138fd565b6121439190613914565b60195461215091906136da565b92505b5050919050565b3361216d6000546001600160a01b031690565b6001600160a01b0316146121935760405162461bcd60e51b81526004016107c69061388c565b606461219f83856136da565b11156121e25760405162461bcd60e51b8152602060048201526012602482015271546f74616c20726174696f203e203130302560701b60448201526064016107c6565b816121ee8460646138c1565b6121f891906138c1565b60025560038390556004829055606481111561224b5760405162461bcd60e51b8152602060048201526012602482015271557365727320726174696f203e203130302560701b60448201526064016107c6565b600181905560025460408051918252602082018590528101839052606081018290527f9644b6174df1bd5bad31e571d2506445b44f89a0ec9f80f86ad150284c317b5a90608001610ef3565b61229f6131dc565b6001600160a01b0382811660009081526018602090815260408083205484168084526017835292819020815160e0810183528154958616815260ff600160a01b87048116151594820194909452600160a81b909504909216848201528051606080820192839052939493840191600184019060039082845b81548152602001906001019080831161231757505050918352505060408051606081019182905260209092019190600484019060039082845b81548152602001906001019080831161235057505050505081526020016007820154815260200160088201805461238690613710565b80601f01602080910402602001604051908101604052809291908181526020018280546123b290613710565b80156123ff5780601f106123d4576101008083540402835291602001916123ff565b820191906000526020600020905b8154815290600101906020018083116123e257829003601f168201915b5050505050815250509150915091565b60007364fa36acd0d13472fd786b03afc9c52ad5fcf0236001600160a01b031663da5b4ee76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c7e573d6000803e3d6000fd5b6005816003811061073257600080fd5b336124866000546001600160a01b031690565b6001600160a01b0316146124ac5760405162461bcd60e51b81526004016107c69061388c565b6124cc739fae2529863bd691b4a7171bdfcf33c7ebb10a65333084612c83565b60005b600381101561258d5760006064600283600381106124ef576124ef6136ae565b01546124fb90856138fd565b6125059190613914565b905060006014836003811061251c5761251c6136ae565b015490508015612578578061253983670de0b6b3a76400006138fd565b6125439190613914565b60058460038110612556576125566136ae565b015461256291906136da565b60058460038110612575576125756136ae565b01555b505080806125859061385a565b9150506124cf565b5050565b336125a46000546001600160a01b031690565b6001600160a01b0316146125ca5760405162461bcd60e51b81526004016107c69061388c565b6125d261146d565b6001600160a01b03808216600090815260176020526040902080549091161580159061260757508054600160a01b900460ff16155b6126235760405162461bcd60e51b81526004016107c6906138d4565b8054600160a81b900460ff1660098160028110612642576126426136ae565b600702016002015461266060098360028110610985576109856136ae565b1061269f5760405162461bcd60e51b815260206004820152600f60248201526e105b1b081b9bd9195cc81859191959608a1b60448201526064016107c6565b6126c083600983600281106126b6576126b66136ae565b600702019061316a565b6127065760405162461bcd60e51b8152602060048201526017602482015276105d5d1a1bdc9a5d1e48185b1c9958591e481859191959604a1b60448201526064016107c6565b60098160028110612719576127196136ae565b60070201600301600081548092919061273190613a3c565b909155505060018201546009826002811061274e5761274e6136ae565b60070201600401600060038110612767576127676136ae565b01600082825461277791906136da565b90915550506001808301015460098260028110612796576127966136ae565b600702016004016001600381106127af576127af6136ae565b0160008282546127bf91906136da565b90915550506003820154600982600281106127dc576127dc6136ae565b600702016004016002600381106127f5576127f56136ae565b01600082825461280591906136da565b909155505060018190036128255761282360048301600560036132bf565b505b815460ff60a01b1916600160a01b1782556040516001600160a01b038416907f7dc8b937d2916b130743c447af3d771fa55e66b7393105150e2e635ac3e8726090600090a2505050565b336128826000546001600160a01b031690565b6001600160a01b0316146128a85760405162461bcd60e51b81526004016107c69061388c565b6001600160a01b03811661290d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107c6565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038082166000908152601860205260408120549091168015612a61576001600160a01b03811660009081526017602052604090208054600160a01b900460ff1615612a5b5760005b6003811015612a4857670de0b6b3a76400008260040182600381106129de576129de6136ae565b0154600583600381106129f3576129f36136ae565b01546129ff91906138c1565b836001018360038110612a1457612a146136ae565b0154612a2091906138fd565b612a2a9190613914565b612a3490856136da565b935080612a408161385a565b9150506129b7565b50612a5960048201600560036132bf565b505b50612a99565b6000546001600160a01b038481169116148015612a885750612a8560096000610985565b15155b15612a995760198054600090915591505b8115612abe57612abe739fae2529863bd691b4a7171bdfcf33c7ebb10a658484612e44565b505050565b6969e10de76676d0800000831015612b0e5760405162461bcd60e51b815260206004820152600e60248201526d4e6f7420656e6f75676820434c4f60901b60448201526064016107c6565b691fc3842bd1f071c00000821015612b5a5760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f75676820434c4f4560881b60448201526064016107c6565b69054b40b1f852bda00000811015612ba55760405162461bcd60e51b815260206004820152600e60248201526d4e6f7420656e6f75676820534f5960901b60448201526064016107c6565b6a0422ca8b0a00a425000000831115612bef5760405162461bcd60e51b815260206004820152600c60248201526b546f6f206d616e7920434c4f60a01b60448201526064016107c6565b6a013da329b6336471800000821115612c3a5760405162461bcd60e51b815260206004820152600d60248201526c546f6f206d616e7920434c4f4560981b60448201526064016107c6565b6934f086f3b33b68400000811115612abe5760405162461bcd60e51b815260206004820152600c60248201526b546f6f206d616e7920534f5960a01b60448201526064016107c6565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691612ce79190613a53565b6000604051808303816000865af19150503d8060008114612d24576040519150601f19603f3d011682016040523d82523d6000602084013e612d29565b606091505b5091509150818015612d53575080511580612d53575080806020019051810190612d539190613a6f565b612dab5760405162461bcd60e51b8152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416044820152631253115160e21b60648201526084016107c6565b505050505050565b81546000908210612e115760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016107c6565b826000018281548110612e2657612e266136ae565b6000918252602090912001546001600160a01b031690505b92915050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691612ea09190613a53565b6000604051808303816000865af19150503d8060008114612edd576040519150601f19603f3d011682016040523d82523d6000602084013e612ee2565b606091505b5091509150818015612f0c575080511580612f0c575080806020019051810190612f0c9190613a6f565b612f585760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c45440060448201526064016107c6565b5050505050565b6001600160a01b03811660009081526001830160205260408120548015613097576000612f8d6001836138c1565b8554909150600090612fa1906001906138c1565b90506000866000018281548110612fba57612fba6136ae565b60009182526020909120015487546001600160a01b0390911691508190889085908110612fe957612fe96136ae565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905561301d8360016136da565b6001600160a01b0382166000908152600189016020526040902055865487908061304957613049613a8c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0388168252600189810190915260408220919091559450612e3e9350505050565b6000915050612e3e565b604080516000808252602082019092526001600160a01b0384169083906040516130cb9190613a53565b60006040518083038185875af1925050503d8060008114613108576040519150601f19603f3d011682016040523d82523d6000602084013e61310d565b606091505b5050905080612abe5760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960448201526213115160ea1b60648201526084016107c6565b6001600160a01b03811660009081526001830160205260408120546131d457508154600180820184556000848152602080822090930180546001600160a01b0319166001600160a01b03861690811790915585549082528286019093526040902091909155612e3e565b506000612e3e565b6040805160e08101825260008082526020820181905291810191909152606081016132056132a1565b81526020016132126132a1565b815260200160008152602001606081525090565b8260038101928215613254579160200282015b82811115613254578251825591602001919060010190613239565b506132609291506132ea565b5090565b50805461327090613710565b6000825580601f10613280575050565b601f01602090049060005260206000209081019061329e91906132ea565b50565b60405180606001604052806003906020820280368337509192915050565b8260038101928215613254579182015b828111156132545782548255916001019190600101906132cf565b5b8082111561326057600081556001016132eb565b60006020828403121561331157600080fd5b5035919050565b6000806040838503121561332b57600080fd5b50508035926020909101359150565b8060005b600381101561335d57815184526020938401939091019060010161333e565b50505050565b60005b8381101561337e578181015183820152602001613366565b50506000910152565b600061016060018060a01b03835116845260208301511515602085015260ff604084015116604085015260608301516133c3606086018261333a565b5060808301516133d660c086018261333a565b5060a083015161012085015260c08301518161014086015280518083870152610180925061340a8184880160208501613363565b601f01601f191694909401019392505050565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b8381101561347457605f19888703018552613462868351613387565b95509382019390820190600101613446565b50508584038187015286518085528782019482019350915060005b828110156134b45784516001600160a01b03168452938101939281019260010161348f565b5091979650505050505050565b80356001600160a01b03811681146134d857600080fd5b919050565b600080604083850312156134f057600080fd5b6134f9836134c1565b9150613507602084016134c1565b90509250929050565b60006020828403121561352257600080fd5b61352b826134c1565b9392505050565b801515811461329e57600080fd5b6000806040838503121561355357600080fd5b82359150602083013561356581613532565b809150509250929050565b6040815260006135836040830185613387565b905060018060a01b03831660208301529392505050565b6000806000806000608086880312156135b257600080fd5b85359450602086013593506135c9604087016134c1565b9250606086013567ffffffffffffffff808211156135e657600080fd5b818801915088601f8301126135fa57600080fd5b81358181111561360957600080fd5b89602082850101111561361b57600080fd5b9699959850939650602001949392505050565b838152602080820184905260a0820190604083018460005b600381101561366357815183529183019190830190600101613646565b50505050949350505050565b60208152600061352b6020830184613387565b60008060006060848603121561369757600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115612e3e57612e3e6136c4565b8060005b600381101561335d5781548452602090930192600191820191016136f1565b600181811c9082168061372457607f821691505b60208210810361374457634e487b7160e01b600052602260045260246000fd5b50919050565b6000815461375781613710565b808552602060018381168015613774576001811461378e576137bc565b60ff1985168884015283151560051b8801830195506137bc565b866000528260002060005b858110156137b45781548a8201860152908301908401613799565b890184019650505b505050505092915050565b602081526000825460018060a01b038116602084015260ff8160a01c16151560408401526138006060840160ff8360a81c1660ff169052565b5061381160808301600185016136ed565b61382160e08301600485016136ed565b60078301546101408301526101608083015261352b61018083016008850161374a565b634e487b7160e01b600052604160045260246000fd5b60006001820161386c5761386c6136c4565b5060010190565b60006020828403121561388557600080fd5b5051919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b81810381811115612e3e57612e3e6136c4565b6020808252600f908201526e77726f6e6720617574686f7269747960881b604082015260600190565b8082028115828204841417612e3e57612e3e6136c4565b60008261393157634e487b7160e01b600052601260045260246000fd5b500490565b601f821115612abe57600081815260208120601f850160051c8101602086101561395d5750805b601f850160051c820191505b81811015612dab57828155600101613969565b815167ffffffffffffffff81111561399657613996613844565b6139aa816139a48454613710565b84613936565b602080601f8311600181146139df57600084156139c75750858301515b600019600386901b1c1916600185901b178555612dab565b600085815260208120601f198616915b82811015613a0e578886015182559484019460019091019084016139ef565b5085821015613a2c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600081613a4b57613a4b6136c4565b506000190190565b60008251613a65818460208701613363565b9190910192915050565b600060208284031215613a8157600080fd5b815161352b81613532565b634e487b7160e01b600052603160045260246000fdfea26469706673582212203fe6c8965de18e5b82a331f0024fe029855cf80ca29dd24f941b3a730bdcc05764736f6c63430008110033

Deployed ByteCode

0x60806040526004361061022f5760003560e01c8063b199892a1161012e578063da5b4ee7116100ab578063ebd5f9e11161006f578063ebd5f9e11461067a578063f2fde38b14610698578063f8077fae146106b8578063fcceb25a146106ce578063feac1200146106ec57600080fd5b8063da5b4ee7146105ef578063e173bd4514610604578063e22733a214610624578063e80233c614610644578063ea5c285d1461066457600080fd5b8063bbebdcc0116100f2578063bbebdcc014610544578063c00007b014610571578063c23bdaa714610591578063cdfdb7dc146105af578063d096a21b146105cf57600080fd5b8063b199892a146104a3578063b2b99ec9146104b6578063b81c806a146104d6578063b88a802f14610500578063b93a89f71461051557600080fd5b80634f3a1ff8116101bc57806374d43ac41161018057806374d43ac4146104055780638129fc1c146104335780638da5cb5b14610448578063a2e6204514610466578063a9622dc51461047b57600080fd5b80634f3a1ff81461033e5780635b17f5061461037e5780635d799f87146103a657806365814455146103c657806370a1579e146103e657600080fd5b806318a75f521161020357806318a75f52146102b65780631e29653c146102d45780632f4860c9146102e957806336f3d514146102ff5780633c6b16ab1461031e57600080fd5b80628df454146102345780630102609914610267578063135e5d891461027c578063141e93be1461029f575b600080fd5b34801561024057600080fd5b5061025461024f3660046132ff565b610722565b6040519081526020015b60405180910390f35b61027a610275366004613318565b610739565b005b34801561028857600080fd5b50610291610979565b60405161025e92919061341d565b3480156102ab57600080fd5b506102546212750081565b3480156102c257600080fd5b506102546934f086f3b33b6840000081565b3480156102e057600080fd5b50610254610c2c565b3480156102f557600080fd5b5061025460195481565b34801561030b57600080fd5b506102546a013da329b633647180000081565b34801561032a57600080fd5b5061027a6103393660046132ff565b610ca7565b34801561034a57600080fd5b506103667364fa36acd0d13472fd786b03afc9c52ad5fcf02381565b6040516001600160a01b03909116815260200161025e565b34801561038a57600080fd5b50610366739fae2529863bd691b4a7171bdfcf33c7ebb10a6581565b3480156103b257600080fd5b5061027a6103c13660046134dd565b610d41565b3480156103d257600080fd5b5061027a6103e1366004613510565b610f00565b3480156103f257600080fd5b506102546a0422ca8b0a00a42500000081565b34801561041157600080fd5b50610425610420366004613540565b6111da565b60405161025e929190613570565b34801561043f57600080fd5b5061027a611373565b34801561045457600080fd5b506000546001600160a01b0316610366565b34801561047257600080fd5b5061027a61146d565b34801561048757600080fd5b50610366731eaa43544daa399b87eecfcc6fa579d5ea4a618781565b61027a6104b136600461359a565b611632565b3480156104c257600080fd5b5061027a6104d1366004613510565b611a7f565b3480156104e257600080fd5b506104eb611cfa565b6040805192835260208301919091520161025e565b34801561050c57600080fd5b5061027a611d1c565b34801561052157600080fd5b506105356105303660046132ff565b611d2f565b60405161025e9392919061362e565b34801561055057600080fd5b5061056461055f366004613510565b611dc8565b60405161025e919061366f565b34801561057d57600080fd5b5061025461058c366004613510565b611f33565b34801561059d57600080fd5b5061025469054b40b1f852bda0000081565b3480156105bb57600080fd5b5061027a6105ca366004613682565b61215a565b3480156105db57600080fd5b506104256105ea366004613510565b612297565b3480156105fb57600080fd5b5061025461240f565b34801561061057600080fd5b5061025461061f3660046132ff565b612463565b34801561063057600080fd5b5061027a61063f3660046132ff565b612473565b34801561065057600080fd5b5061027a61065f366004613510565b612591565b34801561067057600080fd5b5061025460015481565b34801561068657600080fd5b506102546969e10de76676d080000081565b3480156106a457600080fd5b5061027a6106b3366004613510565b61286f565b3480156106c457600080fd5b5061025460085481565b3480156106da57600080fd5b50610254691fc3842bd1f071c0000081565b3480156106f857600080fd5b50610366610707366004613510565b6018602052600090815260409020546001600160a01b031681565b6002816003811061073257600080fd5b0154905081565b61074161146d565b61074a33612968565b336000908152601860209081526040808320546001600160a01b03168084526017909252909120811580159061078b57508054600160a81b900460ff166001145b6107cf5760405162461bcd60e51b815260206004820152601060248201526f4f6e6c7920757365722773206e6f646560801b60448201526064015b60405180910390fd5b8054600160a01b900460ff166108145760405162461bcd60e51b815260206004820152600a6024820152694e6f742061637469766560b01b60448201526064016107c6565b600181015461084a9061082790346136da565b600283015461083690876136da565b600384015461084590876136da565b612ac3565b61086a731eaa43544daa399b87eecfcc6fa579d5ea4a6187333087612c83565b61088a739fae2529863bd691b4a7171bdfcf33c7ebb10a65333086612c83565b346001820160000160008282546108a191906136da565b9091555084905060018083010160008282546108bd91906136da565b909155508390506001820160020160008282546108da91906136da565b90915550349050601460000160008282546108f591906136da565b909155508490506014600101600082825461091091906136da565b909155508390506014600201600082825461092b91906136da565b92505081905550816001600160a01b03167f6f7579464656d5010911f2a5ddf87eaa7149e87a41834055e651366a6e8f3ec08260405161096b91906137c7565b60405180910390a250505050565b606080600061098d6009825b600702015490565b90508067ffffffffffffffff8111156109a8576109a8613844565b6040519080825280602002602001820160405280156109d1578160200160208202803683370190505b5091508067ffffffffffffffff8111156109ed576109ed613844565b604051908082528060200260200182016040528015610a2657816020015b610a136131dc565b815260200190600190039081610a0b5790505b50925060005b81811015610c2657610a4781600960005b6007020190612db3565b838281518110610a5957610a596136ae565b60200260200101906001600160a01b031690816001600160a01b03168152505060176000848381518110610a8f57610a8f6136ae565b6020908102919091018101516001600160a01b039081168352828201939093526040918201600020825160e0810184528154948516815260ff600160a01b86048116151593820193909352600160a81b909404909116838301528151606080820193849052919291840191600184019060039082845b815481526020019060010190808311610b0557505050918352505060408051606081019182905260209092019190600484019060039082845b815481526020019060010190808311610b3e575050505050815260200160078201548152602001600882018054610b7490613710565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba090613710565b8015610bed5780601f10610bc257610100808354040283529160200191610bed565b820191906000526020600020905b815481529060010190602001808311610bd057829003601f168201915b505050505081525050848281518110610c0857610c086136ae565b60200260200101819052508080610c1e9061385a565b915050610a2c565b50509091565b60405163389bbbfd60e21b81523060048201526000907364fa36acd0d13472fd786b03afc9c52ad5fcf0239063e26eeff490602401602060405180830381865afa158015610c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca29190613873565b905090565b337364fa36acd0d13472fd786b03afc9c52ad5fcf02314610cfc5760405162461bcd60e51b815260206004820152600f60248201526e4f6e6c7920676c6f62616c4661726d60881b60448201526064016107c6565b600854600003610d0b57426008555b6040518181527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a150565b33610d546000546001600160a01b031690565b6001600160a01b031614610d7a5760405162461bcd60e51b81526004016107c69061388c565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de59190613873565b9050731eaa43544daa399b87eecfcc6fa579d5ea4a6186196001600160a01b03841601610e2d57601554600e54610e1c90836138c1565b610e2691906138c1565b9050610e9b565b739fae2529863bd691b4a7171bdfcf33c7ebb10a64196001600160a01b03841601610e9b57600f54158015610e625750601654155b610e9b5760405162461bcd60e51b815260206004820152600a602482015269534f5920696e2075736560b01b60448201526064016107c6565b610eaf6001600160a01b0384168383612e44565b604080516001600160a01b038086168252841660208201529081018290527f9b793652de97f04c5168920587bad4b1c6345295a8f5ad31c59ff946a26f91d2906060015b60405180910390a1505050565b610f0861146d565b6001600160a01b038082166000908152601760205260409020805490911615801590610f3c57508054600160a01b900460ff165b610f585760405162461bcd60e51b81526004016107c6906138d4565b80546001600160a01b0316331480610f89575033610f7e6000546001600160a01b031690565b6001600160a01b0316145b610fd55760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c79206e6f6465206f7220636f6e7472616374206f776e6572000000000060448201526064016107c6565b8054600160a81b900460ff166001819003611003578154610ffe906001600160a01b0316612968565b61101d565b61101d6110186000546001600160a01b031690565b612968565b61103e8360098360028110611034576110346136ae565b6007020190612f5f565b6110805760405162461bcd60e51b8152602060048201526013602482015272105d5d1a1bdc9a5d1e481b9bdd08195e1a5cdd606a1b60448201526064016107c6565b60098160028110611093576110936136ae565b6007020160030160008154809291906110ab9061385a565b90915550506001820154600982600281106110c8576110c86136ae565b600702016004016000600381106110e1576110e16136ae565b0160008282546110f191906138c1565b90915550506001808301015460098260028110611110576111106136ae565b60070201600401600160038110611129576111296136ae565b01600082825461113991906138c1565b9091555050600382015460098260028110611156576111566136ae565b6007020160040160026003811061116f5761116f6136ae565b01600082825461117f91906138c1565b9091555050815460ff60a01b1916825561119c62127500426136da565b60078301556040516001600160a01b038416907fd9957750e6343405c319eb99a4ec67fa11cfd66969318cbc71aa2d45fa53a34990600090a2505050565b6111e26131dc565b600082156111fe576111f78460096001610a3d565b905061120e565b61120b8460096000610a3d565b90505b6001600160a01b03818116600090815260176020908152604091829020825160e0810184528154948516815260ff600160a01b86048116151593820193909352600160a81b909404909116838301528151606080820193849052919291840191600184019060039082845b81548152602001906001019080831161127957505050918352505060408051606081019182905260209092019190600484019060039082845b8154815260200190600101908083116112b25750505050508152602001600782015481526020016008820180546112e890613710565b80601f016020809104026020016040519081016040528092919081815260200182805461131490613710565b80156113615780601f1061133657610100808354040283529160200191611361565b820191906000526020600020905b81548152906001019060200180831161134457829003601f168201915b50505050508152505091509250929050565b6000546001600160a01b0316156113c25760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016107c6565b600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3603e6002819055601b6003819055600b6004819055604160018190556040805194855260208501939093529183015260608201527f9644b6174df1bd5bad31e571d2506445b44f89a0ec9f80f86ad150284c317b5a9060800160405180910390a1600b8055600a601255565b60405163032453f160e51b81523060048201527364fa36acd0d13472fd786b03afc9c52ad5fcf0239063648a7e2090602401600060405180830381600087803b1580156114b957600080fd5b505af11580156114cd573d6000803e3d6000fd5b5050505060085442116114dc57565b6008546000036114e857565b6000600854426114f891906138c1565b905060006103e8611507610c2c565b61150f61240f565b61151990856138fd565b61152391906138fd565b61152d9190613914565b9050600060646001548361154191906138fd565b61154b9190613914565b905061155781836138c1565b60195461156491906136da565b60195560005b600381101561162857600060646002836003811061158a5761158a6136ae565b015461159690856138fd565b6115a09190613914565b90506000601483600381106115b7576115b76136ae565b01549050801561161357806115d483670de0b6b3a76400006138fd565b6115de9190613914565b600584600381106115f1576115f16136ae565b01546115fd91906136da565b60058460038110611610576116106136ae565b01555b505080806116209061385a565b91505061156a565b5050426008555050565b61163d348686612ac3565b6000336116526000546001600160a01b031690565b6001600160a01b03161461175257336000908152601860205260409020546001600160a01b0316156116be5760405162461bcd60e51b81526020600482015260156024820152745573657220616c726561647920686173206e6f646560581b60448201526064016107c6565b6001600160a01b0384811660009081526017602052604090205416156117265760405162461bcd60e51b815260206004820152601760248201527f617574686f7269747920616c726561647920616464656400000000000000000060448201526064016107c6565b5033600090815260186020526040902080546001600160a01b0319166001600160a01b03851617905560015b60098160028110611765576117656136ae565b600702016002015461178360098360028110610985576109856136ae565b106117c25760405162461bcd60e51b815260206004820152600f60248201526e105b1b081b9bd9195cc81859191959608a1b60448201526064016107c6565b6117ff84600983600281106117d9576117d96136ae565b60070201906001600160a01b031660009081526001919091016020526040902054151590565b156118465760405162461bcd60e51b8152602060048201526017602482015276105d5d1a1bdc9a5d1e48185b1c9958591e481859191959604a1b60448201526064016107c6565b60098160028110611859576118596136ae565b6007020160030160008154809291906118719061385a565b909155506118979050731eaa43544daa399b87eecfcc6fa579d5ea4a6187333089612c83565b6118b7739fae2529863bd691b4a7171bdfcf33c7ebb10a65333088612c83565b60006040518060e00160405280336001600160a01b031681526020016000151581526020018360ff16815260200160405180606001604052803481526020018a81526020018981525081526020016040518060600160405280600081526020016000815260200160008152508152602001621275004261193791906136da565b815260200185858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250506001600160a01b0380891682526017602090815260409283902085518154928701519487015160ff16600160a81b0260ff60a81b19951515600160a01b026001600160a81b031990941691909416179190911792909216178155606083015192935083929091506119eb9060018301906003613226565b506080820151611a019060048301906003613226565b5060a0820151600782015560c08201516008820190611a20908261397c565b50905050846001600160a01b03167fb6b552e59896e4d58bd65ecce8af2a09e960820e2a6876d694f15471430d5ca582604051611a5d919061366f565b60405180910390a281600003611a7657611a7685612591565b50505050505050565b611a8761146d565b6001600160a01b03808216600090815260176020526040902080549091168015801590611abd57508154600160a01b900460ff16155b611ad95760405162461bcd60e51b81526004016107c6906138d4565b6001600160a01b038116331480611b09575033611afe6000546001600160a01b031690565b6001600160a01b0316145b611b555760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c79206e6f6465206f7220636f6e7472616374206f776e6572000000000060448201526064016107c6565b4282600701541115611b9a5760405162461bcd60e51b815260206004820152600e60248201526d139bd919481a5cc81b1bd8dad95960921b60448201526064016107c6565b8154600990600160a81b900460ff1660028110611bb957611bb96136ae565b600702016003016000815480929190611bd190613a3c565b90915550506001828101546002808501546003808701546001600160a01b038916600090815260176020526040812080546001600160b01b0319168155968701819055938601849055908501839055600485018390556005850183905560068501839055600785018390559293909291611c4e6008830182613264565b50506001600160a01b038416600081815260186020526040902080546001600160a01b0319169055611c8090846130a1565b611c9f731eaa43544daa399b87eecfcc6fa579d5ea4a61878584612e44565b611cbe739fae2529863bd691b4a7171bdfcf33c7ebb10a658583612e44565b6040516001600160a01b038716907fcfc24166db4bb677e857cacabd1541fb2b30645021b27c5130419589b84db52b90600090a2505050505050565b600080611d08600982610985565b9150611d1660096001610985565b90509091565b611d2461146d565b611d2d33612968565b565b600080611d3a6132a1565b60098460028110611d4d57611d4d6136ae565b6007020160020154925060098460028110611d6a57611d6a6136ae565b6007020160030154915060098460028110611d8757611d876136ae565b604080516060810191829052926007929092029091016004019060039082845b815481526020019060010190808311611da757505050505090509193909250565b611dd06131dc565b6001600160a01b03828116600090815260176020908152604091829020825160e0810184528154948516815260ff600160a01b86048116151593820193909352600160a81b909404909116838301528151606080820193849052919291840191600184019060039082845b815481526020019060010190808311611e3b57505050918352505060408051606081019182905260209092019190600484019060039082845b815481526020019060010190808311611e74575050505050815260200160078201548152602001600882018054611eaa90613710565b80601f0160208091040260200160405190810160405280929190818152602001828054611ed690613710565b8015611f235780601f10611ef857610100808354040283529160200191611f23565b820191906000526020600020905b815481529060010190602001808311611f0657829003601f168201915b5050505050815250509050919050565b6001600160a01b03808216600090815260186020526040812054909116816103e8611f5c610c2c565b611f6461240f565b600854611f7190426138c1565b611f7b91906138fd565b611f8591906138fd565b611f8f9190613914565b90506001600160a01b038216156120f2576001600160a01b03821660009081526017602052604090208054600160a01b900460ff16156120ec57606460015483611fd991906138fd565b611fe39190613914565b915060005b60038110156120ea576000606460028360038110612008576120086136ae565b015461201490866138fd565b61201e9190613914565b9050600060148360038110612035576120356136ae565b015461204983670de0b6b3a76400006138fd565b6120539190613914565b60058460038110612066576120666136ae565b015461207291906136da565b9050670de0b6b3a7640000846004018460038110612092576120926136ae565b015461209e90836138c1565b8560010185600381106120b3576120b36136ae565b01546120bf91906138fd565b6120c99190613914565b6120d390886136da565b9650505080806120e29061385a565b915050611fe8565b505b50612153565b6000546001600160a01b038581169116148015612119575061211660096000610985565b15155b15612153576064600154606461212f91906138c1565b61213990836138fd565b6121439190613914565b60195461215091906136da565b92505b5050919050565b3361216d6000546001600160a01b031690565b6001600160a01b0316146121935760405162461bcd60e51b81526004016107c69061388c565b606461219f83856136da565b11156121e25760405162461bcd60e51b8152602060048201526012602482015271546f74616c20726174696f203e203130302560701b60448201526064016107c6565b816121ee8460646138c1565b6121f891906138c1565b60025560038390556004829055606481111561224b5760405162461bcd60e51b8152602060048201526012602482015271557365727320726174696f203e203130302560701b60448201526064016107c6565b600181905560025460408051918252602082018590528101839052606081018290527f9644b6174df1bd5bad31e571d2506445b44f89a0ec9f80f86ad150284c317b5a90608001610ef3565b61229f6131dc565b6001600160a01b0382811660009081526018602090815260408083205484168084526017835292819020815160e0810183528154958616815260ff600160a01b87048116151594820194909452600160a81b909504909216848201528051606080820192839052939493840191600184019060039082845b81548152602001906001019080831161231757505050918352505060408051606081019182905260209092019190600484019060039082845b81548152602001906001019080831161235057505050505081526020016007820154815260200160088201805461238690613710565b80601f01602080910402602001604051908101604052809291908181526020018280546123b290613710565b80156123ff5780601f106123d4576101008083540402835291602001916123ff565b820191906000526020600020905b8154815290600101906020018083116123e257829003601f168201915b5050505050815250509150915091565b60007364fa36acd0d13472fd786b03afc9c52ad5fcf0236001600160a01b031663da5b4ee76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c7e573d6000803e3d6000fd5b6005816003811061073257600080fd5b336124866000546001600160a01b031690565b6001600160a01b0316146124ac5760405162461bcd60e51b81526004016107c69061388c565b6124cc739fae2529863bd691b4a7171bdfcf33c7ebb10a65333084612c83565b60005b600381101561258d5760006064600283600381106124ef576124ef6136ae565b01546124fb90856138fd565b6125059190613914565b905060006014836003811061251c5761251c6136ae565b015490508015612578578061253983670de0b6b3a76400006138fd565b6125439190613914565b60058460038110612556576125566136ae565b015461256291906136da565b60058460038110612575576125756136ae565b01555b505080806125859061385a565b9150506124cf565b5050565b336125a46000546001600160a01b031690565b6001600160a01b0316146125ca5760405162461bcd60e51b81526004016107c69061388c565b6125d261146d565b6001600160a01b03808216600090815260176020526040902080549091161580159061260757508054600160a01b900460ff16155b6126235760405162461bcd60e51b81526004016107c6906138d4565b8054600160a81b900460ff1660098160028110612642576126426136ae565b600702016002015461266060098360028110610985576109856136ae565b1061269f5760405162461bcd60e51b815260206004820152600f60248201526e105b1b081b9bd9195cc81859191959608a1b60448201526064016107c6565b6126c083600983600281106126b6576126b66136ae565b600702019061316a565b6127065760405162461bcd60e51b8152602060048201526017602482015276105d5d1a1bdc9a5d1e48185b1c9958591e481859191959604a1b60448201526064016107c6565b60098160028110612719576127196136ae565b60070201600301600081548092919061273190613a3c565b909155505060018201546009826002811061274e5761274e6136ae565b60070201600401600060038110612767576127676136ae565b01600082825461277791906136da565b90915550506001808301015460098260028110612796576127966136ae565b600702016004016001600381106127af576127af6136ae565b0160008282546127bf91906136da565b90915550506003820154600982600281106127dc576127dc6136ae565b600702016004016002600381106127f5576127f56136ae565b01600082825461280591906136da565b909155505060018190036128255761282360048301600560036132bf565b505b815460ff60a01b1916600160a01b1782556040516001600160a01b038416907f7dc8b937d2916b130743c447af3d771fa55e66b7393105150e2e635ac3e8726090600090a2505050565b336128826000546001600160a01b031690565b6001600160a01b0316146128a85760405162461bcd60e51b81526004016107c69061388c565b6001600160a01b03811661290d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107c6565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038082166000908152601860205260408120549091168015612a61576001600160a01b03811660009081526017602052604090208054600160a01b900460ff1615612a5b5760005b6003811015612a4857670de0b6b3a76400008260040182600381106129de576129de6136ae565b0154600583600381106129f3576129f36136ae565b01546129ff91906138c1565b836001018360038110612a1457612a146136ae565b0154612a2091906138fd565b612a2a9190613914565b612a3490856136da565b935080612a408161385a565b9150506129b7565b50612a5960048201600560036132bf565b505b50612a99565b6000546001600160a01b038481169116148015612a885750612a8560096000610985565b15155b15612a995760198054600090915591505b8115612abe57612abe739fae2529863bd691b4a7171bdfcf33c7ebb10a658484612e44565b505050565b6969e10de76676d0800000831015612b0e5760405162461bcd60e51b815260206004820152600e60248201526d4e6f7420656e6f75676820434c4f60901b60448201526064016107c6565b691fc3842bd1f071c00000821015612b5a5760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f75676820434c4f4560881b60448201526064016107c6565b69054b40b1f852bda00000811015612ba55760405162461bcd60e51b815260206004820152600e60248201526d4e6f7420656e6f75676820534f5960901b60448201526064016107c6565b6a0422ca8b0a00a425000000831115612bef5760405162461bcd60e51b815260206004820152600c60248201526b546f6f206d616e7920434c4f60a01b60448201526064016107c6565b6a013da329b6336471800000821115612c3a5760405162461bcd60e51b815260206004820152600d60248201526c546f6f206d616e7920434c4f4560981b60448201526064016107c6565b6934f086f3b33b68400000811115612abe5760405162461bcd60e51b815260206004820152600c60248201526b546f6f206d616e7920534f5960a01b60448201526064016107c6565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691612ce79190613a53565b6000604051808303816000865af19150503d8060008114612d24576040519150601f19603f3d011682016040523d82523d6000602084013e612d29565b606091505b5091509150818015612d53575080511580612d53575080806020019051810190612d539190613a6f565b612dab5760405162461bcd60e51b8152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416044820152631253115160e21b60648201526084016107c6565b505050505050565b81546000908210612e115760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016107c6565b826000018281548110612e2657612e266136ae565b6000918252602090912001546001600160a01b031690505b92915050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691612ea09190613a53565b6000604051808303816000865af19150503d8060008114612edd576040519150601f19603f3d011682016040523d82523d6000602084013e612ee2565b606091505b5091509150818015612f0c575080511580612f0c575080806020019051810190612f0c9190613a6f565b612f585760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c45440060448201526064016107c6565b5050505050565b6001600160a01b03811660009081526001830160205260408120548015613097576000612f8d6001836138c1565b8554909150600090612fa1906001906138c1565b90506000866000018281548110612fba57612fba6136ae565b60009182526020909120015487546001600160a01b0390911691508190889085908110612fe957612fe96136ae565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905561301d8360016136da565b6001600160a01b0382166000908152600189016020526040902055865487908061304957613049613a8c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0388168252600189810190915260408220919091559450612e3e9350505050565b6000915050612e3e565b604080516000808252602082019092526001600160a01b0384169083906040516130cb9190613a53565b60006040518083038185875af1925050503d8060008114613108576040519150601f19603f3d011682016040523d82523d6000602084013e61310d565b606091505b5050905080612abe5760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960448201526213115160ea1b60648201526084016107c6565b6001600160a01b03811660009081526001830160205260408120546131d457508154600180820184556000848152602080822090930180546001600160a01b0319166001600160a01b03861690811790915585549082528286019093526040902091909155612e3e565b506000612e3e565b6040805160e08101825260008082526020820181905291810191909152606081016132056132a1565b81526020016132126132a1565b815260200160008152602001606081525090565b8260038101928215613254579160200282015b82811115613254578251825591602001919060010190613239565b506132609291506132ea565b5090565b50805461327090613710565b6000825580601f10613280575050565b601f01602090049060005260206000209081019061329e91906132ea565b50565b60405180606001604052806003906020820280368337509192915050565b8260038101928215613254579182015b828111156132545782548255916001019190600101906132cf565b5b8082111561326057600081556001016132eb565b60006020828403121561331157600080fd5b5035919050565b6000806040838503121561332b57600080fd5b50508035926020909101359150565b8060005b600381101561335d57815184526020938401939091019060010161333e565b50505050565b60005b8381101561337e578181015183820152602001613366565b50506000910152565b600061016060018060a01b03835116845260208301511515602085015260ff604084015116604085015260608301516133c3606086018261333a565b5060808301516133d660c086018261333a565b5060a083015161012085015260c08301518161014086015280518083870152610180925061340a8184880160208501613363565b601f01601f191694909401019392505050565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b8381101561347457605f19888703018552613462868351613387565b95509382019390820190600101613446565b50508584038187015286518085528782019482019350915060005b828110156134b45784516001600160a01b03168452938101939281019260010161348f565b5091979650505050505050565b80356001600160a01b03811681146134d857600080fd5b919050565b600080604083850312156134f057600080fd5b6134f9836134c1565b9150613507602084016134c1565b90509250929050565b60006020828403121561352257600080fd5b61352b826134c1565b9392505050565b801515811461329e57600080fd5b6000806040838503121561355357600080fd5b82359150602083013561356581613532565b809150509250929050565b6040815260006135836040830185613387565b905060018060a01b03831660208301529392505050565b6000806000806000608086880312156135b257600080fd5b85359450602086013593506135c9604087016134c1565b9250606086013567ffffffffffffffff808211156135e657600080fd5b818801915088601f8301126135fa57600080fd5b81358181111561360957600080fd5b89602082850101111561361b57600080fd5b9699959850939650602001949392505050565b838152602080820184905260a0820190604083018460005b600381101561366357815183529183019190830190600101613646565b50505050949350505050565b60208152600061352b6020830184613387565b60008060006060848603121561369757600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115612e3e57612e3e6136c4565b8060005b600381101561335d5781548452602090930192600191820191016136f1565b600181811c9082168061372457607f821691505b60208210810361374457634e487b7160e01b600052602260045260246000fd5b50919050565b6000815461375781613710565b808552602060018381168015613774576001811461378e576137bc565b60ff1985168884015283151560051b8801830195506137bc565b866000528260002060005b858110156137b45781548a8201860152908301908401613799565b890184019650505b505050505092915050565b602081526000825460018060a01b038116602084015260ff8160a01c16151560408401526138006060840160ff8360a81c1660ff169052565b5061381160808301600185016136ed565b61382160e08301600485016136ed565b60078301546101408301526101608083015261352b61018083016008850161374a565b634e487b7160e01b600052604160045260246000fd5b60006001820161386c5761386c6136c4565b5060010190565b60006020828403121561388557600080fd5b5051919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b81810381811115612e3e57612e3e6136c4565b6020808252600f908201526e77726f6e6720617574686f7269747960881b604082015260600190565b8082028115828204841417612e3e57612e3e6136c4565b60008261393157634e487b7160e01b600052601260045260246000fd5b500490565b601f821115612abe57600081815260208120601f850160051c8101602086101561395d5750805b601f850160051c820191505b81811015612dab57828155600101613969565b815167ffffffffffffffff81111561399657613996613844565b6139aa816139a48454613710565b84613936565b602080601f8311600181146139df57600084156139c75750858301515b600019600386901b1c1916600185901b178555612dab565b600085815260208120601f198616915b82811015613a0e578886015182559484019460019091019084016139ef565b5085821015613a2c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600081613a4b57613a4b6136c4565b506000190190565b60008251613a65818460208701613363565b9190910192915050565b600060208284031215613a8157600080fd5b815161352b81613532565b634e487b7160e01b600052603160045260246000fdfea26469706673582212203fe6c8965de18e5b82a331f0024fe029855cf80ca29dd24f941b3a730bdcc05764736f6c63430008110033