ETH Price: $2,674.74 (-0.83%)

Contract

0x3EF26504dbc8Dd7B7aa3E97Bc9f3813a9FC0B4B0
 
Transaction Hash
Method
Block
From
To
Withdraw Locked208445272024-09-27 21:03:3527 hrs ago1727471015IN
0x3EF26504...a9FC0B4B0
0 ETH0.005508549.11693896
Withdraw Locked208272382024-09-25 11:10:473 days ago1727262647IN
0x3EF26504...a9FC0B4B0
0 ETH0.0078313819.56343996
Get Reward208272142024-09-25 11:05:593 days ago1727262359IN
0x3EF26504...a9FC0B4B0
0 ETH0.0083139421.28363213
Withdraw Locked208166872024-09-23 23:52:235 days ago1727135543IN
0x3EF26504...a9FC0B4B0
0 ETH0.018142130.3057332
Withdraw Locked207922142024-09-20 13:51:358 days ago1726840295IN
0x3EF26504...a9FC0B4B0
0 ETH0.0237935442.59831548
Withdraw Locked207781722024-09-18 14:47:5910 days ago1726670879IN
0x3EF26504...a9FC0B4B0
0 ETH0.0054333812.20929888
Withdraw Locked207526712024-09-15 1:16:5913 days ago1726363019IN
0x3EF26504...a9FC0B4B0
0 ETH0.000982121.48509452
Withdraw Locked207464622024-09-14 4:27:4714 days ago1726288067IN
0x3EF26504...a9FC0B4B0
0 ETH0.000592751
Withdraw Locked207287502024-09-11 17:06:2317 days ago1726074383IN
0x3EF26504...a9FC0B4B0
0 ETH0.001806423.43516785
Withdraw Locked207233292024-09-10 22:55:4718 days ago1726008947IN
0x3EF26504...a9FC0B4B0
0 ETH0.001902715.15128437
Withdraw Locked207233242024-09-10 22:54:4718 days ago1726008887IN
0x3EF26504...a9FC0B4B0
0 ETH0.001464715.51717094
Get Reward207233222024-09-10 22:54:2318 days ago1726008863IN
0x3EF26504...a9FC0B4B0
0 ETH0.00207525.82140095
Get Reward207188492024-09-10 7:53:3518 days ago1725954815IN
0x3EF26504...a9FC0B4B0
0 ETH0.001483894.00769099
Staker Allow Mig...207188472024-09-10 7:53:1118 days ago1725954791IN
0x3EF26504...a9FC0B4B0
0 ETH0.000190494.11292677
Withdraw Locked207069342024-09-08 15:57:2320 days ago1725811043IN
0x3EF26504...a9FC0B4B0
0 ETH0.002751133.33982236
Withdraw Locked207069272024-09-08 15:55:5920 days ago1725810959IN
0x3EF26504...a9FC0B4B0
0 ETH0.003109712.90509633
Get Reward206988912024-09-07 13:02:1121 days ago1725714131IN
0x3EF26504...a9FC0B4B0
0 ETH0.001511162.95585439
Withdraw Locked206806202024-09-04 23:51:2324 days ago1725493883IN
0x3EF26504...a9FC0B4B0
0 ETH0.001628293.16345494
Withdraw Locked206708772024-09-03 15:14:3525 days ago1725376475IN
0x3EF26504...a9FC0B4B0
0 ETH0.002622355.89267197
Withdraw Locked206396192024-08-30 6:31:4729 days ago1724999507IN
0x3EF26504...a9FC0B4B0
0 ETH0.00044281.01806835
Withdraw Locked206378372024-08-30 0:32:4729 days ago1724977967IN
0x3EF26504...a9FC0B4B0
0 ETH0.000674341.37488662
Get Reward206376222024-08-29 23:49:1130 days ago1724975351IN
0x3EF26504...a9FC0B4B0
0 ETH0.000410931.1
Staker Allow Mig...206376182024-08-29 23:48:2330 days ago1724975303IN
0x3EF26504...a9FC0B4B0
0 ETH0.000050941.1
Withdraw Locked206354922024-08-29 16:40:4730 days ago1724949647IN
0x3EF26504...a9FC0B4B0
0 ETH0.002079683.47805378
Withdraw Locked206336192024-08-29 10:23:1130 days ago1724926991IN
0x3EF26504...a9FC0B4B0
0 ETH0.000672481.15633927
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FraxFarm_UniV3_veFXS_FRAX_USDC

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 100000 runs

Other Settings:
default evmVersion, GNU GPLv2 license

Contract Source Code (Solidity Multiple files format)

File 1 of 32: FraxFarm_UniV3_veFXS_FRAX_USDC.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;
pragma experimental ABIEncoderV2;

import "./FraxFarm_UniV3_veFXS.sol";

contract FraxFarm_UniV3_veFXS_FRAX_USDC is FraxFarm_UniV3_veFXS {
    constructor(
        address _owner,
        address _rewardsToken0,
        address _stakingTokenNFT,
        address _lp_pool_address,
        address _timelock_address,
        address _veFXS_address,
        address _gauge_controller_address,
        address _uni_token0,
        address _uni_token1,
        int24 _uni_tick_lower,
        int24 _uni_tick_upper,
        int24 _uni_ideal_tick
    ) 
    FraxFarm_UniV3_veFXS(_owner, _rewardsToken0, _stakingTokenNFT, _lp_pool_address, _timelock_address, _veFXS_address, _gauge_controller_address, _uni_token0, _uni_token1, _uni_tick_lower, _uni_tick_upper, _uni_ideal_tick)
    {}
}

File 2 of 32: Address.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11 <0.9.0;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 3 of 32: CommunalFarm.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;
pragma experimental ABIEncoderV2;

// ====================================================================
// |     ______                   _______                             |
// |    / _____________ __  __   / ____(_____  ____ _____  ________   |
// |   / /_  / ___/ __ `| |/_/  / /_  / / __ \/ __ `/ __ \/ ___/ _ \  |
// |  / __/ / /  / /_/ _>  <   / __/ / / / / / /_/ / / / / /__/  __/  |
// | /_/   /_/   \__,_/_/|_|  /_/   /_/_/ /_/\__,_/_/ /_/\___/\___/   |
// |                                                                  |
// ====================================================================
// =========================== CommunalFarm ===========================
// ====================================================================
// Multiple tokens with different reward rates can be emitted
// Multiple teams can set the reward rates for their token(s)
// Apes together strong

// Frax Finance: https://github.com/FraxFinance

// Primary Author(s)
// Travis Moore: https://github.com/FortisFortuna

// Reviewer(s) / Contributor(s)
// Jason Huan: https://github.com/jasonhuan 
// Sam Kazemian: https://github.com/samkazemian
// Saddle Team: https://github.com/saddle-finance
// Fei Team: https://github.com/fei-protocol
// Alchemix Team: https://github.com/alchemix-finance
// Liquity Team: https://github.com/liquity

// Modified from the Synthetix.io original
// https://raw.githubusercontent.com/Synthetixio/synthetix/develop/contracts/StakingRewards.sol

import "./Math.sol";
import "./SafeMath.sol";
import "./ERC20.sol";
import "./SafeERC20.sol";
import './TransferHelper.sol';
import "./ISaddleD4_LP.sol";
import "./ReentrancyGuard.sol";

// Inheritance
import "./Owned.sol";

contract CommunalFarm is Owned, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for ERC20;

    /* ========== STATE VARIABLES ========== */

    // Instances
    ISaddleD4_LP private stakingToken;
    
    // Constant for various precisions
    uint256 private constant MULTIPLIER_PRECISION = 1e18;

    // Time tracking
    uint256 public periodFinish;
    uint256 public lastUpdateTime;

    // Lock time and multiplier settings
    uint256 public lock_max_multiplier = uint256(3e18); // E18. 1x = e18
    uint256 public lock_time_for_max_multiplier = 1 * 365 * 86400; // 1 year
    uint256 public lock_time_min = 86400; // 1 * 86400  (1 day)

    // Reward addresses, rates, and managers
    mapping(address => address) public rewardManagers; // token addr -> manager addr
    address[] public rewardTokens;
    uint256[] public rewardRates;
    string[] public rewardSymbols;
    mapping(address => uint256) public rewardTokenAddrToIdx; // token addr -> token index
    
    // Reward period
    uint256 public rewardsDuration = 604800; // 7 * 86400  (7 days)

    // Reward tracking
    uint256[] private rewardsPerTokenStored;
    mapping(address => mapping(uint256 => uint256)) private userRewardsPerTokenPaid; // staker addr -> token id -> paid amount
    mapping(address => mapping(uint256 => uint256)) private rewards; // staker addr -> token id -> reward amount
    mapping(address => uint256) private lastRewardClaimTime; // staker addr -> timestamp

    // Balance tracking
    uint256 private _total_liquidity_locked;
    uint256 private _total_combined_weight;
    mapping(address => uint256) private _locked_liquidity;
    mapping(address => uint256) private _combined_weights;

    // Stake tracking
    mapping(address => LockedStake[]) private lockedStakes;

    // Greylisting of bad addresses
    mapping(address => bool) public greylist;

    // Administrative booleans
    bool public stakesUnlocked; // Release locked stakes in case of emergency
    bool public withdrawalsPaused; // For emergencies
    bool public rewardsCollectionPaused; // For emergencies
    bool public stakingPaused; // For emergencies

    /* ========== STRUCTS ========== */
    
    struct LockedStake {
        bytes32 kek_id;
        uint256 start_timestamp;
        uint256 liquidity;
        uint256 ending_timestamp;
        uint256 lock_multiplier; // 6 decimals of precision. 1x = 1000000
    }

    /* ========== MODIFIERS ========== */

    modifier onlyByOwner() {
        require(msg.sender == owner, "You are not the owner");
        _;
    }

    modifier onlyTokenManagers(address reward_token_address) {
        require(msg.sender == owner || isTokenManagerFor(msg.sender, reward_token_address), "You are not the owner or the correct token manager");
        _;
    }

    modifier notStakingPaused() {
        require(stakingPaused == false, "Staking is paused");
        _;
    }

    modifier updateRewardAndBalance(address account, bool sync_too) {
        _updateRewardAndBalance(account, sync_too);
        _;
    }
    
    /* ========== CONSTRUCTOR ========== */

    constructor(
        address _owner,
        address _stakingToken,
        string[] memory _rewardSymbols,
        address[] memory _rewardTokens,
        address[] memory _rewardManagers,
        uint256[] memory _rewardRates
    ) Owned(_owner){
        stakingToken = ISaddleD4_LP(_stakingToken);

        rewardTokens = _rewardTokens;
        rewardRates = _rewardRates;
        rewardSymbols = _rewardSymbols;

        lastUpdateTime = block.timestamp;

        for (uint256 i = 0; i < _rewardTokens.length; i++){ 
            // For fast token address -> token ID lookups later
            rewardTokenAddrToIdx[_rewardTokens[i]] = i;

            // Initialize the stored rewards
            rewardsPerTokenStored.push(0);

            // Initialize the reward managers
            rewardManagers[_rewardTokens[i]] = _rewardManagers[i];
        }

        // Other booleans
        stakesUnlocked = false;
    }

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

    // Total locked liquidity tokens
    function totalLiquidityLocked() external view returns (uint256) {
        return _total_liquidity_locked;
    }

    // Locked liquidity for a given account
    function lockedLiquidityOf(address account) external view returns (uint256) {
        return _locked_liquidity[account];
    }

    // Total 'balance' used for calculating the percent of the pool the account owns
    // Takes into account the locked stake time multiplier
    function totalCombinedWeight() external view returns (uint256) {
        return _total_combined_weight;
    }

    // Combined weight for a specific account
    function combinedWeightOf(address account) external view returns (uint256) {
        return _combined_weights[account];
    }

    // Calculated the combined weight for an account
    function calcCurCombinedWeight(address account) public view
        returns (
            uint256 old_combined_weight,
            uint256 new_combined_weight
        )
    {
        // Get the old combined weight
        old_combined_weight = _combined_weights[account];

        // Loop through the locked stakes, first by getting the liquidity * lock_multiplier portion
        new_combined_weight = 0;
        for (uint256 i = 0; i < lockedStakes[account].length; i++) {
            LockedStake memory thisStake = lockedStakes[account][i];
            uint256 lock_multiplier = thisStake.lock_multiplier;

            // If the lock is expired
            if (thisStake.ending_timestamp <= block.timestamp) {
                // If the lock expired in the time since the last claim, the weight needs to be proportionately averaged this time
                if (lastRewardClaimTime[account] < thisStake.ending_timestamp){
                    uint256 time_before_expiry = (thisStake.ending_timestamp).sub(lastRewardClaimTime[account]);
                    uint256 time_after_expiry = (block.timestamp).sub(thisStake.ending_timestamp);

                    // Get the weighted-average lock_multiplier
                    uint256 numerator = ((lock_multiplier).mul(time_before_expiry)).add(((MULTIPLIER_PRECISION).mul(time_after_expiry)));
                    lock_multiplier = numerator.div(time_before_expiry.add(time_after_expiry));
                }
                // Otherwise, it needs to just be 1x
                else {
                    lock_multiplier = MULTIPLIER_PRECISION;
                }
            }

            uint256 liquidity = thisStake.liquidity;
            uint256 combined_boosted_amount = liquidity.mul(lock_multiplier).div(MULTIPLIER_PRECISION);
            new_combined_weight = new_combined_weight.add(combined_boosted_amount);
        }
    }

    // All the locked stakes for a given account
    function lockedStakesOf(address account) external view returns (LockedStake[] memory) {
        return lockedStakes[account];
    }

    // All the locked stakes for a given account
    function getRewardSymbols() external view returns (string[] memory) {
        return rewardSymbols;
    }

    // All the reward tokens
    function getAllRewardTokens() external view returns (address[] memory) {
        return rewardTokens;
    }
    
    // Multiplier amount, given the length of the lock
    function lockMultiplier(uint256 secs) public view returns (uint256) {
        uint256 lock_multiplier =
            uint256(MULTIPLIER_PRECISION).add(
                secs
                    .mul(lock_max_multiplier.sub(MULTIPLIER_PRECISION))
                    .div(lock_time_for_max_multiplier)
            );
        if (lock_multiplier > lock_max_multiplier) lock_multiplier = lock_max_multiplier;
        return lock_multiplier;
    }

    // Last time the reward was applicable
    function lastTimeRewardApplicable() internal view returns (uint256) {
        return Math.min(block.timestamp, periodFinish);
    }

    // Amount of reward tokens per LP token
    function rewardsPerToken() public view returns (uint256[] memory newRewardsPerTokenStored) {
        if (_total_liquidity_locked == 0 || _total_combined_weight == 0) {
            return rewardsPerTokenStored;
        }
        else {
            newRewardsPerTokenStored = new uint256[](rewardTokens.length);
            for (uint256 i = 0; i < rewardsPerTokenStored.length; i++){ 
                newRewardsPerTokenStored[i] = rewardsPerTokenStored[i].add(
                    lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRates[i]).mul(1e18).div(_total_combined_weight)
                );
            }
            return newRewardsPerTokenStored;
        }
    }

    // Amount of reward tokens an account has earned / accrued
    // Note: In the edge-case of one of the account's stake expiring since the last claim, this will
    // return a slightly inflated number
    function earned(address account) public view returns (uint256[] memory new_earned) {
        uint256[] memory reward_arr = rewardsPerToken();
        new_earned = new uint256[](rewardTokens.length);

        if (_combined_weights[account] == 0){
            for (uint256 i = 0; i < rewardTokens.length; i++){ 
                new_earned[i] = 0;
            }
        }
        else {
            for (uint256 i = 0; i < rewardTokens.length; i++){ 
                new_earned[i] = (_combined_weights[account])
                    .mul(reward_arr[i].sub(userRewardsPerTokenPaid[account][i]))
                    .div(1e18)
                    .add(rewards[account][i]);
            }
        }
    }

    // Total reward tokens emitted in the given period
    function getRewardForDuration() external view returns (uint256[] memory rewards_per_duration_arr) {
        rewards_per_duration_arr = new uint256[](rewardRates.length);

        for (uint256 i = 0; i < rewardRates.length; i++){ 
            rewards_per_duration_arr[i] = rewardRates[i].mul(rewardsDuration);
        }
    }

    // See if the caller_addr is a manager for the reward token 
    function isTokenManagerFor(address caller_addr, address reward_token_addr) public view returns (bool){
        if (caller_addr == owner) return true; // Contract owner
        else if (rewardManagers[reward_token_addr] == caller_addr) return true; // Reward manager
        return false; 
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function _updateRewardAndBalance(address account, bool sync_too) internal {
        // Need to retro-adjust some things if the period hasn't been renewed, then start a new one
        if (sync_too){
            sync();
        }
        
        if (account != address(0)) {
            // To keep the math correct, the user's combined weight must be recomputed
            (   
                uint256 old_combined_weight,
                uint256 new_combined_weight
            ) = calcCurCombinedWeight(account);

            // Calculate the earnings first
            _syncEarned(account);

            // Update the user's and the global combined weights
            if (new_combined_weight >= old_combined_weight) {
                uint256 weight_diff = new_combined_weight.sub(old_combined_weight);
                _total_combined_weight = _total_combined_weight.add(weight_diff);
                _combined_weights[account] = old_combined_weight.add(weight_diff);
            } else {
                uint256 weight_diff = old_combined_weight.sub(new_combined_weight);
                _total_combined_weight = _total_combined_weight.sub(weight_diff);
                _combined_weights[account] = old_combined_weight.sub(weight_diff);
            }

        }
    }

    function _syncEarned(address account) internal {
        if (account != address(0)) {
            // Calculate the earnings
            uint256[] memory earned_arr = earned(account);

            // Update the rewards array
            for (uint256 i = 0; i < earned_arr.length; i++){ 
                rewards[account][i] = earned_arr[i];
            }

            // Update the rewards paid array
            for (uint256 i = 0; i < earned_arr.length; i++){ 
                userRewardsPerTokenPaid[account][i] = rewardsPerTokenStored[i];
            }
        }
    }

    // Two different stake functions are needed because of delegateCall and msg.sender issues
    function stakeLocked(uint256 liquidity, uint256 secs) nonReentrant public {
        _stakeLocked(msg.sender, msg.sender, liquidity, secs, block.timestamp);
    }

    // If this were not internal, and source_address had an infinite approve, this could be exploitable
    // (pull funds from source_address and stake for an arbitrary staker_address)
    function _stakeLocked(
        address staker_address, 
        address source_address, 
        uint256 liquidity, 
        uint256 secs,
        uint256 start_timestamp
    ) internal updateRewardAndBalance(staker_address, true) {
        require(!stakingPaused, "Staking is paused");
        require(liquidity > 0, "Must stake more than zero");
        require(greylist[staker_address] == false, "Address has been greylisted");
        require(secs >= lock_time_min, "Minimum stake time not met");
        require(secs <= lock_time_for_max_multiplier,"Trying to lock for too long");

        uint256 lock_multiplier = lockMultiplier(secs);
        bytes32 kek_id = keccak256(abi.encodePacked(staker_address, start_timestamp, liquidity, _locked_liquidity[staker_address]));
        lockedStakes[staker_address].push(LockedStake(
            kek_id,
            start_timestamp,
            liquidity,
            start_timestamp.add(secs),
            lock_multiplier
        ));

        // Pull the tokens from the source_address
        TransferHelper.safeTransferFrom(address(stakingToken), source_address, address(this), liquidity);

        // Update liquidities
        _total_liquidity_locked = _total_liquidity_locked.add(liquidity);
        _locked_liquidity[staker_address] = _locked_liquidity[staker_address].add(liquidity);

        // Need to call to update the combined weights
        _updateRewardAndBalance(staker_address, false);

        // Needed for edge case if the staker only claims once, and after the lock expired
        if (lastRewardClaimTime[staker_address] == 0) lastRewardClaimTime[staker_address] = block.timestamp;

        emit StakeLocked(staker_address, liquidity, secs, kek_id, source_address);
    }

    // Two different withdrawLocked functions are needed because of delegateCall and msg.sender issues
    function withdrawLocked(bytes32 kek_id) nonReentrant public {
        require(withdrawalsPaused == false, "Withdrawals paused");
        _withdrawLocked(msg.sender, msg.sender, kek_id);
    }

    // No withdrawer == msg.sender check needed since this is only internally callable and the checks are done in the wrapper
    // functions like withdraw()
    function _withdrawLocked(address staker_address, address destination_address, bytes32 kek_id) internal  {
        // Collect rewards first and then update the balances
        _getReward(staker_address, destination_address);

        LockedStake memory thisStake;
        thisStake.liquidity = 0;
        uint theArrayIndex;
        for (uint256 i = 0; i < lockedStakes[staker_address].length; i++){ 
            if (kek_id == lockedStakes[staker_address][i].kek_id){
                thisStake = lockedStakes[staker_address][i];
                theArrayIndex = i;
                break;
            }
        }
        require(thisStake.kek_id == kek_id, "Stake not found");
        require(block.timestamp >= thisStake.ending_timestamp || stakesUnlocked == true, "Stake is still locked!");

        uint256 liquidity = thisStake.liquidity;

        if (liquidity > 0) {
            // Update liquidities
            _total_liquidity_locked = _total_liquidity_locked.sub(liquidity);
            _locked_liquidity[staker_address] = _locked_liquidity[staker_address].sub(liquidity);

            // Remove the stake from the array
            delete lockedStakes[staker_address][theArrayIndex];

            // Need to call to update the combined weights
            _updateRewardAndBalance(staker_address, false);

            // Give the tokens to the destination_address
            // Should throw if insufficient balance
            stakingToken.transfer(destination_address, liquidity);

            emit WithdrawLocked(staker_address, liquidity, kek_id, destination_address);
        }

    }
    
    // Two different getReward functions are needed because of delegateCall and msg.sender issues
    function getReward() external nonReentrant returns (uint256[] memory) {
        require(rewardsCollectionPaused == false,"Rewards collection paused");
        return _getReward(msg.sender, msg.sender);
    }

    // No withdrawer == msg.sender check needed since this is only internally callable
    function _getReward(address rewardee, address destination_address) internal updateRewardAndBalance(rewardee, true) returns (uint256[] memory rewards_before) {
        // Update the rewards array and distribute rewards
        rewards_before = new uint256[](rewardTokens.length);

        for (uint256 i = 0; i < rewardTokens.length; i++){ 
            rewards_before[i] = rewards[rewardee][i];
            rewards[rewardee][i] = 0;
            ERC20(rewardTokens[i]).transfer(destination_address, rewards_before[i]);
            emit RewardPaid(rewardee, rewards_before[i], rewardTokens[i], destination_address);
        }

        lastRewardClaimTime[rewardee] = block.timestamp;
    }

    // If the period expired, renew it
    function retroCatchUp() internal {
        // Failsafe check
        require(block.timestamp > periodFinish, "Period has not expired yet!");

        // Ensure the provided reward amount is not more than the balance in the contract.
        // This keeps the reward rate in the right range, preventing overflows due to
        // very high values of rewardRate in the earned and rewardsPerToken functions;
        // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.
        uint256 num_periods_elapsed = uint256(block.timestamp.sub(periodFinish)) / rewardsDuration; // Floor division to the nearest period
        
        // Make sure there are enough tokens to renew the reward period
        for (uint256 i = 0; i < rewardTokens.length; i++){ 
            require(rewardRates[i].mul(rewardsDuration).mul(num_periods_elapsed + 1) <= ERC20(rewardTokens[i]).balanceOf(address(this)), string(abi.encodePacked("Not enough reward tokens available: ", rewardTokens[i])) );
        }
        
        // uint256 old_lastUpdateTime = lastUpdateTime;
        // uint256 new_lastUpdateTime = block.timestamp;

        // lastUpdateTime = periodFinish;
        periodFinish = periodFinish.add((num_periods_elapsed.add(1)).mul(rewardsDuration));

        _updateStoredRewardsAndTime();

        emit RewardsPeriodRenewed(address(stakingToken));
    }

    function _updateStoredRewardsAndTime() internal {
        // Get the rewards
        uint256[] memory rewards_per_token = rewardsPerToken();

        // Update the rewardsPerTokenStored
        for (uint256 i = 0; i < rewardsPerTokenStored.length; i++){ 
            rewardsPerTokenStored[i] = rewards_per_token[i];
        }

        // Update the last stored time
        lastUpdateTime = lastTimeRewardApplicable();
    }

    function sync() public {
        if (block.timestamp > periodFinish) {
            retroCatchUp();
        }
        else {
            _updateStoredRewardsAndTime();
        }
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    // Added to support recovering LP Rewards and other mistaken tokens from other systems to be distributed to holders
    function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyTokenManagers(tokenAddress) {
        // Cannot rug the staking / LP tokens
        require(tokenAddress != address(stakingToken), "Cannot rug staking / LP tokens");

        // Check if the desired token is a reward token
        bool isRewardToken = false;
        for (uint256 i = 0; i < rewardTokens.length; i++){ 
            if (rewardTokens[i] == tokenAddress) {
                isRewardToken = true;
                break;
            }
        }

        // Only the reward managers can take back their reward tokens
        if (isRewardToken && rewardManagers[tokenAddress] == msg.sender){
            ERC20(tokenAddress).transfer(msg.sender, tokenAmount);
            emit Recovered(msg.sender, tokenAddress, tokenAmount);
            return;
        }

        // Other tokens, like airdrops or accidental deposits, can be withdrawn by the owner
        else if (!isRewardToken && (msg.sender == owner)){
            ERC20(tokenAddress).transfer(msg.sender, tokenAmount);
            emit Recovered(msg.sender, tokenAddress, tokenAmount);
            return;
        }

        // If none of the above conditions are true
        else {
            revert("No valid tokens to recover");
        }
    }

    function setRewardsDuration(uint256 _rewardsDuration) external onlyByOwner {
        require(_rewardsDuration >= 86400, "Rewards duration must be at least one day");
        require(
            periodFinish == 0 || block.timestamp > periodFinish,
            "Reward period incomplete"
        );
        rewardsDuration = _rewardsDuration;
        emit RewardsDurationUpdated(rewardsDuration);
    }

    function setMultipliers(uint256 _lock_max_multiplier) external onlyByOwner {
        require(_lock_max_multiplier >= uint256(1e18), "Multiplier must be greater than or equal to 1e18");
        lock_max_multiplier = _lock_max_multiplier;
        emit LockedStakeMaxMultiplierUpdated(lock_max_multiplier);
    }

    function setLockedStakeTimeForMinAndMaxMultiplier(uint256 _lock_time_for_max_multiplier, uint256 _lock_time_min) external onlyByOwner {
        require(_lock_time_for_max_multiplier >= 1, "Mul max time must be >= 1");
        require(_lock_time_min >= 1, "Mul min time must be >= 1");

        lock_time_for_max_multiplier = _lock_time_for_max_multiplier;
        lock_time_min = _lock_time_min;

        emit LockedStakeTimeForMaxMultiplier(lock_time_for_max_multiplier);
        emit LockedStakeMinTime(_lock_time_min);
    }

    function initializeDefault() external onlyByOwner {
        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(rewardsDuration);
        emit DefaultInitialization();
    }

    function greylistAddress(address _address) external onlyByOwner {
        greylist[_address] = !(greylist[_address]);
    }

    function unlockStakes() external onlyByOwner {
        stakesUnlocked = !stakesUnlocked;
    }

    function toggleStaking() external onlyByOwner {
        stakingPaused = !stakingPaused;
    }

    function toggleWithdrawals() external onlyByOwner {
        withdrawalsPaused = !withdrawalsPaused;
    }

    function toggleRewardsCollection() external onlyByOwner {
        rewardsCollectionPaused = !rewardsCollectionPaused;
    }

    // The owner or the reward token managers can set reward rates 
    function setRewardRate(address reward_token_address, uint256 new_rate, bool sync_too) external onlyTokenManagers(reward_token_address) {
        rewardRates[rewardTokenAddrToIdx[reward_token_address]] = new_rate;
        
        if (sync_too){
            sync();
        }
    }

    // The owner or the reward token managers can change managers
    function changeTokenManager(address reward_token_address, address new_manager_address) external onlyTokenManagers(reward_token_address) {
        rewardManagers[reward_token_address] = new_manager_address;
    }

    /* ========== EVENTS ========== */

    event StakeLocked(address indexed user, uint256 amount, uint256 secs, bytes32 kek_id, address source_address);
    event WithdrawLocked(address indexed user, uint256 amount, bytes32 kek_id, address destination_address);
    event RewardPaid(address indexed user, uint256 reward, address token_address, address destination_address);
    event RewardsDurationUpdated(uint256 newDuration);
    event Recovered(address destination_address, address token, uint256 amount);
    event RewardsPeriodRenewed(address token);
    event DefaultInitialization();
    event LockedStakeMaxMultiplierUpdated(uint256 multiplier);
    event LockedStakeTimeForMaxMultiplier(uint256 secs);
    event LockedStakeMinTime(uint256 secs);
}

File 4 of 32: CommunalFarm_SaddleD4.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;
pragma experimental ABIEncoderV2;

import "./CommunalFarm.sol";

contract CommunalFarm_SaddleD4 is CommunalFarm {
    constructor(
        address _owner,
        address _stakingToken,
        string[] memory _rewardSymbols,
        address[] memory _rewardTokens,
        address[] memory _rewardManagers,
        uint256[] memory _rewardRates
    ) 
    CommunalFarm(_owner, _stakingToken, _rewardSymbols, _rewardTokens, _rewardManagers, _rewardRates)
    {}
}

File 5 of 32: Context.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

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

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 6 of 32: ERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

import "./Context.sol";
import "./IERC20.sol";
import "./SafeMath.sol";
import "./Address.sol";


/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20Mintable}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
 
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;
    
    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory __name, string memory __symbol) public {
        _name = __name;
        _symbol = __symbol;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.approve(address spender, uint256 amount)
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for `sender`'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for `accounts`'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }


    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal virtual {
        _burn(account, amount);
        _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of `from`'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of `from`'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:using-hooks.adoc[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

File 7 of 32: FixedPoint96.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.4.0;

/// @title FixedPoint96
/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)
/// @dev Used in SqrtPriceMath.sol
library FixedPoint96 {
    uint8 internal constant RESOLUTION = 96;
    uint256 internal constant Q96 = 0x1000000000000000000000000;
}

File 8 of 32: FraxFarm_UniV3_veFXS.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;
pragma experimental ABIEncoderV2;

// ====================================================================
// |     ______                   _______                             |
// |    / _____________ __  __   / ____(_____  ____ _____  ________   |
// |   / /_  / ___/ __ `| |/_/  / /_  / / __ \/ __ `/ __ \/ ___/ _ \  |
// |  / __/ / /  / /_/ _>  <   / __/ / / / / / /_/ / / / / /__/  __/  |
// | /_/   /_/   \__,_/_/|_|  /_/   /_/_/ /_/\__,_/_/ /_/\___/\___/   |
// |                                                                  |
// ====================================================================
// ========================FraxFarm_UniV3_veFXS========================
// ====================================================================
// Migratable Farming contract that accounts for veFXS and UniswapV3 NFTs
// Only one possible reward token here (usually FXS), to cut gas costs
// Also, because of the nonfungible nature, and to reduce gas, unlocked staking was removed
// You can lock for as short as 1 day now, which is de-facto an unlocked stake

// Frax Finance: https://github.com/FraxFinance

// Primary Author(s)
// Travis Moore: https://github.com/FortisFortuna

// Reviewer(s) / Contributor(s)
// Jason Huan: https://github.com/jasonhuan
// Sam Kazemian: https://github.com/samkazemian

// Originally inspired by Synthetixio, but heavily modified by the Frax team
// (Locked, veFXS, and UniV3 portions are new)
// https://raw.githubusercontent.com/Synthetixio/synthetix/develop/contracts/StakingRewards.sol

import "./Math.sol";
import "./SafeMath.sol";
import "./IveFXS.sol";
import "./IFraxGaugeController.sol";
import "./ERC20.sol";
import './TransferHelper.sol';
import "./SafeERC20.sol";
import "./TickMath.sol";
import "./LiquidityAmounts.sol";
import "./IUniswapV3PositionsNFT.sol";
import "./IUniswapV3Pool.sol";
import "./ReentrancyGuard.sol";
import "./Owned.sol";

contract FraxFarm_UniV3_veFXS is Owned, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for ERC20;

    /* ========== STATE VARIABLES ========== */

    // Instances
    IveFXS private veFXS;
    ERC20 private rewardsToken0;
    IFraxGaugeController private gauge_controller;
    IUniswapV3PositionsNFT private stakingTokenNFT; // UniV3 uses an NFT
    IUniswapV3Pool private lp_pool;

    // Admin addresses
    address public timelock_address;

    // Constant for various precisions
    uint256 private constant MULTIPLIER_PRECISION = 1e18;
    int256 private constant EMISSION_FACTOR_PRECISION = 1e18;

    // Reward and period related
    uint256 private periodFinish;
    uint256 private lastUpdateTime;
    uint256 public reward_rate_manual;
    uint256 public rewardsDuration = 604800; // 7 * 86400  (7 days)

    // Lock time and multiplier settings
    uint256 public lock_max_multiplier = uint256(3e18); // E18. 1x = 1e18
    uint256 public lock_time_for_max_multiplier = 3 * 365 * 86400; // 3 years
    uint256 public lock_time_min = 86400; // 1 * 86400  (1 day)

    // veFXS related
    uint256 public vefxs_per_frax_for_max_boost = uint256(4e18); // E18. 4e18 means 4 veFXS must be held by the staker per 1 FRAX
    uint256 public vefxs_max_multiplier = uint256(2e18); // E18. 1x = 1e18
    mapping(address => uint256) private _vefxsMultiplierStored;

    // Uniswap V3 related
    int24 public uni_tick_lower;
    int24 public uni_tick_upper;
    int24 public ideal_tick;
    uint24 public uni_required_fee = 500;
    address public uni_token0;
    address public uni_token1;
    uint32 public twap_duration = 300; // 5 minutes

    // Rewards tracking
    uint256 private rewardPerTokenStored0;
    mapping(address => uint256) private userRewardPerTokenPaid0;
    mapping(address => uint256) private rewards0;
    uint256 private last_gauge_relative_weight;
    uint256 private last_gauge_time_total;

    // Balance, stake, and weight tracking
    uint256 private _total_liquidity_locked;
    uint256 private _total_combined_weight;
    mapping(address => uint256) private _locked_liquidity;
    mapping(address => uint256) private _combined_weights;
    mapping(address => LockedNFT[]) private lockedNFTs;

    // List of valid migrators (set by governance)
    mapping(address => bool) private valid_migrators;
    address[] private valid_migrators_array;

    // Stakers set which migrator(s) they want to use
    mapping(address => mapping(address => bool)) private staker_allowed_migrators;

    // Greylists
    mapping(address => bool) private greylist;

    // Admin booleans for emergencies, migrations, and overrides
    bool public bypassEmissionFactor;
    bool public migrationsOn; // Used for migrations. Prevents new stakes, but allows LP and reward withdrawals
    bool public stakesUnlocked; // Release locked stakes in case of system migration or emergency
    bool public stakingPaused;
    bool public withdrawalsPaused;
    bool public rewardsCollectionPaused;

    // Struct for the stake
    struct LockedNFT {
        uint256 token_id; // for Uniswap V3 LPs
        uint256 liquidity;
        uint256 start_timestamp;
        uint256 ending_timestamp;
        uint256 lock_multiplier; // 6 decimals of precision. 1x = 1000000
        int24 tick_lower;
        int24 tick_upper;
    }

    /* ========== MODIFIERS ========== */

    modifier onlyByOwnerOrGovernance() {
        require(msg.sender == owner || msg.sender == timelock_address, "Not owner or timelock");
        _;
    }

    modifier isMigrating() {
        require(migrationsOn == true, "Not in migration");
        _;
    }

    modifier updateRewardAndBalance(address account, bool sync_too) {
        _updateRewardAndBalance(account, sync_too);
        _;
    }

    /* ========== CONSTRUCTOR ========== */

    constructor(
        address _owner,
        address _rewardsToken0,
        address _stakingTokenNFT,
        address _lp_pool_address,
        address _timelock_address,
        address _veFXS_address,
        address _gauge_controller_address,
        address _uni_token0,
        address _uni_token1,
        int24 _uni_tick_lower,
        int24 _uni_tick_upper,
        int24 _uni_ideal_tick
    ) Owned(_owner) {
        rewardsToken0 = ERC20(_rewardsToken0);
        stakingTokenNFT = IUniswapV3PositionsNFT(_stakingTokenNFT);
        lp_pool = IUniswapV3Pool(_lp_pool_address); // call getPool(token0, token1, fee) on the Uniswap V3 Factory (0x1F98431c8aD98523631AE4a59f267346ea31F984) to get this otherwise
        gauge_controller = IFraxGaugeController(_gauge_controller_address);

        veFXS = IveFXS(_veFXS_address);
        lastUpdateTime = block.timestamp;
        timelock_address = _timelock_address;

        // Set the UniV3 addresses
        uni_token0 = _uni_token0;
        uni_token1 = _uni_token1;

        // Tick and Liquidity related
        uni_tick_lower = _uni_tick_lower;
        uni_tick_upper = _uni_tick_upper;

        // Closest tick to 1
        ideal_tick = _uni_ideal_tick;

        // Manual reward rate
        reward_rate_manual = (uint256(365e17)).div(365 * 86400); // 0.1 FXS per day
    }

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

    // User locked liquidity tokens
    function totalLiquidityLocked() external view returns (uint256) {
        return _total_liquidity_locked;
    }

    // Total locked liquidity tokens
    function lockedLiquidityOf(address account) external view returns (uint256) {
        return _locked_liquidity[account];
    }

    // Total 'balance' used for calculating the percent of the pool the account owns
    // Takes into account the locked stake time multiplier and veFXS multiplier
    function combinedWeightOf(address account) external view returns (uint256) {
        return _combined_weights[account];
    }

    // Total combined weight
    function totalCombinedWeight() external view returns (uint256) {
        return _total_combined_weight;
    }

    function lockMultiplier(uint256 secs) public view returns (uint256) {
        uint256 lock_multiplier =
            uint256(MULTIPLIER_PRECISION).add(
                secs.mul(lock_max_multiplier.sub(MULTIPLIER_PRECISION)).div(
                    lock_time_for_max_multiplier
                )
            );
        if (lock_multiplier > lock_max_multiplier) lock_multiplier = lock_max_multiplier;
        return lock_multiplier;
    }

    function userStakedFrax(address account) public view returns (uint256) {
        uint256 frax_tally = 0;
        LockedNFT memory thisNFT;
        for (uint256 i = 0; i < lockedNFTs[account].length; i++) {
            thisNFT = lockedNFTs[account][i];
            uint256 this_liq = thisNFT.liquidity;
            if (this_liq > 0){
                uint160 sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(thisNFT.tick_lower);
                uint160 sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(thisNFT.tick_upper);
                frax_tally = frax_tally.add(LiquidityAmounts.getAmount0ForLiquidity(sqrtRatioAX96, sqrtRatioBX96, uint128(thisNFT.liquidity)));
            }
        }

        // In order to avoid excessive gas calculations and the input tokens ratios. 50% FRAX is assumed
        // If this were Uni V2, it would be akin to reserve0 & reserve1 math
        return frax_tally.div(2); 
    }

    // Will return MULTIPLIER_PRECISION if the pool is balanced, a smaller fraction if between the ticks,
    // and zero outside of the ticks
    function emissionFactor() public view returns (uint256 emission_factor){
        // If the bypass is turned on, return 1x
        if (bypassEmissionFactor) return MULTIPLIER_PRECISION;

        // From https://github.com/charmfinance/alpha-vaults-contracts/blob/main/contracts/AlphaStrategy.sol
        uint32[] memory secondsAgo = new uint32[](2);
        secondsAgo[0] = uint32(twap_duration);
        secondsAgo[1] = 0;

        // Make sure observationCardinalityNext has enough points on the lp_pool first
        // Otherwise, any observation greater then 0 will return 0 values
        (int56[] memory tickCumulatives, ) = lp_pool.observe(secondsAgo);
        int24 avg_tick = int24((tickCumulatives[1] - tickCumulatives[0]) / int32(twap_duration));

        // Return 0 if out of bounds (de-pegged)
        if (avg_tick <= uni_tick_lower) return 0;
        if (avg_tick >= uni_tick_upper) return 0;

        // Price = (1e18 / 1e6) * 1.0001^(tick)
        // Tick = Math.Floor(Log[base 1.0001] of (price / (10 ** decimal difference)))
        // Unsafe math, but there is a safety check later
        int256 em_factor_int256;
        if (avg_tick <= ideal_tick){
            em_factor_int256 = (EMISSION_FACTOR_PRECISION * (avg_tick - uni_tick_lower)) / (ideal_tick - uni_tick_lower);
        }
        else {
            em_factor_int256 = (EMISSION_FACTOR_PRECISION * (uni_tick_upper - avg_tick)) / (uni_tick_upper - ideal_tick);
        }

        // Check for negatives
        if (em_factor_int256 < 0) emission_factor = uint256(-1 * em_factor_int256);
        else emission_factor = uint256(em_factor_int256);

        // Sanity checks
        require(emission_factor <= MULTIPLIER_PRECISION, "Emission factor too high");
        require(emission_factor >= 0, "Emission factor too low");
    }

    function minVeFXSForMaxBoost(address account) public view returns (uint256) {
        return (userStakedFrax(account)).mul(vefxs_per_frax_for_max_boost).div(MULTIPLIER_PRECISION);
    }

    function veFXSMultiplier(address account) public view returns (uint256) {
        // The claimer gets a boost depending on amount of veFXS they have relative to the amount of FRAX 'inside'
        // of their locked LP tokens
        uint256 veFXS_needed_for_max_boost = minVeFXSForMaxBoost(account);
        if (veFXS_needed_for_max_boost > 0){ 
            uint256 user_vefxs_fraction = (veFXS.balanceOf(account)).mul(MULTIPLIER_PRECISION).div(veFXS_needed_for_max_boost);
            
            uint256 vefxs_multiplier = ((user_vefxs_fraction).mul(vefxs_max_multiplier)).div(MULTIPLIER_PRECISION);

            // Cap the boost to the vefxs_max_multiplier
            if (vefxs_multiplier > vefxs_max_multiplier) vefxs_multiplier = vefxs_max_multiplier;

            return vefxs_multiplier;        
        }
        else return 0; // This will happen with the first stake, when user_staked_frax is 0
    }

    function checkUniV3NFT(uint256 token_id, bool fail_if_false) internal view returns (bool is_valid, uint256 liquidity, int24 tick_lower, int24 tick_upper) {
        (
            ,
            ,
            address token0,
            address token1,
            uint24 fee,
            int24 tickLower,
            int24 tickUpper,
            uint256 _liquidity,
            ,
            ,
            ,

        ) = stakingTokenNFT.positions(token_id);

        // Set initially
        is_valid = false;
        liquidity = _liquidity;

        // Do the checks
        if (
            (token0 == uni_token0) && 
            (token1 == uni_token1) && 
            (fee == uni_required_fee) && 
            (tickLower == uni_tick_lower) && 
            (tickUpper == uni_tick_upper)
        ) {
            is_valid = true;
        }
        else {
            // More detailed messages removed here to save space
            if (fail_if_false) {
                revert("Wrong token characteristics");
            }
        }
        return (is_valid, liquidity, tickLower, tickUpper);
    }

    // Return all of the locked NFT positions
    function lockedNFTsOf(address account) external view returns (LockedNFT[] memory) {
        return lockedNFTs[account];
    }

    function calcCurCombinedWeight(address account) public view
        returns (
            uint256 old_combined_weight,
            uint256 new_vefxs_multiplier,
            uint256 new_combined_weight
        )
    {
        // Get the old combined weight
        old_combined_weight = _combined_weights[account];

        // Get the veFXS multipliers
        // For the calculations, use the midpoint (analogous to midpoint Riemann sum)
        new_vefxs_multiplier = veFXSMultiplier(account);
        uint256 midpoint_vefxs_multiplier = ((new_vefxs_multiplier).add(_vefxsMultiplierStored[account])).div(2); 

        // Loop through the locked stakes, first by getting the liquidity * lock_multiplier portion
        new_combined_weight = 0;
        for (uint256 i = 0; i < lockedNFTs[account].length; i++) {
            LockedNFT memory thisNFT = lockedNFTs[account][i];
            uint256 lock_multiplier = thisNFT.lock_multiplier;

            // If the lock period is over, drop the lock multiplier down to 1x for the weight calculations
            if (thisNFT.ending_timestamp <= block.timestamp){
                lock_multiplier = MULTIPLIER_PRECISION;
            }

            uint256 liquidity = thisNFT.liquidity;
            uint256 combined_boosted_amount = liquidity.mul(lock_multiplier.add(midpoint_vefxs_multiplier)).div(MULTIPLIER_PRECISION);
            new_combined_weight = new_combined_weight.add(combined_boosted_amount);
        }
    }

    function lastTimeRewardApplicable() internal view returns (uint256) {
        return Math.min(block.timestamp, periodFinish);
    }

    function rewardPerToken() internal view returns (uint256) {
        if (_total_liquidity_locked == 0 || _total_combined_weight == 0) {
            return rewardPerTokenStored0;
        } else {
            return (
                rewardPerTokenStored0.add(
                    lastTimeRewardApplicable()
                        .sub(lastUpdateTime)
                        .mul(rewardRate0())
                        .mul(emissionFactor()) // has 1e18 already
                        .div(_total_combined_weight)
                )
            );
        }
    }

    function earned(address account) public view returns (uint256) {
        uint256 earned_reward_0 = rewardPerToken();
        return (
            _combined_weights[account]
                .mul(earned_reward_0.sub(userRewardPerTokenPaid0[account]))
                .div(1e18)
                .add(rewards0[account])
        );
    }

    function rewardRate0() public view returns (uint256 rwd_rate) {
        if (address(gauge_controller) != address(0)) {
            rwd_rate = (gauge_controller.global_emission_rate()).mul(last_gauge_relative_weight).div(1e18);
        }
        else {
            rwd_rate = reward_rate_manual;
        }
    }

    function getRewardForDuration() external view returns (uint256) {
        return rewardRate0().mul(rewardsDuration);
    }

    // Needed to indicate that this contract is ERC721 compatible
    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public pure returns (bytes4) {
        return this.onERC721Received.selector;
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function _updateRewardAndBalance(address account, bool sync_too) internal {
        // Need to retro-adjust some things if the period hasn't been renewed, then start a new one
        if (sync_too){
            sync();
        }
        
        if (account != address(0)) {
            // To keep the math correct, the user's combined weight must be recomputed to account for their
            // ever-changing veFXS balance.
            (   
                uint256 old_combined_weight,
                uint256 new_vefxs_multiplier,
                uint256 new_combined_weight
            ) = calcCurCombinedWeight(account);

            // Calculate the earnings first
            _syncEarned(account);

            // Update the user's stored veFXS multipliers
            _vefxsMultiplierStored[account] = new_vefxs_multiplier;

            // Update the user's and the global combined weights
            if (new_combined_weight >= old_combined_weight) {
                uint256 weight_diff = new_combined_weight.sub(old_combined_weight);
                _total_combined_weight = _total_combined_weight.add(weight_diff);
                _combined_weights[account] = old_combined_weight.add(weight_diff);
            } else {
                uint256 weight_diff = old_combined_weight.sub(new_combined_weight);
                _total_combined_weight = _total_combined_weight.sub(weight_diff);
                _combined_weights[account] = old_combined_weight.sub(weight_diff);
            }

        }
    }

    function _syncEarned(address account) internal {
        if (account != address(0)) {
            // Calculate the earnings
            uint256 earned0 = earned(account);
            rewards0[account] = earned0;
            userRewardPerTokenPaid0[account] = rewardPerTokenStored0;
        }
    }

    // Staker can allow a migrator
    function stakerAllowMigrator(address migrator_address) external {
        require(valid_migrators[migrator_address], "Invalid migrator address");
        staker_allowed_migrators[msg.sender][migrator_address] = true;
    }

    // Staker can disallow a previously-allowed migrator
    function stakerDisallowMigrator(address migrator_address) external {
        // Delete from the mapping
        delete staker_allowed_migrators[msg.sender][migrator_address];
    }

    // Two different stake functions are needed because of delegateCall and msg.sender issues (important for migration)
    function stakeLocked(uint256 token_id, uint256 secs) nonReentrant external {
        _stakeLocked(msg.sender, msg.sender, token_id, secs, block.timestamp);
    }

    // If this were not internal, and source_address had an infinite approve, this could be exploitable
    // (pull funds from source_address and stake for an arbitrary staker_address)
    function _stakeLocked(
        address staker_address,
        address source_address,
        uint256 token_id,
        uint256 secs,
        uint256 start_timestamp
    ) internal updateRewardAndBalance(staker_address, true) {
        require(stakingPaused == false || valid_migrators[msg.sender] == true, "Staking paused or in migration");
        require(greylist[staker_address] == false, "Address has been greylisted");
        require(secs >= lock_time_min, "Minimum stake time not met");
        require(secs <= lock_time_for_max_multiplier,"Trying to lock for too long");
        (, uint256 liquidity, int24 tick_lower, int24 tick_upper) = checkUniV3NFT(token_id, true); // Should throw if false

        {
            uint256 lock_multiplier = lockMultiplier(secs);
            lockedNFTs[staker_address].push(
                LockedNFT(
                    token_id,
                    liquidity,
                    start_timestamp,
                    start_timestamp.add(secs),
                    lock_multiplier,
                    tick_lower,
                    tick_upper
                )
            );
        }

        // Pull the tokens from the source_address
        stakingTokenNFT.safeTransferFrom(source_address, address(this), token_id);

        // Update liquidities
        _total_liquidity_locked = _total_liquidity_locked.add(liquidity);
        _locked_liquidity[staker_address] = _locked_liquidity[staker_address].add(liquidity);

        // Need to call again to make sure everything is correct
        _updateRewardAndBalance(staker_address, false);

        emit LockNFT(staker_address, liquidity, token_id, secs, source_address);
    }

    // Two different withdrawLocked functions are needed because of delegateCall and msg.sender issues (important for migration)
    function withdrawLocked(uint256 token_id) nonReentrant external {
        require(withdrawalsPaused == false, "Withdrawals paused");
        _withdrawLocked(msg.sender, msg.sender, token_id);
    }

    // No withdrawer == msg.sender check needed since this is only internally callable and the checks are done in the wrapper
    // functions like migrator_withdraw_locked() and withdrawLocked()
    function _withdrawLocked(
        address staker_address,
        address destination_address,
        uint256 token_id
    ) internal {
        // Collect rewards first and then update the balances
        _getReward(staker_address, destination_address);

        LockedNFT memory thisNFT;
        thisNFT.liquidity = 0;
        uint256 theArrayIndex;
        for (uint256 i = 0; i < lockedNFTs[staker_address].length; i++) {
            if (token_id == lockedNFTs[staker_address][i].token_id) {
                thisNFT = lockedNFTs[staker_address][i];
                theArrayIndex = i;
                break;
            }
        }
        require(thisNFT.token_id == token_id, "Token ID not found");
        require(block.timestamp >= thisNFT.ending_timestamp || stakesUnlocked == true || valid_migrators[msg.sender] == true, "Stake is still locked!");

        uint256 theLiquidity = thisNFT.liquidity;

        if (theLiquidity > 0) {
            // Update liquidities
            _total_liquidity_locked = _total_liquidity_locked.sub(theLiquidity);
            _locked_liquidity[staker_address] = _locked_liquidity[staker_address].sub(theLiquidity);

            // Remove the stake from the array
            delete lockedNFTs[staker_address][theArrayIndex];

            // Need to call again to make sure everything is correct
            _updateRewardAndBalance(staker_address, false);

            // Give the tokens to the destination_address
            stakingTokenNFT.safeTransferFrom(address(this), destination_address, token_id);

            emit WithdrawLocked(staker_address, theLiquidity, token_id, destination_address);
        }
    }

    // Two different getReward functions are needed because of delegateCall and msg.sender issues (important for migration)
    function getReward() external nonReentrant returns (uint256) {
        require(rewardsCollectionPaused == false,"Rewards collection paused");
        return _getReward(msg.sender, msg.sender);
    }

    // No withdrawer == msg.sender check needed since this is only internally callable
    // This distinction is important for the migrator
    // Also collects the LP fees
    function _getReward(address rewardee, address destination_address) internal updateRewardAndBalance(rewardee, true) returns (uint256 reward_0) {
        reward_0 = rewards0[rewardee];
        if (reward_0 > 0) {
            rewards0[rewardee] = 0;
            TransferHelper.safeTransfer(address(rewardsToken0), destination_address, reward_0);

            // Collect liquidity fees too
            uint256 accumulated_token0 = 0;
            uint256 accumulated_token1 = 0;
            LockedNFT memory thisNFT;
            for (uint256 i = 0; i < lockedNFTs[rewardee].length; i++) {
                thisNFT = lockedNFTs[rewardee][i];
                
                // Check for null entries
                if (thisNFT.token_id != 0){
                    IUniswapV3PositionsNFT.CollectParams memory collect_params = IUniswapV3PositionsNFT.CollectParams(
                        thisNFT.token_id,
                        destination_address,
                        type(uint128).max,
                        type(uint128).max
                    );
                    (uint256 tok0_amt, uint256 tok1_amt) = stakingTokenNFT.collect(collect_params);
                    accumulated_token0 = accumulated_token0.add(tok0_amt);
                    accumulated_token1 = accumulated_token1.add(tok1_amt);
                }
            }

            emit RewardPaid(rewardee, reward_0, accumulated_token0, accumulated_token1, address(rewardsToken0), destination_address);
        }

    }

    // If the period expired, renew it
    function retroCatchUp() internal {
        // Failsafe check
        require(block.timestamp > periodFinish, "Period has not expired yet!");

        // Ensure the provided reward amount is not more than the balance in the contract.
        // This keeps the reward rate in the right range, preventing overflows due to
        // very high values of rewardRate in the earned and rewardsPerToken functions;
        // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.
        uint256 num_periods_elapsed = uint256(block.timestamp.sub(periodFinish)) / rewardsDuration; // Floor division to the nearest period
        uint256 balance0 = rewardsToken0.balanceOf(address(this));
        require(rewardRate0().mul(rewardsDuration).mul(num_periods_elapsed + 1) <= balance0, "Not enough FXS available");

        periodFinish = periodFinish.add((num_periods_elapsed.add(1)).mul(rewardsDuration));

        uint256 reward_per_token_0 = rewardPerToken();
        rewardPerTokenStored0 = reward_per_token_0;
        lastUpdateTime = lastTimeRewardApplicable();

        emit RewardsPeriodRenewed(address(stakingTokenNFT));
    }

    function sync_gauge_weight(bool force_update) public {
        if (address(gauge_controller) != address(0) && (force_update || (block.timestamp > last_gauge_time_total))){
            // Update the gauge_relative_weight
            last_gauge_relative_weight = gauge_controller.gauge_relative_weight_write(address(this), block.timestamp);
            last_gauge_time_total = gauge_controller.time_total();
        }
    }

    function sync() public {
        // Sync the gauge weight, if applicable
        sync_gauge_weight(false);

        if (block.timestamp > periodFinish) {
            retroCatchUp();
        } else {
            uint256 reward_per_token_0 = rewardPerToken();
            rewardPerTokenStored0 = reward_per_token_0;
            lastUpdateTime = lastTimeRewardApplicable();
        }
    }

    /* ========== RESTRICTED FUNCTIONS ========== */
    

    // Migrator can stake for someone else (they won't be able to withdraw it back though, only staker_address can).
    function migrator_stakeLocked_for(address staker_address, uint256 token_id, uint256 secs, uint256 start_timestamp) external isMigrating {
        require(staker_allowed_migrators[staker_address][msg.sender] && valid_migrators[msg.sender], "Migrator invalid or unapproved");
        _stakeLocked(staker_address, msg.sender, token_id, secs, start_timestamp);
    }

    // Used for migrations
    function migrator_withdraw_locked(address staker_address, uint256 token_id) external isMigrating {
        require(staker_allowed_migrators[staker_address][msg.sender] && valid_migrators[msg.sender], "Migrator invalid or unapproved");
        _withdrawLocked(staker_address, msg.sender, token_id);
    }

    // Adds supported migrator address
    function addMigrator(address migrator_address) external onlyByOwnerOrGovernance {
        valid_migrators[migrator_address] = true;
    }

    // Remove a migrator address
    function removeMigrator(address migrator_address) external onlyByOwnerOrGovernance {
        // Delete from the mapping
        delete valid_migrators[migrator_address];
    }

    // Added to support recovering LP Rewards and other mistaken tokens from other systems to be distributed to holders
    function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyByOwnerOrGovernance {
        // Admin cannot withdraw the staking token from the contract unless currently migrating
        if (!migrationsOn) {
            require(tokenAddress != address(stakingTokenNFT), "Not in migration"); // Only Governance / Timelock can trigger a migration
        }

        // Only the owner address can ever receive the recovery withdrawal
        TransferHelper.safeTransfer(tokenAddress, owner, tokenAmount);
        emit RecoveredERC20(tokenAddress, tokenAmount);
    }

    // Added to support recovering LP Rewards and other mistaken tokens from other systems to be distributed to holders
    function recoverERC721(address tokenAddress, uint256 token_id) external onlyByOwnerOrGovernance {
        // Admin cannot withdraw the staking token from the contract unless currently migrating
        if (!migrationsOn) {
            require(tokenAddress != address(stakingTokenNFT), "Not in migration"); // Only Governance / Timelock can trigger a migration
        }
        
        // Only the owner address can ever receive the recovery withdrawal
        // IUniswapV3PositionsNFT inherits IERC721 so the latter does not need to be imported
        IUniswapV3PositionsNFT(tokenAddress).safeTransferFrom( address(this), owner, token_id);
        emit RecoveredERC721(tokenAddress, token_id);
    }

    function setMultipliers(uint256 _lock_max_multiplier, uint256 _vefxs_max_multiplier, uint256 _vefxs_per_frax_for_max_boost) external onlyByOwnerOrGovernance {
        require(_lock_max_multiplier >= MULTIPLIER_PRECISION, "Mult must be >= MULTIPLIER_PRECISION");
        require(_vefxs_max_multiplier >= 0, "veFXS mul must be >= 0");
        require(_vefxs_per_frax_for_max_boost > 0, "veFXS pct max must be >= 0");

        lock_max_multiplier = _lock_max_multiplier;
        vefxs_max_multiplier = _vefxs_max_multiplier;
        vefxs_per_frax_for_max_boost = _vefxs_per_frax_for_max_boost;

        emit MaxVeFXSMultiplier(vefxs_max_multiplier);
        emit LockedNFTMaxMultiplierUpdated(lock_max_multiplier);
        emit veFXSPctForMaxBoostUpdated(vefxs_per_frax_for_max_boost);
    }

    function setLockedNFTTimeForMinAndMaxMultiplier(uint256 _lock_time_for_max_multiplier, uint256 _lock_time_min) external onlyByOwnerOrGovernance {
        require(_lock_time_for_max_multiplier >= 1, "Mul max time must be >= 1");
        require(_lock_time_min >= 1, "Mul min time must be >= 1");

        lock_time_for_max_multiplier = _lock_time_for_max_multiplier;
        lock_time_min = _lock_time_min;

        emit LockedNFTTimeForMaxMultiplier(lock_time_for_max_multiplier);
        emit LockedNFTMinTime(_lock_time_min);
    }

    function initializeDefault() external onlyByOwnerOrGovernance {
        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(rewardsDuration);
        if (address(gauge_controller) != address(0)){
            sync_gauge_weight(true);
        }
        emit DefaultInitialization();
    }

    function greylistAddress(address _address) external onlyByOwnerOrGovernance {
        greylist[_address] = !(greylist[_address]);
    }

    function unlockStakes() external onlyByOwnerOrGovernance {
        stakesUnlocked = !stakesUnlocked;
    }

    function toggleMigrations() external onlyByOwnerOrGovernance {
        migrationsOn = !migrationsOn;
    }

    function setPauses(
        bool _stakingPaused,
        bool _withdrawalsPaused,
        bool _rewardsCollectionPaused
    ) external onlyByOwnerOrGovernance {
        stakingPaused = _stakingPaused;
        withdrawalsPaused = _withdrawalsPaused;
        rewardsCollectionPaused = _rewardsCollectionPaused;
    }

    function setManualRewardRate(uint256 _reward_rate_manual, bool sync_too) external onlyByOwnerOrGovernance {
        reward_rate_manual = _reward_rate_manual;

        if (sync_too) {
            sync();
        }
    }

    function setTWAP(uint32 _new_twap_duration) external onlyByOwnerOrGovernance {
        require(_new_twap_duration <= 3600, "TWAP too long"); // One hour for now. Depends on how many increaseObservationCardinalityNext / observation slots you have
        twap_duration = _new_twap_duration;
    }

    function toggleEmissionFactorBypass() external onlyByOwnerOrGovernance {
        bypassEmissionFactor = !bypassEmissionFactor;
    }

    function setTimelock(address _new_timelock) external onlyByOwnerOrGovernance {
        timelock_address = _new_timelock;
    }

    // Set to address(0) to fall back to the reward_rate_manual
    function setGaugeController(address _gauge_controller_address) external onlyByOwnerOrGovernance {
        gauge_controller = IFraxGaugeController(_gauge_controller_address);
    }

    /* ========== EVENTS ========== */

    event LockNFT(address indexed user, uint256 liquidity, uint256 token_id, uint256 secs, address source_address);
    event WithdrawLocked(address indexed user, uint256 liquidity, uint256 token_id, address destination_address);
    event RewardPaid(address indexed user, uint256 farm_reward, uint256 liq_tok0_reward, uint256 liq_tok1_reward, address token_address, address destination_address);
    event RecoveredERC20(address token, uint256 amount);
    event RecoveredERC721(address token, uint256 token_id);
    event RewardsPeriodRenewed(address token);
    event DefaultInitialization();
    event LockedNFTMaxMultiplierUpdated(uint256 multiplier);
    event LockedNFTTimeForMaxMultiplier(uint256 secs);
    event LockedNFTMinTime(uint256 secs);
    event MaxVeFXSMultiplier(uint256 multiplier);
    event veFXSPctForMaxBoostUpdated(uint256 scale_factor);

    /* ========== A CHICKEN ========== */
    //
    //         ,~.
    //      ,-'__ `-,
    //     {,-'  `. }              ,')
    //    ,( a )   `-.__         ,',')~,
    //   <=.) (         `-.__,==' ' ' '}
    //     (   )                      /)
    //      `-'\   ,                    )
    //          |  \        `~.        /
    //          \   `._        \      /
    //           \     `._____,'    ,'
    //            `-.             ,'
    //               `-._     _,-'
    //                   77jj'
    //                  //_||
    //               __//--'/`
    //             ,--'/`  '
    //
    // [hjw] https://textart.io/art/vw6Sa3iwqIRGkZsN1BC2vweF/chicken
}

File 9 of 32: FraxFarm_UniV3_veFXS_FRAX_DAI.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;
pragma experimental ABIEncoderV2;

import "./FraxFarm_UniV3_veFXS.sol";

contract FraxFarm_UniV3_veFXS_FRAX_DAI is FraxFarm_UniV3_veFXS {
    constructor(
        address _owner,
        address _rewardsToken0,
        address _stakingTokenNFT,
        address _lp_pool_address,
        address _timelock_address,
        address _veFXS_address,
        address _gauge_controller_address,
        address _uni_token0,
        address _uni_token1,
        int24 _uni_tick_lower,
        int24 _uni_tick_upper,
        int24 _uni_ideal_tick
    ) 
    FraxFarm_UniV3_veFXS(_owner, _rewardsToken0, _stakingTokenNFT, _lp_pool_address, _timelock_address, _veFXS_address, _gauge_controller_address, _uni_token0, _uni_token1, _uni_tick_lower, _uni_tick_upper, _uni_ideal_tick)
    {}
}

File 10 of 32: FullMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.0;

/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
library FullMath {
    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
    function mulDiv(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        // 512-bit multiply [prod1 prod0] = a * b
        // Compute the product mod 2**256 and mod 2**256 - 1
        // then use the Chinese Remainder Theorem to reconstruct
        // the 512 bit result. The result is stored in two 256
        // variables such that product = prod1 * 2**256 + prod0
        uint256 prod0; // Least significant 256 bits of the product
        uint256 prod1; // Most significant 256 bits of the product
        assembly {
            let mm := mulmod(a, b, not(0))
            prod0 := mul(a, b)
            prod1 := sub(sub(mm, prod0), lt(mm, prod0))
        }

        // Handle non-overflow cases, 256 by 256 division
        if (prod1 == 0) {
            require(denominator > 0);
            assembly {
                result := div(prod0, denominator)
            }
            return result;
        }

        // Make sure the result is less than 2**256.
        // Also prevents denominator == 0
        require(denominator > prod1);

        ///////////////////////////////////////////////
        // 512 by 256 division.
        ///////////////////////////////////////////////

        // Make division exact by subtracting the remainder from [prod1 prod0]
        // Compute remainder using mulmod
        uint256 remainder;
        assembly {
            remainder := mulmod(a, b, denominator)
        }
        // Subtract 256 bit number from 512 bit number
        assembly {
            prod1 := sub(prod1, gt(remainder, prod0))
            prod0 := sub(prod0, remainder)
        }

        // Factor powers of two out of denominator
        // Compute largest power of two divisor of denominator.
        // Always >= 1.
        uint256 twos = (type(uint256).max - denominator + 1) & denominator;
        // Divide denominator by power of two
        assembly {
            denominator := div(denominator, twos)
        }

        // Divide [prod1 prod0] by the factors of two
        assembly {
            prod0 := div(prod0, twos)
        }
        // Shift in bits from prod1 into prod0. For this we need
        // to flip `twos` such that it is 2**256 / twos.
        // If twos is zero, then it becomes one
        assembly {
            twos := add(div(sub(0, twos), twos), 1)
        }
        prod0 |= prod1 * twos;

        // Invert denominator mod 2**256
        // Now that denominator is an odd number, it has an inverse
        // modulo 2**256 such that denominator * inv = 1 mod 2**256.
        // Compute the inverse by starting with a seed that is correct
        // correct for four bits. That is, denominator * inv = 1 mod 2**4
        uint256 inv = (3 * denominator) ^ 2;
        // Now use Newton-Raphson iteration to improve the precision.
        // Thanks to Hensel's lifting lemma, this also works in modular
        // arithmetic, doubling the correct bits in each step.
        inv *= 2 - denominator * inv; // inverse mod 2**8
        inv *= 2 - denominator * inv; // inverse mod 2**16
        inv *= 2 - denominator * inv; // inverse mod 2**32
        inv *= 2 - denominator * inv; // inverse mod 2**64
        inv *= 2 - denominator * inv; // inverse mod 2**128
        inv *= 2 - denominator * inv; // inverse mod 2**256

        // Because the division is now exact we can divide by multiplying
        // with the modular inverse of denominator. This will give us the
        // correct result modulo 2**256. Since the precoditions guarantee
        // that the outcome is less than 2**256, this is the final result.
        // We don't need to compute the high bits of the result and prod1
        // is no longer required.
        result = prod0 * inv;
        return result;
    }

    /// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    function mulDivRoundingUp(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        result = mulDiv(a, b, denominator);
        if (mulmod(a, b, denominator) > 0) {
            require(result < type(uint256).max);
            result++;
        }
    }
}

File 11 of 32: IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.11;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 12 of 32: IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

import "./Context.sol";
import "./SafeMath.sol";

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

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


File 13 of 32: IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.11;

import "./IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
      * @dev Safely transfers `tokenId` token from `from` to `to`.
      *
      * Requirements:
      *
      * - `from` cannot be the zero address.
      * - `to` cannot be the zero address.
      * - `tokenId` token must exist and be owned by `from`.
      * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
      * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
      *
      * Emits a {Transfer} event.
      */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
}

File 14 of 32: IFraxGaugeController.sol
pragma solidity >=0.6.11;

// https://github.com/swervefi/swerve/edit/master/packages/swerve-contracts/interfaces/IGaugeController.sol

interface IFraxGaugeController {
    struct Point {
        uint256 bias;
        uint256 slope;
    }

    struct VotedSlope {
        uint256 slope;
        uint256 power;
        uint256 end;
    }

    // Public variables
    function admin() external view returns (address);
    function future_admin() external view returns (address);
    function token() external view returns (address);
    function voting_escrow() external view returns (address);
    function n_gauge_types() external view returns (int128);
    function n_gauges() external view returns (int128);
    function gauge_type_names(int128) external view returns (string memory);
    function gauges(uint256) external view returns (address);
    function vote_user_slopes(address, address)
        external
        view
        returns (VotedSlope memory);
    function vote_user_power(address) external view returns (uint256);
    function last_user_vote(address, address) external view returns (uint256);
    function points_weight(address, uint256)
        external
        view
        returns (Point memory);
    function time_weight(address) external view returns (uint256);
    function points_sum(int128, uint256) external view returns (Point memory);
    function time_sum(uint256) external view returns (uint256);
    function points_total(uint256) external view returns (uint256);
    function time_total() external view returns (uint256);
    function points_type_weight(int128, uint256)
        external
        view
        returns (uint256);
    function time_type_weight(uint256) external view returns (uint256);

    // Getter functions
    function gauge_types(address) external view returns (int128);
    function gauge_relative_weight(address, uint256)
        external
        view
        returns (uint256);
    function get_gauge_weight(address) external view returns (uint256);
    function get_type_weight(int128) external view returns (uint256);
    function get_total_weight() external view returns (uint256);
    function get_weights_sum_per_type(int128) external view returns (uint256);

    // External functions
    function commit_transfer_ownership(address) external;
    function apply_transfer_ownership() external;
    function add_gauge(
        address,
        int128,
        uint256
    ) external;
    function checkpoint() external;
    function checkpoint_gauge(address) external;
    function global_emission_rate() external view returns (uint256);
    function gauge_relative_weight_write(address, uint256)
        external
        returns (uint256);
    function add_type(string memory, uint256) external;
    function change_type_weight(int128, uint256) external;
    function change_gauge_weight(address, uint256) external;
    function change_global_emission_rate(uint256) external;
    function vote_for_gauge_weights(address, uint256) external;
}

File 15 of 32: ISaddleD4_LP.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;

interface ISaddleD4_LP {
  function allowance(address owner, address spender) external view returns (uint256);
  function approve(address spender, uint256 amount) external returns (bool);
  function balanceOf(address account) external view returns (uint256);
  function burn(uint256 amount) external;
  function burnFrom(address account, uint256 amount) external;
  function decimals() external view returns (uint8);
  function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool);
  function increaseAllowance(address spender, uint256 addedValue) external returns (bool);
  function initialize(string memory name, string memory symbol) external returns (bool);
  function mint(address recipient, uint256 amount) external;
  function name() external view returns (string memory);
  function owner() external view returns (address);
  function renounceOwnership() external;
  function symbol() external view returns (string memory);
  function totalSupply() external view returns (uint256);
  function transfer(address recipient, uint256 amount) external returns (bool);
  function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
  function transferOwnership(address newOwner) external;
}

File 16 of 32: IUniswapV3Pool.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;

import './IUniswapV3PoolImmutables.sol';
import './IUniswapV3PoolState.sol';
import './IUniswapV3PoolDerivedState.sol';
import './IUniswapV3PoolActions.sol';
import './IUniswapV3PoolOwnerActions.sol';
import './IUniswapV3PoolEvents.sol';

/// @title The interface for a Uniswap V3 Pool
/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform
/// to the ERC20 specification
/// @dev The pool interface is broken up into many smaller pieces
interface IUniswapV3Pool is
    IUniswapV3PoolImmutables,
    IUniswapV3PoolState,
    IUniswapV3PoolDerivedState,
    IUniswapV3PoolActions,
    IUniswapV3PoolOwnerActions,
    IUniswapV3PoolEvents
{

}

File 17 of 32: IUniswapV3PoolActions.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

/// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone
interface IUniswapV3PoolActions {
    /// @notice Sets the initial price for the pool
    /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
    /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
    function initialize(uint160 sqrtPriceX96) external;

    /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position
    /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback
    /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends
    /// on tickLower, tickUpper, the amount of liquidity, and the current price.
    /// @param recipient The address for which the liquidity will be created
    /// @param tickLower The lower tick of the position in which to add liquidity
    /// @param tickUpper The upper tick of the position in which to add liquidity
    /// @param amount The amount of liquidity to mint
    /// @param data Any data that should be passed through to the callback
    /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback
    /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback
    function mint(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount,
        bytes calldata data
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Collects tokens owed to a position
    /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.
    /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or
    /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the
    /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.
    /// @param recipient The address which should receive the fees collected
    /// @param tickLower The lower tick of the position for which to collect fees
    /// @param tickUpper The upper tick of the position for which to collect fees
    /// @param amount0Requested How much token0 should be withdrawn from the fees owed
    /// @param amount1Requested How much token1 should be withdrawn from the fees owed
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);

    /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position
    /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0
    /// @dev Fees must be collected separately via a call to #collect
    /// @param tickLower The lower tick of the position for which to burn liquidity
    /// @param tickUpper The upper tick of the position for which to burn liquidity
    /// @param amount How much liquidity to burn
    /// @return amount0 The amount of token0 sent to the recipient
    /// @return amount1 The amount of token1 sent to the recipient
    function burn(
        int24 tickLower,
        int24 tickUpper,
        uint128 amount
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Swap token0 for token1, or token1 for token0
    /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback
    /// @param recipient The address to receive the output of the swap
    /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0
    /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
    /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this
    /// value after the swap. If one for zero, the price cannot be greater than this value after the swap
    /// @param data Any data to be passed through to the callback
    /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive
    /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);

    /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback
    /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback
    /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling
    /// with 0 amount{0,1} and sending the donation amount(s) from the callback
    /// @param recipient The address which will receive the token0 and token1 amounts
    /// @param amount0 The amount of token0 to send
    /// @param amount1 The amount of token1 to send
    /// @param data Any data to be passed through to the callback
    function flash(
        address recipient,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external;

    /// @notice Increase the maximum number of price and liquidity observations that this pool will store
    /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to
    /// the input observationCardinalityNext.
    /// @param observationCardinalityNext The desired minimum number of observations for the pool to store
    function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;
}

File 18 of 32: IUniswapV3PoolDerivedState.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

/// @title Pool state that is not stored
/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the
/// blockchain. The functions here may have variable gas costs.
interface IUniswapV3PoolDerivedState {
    /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp
    /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing
    /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,
    /// you must call it with secondsAgos = [3600, 0].
    /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in
    /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
    /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned
    /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp
    /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block
    /// timestamp
    function observe(uint32[] calldata secondsAgos)
        external
        view
        returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);

    /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range
    /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.
    /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first
    /// snapshot is taken and the second snapshot is taken.
    /// @param tickLower The lower tick of the range
    /// @param tickUpper The upper tick of the range
    /// @return tickCumulativeInside The snapshot of the tick accumulator for the range
    /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range
    /// @return secondsInside The snapshot of seconds per liquidity for the range
    function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)
        external
        view
        returns (
            int56 tickCumulativeInside,
            uint160 secondsPerLiquidityInsideX128,
            uint32 secondsInside
        );
}

File 19 of 32: IUniswapV3PoolEvents.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;

/// @title Events emitted by a pool
/// @notice Contains all events emitted by the pool
interface IUniswapV3PoolEvents {
    /// @notice Emitted exactly once by a pool when #initialize is first called on the pool
    /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize
    /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96
    /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool
    event Initialize(uint160 sqrtPriceX96, int24 tick);

    /// @notice Emitted when liquidity is minted for a given position
    /// @param sender The address that minted the liquidity
    /// @param owner The owner of the position and recipient of any minted liquidity
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity minted to the position range
    /// @param amount0 How much token0 was required for the minted liquidity
    /// @param amount1 How much token1 was required for the minted liquidity
    event Mint(
        address sender,
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted when fees are collected by the owner of a position
    /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
    /// @param owner The owner of the position for which fees are collected
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount0 The amount of token0 fees collected
    /// @param amount1 The amount of token1 fees collected
    event Collect(
        address indexed owner,
        address recipient,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount0,
        uint128 amount1
    );

    /// @notice Emitted when a position's liquidity is removed
    /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
    /// @param owner The owner of the position for which liquidity is removed
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity to remove
    /// @param amount0 The amount of token0 withdrawn
    /// @param amount1 The amount of token1 withdrawn
    event Burn(
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted by the pool for any swaps between token0 and token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the output of the swap
    /// @param amount0 The delta of the token0 balance of the pool
    /// @param amount1 The delta of the token1 balance of the pool
    /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96
    /// @param liquidity The liquidity of the pool after the swap
    /// @param tick The log base 1.0001 of price of the pool after the swap
    event Swap(
        address indexed sender,
        address indexed recipient,
        int256 amount0,
        int256 amount1,
        uint160 sqrtPriceX96,
        uint128 liquidity,
        int24 tick
    );

    /// @notice Emitted by the pool for any flashes of token0/token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the tokens from flash
    /// @param amount0 The amount of token0 that was flashed
    /// @param amount1 The amount of token1 that was flashed
    /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
    /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee
    event Flash(
        address indexed sender,
        address indexed recipient,
        uint256 amount0,
        uint256 amount1,
        uint256 paid0,
        uint256 paid1
    );

    /// @notice Emitted by the pool for increases to the number of observations that can be stored
    /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index
    /// just before a mint/swap/burn.
    /// @param observationCardinalityNextOld The previous value of the next observation cardinality
    /// @param observationCardinalityNextNew The updated value of the next observation cardinality
    event IncreaseObservationCardinalityNext(
        uint16 observationCardinalityNextOld,
        uint16 observationCardinalityNextNew
    );

    /// @notice Emitted when the protocol fee is changed by the pool
    /// @param feeProtocol0Old The previous value of the token0 protocol fee
    /// @param feeProtocol1Old The previous value of the token1 protocol fee
    /// @param feeProtocol0New The updated value of the token0 protocol fee
    /// @param feeProtocol1New The updated value of the token1 protocol fee
    event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);

    /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner
    /// @param sender The address that collects the protocol fees
    /// @param recipient The address that receives the collected protocol fees
    /// @param amount0 The amount of token0 protocol fees that is withdrawn
    /// @param amount0 The amount of token1 protocol fees that is withdrawn
    event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);
}

File 20 of 32: IUniswapV3PoolImmutables.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;

/// @title Pool state that never changes
/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values
interface IUniswapV3PoolImmutables {
    /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface
    /// @return The contract address
    function factory() external view returns (address);

    /// @notice The first of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token0() external view returns (address);

    /// @notice The second of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token1() external view returns (address);

    /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6
    /// @return The fee
    function fee() external view returns (uint24);

    /// @notice The pool tick spacing
    /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive
    /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...
    /// This value is an int24 to avoid casting even though it is always positive.
    /// @return The tick spacing
    function tickSpacing() external view returns (int24);

    /// @notice The maximum amount of position liquidity that can use any tick in the range
    /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and
    /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool
    /// @return The max amount of liquidity per tick
    function maxLiquidityPerTick() external view returns (uint128);
}

File 21 of 32: IUniswapV3PoolOwnerActions.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;

/// @title Permissioned pool actions
/// @notice Contains pool methods that may only be called by the factory owner
interface IUniswapV3PoolOwnerActions {
    /// @notice Set the denominator of the protocol's % share of the fees
    /// @param feeProtocol0 new protocol fee for token0 of the pool
    /// @param feeProtocol1 new protocol fee for token1 of the pool
    function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;

    /// @notice Collect the protocol fee accrued to the pool
    /// @param recipient The address to which collected protocol fees should be sent
    /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1
    /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0
    /// @return amount0 The protocol fee collected in token0
    /// @return amount1 The protocol fee collected in token1
    function collectProtocol(
        address recipient,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);
}

File 22 of 32: IUniswapV3PoolState.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;

/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
    /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas
    /// when accessed externally.
    /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value
    /// tick The current tick of the pool, i.e. according to the last tick transition that was run.
    /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick
    /// boundary.
    /// observationIndex The index of the last oracle observation that was written,
    /// observationCardinality The current maximum number of observations stored in the pool,
    /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.
    /// feeProtocol The protocol fee for both tokens of the pool.
    /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0
    /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.
    /// unlocked Whether the pool is currently locked to reentrancy
    function slot0()
        external
        view
        returns (
            uint160 sqrtPriceX96,
            int24 tick,
            uint16 observationIndex,
            uint16 observationCardinality,
            uint16 observationCardinalityNext,
            uint8 feeProtocol,
            bool unlocked
        );

    /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal0X128() external view returns (uint256);

    /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal1X128() external view returns (uint256);

    /// @notice The amounts of token0 and token1 that are owed to the protocol
    /// @dev Protocol fees will never exceed uint128 max in either token
    function protocolFees() external view returns (uint128 token0, uint128 token1);

    /// @notice The currently in range liquidity available to the pool
    /// @dev This value has no relationship to the total liquidity across all ticks
    function liquidity() external view returns (uint128);

    /// @notice Look up information about a specific tick in the pool
    /// @param tick The tick to look up
    /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or
    /// tick upper,
    /// liquidityNet how much liquidity changes when the pool price crosses the tick,
    /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,
    /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,
    /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick
    /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,
    /// secondsOutside the seconds spent on the other side of the tick from the current tick,
    /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.
    /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.
    /// In addition, these values are only relative and must be used only in comparison to previous snapshots for
    /// a specific position.
    function ticks(int24 tick)
        external
        view
        returns (
            uint128 liquidityGross,
            int128 liquidityNet,
            uint256 feeGrowthOutside0X128,
            uint256 feeGrowthOutside1X128,
            int56 tickCumulativeOutside,
            uint160 secondsPerLiquidityOutsideX128,
            uint32 secondsOutside,
            bool initialized
        );

    /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
    function tickBitmap(int16 wordPosition) external view returns (uint256);

    /// @notice Returns the information about a position by the position's key
    /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper
    /// @return _liquidity The amount of liquidity in the position,
    /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,
    /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,
    /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,
    /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke
    function positions(bytes32 key)
        external
        view
        returns (
            uint128 _liquidity,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            uint128 tokensOwed0,
            uint128 tokensOwed1
        );

    /// @notice Returns data about a specific observation index
    /// @param index The element of the observations array to fetch
    /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time
    /// ago, rather than at a specific index in the array.
    /// @return blockTimestamp The timestamp of the observation,
    /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,
    /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,
    /// Returns initialized whether the observation has been initialized and the values are safe to use
    function observations(uint256 index)
        external
        view
        returns (
            uint32 blockTimestamp,
            int56 tickCumulative,
            uint160 secondsPerLiquidityCumulativeX128,
            bool initialized
        );
}

File 23 of 32: IUniswapV3PositionsNFT.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;
pragma abicoder v2;

import './IERC721.sol';

// Originally INonfungiblePositionManager
interface IUniswapV3PositionsNFT is IERC721 {
    
    struct CollectParams {
        uint256 tokenId;
        address recipient;
        uint128 amount0Max;
        uint128 amount1Max;
    }

    /// @notice Returns the position information associated with a given token ID.
    /// @dev Throws if the token ID is not valid.
    /// @param tokenId The ID of the token that represents the position
    /// @return nonce The nonce for permits
    /// @return operator The address that is approved for spending
    /// @return token0 The address of the token0 for a specific pool
    /// @return token1 The address of the token1 for a specific pool
    /// @return fee The fee associated with the pool
    /// @return tickLower The lower end of the tick range for the position
    /// @return tickUpper The higher end of the tick range for the position
    /// @return liquidity The liquidity of the position
    /// @return feeGrowthInside0LastX128 The fee growth of token0 as of the last action on the individual position
    /// @return feeGrowthInside1LastX128 The fee growth of token1 as of the last action on the individual position
    /// @return tokensOwed0 The uncollected amount of token0 owed to the position as of the last computation
    /// @return tokensOwed1 The uncollected amount of token1 owed to the position as of the last computation
    function positions(uint256 tokenId)
        external
        view
        returns (
            uint96 nonce, // [0]
            address operator, // [1]
            address token0, // [2]
            address token1, // [3]
            uint24 fee, // [4]
            int24 tickLower, // [5]
            int24 tickUpper, // [6]
            uint128 liquidity, // [7]
            uint256 feeGrowthInside0LastX128, // [8]
            uint256 feeGrowthInside1LastX128, // [9]
            uint128 tokensOwed0, // [10]
            uint128 tokensOwed1 // [11]
        );

    /// @notice Collects up to a maximum amount of fees owed to a specific position to the recipient
    /// @param params tokenId The ID of the NFT for which tokens are being collected,
    /// recipient The account that should receive the tokens,
    /// amount0Max The maximum amount of token0 to collect,
    /// amount1Max The maximum amount of token1 to collect
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(CollectParams calldata params) external payable returns (uint256 amount0, uint256 amount1);
}

File 24 of 32: IveFXS.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;
pragma abicoder v2;

interface IveFXS {

    struct LockedBalance {
        int128 amount;
        uint256 end;
    }

    function commit_transfer_ownership(address addr) external;
    function apply_transfer_ownership() external;
    function commit_smart_wallet_checker(address addr) external;
    function apply_smart_wallet_checker() external;
    function toggleEmergencyUnlock() external;
    function recoverERC20(address token_addr, uint256 amount) external;
    function get_last_user_slope(address addr) external view returns (int128);
    function user_point_history__ts(address _addr, uint256 _idx) external view returns (uint256);
    function locked__end(address _addr) external view returns (uint256);
    function checkpoint() external;
    function deposit_for(address _addr, uint256 _value) external;
    function create_lock(uint256 _value, uint256 _unlock_time) external;
    function increase_amount(uint256 _value) external;
    function increase_unlock_time(uint256 _unlock_time) external;
    function withdraw() external;
    function balanceOf(address addr) external view returns (uint256);
    function balanceOf(address addr, uint256 _t) external view returns (uint256);
    function balanceOfAt(address addr, uint256 _block) external view returns (uint256);
    function totalSupply() external view returns (uint256);
    function totalSupply(uint256 t) external view returns (uint256);
    function totalSupplyAt(uint256 _block) external view returns (uint256);
    function totalFXSSupply() external view returns (uint256);
    function totalFXSSupplyAt(uint256 _block) external view returns (uint256);
    function changeController(address _newController) external;
    function token() external view returns (address);
    function supply() external view returns (uint256);
    function locked(address addr) external view returns (LockedBalance memory);
    function epoch() external view returns (uint256);
    function point_history(uint256 arg0) external view returns (int128 bias, int128 slope, uint256 ts, uint256 blk, uint256 fxs_amt);
    function user_point_history(address arg0, uint256 arg1) external view returns (int128 bias, int128 slope, uint256 ts, uint256 blk, uint256 fxs_amt);
    function user_point_epoch(address arg0) external view returns (uint256);
    function slope_changes(uint256 arg0) external view returns (int128);
    function controller() external view returns (address);
    function transfersEnabled() external view returns (bool);
    function emergencyUnlockActive() external view returns (bool);
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function version() external view returns (string memory);
    function decimals() external view returns (uint256);
    function future_smart_wallet_checker() external view returns (address);
    function smart_wallet_checker() external view returns (address);
    function admin() external view returns (address);
    function future_admin() external view returns (address);
}

File 25 of 32: LiquidityAmounts.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

import './FullMath.sol';
import './FixedPoint96.sol';

/// @title Liquidity amount functions
/// @notice Provides functions for computing liquidity amounts from token amounts and prices
library LiquidityAmounts {
    /// @notice Downcasts uint256 to uint128
    /// @param x The uint258 to be downcasted
    /// @return y The passed value, downcasted to uint128
    function toUint128(uint256 x) private pure returns (uint128 y) {
        require((y = uint128(x)) == x);
    }

    /// @notice Computes the amount of liquidity received for a given amount of token0 and price range
    /// @dev Calculates amount0 * (sqrt(upper) * sqrt(lower)) / (sqrt(upper) - sqrt(lower))
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param amount0 The amount0 being sent in
    /// @return liquidity The amount of returned liquidity
    function getLiquidityForAmount0(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint256 amount0
    ) internal pure returns (uint128 liquidity) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);
        uint256 intermediate = FullMath.mulDiv(sqrtRatioAX96, sqrtRatioBX96, FixedPoint96.Q96);
        return toUint128(FullMath.mulDiv(amount0, intermediate, sqrtRatioBX96 - sqrtRatioAX96));
    }

    /// @notice Computes the amount of liquidity received for a given amount of token1 and price range
    /// @dev Calculates amount1 / (sqrt(upper) - sqrt(lower)).
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param amount1 The amount1 being sent in
    /// @return liquidity The amount of returned liquidity
    function getLiquidityForAmount1(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint256 amount1
    ) internal pure returns (uint128 liquidity) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);
        return toUint128(FullMath.mulDiv(amount1, FixedPoint96.Q96, sqrtRatioBX96 - sqrtRatioAX96));
    }

    /// @notice Computes the maximum amount of liquidity received for a given amount of token0, token1, the current
    /// pool prices and the prices at the tick boundaries
    /// @param sqrtRatioX96 A sqrt price representing the current pool prices
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param amount0 The amount of token0 being sent in
    /// @param amount1 The amount of token1 being sent in
    /// @return liquidity The maximum amount of liquidity received
    function getLiquidityForAmounts(
        uint160 sqrtRatioX96,
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint256 amount0,
        uint256 amount1
    ) internal pure returns (uint128 liquidity) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        if (sqrtRatioX96 <= sqrtRatioAX96) {
            liquidity = getLiquidityForAmount0(sqrtRatioAX96, sqrtRatioBX96, amount0);
        } else if (sqrtRatioX96 < sqrtRatioBX96) {
            uint128 liquidity0 = getLiquidityForAmount0(sqrtRatioX96, sqrtRatioBX96, amount0);
            uint128 liquidity1 = getLiquidityForAmount1(sqrtRatioAX96, sqrtRatioX96, amount1);

            liquidity = liquidity0 < liquidity1 ? liquidity0 : liquidity1;
        } else {
            liquidity = getLiquidityForAmount1(sqrtRatioAX96, sqrtRatioBX96, amount1);
        }
    }

    /// @notice Computes the amount of token0 for a given amount of liquidity and a price range
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param liquidity The liquidity being valued
    /// @return amount0 The amount of token0
    function getAmount0ForLiquidity(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint128 liquidity
    ) internal pure returns (uint256 amount0) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        return
            FullMath.mulDiv(
                uint256(liquidity) << FixedPoint96.RESOLUTION,
                sqrtRatioBX96 - sqrtRatioAX96,
                sqrtRatioBX96
            ) / sqrtRatioAX96;
    }

    /// @notice Computes the amount of token1 for a given amount of liquidity and a price range
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param liquidity The liquidity being valued
    /// @return amount1 The amount of token1
    function getAmount1ForLiquidity(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint128 liquidity
    ) internal pure returns (uint256 amount1) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        return FullMath.mulDiv(liquidity, sqrtRatioBX96 - sqrtRatioAX96, FixedPoint96.Q96);
    }

    /// @notice Computes the token0 and token1 value for a given amount of liquidity, the current
    /// pool prices and the prices at the tick boundaries
    /// @param sqrtRatioX96 A sqrt price representing the current pool prices
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param liquidity The liquidity being valued
    /// @return amount0 The amount of token0
    /// @return amount1 The amount of token1
    function getAmountsForLiquidity(
        uint160 sqrtRatioX96,
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint128 liquidity
    ) internal pure returns (uint256 amount0, uint256 amount1) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        if (sqrtRatioX96 <= sqrtRatioAX96) {
            amount0 = getAmount0ForLiquidity(sqrtRatioAX96, sqrtRatioBX96, liquidity);
        } else if (sqrtRatioX96 < sqrtRatioBX96) {
            amount0 = getAmount0ForLiquidity(sqrtRatioX96, sqrtRatioBX96, liquidity);
            amount1 = getAmount1ForLiquidity(sqrtRatioAX96, sqrtRatioX96, liquidity);
        } else {
            amount1 = getAmount1ForLiquidity(sqrtRatioAX96, sqrtRatioBX96, liquidity);
        }
    }
}

File 26 of 32: Math.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

File 27 of 32: Owned.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.11;

// https://docs.synthetix.io/contracts/Owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    constructor(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

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

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

    modifier onlyOwner {
        require(msg.sender == owner, "Only the contract owner may perform this action");
        _;
    }

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

File 28 of 32: ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 29 of 32: SafeERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

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

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

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

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

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

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

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

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

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

File 30 of 32: SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

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

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 31 of 32: TickMath.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Math library for computing sqrt prices from ticks and vice versa
/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports
/// prices between 2**-128 and 2**128
library TickMath {
    /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128
    int24 internal constant MIN_TICK = -887272;
    /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128
    int24 internal constant MAX_TICK = -MIN_TICK;

    /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)
    uint160 internal constant MIN_SQRT_RATIO = 4295128739;
    /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)
    uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;

    /// @notice Calculates sqrt(1.0001^tick) * 2^96
    /// @dev Throws if |tick| > max tick
    /// @param tick The input tick for the above formula
    /// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)
    /// at the given tick
    function getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 sqrtPriceX96) {
        uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick));
        require(int256(absTick) <= int256(MAX_TICK), 'T');

        uint256 ratio = absTick & 0x1 != 0 ? 0xfffcb933bd6fad37aa2d162d1a594001 : 0x100000000000000000000000000000000;
        if (absTick & 0x2 != 0) ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;
        if (absTick & 0x4 != 0) ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;
        if (absTick & 0x8 != 0) ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;
        if (absTick & 0x10 != 0) ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;
        if (absTick & 0x20 != 0) ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;
        if (absTick & 0x40 != 0) ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;
        if (absTick & 0x80 != 0) ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;
        if (absTick & 0x100 != 0) ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;
        if (absTick & 0x200 != 0) ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;
        if (absTick & 0x400 != 0) ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;
        if (absTick & 0x800 != 0) ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;
        if (absTick & 0x1000 != 0) ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;
        if (absTick & 0x2000 != 0) ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;
        if (absTick & 0x4000 != 0) ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;
        if (absTick & 0x8000 != 0) ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;
        if (absTick & 0x10000 != 0) ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;
        if (absTick & 0x20000 != 0) ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;
        if (absTick & 0x40000 != 0) ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;
        if (absTick & 0x80000 != 0) ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;

        if (tick > 0) ratio = type(uint256).max / ratio;

        // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96.
        // we then downcast because we know the result always fits within 160 bits due to our tick input constraint
        // we round up in the division so getTickAtSqrtRatio of the output price is always consistent
        sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1));
    }

    /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio
    /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may
    /// ever return.
    /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96
    /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio
    function getTickAtSqrtRatio(uint160 sqrtPriceX96) internal pure returns (int24 tick) {
        // second inequality must be < because the price can never reach the price at the max tick
        require(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO, 'R');
        uint256 ratio = uint256(sqrtPriceX96) << 32;

        uint256 r = ratio;
        uint256 msb = 0;

        assembly {
            let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(5, gt(r, 0xFFFFFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(4, gt(r, 0xFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(3, gt(r, 0xFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(2, gt(r, 0xF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(1, gt(r, 0x3))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := gt(r, 0x1)
            msb := or(msb, f)
        }

        if (msb >= 128) r = ratio >> (msb - 127);
        else r = ratio << (127 - msb);

        int256 log_2 = (int256(msb) - 128) << 64;

        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(63, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(62, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(61, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(60, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(59, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(58, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(57, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(56, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(55, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(54, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(53, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(52, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(51, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(50, f))
        }

        int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number

        int24 tickLow = int24((log_sqrt10001 - 3402992956809132418596140100660247210) >> 128);
        int24 tickHi = int24((log_sqrt10001 + 291339464771989622907027621153398088495) >> 128);

        tick = tickLow == tickHi ? tickLow : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96 ? tickHi : tickLow;
    }
}

File 32 of 32: TransferHelper.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_rewardsToken0","type":"address"},{"internalType":"address","name":"_stakingTokenNFT","type":"address"},{"internalType":"address","name":"_lp_pool_address","type":"address"},{"internalType":"address","name":"_timelock_address","type":"address"},{"internalType":"address","name":"_veFXS_address","type":"address"},{"internalType":"address","name":"_gauge_controller_address","type":"address"},{"internalType":"address","name":"_uni_token0","type":"address"},{"internalType":"address","name":"_uni_token1","type":"address"},{"internalType":"int24","name":"_uni_tick_lower","type":"int24"},{"internalType":"int24","name":"_uni_tick_upper","type":"int24"},{"internalType":"int24","name":"_uni_ideal_tick","type":"int24"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[],"name":"DefaultInitialization","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"liquidity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"token_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"secs","type":"uint256"},{"indexed":false,"internalType":"address","name":"source_address","type":"address"}],"name":"LockNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"multiplier","type":"uint256"}],"name":"LockedNFTMaxMultiplierUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"secs","type":"uint256"}],"name":"LockedNFTMinTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"secs","type":"uint256"}],"name":"LockedNFTTimeForMaxMultiplier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"multiplier","type":"uint256"}],"name":"MaxVeFXSMultiplier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RecoveredERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"token_id","type":"uint256"}],"name":"RecoveredERC721","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"farm_reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"liq_tok0_reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"liq_tok1_reward","type":"uint256"},{"indexed":false,"internalType":"address","name":"token_address","type":"address"},{"indexed":false,"internalType":"address","name":"destination_address","type":"address"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"RewardsPeriodRenewed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"liquidity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"token_id","type":"uint256"},{"indexed":false,"internalType":"address","name":"destination_address","type":"address"}],"name":"WithdrawLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"scale_factor","type":"uint256"}],"name":"veFXSPctForMaxBoostUpdated","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"migrator_address","type":"address"}],"name":"addMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bypassEmissionFactor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"calcCurCombinedWeight","outputs":[{"internalType":"uint256","name":"old_combined_weight","type":"uint256"},{"internalType":"uint256","name":"new_vefxs_multiplier","type":"uint256"},{"internalType":"uint256","name":"new_combined_weight","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"combinedWeightOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emissionFactor","outputs":[{"internalType":"uint256","name":"emission_factor","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"greylistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ideal_tick","outputs":[{"internalType":"int24","name":"","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initializeDefault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"secs","type":"uint256"}],"name":"lockMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock_max_multiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock_time_for_max_multiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock_time_min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"lockedLiquidityOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"lockedNFTsOf","outputs":[{"components":[{"internalType":"uint256","name":"token_id","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"start_timestamp","type":"uint256"},{"internalType":"uint256","name":"ending_timestamp","type":"uint256"},{"internalType":"uint256","name":"lock_multiplier","type":"uint256"},{"internalType":"int24","name":"tick_lower","type":"int24"},{"internalType":"int24","name":"tick_upper","type":"int24"}],"internalType":"struct FraxFarm_UniV3_veFXS.LockedNFT[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrationsOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker_address","type":"address"},{"internalType":"uint256","name":"token_id","type":"uint256"},{"internalType":"uint256","name":"secs","type":"uint256"},{"internalType":"uint256","name":"start_timestamp","type":"uint256"}],"name":"migrator_stakeLocked_for","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"staker_address","type":"address"},{"internalType":"uint256","name":"token_id","type":"uint256"}],"name":"migrator_withdraw_locked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"minVeFXSForMaxBoost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"token_id","type":"uint256"}],"name":"recoverERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"migrator_address","type":"address"}],"name":"removeMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardRate0","outputs":[{"internalType":"uint256","name":"rwd_rate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reward_rate_manual","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsCollectionPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge_controller_address","type":"address"}],"name":"setGaugeController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lock_time_for_max_multiplier","type":"uint256"},{"internalType":"uint256","name":"_lock_time_min","type":"uint256"}],"name":"setLockedNFTTimeForMinAndMaxMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_reward_rate_manual","type":"uint256"},{"internalType":"bool","name":"sync_too","type":"bool"}],"name":"setManualRewardRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lock_max_multiplier","type":"uint256"},{"internalType":"uint256","name":"_vefxs_max_multiplier","type":"uint256"},{"internalType":"uint256","name":"_vefxs_per_frax_for_max_boost","type":"uint256"}],"name":"setMultipliers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_stakingPaused","type":"bool"},{"internalType":"bool","name":"_withdrawalsPaused","type":"bool"},{"internalType":"bool","name":"_rewardsCollectionPaused","type":"bool"}],"name":"setPauses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_new_twap_duration","type":"uint32"}],"name":"setTWAP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_new_timelock","type":"address"}],"name":"setTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"token_id","type":"uint256"},{"internalType":"uint256","name":"secs","type":"uint256"}],"name":"stakeLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"migrator_address","type":"address"}],"name":"stakerAllowMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"migrator_address","type":"address"}],"name":"stakerDisallowMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakesUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sync","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"force_update","type":"bool"}],"name":"sync_gauge_weight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timelock_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleEmissionFactorBypass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleMigrations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalCombinedWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalLiquidityLocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"twap_duration","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uni_required_fee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uni_tick_lower","outputs":[{"internalType":"int24","name":"","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uni_tick_upper","outputs":[{"internalType":"int24","name":"","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uni_token0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uni_token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockStakes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"userStakedFrax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"veFXSMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vefxs_max_multiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vefxs_per_frax_for_max_boost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token_id","type":"uint256"}],"name":"withdrawLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalsPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405262093a80600c556729a2241af62c0000600d556305a39a80600e5562015180600f55673782dace9d900000601055671bc16d674ec800006011556013805462ffffff60481b19166a01f40000000000000000001790556014805463ffffffff60a01b1916604b60a21b1790553480156200007d57600080fd5b506040516200628438038062006284833981016040819052620000a0916200034e565b8b8b8b8b8b8b8b8b8b8b8b8b8b6001600160a01b038116620001095760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a15060016002908155600480546001600160a01b03199081166001600160a01b038f8116919091179092556006805482168e84161790556007805482168d84161790556005805482168a84161790556003805482168b841617905542600a556008805482168c841617905560138054601480549093168985161790925586840b62ffffff9081166bffffffffffff0000000000009093166c01000000000000000000000000948b169490940265ffffffffffff19169390931791909117630100000086850b8416021762ffffff60301b191666010000000000009385900b92909216929092021790556200026d6801fa8a0c9d5dc200006301e1338062000291602090811b6200334417901c565b600b81905550505050505050505050505050505050505050505050505050620004b9565b6000620002db83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250620002e260201b60201c565b9392505050565b60008183620003065760405162461bcd60e51b815260040162000100919062000442565b50600062000315848662000498565b95945050505050565b80516001600160a01b03811681146200033657600080fd5b919050565b8051600281900b81146200033657600080fd5b6000806000806000806000806000806000806101808d8f03121562000371578788fd5b6200037c8d6200031e565b9b506200038c60208e016200031e565b9a506200039c60408e016200031e565b9950620003ac60608e016200031e565b9850620003bc60808e016200031e565b9750620003cc60a08e016200031e565b9650620003dc60c08e016200031e565b9550620003ec60e08e016200031e565b9450620003fd6101008e016200031e565b93506200040e6101208e016200033b565b92506200041f6101408e016200033b565b9150620004306101608e016200033b565b90509295989b509295989b509295989b565b6000602080835283518082850152825b81811015620004705785810183015185820160400152820162000452565b81811115620004825783604083870101525b50601f01601f1916929092016040019392505050565b600082620004b457634e487b7160e01b81526012600452602481fd5b500490565b615dbb80620004c96000396000f3fe608060405234801561001057600080fd5b50600436106103e95760003560e01c8063847370291161021a578063bf20e71e11610135578063e01f62bf116100c8578063f288baf611610097578063fce6fd131161007c578063fce6fd13146109b7578063fe082ada146109c9578063fff6cae9146109f957600080fd5b8063f288baf6146109a5578063f2a8d349146109ae57600080fd5b8063e01f62bf1461096d578063e1ba95d214610975578063e9f2838e1461097d578063f12f14471461099257600080fd5b8063d77258b311610104578063d77258b3146108fb578063d9f96e8d14610904578063da0f2ec01461093a578063dc6663c71461094d57600080fd5b8063bf20e71e146108c4578063cc2abd64146108cc578063cdc82e80146108df578063d42fc9b4146108e857600080fd5b806396f66e6d116101ad578063b3def2f51161017c578063b3def2f51461088c578063b94c4dcb14610894578063bbb781cc1461089d578063bdacb303146108b157600080fd5b806396f66e6d146108275780639c5303eb146108345780639f43ae0914610847578063a2217bc51461088457600080fd5b806392ad4159116101e957806392ad4159146107cd5780639393bb7f146107ed578063941d9f65146108015780639637927f1461081457600080fd5b806384737029146107595780638980f11f1461076c5780638bad86a71461077f5780638da5cb5b146107ad57600080fd5b8063377be6511161030a5780635ea1e6781161029d5780636e27cef91161026c5780636e27cef91461072257806379ba50971461072b578063807c48da14610733578063819d4cc61461074657600080fd5b80635ea1e678146106d057806360153c4d146106dd57806364f2c060146107075780636ce46bc31461070f57600080fd5b806352732bc8116102d957806352732bc81461060657806353a47bb71461066d578063575959bf1461068d5780635e415e69146106a057600080fd5b8063377be6511461059d578063386a9525146105e25780633d18b912146105eb5780634fd2b536146105f357600080fd5b80631b3e870a116103825780632ca1a895116103515780632ca1a89514610526578063323331ca1461052e57806332d342b71461055457806336f89af21461056757600080fd5b80631b3e870a146104e55780631c1f78eb146104f857806328ef934e146105005780632c0c2a0a1461051357600080fd5b8063150b7a02116103be578063150b7a021461044f5780631627540c146104b7578063169d27ef146104ca57806317b18c89146104d257600080fd5b80628cc262146103ee57806291d2b814610414578063049074f3146104295780630d7bac4f1461043c575b600080fd5b6104016103fc3660046152a4565b610a01565b6040519081526020015b60405180910390f35b6104276104223660046152a4565b610aa1565b005b61042761043736600461561a565b610b90565b61040161044a36600461554c565b610cf4565b61048661045d3660046152c0565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161040b565b6104276104c53660046152a4565b610d4d565b610427610e6d565b6104276104e03660046155ab565b610f79565b6104276104f33660046152a4565b610fff565b6104016110ee565b61042761050e3660046153c5565b611109565b6104016105213660046152a4565b611248565b61040161135c565b6023546105449065010000000000900460ff1681565b604051901515815260200161040b565b61042761056236600461554c565b6113fe565b6104016105753660046152a4565b73ffffffffffffffffffffffffffffffffffffffff166000908152601d602052604090205490565b6014546105bd9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161040b565b610401600c5481565b6104016114f6565b6104016106013660046152a4565b6115f2565b6104276106143660046152a4565b33600090815260216020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6001546105bd9073ffffffffffffffffffffffffffffffffffffffff1681565b61042761069b36600461539a565b61160f565b6013546105bd906c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6023546105449060ff1681565b6013546106f4906601000000000000900460020b81565b60405160029190910b815260200161040b565b601b54610401565b61042761071d3660046155ef565b61174a565b610401600f5481565b6104276119ab565b6104276107413660046154ca565b611af6565b61042761075436600461539a565b611c80565b6104276107673660046155ab565b611e9e565b61042761077a36600461539a565b612084565b61079261078d3660046152a4565b61222c565b6040805193845260208401929092529082015260600161040b565b6000546105bd9073ffffffffffffffffffffffffffffffffffffffff1681565b6107e06107db3660046152a4565b61240d565b60405161040b9190615739565b6013546106f4906301000000900460020b81565b61042761080f3660046152a4565b6124e2565b6023546105449062010000900460ff1681565b6013546106f49060020b81565b6104276108423660046152a4565b6125d9565b60145461086f9074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff909116815260200161040b565b6104276126cb565b6104016127a8565b610401600e5481565b602354610544906301000000900460ff1681565b6104276108bf3660046152a4565b612beb565b610427612cd5565b6104276108da366004615502565b612daa565b610401600d5481565b6104016108f63660046152a4565b612eea565b610401600b5481565b6104016109123660046152a4565b73ffffffffffffffffffffffffffffffffffffffff166000908152601c602052604090205490565b61042761094836600461557c565b613088565b6008546105bd9073ffffffffffffffffffffffffffffffffffffffff1681565b601a54610401565b61042761313e565b60235461054490640100000000900460ff1681565b6104276109a03660046152a4565b61321c565b61040160115481565b61040160105481565b60235461054490610100900460ff1681565b6013546109e5906901000000000000000000900462ffffff1681565b60405162ffffff909116815260200161040b565b610427613307565b600080610a0c613386565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260176020908152604080832054601690925290912054919250610a9a91610a9490670de0b6b3a764000090610a8e90610a629087906133e1565b73ffffffffffffffffffffffffffffffffffffffff89166000908152601d602052604090205490613423565b90613344565b906134d8565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331480610ade575060085473ffffffffffffffffffffffffffffffffffffffff1633145b610b49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b000000000000000000000060448201526064015b60405180910390fd5b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480610bcd575060085473ffffffffffffffffffffffffffffffffffffffff1633145b610c33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b610e108163ffffffff161115610ca5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f5457415020746f6f206c6f6e67000000000000000000000000000000000000006044820152606401610b40565b6014805463ffffffff90921674010000000000000000000000000000000000000000027fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b600080610d36610d27600e54610a8e610d20670de0b6b3a7640000600d546133e190919063ffffffff16565b8790613423565b670de0b6b3a7640000906134d8565b9050600d54811115610d475750600d545b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610df4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e00000000000000000000000000000000006064820152608401610b40565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff16331480610eaa575060085473ffffffffffffffffffffffffffffffffffffffff1633145b610f10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b42600a819055600c54610f2391906134d8565b60095560055473ffffffffffffffffffffffffffffffffffffffff1615610f4e57610f4e6001611af6565b6040517fb5cfe3ccd03847076864f081609024cbc2eb98c38da4d8b2cebe9479a9a1ef3790600090a1565b600280541415610fe5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b40565b60028055610ff63380848442613551565b50506001600255565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061103c575060085473ffffffffffffffffffffffffffffffffffffffff1633145b6110a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b73ffffffffffffffffffffffffffffffffffffffff166000908152601f6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000611104600c546110fe61135c565b90613423565b905090565b60235460ff610100909104161515600114611180576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420696e206d6967726174696f6e000000000000000000000000000000006044820152606401610b40565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260216020908152604080832033845290915290205460ff1680156111cf5750336000908152601f602052604090205460ff165b611235576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4d69677261746f7220696e76616c6964206f7220756e617070726f76656400006044820152606401610b40565b6112428433858585613551565b50505050565b600080611254836115f2565b90508015611353576003546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152600092611315928592610a8e92670de0b6b3a7640000929116906370a082319060240160206040518083038186803b1580156112dd57600080fd5b505afa1580156112f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fe9190615564565b9050600061133a670de0b6b3a7640000610a8e6011548561342390919063ffffffff16565b905060115481111561134b57506011545b949350505050565b50600092915050565b60055460009073ffffffffffffffffffffffffffffffffffffffff16156113f757611104670de0b6b3a7640000610a8e601854600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630a3be7576040518163ffffffff1660e01b815260040160206040518083038186803b1580156112dd57600080fd5b50600b5490565b60028054141561146a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b40565b60028055602354640100000000900460ff16156114e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5769746864726177616c732070617573656400000000000000000000000000006044820152606401610b40565b6114ee333383613a22565b506001600255565b6000600280541415611564576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b40565b6002805560235465010000000000900460ff16156115de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5265776172647320636f6c6c656374696f6e20706175736564000000000000006044820152606401610b40565b6115e83333613f2b565b9050600160025590565b6000610d47670de0b6b3a7640000610a8e6010546110fe86612eea565b60235460ff610100909104161515600114611686576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420696e206d6967726174696f6e000000000000000000000000000000006044820152606401610b40565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260216020908152604080832033845290915290205460ff1680156116d55750336000908152601f602052604090205460ff165b61173b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4d69677261746f7220696e76616c6964206f7220756e617070726f76656400006044820152606401610b40565b611746823383613a22565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff16331480611787575060085473ffffffffffffffffffffffffffffffffffffffff1633145b6117ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b670de0b6b3a7640000831015611884576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4d756c74206d757374206265203e3d204d554c5449504c4945525f505245434960448201527f53494f4e000000000000000000000000000000000000000000000000000000006064820152608401610b40565b600081116118ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f766546585320706374206d6178206d757374206265203e3d20300000000000006044820152606401610b40565b600d839055601182905560108190556040518281527fc9d56ccdd6b954d8d74700db074cc667054f8e33c1b8d23e97021d4c588a87619060200160405180910390a17f56a7f617180f6beea050b873366dccd22ab6564e9a4c921b9be53a4af4e9bcc8600d5460405161196391815260200190565b60405180910390a17fce426dd9202a2e5a80566b295160d3891cadf200ec0b6a326ce9894fe7f2603060105460405161199e91815260200190565b60405180910390a1505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611a52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e65727368697000000000000000000000006064820152608401610b40565b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff93841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b60055473ffffffffffffffffffffffffffffffffffffffff1615801590611b2557508080611b25575060195442115b15611c7d576005546040517f6472eee100000000000000000000000000000000000000000000000000000000815230600482015242602482015273ffffffffffffffffffffffffffffffffffffffff90911690636472eee190604401602060405180830381600087803b158015611b9b57600080fd5b505af1158015611baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd39190615564565b601855600554604080517f513872bd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169163513872bd91600480820192602092909190829003018186803b158015611c4157600080fd5b505afa158015611c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c799190615564565b6019555b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331480611cbd575060085473ffffffffffffffffffffffffffffffffffffffff1633145b611d23576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b602354610100900460ff16611db75760065473ffffffffffffffffffffffffffffffffffffffff83811691161415611db7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420696e206d6967726174696f6e000000000000000000000000000000006044820152606401610b40565b6000546040517f42842e0e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff918216602482015260448101839052908316906342842e0e90606401600060405180830381600087803b158015611e3157600080fd5b505af1158015611e45573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff86168152602081018590527f57519b6a0997d7d44511836bcee0a36871aa79d445816f6c464abb0cd9d3f3e893500190505b60405180910390a15050565b60005473ffffffffffffffffffffffffffffffffffffffff16331480611edb575060085473ffffffffffffffffffffffffffffffffffffffff1633145b611f41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b6001821015611fac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d756c206d61782074696d65206d757374206265203e3d2031000000000000006044820152606401610b40565b6001811015612017576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d756c206d696e2074696d65206d757374206265203e3d2031000000000000006044820152606401610b40565b600e829055600f8190556040518281527f74fa102aff6c8f2f6340638f052d9364a1c84bbe95ef31eed189e87e357551da9060200160405180910390a16040518181527f53f6493eec470b97db35629d432373ea4232ee1505f5ff961b2ece5b5d92b81390602001611e92565b60005473ffffffffffffffffffffffffffffffffffffffff163314806120c1575060085473ffffffffffffffffffffffffffffffffffffffff1633145b612127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b602354610100900460ff166121bb5760065473ffffffffffffffffffffffffffffffffffffffff838116911614156121bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420696e206d6967726174696f6e000000000000000000000000000000006044820152606401610b40565b6000546121e090839073ffffffffffffffffffffffffffffffffffffffff1683614293565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018390527f55350610fe57096d8c0ffa30beede987326bccfcb0b4415804164d0dd50ce8b19101611e92565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601d6020526040812054908061225d84611248565b73ffffffffffffffffffffffffffffffffffffffff85166000908152601260205260408120549193509061229990600290610a8e9086906134d8565b90506000915060005b73ffffffffffffffffffffffffffffffffffffffff86166000908152601e60205260409020548110156124045773ffffffffffffffffffffffffffffffffffffffff86166000908152601e6020526040812080548390811061232d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020918290206040805160e0810182526006909302909101805483526001810154938301939093526002808401549183019190915260038301546060830181905260048401546080840181905260059094015480830b830b830b60a085015263010000009004820b820b90910b60c083015290925042106123b85750670de0b6b3a76400005b602082015160006123df670de0b6b3a7640000610a8e6123d8868a6134d8565b8590613423565b90506123eb87826134d8565b96505050505080806123fc90615c08565b9150506122a2565b50509193909250565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601e60209081526040808320805482518185028101850190935280835260609492939192909184015b828210156124d75760008481526020908190206040805160e08101825260068602909201805483526001808201548486015260028083015493850193909352600382015460608501526004820154608085015260059091015480830b830b830b60a085015263010000009004820b820b90910b60c08301529083529092019101612452565b505050509050919050565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061251f575060085473ffffffffffffffffffffffffffffffffffffffff1633145b612585576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b73ffffffffffffffffffffffffffffffffffffffff16600090815260226020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480612616575060085473ffffffffffffffffffffffffffffffffffffffff1633145b61267c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b73ffffffffffffffffffffffffffffffffffffffff166000908152601f6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480612708575060085473ffffffffffffffffffffffffffffffffffffffff1633145b61276e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b602380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff81166101009182900460ff1615909102179055565b60235460009060ff16156127c35750670de0b6b3a764000090565b60408051600280825260608201835260009260208301908036833701905050905060148054906101000a900463ffffffff168160008151811061282f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019063ffffffff16908163ffffffff1681525050600081600181518110612885577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff909216602092830291909101909101526007546040517f883bdbfd00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff169063883bdbfd906128f19085906004016157c5565b60006040518083038186803b15801561290957600080fd5b505afa15801561291d573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261296391908101906153ff565b509050600060148054906101000a900463ffffffff1660030b826000815181106129b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151836001815181106129f8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151612a0a9190615b33565b612a149190615953565b601354909150600290810b810b9082900b13612a34576000935050505090565b60135463010000009004600290810b810b9082900b12612a58576000935050505090565b6000601360069054906101000a900460020b60020b8260020b13612acf57601354612a9490600281810b9166010000000000009004900b615ad0565b601354600291820b91612aa991900b84615ad0565b612abe9060020b670de0b6b3a76400006159db565b612ac891906158eb565b9050612b34565b601354612af49066010000000000008104600290810b9163010000009004900b615ad0565b60020b82601360039054906101000a900460020b612b129190615ad0565b612b279060020b670de0b6b3a76400006159db565b612b3191906158eb565b90505b6000811215612b6e57612b67817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6159db565b9450612b72565b8094505b670de0b6b3a7640000851115612be4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f456d697373696f6e20666163746f7220746f6f206869676800000000000000006044820152606401610b40565b5050505090565b60005473ffffffffffffffffffffffffffffffffffffffff16331480612c28575060085473ffffffffffffffffffffffffffffffffffffffff1633145b612c8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480612d12575060085473ffffffffffffffffffffffffffffffffffffffff1633145b612d78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b602380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480612de7575060085473ffffffffffffffffffffffffffffffffffffffff1633145b612e4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b6023805491151565010000000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff931515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff951515630100000002959095167fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffff909316929092179390931791909116179055565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101829052819060005b73ffffffffffffffffffffffffffffffffffffffff85166000908152601e602052604090205481101561307c5773ffffffffffffffffffffffffffffffffffffffff85166000908152601e60205260409020805482908110612fb2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020918290206040805160e08101825260069093029091018054835260018101549383018490526002808201549284019290925260038101546060840152600481015460808401526005015480820b820b820b60a084015263010000009004810b810b900b60c0820152925080156130695760006130388460a00151614403565b905060006130498560c00151614403565b905061306461305d83838860200151614895565b87906134d8565b955050505b508061307481615c08565b915050612f27565b5061134b826002613344565b60005473ffffffffffffffffffffffffffffffffffffffff163314806130c5575060085473ffffffffffffffffffffffffffffffffffffffff1633145b61312b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b600b829055801561174657611746613307565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061317b575060085473ffffffffffffffffffffffffffffffffffffffff1633145b6131e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b602380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff8116620100009182900460ff1615909102179055565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601f602052604090205460ff166132ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c6964206d69677261746f72206164647265737300000000000000006044820152606401610b40565b33600090815260216020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6133116000611af6565b60095442111561332557613323614952565b565b600061332f613386565b6015819055905061333e614b98565b600a5550565b6000610a9a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614ba6565b6000601a54600014806133995750601b54155b156133a5575060155490565b6111046133d8601b54610a8e6133b96127a8565b6110fe6133c461135c565b6110fe600a546133d2614b98565b906133e1565b601554906134d8565b6000610a9a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614bf7565b60008261343257506000610d47565b600061343e8385615a93565b90508261344b85836159c7565b14610a9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60448201527f77000000000000000000000000000000000000000000000000000000000000006064820152608401610b40565b6000806134e583856158d3565b905083811015610a9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610b40565b84600161355e8282614c42565b6023546301000000900460ff16158061358b5750336000908152601f602052604090205460ff1615156001145b6135f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5374616b696e6720706175736564206f7220696e206d6967726174696f6e00006044820152606401610b40565b73ffffffffffffffffffffffffffffffffffffffff871660009081526022602052604090205460ff1615613681576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4164647265737320686173206265656e20677265796c697374656400000000006044820152606401610b40565b600f548410156136ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d696e696d756d207374616b652074696d65206e6f74206d65740000000000006044820152606401610b40565b600e54841115613759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f547279696e6720746f206c6f636b20666f7220746f6f206c6f6e6700000000006044820152606401610b40565b6000806000613769886001614d64565b93509350935050600061377b88610cf4565b9050601e60008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060e001604052808b81526020018681526020018981526020016137ec8b8b6134d890919063ffffffff16565b8152602080820194909452600286810b60408084019190915286820b6060938401528454600180820187556000968752958790208551600692830290910190815596850151958701959095558381015186830155918301516003860155608083015160048087019190915560a08401516005909601805460c090950151830b62ffffff9081166301000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000009096169790930b929092169590951792909217909155905490517f42842e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c811693820193909352306024820152604481018b90529116906342842e0e90606401600060405180830381600087803b15801561392857600080fd5b505af115801561393c573d6000803e3d6000fd5b5050601a5461394e92509050846134d8565b601a5573ffffffffffffffffffffffffffffffffffffffff8a166000908152601c602052604090205461398190846134d8565b73ffffffffffffffffffffffffffffffffffffffff8b166000908152601c60205260408120919091556139b5908b90614c42565b60408051848152602081018a905290810188905273ffffffffffffffffffffffffffffffffffffffff8a811660608301528b16907f31784953dbbbbfd278bcb87e70e78b0979b28f456dec0e601b24aa9a2727d1ce9060800160405180910390a250505050505050505050565b613a2c8383613f2b565b50613a736040518060e001604052806000815260200160008152602001600081526020016000815260200160008152602001600060020b8152602001600060020b81525090565b600060208201819052805b73ffffffffffffffffffffffffffffffffffffffff86166000908152601e6020526040902054811015613c0f5773ffffffffffffffffffffffffffffffffffffffff86166000908152601e60205260409020805482908110613b09577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906006020160000154841415613bfd5773ffffffffffffffffffffffffffffffffffffffff86166000908152601e60205260409020805482908110613b80577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020918290206040805160e08101825260069093029091018054835260018101549383019390935260028084015491830191909152600383015460608301526004830154608083015260059092015480830b830b830b60a083015263010000009004820b820b90910b60c08201529250905080613c0f565b80613c0781615c08565b915050613a7e565b5081518314613c7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f546f6b656e204944206e6f7420666f756e6400000000000000000000000000006044820152606401610b40565b816060015142101580613c9a575060235462010000900460ff1615156001145b80613cb95750336000908152601f602052604090205460ff1615156001145b613d1f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f5374616b65206973207374696c6c206c6f636b656421000000000000000000006044820152606401610b40565b60208201518015613f2357601a54613d3790826133e1565b601a5573ffffffffffffffffffffffffffffffffffffffff86166000908152601c6020526040902054613d6a90826133e1565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601c6020908152604080832093909355601e905220805483908110613dd4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000918252602082206006909102018181556001810182905560028101829055600381018290556004810182905560050180547fffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000169055613e36908790614c42565b6006546040517f42842e0e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff878116602483015260448201879052909116906342842e0e90606401600060405180830381600087803b158015613eb057600080fd5b505af1158015613ec4573d6000803e3d6000fd5b5050604080518481526020810188905273ffffffffffffffffffffffffffffffffffffffff898116828401529151918a1693507f88ac64fdaa180cbd77b625cbb795a39a7b7d1b3b478d09f28f6bb89ee0fa1e51925081900360600190a25b505050505050565b6000826001613f3a8282614c42565b73ffffffffffffffffffffffffffffffffffffffff85166000908152601760205260409020549250821561428b5773ffffffffffffffffffffffffffffffffffffffff808616600090815260176020526040812055600454613f9e91168585614293565b600080613fe76040518060e001604052806000815260200160008152602001600081526020016000815260200160008152602001600060020b8152602001600060020b81525090565b60005b73ffffffffffffffffffffffffffffffffffffffff89166000908152601e60205260409020548110156142195773ffffffffffffffffffffffffffffffffffffffff89166000908152601e60205260409020805482908110614075577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020918290206040805160e081018252600690930290910180548084526001820154948401949094526002808201549284019290925260038101546060840152600481015460808401526005015480820b820b820b60a084015263010000009004810b810b900b60c082015292501561420757604080516080810182528351815273ffffffffffffffffffffffffffffffffffffffff8a8116602083019081526fffffffffffffffffffffffffffffffff8385018181526060850182815260065496517ffc6f7865000000000000000000000000000000000000000000000000000000008152865160048201529351851660248501529051821660448401525116606482015291926000928392919091169063fc6f7865906084016040805180830381600087803b1580156141ae57600080fd5b505af11580156141c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141e691906155cc565b90925090506141f587836134d8565b965061420186826134d8565b95505050505b8061421181615c08565b915050613fea565b50600454604080518881526020810186905290810184905273ffffffffffffffffffffffffffffffffffffffff91821660608201528882166080820152908916907f96ad88e4f6444f9224c830f0448b73c991f51cce39424918e9cef4a691e02b489060a00160405180910390a25050505b505092915050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052915160009283929087169161432a919061571d565b6000604051808303816000865af19150503d8060008114614367576040519150601f19603f3d011682016040523d82523d6000602084013e61436c565b606091505b509150915081801561439657508051158061439657508080602001905181019061439691906154e6565b6143fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c4544006044820152606401610b40565b5050505050565b60008060008360020b1261441a578260020b614427565b8260020b61442790615c92565b90506144527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff27618615c55565b60020b8113156144be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f54000000000000000000000000000000000000000000000000000000000000006044820152606401610b40565b6000600182166144df577001000000000000000000000000000000006144f1565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff169050600282161561453057608061452b826ffff97272373d413259a46990580e213a615a93565b901c90505b600482161561455a576080614555826ffff2e50f5f656932ef12357cf3c7fdcc615a93565b901c90505b600882161561458457608061457f826fffe5caca7e10e4e61c3624eaa0941cd0615a93565b901c90505b60108216156145ae5760806145a9826fffcb9843d60f6159c9db58835c926644615a93565b901c90505b60208216156145d85760806145d3826fff973b41fa98c081472e6896dfb254c0615a93565b901c90505b60408216156146025760806145fd826fff2ea16466c96a3843ec78b326b52861615a93565b901c90505b608082161561462c576080614627826ffe5dee046a99a2a811c461f1969c3053615a93565b901c90505b610100821615614657576080614652826ffcbe86c7900a88aedcffc83b479aa3a4615a93565b901c90505b61020082161561468257608061467d826ff987a7253ac413176f2b074cf7815e54615a93565b901c90505b6104008216156146ad5760806146a8826ff3392b0822b70005940c7a398e4b70f3615a93565b901c90505b6108008216156146d85760806146d3826fe7159475a2c29b7443b29c7fa6e889d9615a93565b901c90505b6110008216156147035760806146fe826fd097f3bdfd2022b8845ad8f792aa5825615a93565b901c90505b61200082161561472e576080614729826fa9f746462d870fdf8a65dc1f90e061e5615a93565b901c90505b614000821615614759576080614754826f70d869a156d2a1b890bb3df62baf32f7615a93565b901c90505b61800082161561478457608061477f826f31be135f97d08fd981231505542fcfa6615a93565b901c90505b620100008216156147b05760806147ab826f09aa508b5b7a84e1c677de54f3e99bc9615a93565b901c90505b620200008216156147db5760806147d6826e5d6af8dedb81196699c329225ee604615a93565b901c90505b62040000821615614805576080614800826d2216e584f5fa1ea926041bedfe98615a93565b901c90505b6208000082161561482d576080614828826b048a170391f7dc42444e8fa2615a93565b901c90505b60008460020b131561486657614863817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6159c7565b90505b61487564010000000082615c41565b15614881576001614884565b60005b61134b9060ff16602083901c6158d3565b60008273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1611156148cf579192915b73ffffffffffffffffffffffffffffffffffffffff84166149487bffffffffffffffffffffffffffffffff000000000000000000000000606085901b166149168787615b90565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16614f9d565b61134b91906159c7565b60095442116149bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f506572696f6420686173206e6f742065787069726564207965742100000000006044820152606401610b40565b6000600c546149d7600954426133e190919063ffffffff16565b6149e191906159c7565b600480546040517f70a08231000000000000000000000000000000000000000000000000000000008152309281019290925291925060009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015614a5157600080fd5b505afa158015614a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a899190615564565b905080614aa8614a9a8460016158d3565b6110fe600c546110fe61135c565b1115614b10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4e6f7420656e6f7567682046585320617661696c61626c6500000000000000006044820152606401610b40565b600c54614b2f90614b26906110fe8560016134d8565b600954906134d8565b6009556000614b3c613386565b60158190559050614b4b614b98565b600a5560065460405173ffffffffffffffffffffffffffffffffffffffff90911681527f6f2b3b3aaf1881d69a5d40565500f93ea73df36e7b6a29bf48b21479a9237fe99060200161199e565b60006111044260095461515e565b60008183614be1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b40919061580f565b506000614bee84866159c7565b95945050505050565b60008184841115614c35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b40919061580f565b506000614bee8486615bc5565b8015614c5057614c50613307565b73ffffffffffffffffffffffffffffffffffffffff821615611746576000806000614c7a8561222c565b925092509250614c8985615174565b73ffffffffffffffffffffffffffffffffffffffff85166000908152601260205260409020829055828110614d0d576000614cc482856133e1565b601b54909150614cd490826134d8565b601b55614ce184826134d8565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601d6020526040902055506143fc565b6000614d1984836133e1565b601b54909150614d2990826133e1565b601b55614d3684826133e1565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601d6020526040902055505050505050565b600080600080600080600080600080600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166399fbab888d6040518263ffffffff1660e01b8152600401614dd091815260200190565b6101806040518083038186803b158015614de957600080fd5b505afa158015614dfd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614e21919061563e565b505050506fffffffffffffffffffffffffffffffff169750975097509750975097505050600099508098506013600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16148015614ec3575060145473ffffffffffffffffffffffffffffffffffffffff8681169116145b8015614ee5575060135462ffffff858116690100000000000000000090920416145b8015614efb5750601354600284810b91810b900b145b8015614f185750601354600283810b6301000000909204810b900b145b15614f265760019950614f8e565b8a15614f8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f57726f6e6720746f6b656e2063686172616374657269737469637300000000006044820152606401610b40565b50979a96995097505050505050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8587098587029250828110838203039150508060001415614ff55760008411614fea57600080fd5b508290049050610a9a565b80841161500157600080fd5b600084868809808403938111909203919050600085615040817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff615bc5565b61504b9060016158d3565b1695869004959384900493600081900304600101905061506b8184615a93565b90931792600061507c876003615a93565b600218905061508b8188615a93565b615096906002615bc5565b6150a09082615a93565b90506150ac8188615a93565b6150b7906002615bc5565b6150c19082615a93565b90506150cd8188615a93565b6150d8906002615bc5565b6150e29082615a93565b90506150ee8188615a93565b6150f9906002615bc5565b6151039082615a93565b905061510f8188615a93565b61511a906002615bc5565b6151249082615a93565b90506151308188615a93565b61513b906002615bc5565b6151459082615a93565b90506151518186615a93565b9998505050505050505050565b600081831061516d5781610a9a565b5090919050565b73ffffffffffffffffffffffffffffffffffffffff811615611c7d57600061519b82610a01565b73ffffffffffffffffffffffffffffffffffffffff83166000908152601760209081526040808320939093556015546016909152919020555050565b80516151e281615d55565b919050565b600082601f8301126151f7578081fd5b8151602061520c615207836158af565b615860565b80838252828201915082860187848660051b890101111561522b578586fd5b855b8581101561525257815161524081615d55565b8452928401929084019060010161522d565b5090979650505050505050565b8051600281900b81146151e257600080fd5b80516fffffffffffffffffffffffffffffffff811681146151e257600080fd5b805162ffffff811681146151e257600080fd5b6000602082840312156152b5578081fd5b8135610a9a81615d55565b600080600080608085870312156152d5578283fd5b84356152e081615d55565b93506020858101356152f181615d55565b935060408601359250606086013567ffffffffffffffff80821115615314578384fd5b818801915088601f830112615327578384fd5b81358181111561533957615339615d26565b615369847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601615860565b9150808252898482850101111561537e578485fd5b8084840185840137810190920192909252939692955090935050565b600080604083850312156153ac578182fd5b82356153b781615d55565b946020939093013593505050565b600080600080608085870312156153da578384fd5b84356153e581615d55565b966020860135965060408601359560600135945092505050565b60008060408385031215615411578182fd5b825167ffffffffffffffff80821115615428578384fd5b818501915085601f83011261543b578384fd5b8151602061544b615207836158af565b8083825282820191508286018a848660051b890101111561546a578889fd5b8896505b8487101561549a5780518060060b811461548657898afd5b83526001969096019591830191830161546e565b50918801519196509093505050808211156154b3578283fd5b506154c0858286016151e7565b9150509250929050565b6000602082840312156154db578081fd5b8135610a9a81615d77565b6000602082840312156154f7578081fd5b8151610a9a81615d77565b600080600060608486031215615516578081fd5b833561552181615d77565b9250602084013561553181615d77565b9150604084013561554181615d77565b809150509250925092565b60006020828403121561555d578081fd5b5035919050565b600060208284031215615575578081fd5b5051919050565b6000806040838503121561558e578182fd5b8235915060208301356155a081615d77565b809150509250929050565b600080604083850312156155bd578182fd5b50508035926020909101359150565b600080604083850312156155de578182fd5b505080516020909101519092909150565b600080600060608486031215615603578081fd5b505081359360208301359350604090920135919050565b60006020828403121561562b578081fd5b813563ffffffff81168114610a9a578182fd5b6000806000806000806000806000806000806101808d8f03121561566057898afd5b8c516bffffffffffffffffffffffff8116811461567b578a8bfd5b9b5061568960208e016151d7565b9a5061569760408e016151d7565b99506156a560608e016151d7565b98506156b360808e01615291565b97506156c160a08e0161525f565b96506156cf60c08e0161525f565b95506156dd60e08e01615271565b94506101008d015193506101208d015192506156fc6101408e01615271565b915061570b6101608e01615271565b90509295989b509295989b509295989b565b6000825161572f818460208701615bdc565b9190910192915050565b602080825282518282018190526000919060409081850190868401855b828110156157b85781518051855286810151878601528581015186860152606080820151908601526080808201519086015260a080820151600290810b9187019190915260c091820151900b9085015260e09093019290850190600101615756565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561580357835163ffffffff16835292840192918401916001016157e1565b50909695505050505050565b602081526000825180602084015261582e816040850160208701615bdc565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156158a7576158a7615d26565b604052919050565b600067ffffffffffffffff8211156158c9576158c9615d26565b5060051b60200190565b600082198211156158e6576158e6615cc8565b500190565b6000826158fa576158fa615cf7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561594e5761594e615cc8565b500590565b60008160060b8360060b8061596a5761596a615cf7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81147fffffffffffffffffffffffffffffffffffffffffffffffffff80000000000000831416156159be576159be615cc8565b90059392505050565b6000826159d6576159d6615cf7565b500490565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81841382841385830485118282161615615a1a57615a1a615cc8565b7f800000000000000000000000000000000000000000000000000000000000000084871286820588128184161615615a5457615a54615cc8565b858712925087820587128484161615615a6f57615a6f615cc8565b87850587128184161615615a8557615a85615cc8565b505050929093029392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615acb57615acb615cc8565b500290565b60008160020b8360020b828112817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80000001831281151615615b1257615b12615cc8565b81627fffff018313811615615b2957615b29615cc8565b5090039392505050565b60008160060b8360060b828112817fffffffffffffffffffffffffffffffffffffffffffffffffff8000000000000001831281151615615b7557615b75615cc8565b81667fffffffffffff018313811615615b2957615b29615cc8565b600073ffffffffffffffffffffffffffffffffffffffff83811690831681811015615bbd57615bbd615cc8565b039392505050565b600082821015615bd757615bd7615cc8565b500390565b60005b83811015615bf7578181015183820152602001615bdf565b838111156112425750506000910152565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615c3a57615c3a615cc8565b5060010190565b600082615c5057615c50615cf7565b500690565b60008160020b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff800000811415615c8b57615c8b615cc8565b9003919050565b60007f8000000000000000000000000000000000000000000000000000000000000000821415615cc457615cc4615cc8565b0390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114611c7d57600080fd5b8015158114611c7d57600080fdfea2646970667358221220ecd0e0c0ec87686ff17fb765e0b7ed2a3612c98f3c6ba242e3b51e3af5125fbd64736f6c63430008040033000000000000000000000000ff5b4bcbf765fe363269114e1c765229a29edefd0000000000000000000000003432b6a60d23ca0dfca7761b7ab56459d9c964d0000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88000000000000000000000000c63b0708e2f7e69cb8a1df0e1389a98c35a76d520000000000000000000000008412ebf45bac1b340bbe8f318b928c466c4e39ca000000000000000000000000c8418af6358ffdda74e09ca9cc3fe03ca6adc5b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000853d955acef822db058eb8505911ed77f175b99e000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc864fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc8d2fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc89b

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103e95760003560e01c8063847370291161021a578063bf20e71e11610135578063e01f62bf116100c8578063f288baf611610097578063fce6fd131161007c578063fce6fd13146109b7578063fe082ada146109c9578063fff6cae9146109f957600080fd5b8063f288baf6146109a5578063f2a8d349146109ae57600080fd5b8063e01f62bf1461096d578063e1ba95d214610975578063e9f2838e1461097d578063f12f14471461099257600080fd5b8063d77258b311610104578063d77258b3146108fb578063d9f96e8d14610904578063da0f2ec01461093a578063dc6663c71461094d57600080fd5b8063bf20e71e146108c4578063cc2abd64146108cc578063cdc82e80146108df578063d42fc9b4146108e857600080fd5b806396f66e6d116101ad578063b3def2f51161017c578063b3def2f51461088c578063b94c4dcb14610894578063bbb781cc1461089d578063bdacb303146108b157600080fd5b806396f66e6d146108275780639c5303eb146108345780639f43ae0914610847578063a2217bc51461088457600080fd5b806392ad4159116101e957806392ad4159146107cd5780639393bb7f146107ed578063941d9f65146108015780639637927f1461081457600080fd5b806384737029146107595780638980f11f1461076c5780638bad86a71461077f5780638da5cb5b146107ad57600080fd5b8063377be6511161030a5780635ea1e6781161029d5780636e27cef91161026c5780636e27cef91461072257806379ba50971461072b578063807c48da14610733578063819d4cc61461074657600080fd5b80635ea1e678146106d057806360153c4d146106dd57806364f2c060146107075780636ce46bc31461070f57600080fd5b806352732bc8116102d957806352732bc81461060657806353a47bb71461066d578063575959bf1461068d5780635e415e69146106a057600080fd5b8063377be6511461059d578063386a9525146105e25780633d18b912146105eb5780634fd2b536146105f357600080fd5b80631b3e870a116103825780632ca1a895116103515780632ca1a89514610526578063323331ca1461052e57806332d342b71461055457806336f89af21461056757600080fd5b80631b3e870a146104e55780631c1f78eb146104f857806328ef934e146105005780632c0c2a0a1461051357600080fd5b8063150b7a02116103be578063150b7a021461044f5780631627540c146104b7578063169d27ef146104ca57806317b18c89146104d257600080fd5b80628cc262146103ee57806291d2b814610414578063049074f3146104295780630d7bac4f1461043c575b600080fd5b6104016103fc3660046152a4565b610a01565b6040519081526020015b60405180910390f35b6104276104223660046152a4565b610aa1565b005b61042761043736600461561a565b610b90565b61040161044a36600461554c565b610cf4565b61048661045d3660046152c0565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161040b565b6104276104c53660046152a4565b610d4d565b610427610e6d565b6104276104e03660046155ab565b610f79565b6104276104f33660046152a4565b610fff565b6104016110ee565b61042761050e3660046153c5565b611109565b6104016105213660046152a4565b611248565b61040161135c565b6023546105449065010000000000900460ff1681565b604051901515815260200161040b565b61042761056236600461554c565b6113fe565b6104016105753660046152a4565b73ffffffffffffffffffffffffffffffffffffffff166000908152601d602052604090205490565b6014546105bd9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161040b565b610401600c5481565b6104016114f6565b6104016106013660046152a4565b6115f2565b6104276106143660046152a4565b33600090815260216020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6001546105bd9073ffffffffffffffffffffffffffffffffffffffff1681565b61042761069b36600461539a565b61160f565b6013546105bd906c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6023546105449060ff1681565b6013546106f4906601000000000000900460020b81565b60405160029190910b815260200161040b565b601b54610401565b61042761071d3660046155ef565b61174a565b610401600f5481565b6104276119ab565b6104276107413660046154ca565b611af6565b61042761075436600461539a565b611c80565b6104276107673660046155ab565b611e9e565b61042761077a36600461539a565b612084565b61079261078d3660046152a4565b61222c565b6040805193845260208401929092529082015260600161040b565b6000546105bd9073ffffffffffffffffffffffffffffffffffffffff1681565b6107e06107db3660046152a4565b61240d565b60405161040b9190615739565b6013546106f4906301000000900460020b81565b61042761080f3660046152a4565b6124e2565b6023546105449062010000900460ff1681565b6013546106f49060020b81565b6104276108423660046152a4565b6125d9565b60145461086f9074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff909116815260200161040b565b6104276126cb565b6104016127a8565b610401600e5481565b602354610544906301000000900460ff1681565b6104276108bf3660046152a4565b612beb565b610427612cd5565b6104276108da366004615502565b612daa565b610401600d5481565b6104016108f63660046152a4565b612eea565b610401600b5481565b6104016109123660046152a4565b73ffffffffffffffffffffffffffffffffffffffff166000908152601c602052604090205490565b61042761094836600461557c565b613088565b6008546105bd9073ffffffffffffffffffffffffffffffffffffffff1681565b601a54610401565b61042761313e565b60235461054490640100000000900460ff1681565b6104276109a03660046152a4565b61321c565b61040160115481565b61040160105481565b60235461054490610100900460ff1681565b6013546109e5906901000000000000000000900462ffffff1681565b60405162ffffff909116815260200161040b565b610427613307565b600080610a0c613386565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260176020908152604080832054601690925290912054919250610a9a91610a9490670de0b6b3a764000090610a8e90610a629087906133e1565b73ffffffffffffffffffffffffffffffffffffffff89166000908152601d602052604090205490613423565b90613344565b906134d8565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331480610ade575060085473ffffffffffffffffffffffffffffffffffffffff1633145b610b49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b000000000000000000000060448201526064015b60405180910390fd5b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480610bcd575060085473ffffffffffffffffffffffffffffffffffffffff1633145b610c33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b610e108163ffffffff161115610ca5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f5457415020746f6f206c6f6e67000000000000000000000000000000000000006044820152606401610b40565b6014805463ffffffff90921674010000000000000000000000000000000000000000027fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b600080610d36610d27600e54610a8e610d20670de0b6b3a7640000600d546133e190919063ffffffff16565b8790613423565b670de0b6b3a7640000906134d8565b9050600d54811115610d475750600d545b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610df4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e00000000000000000000000000000000006064820152608401610b40565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff16331480610eaa575060085473ffffffffffffffffffffffffffffffffffffffff1633145b610f10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b42600a819055600c54610f2391906134d8565b60095560055473ffffffffffffffffffffffffffffffffffffffff1615610f4e57610f4e6001611af6565b6040517fb5cfe3ccd03847076864f081609024cbc2eb98c38da4d8b2cebe9479a9a1ef3790600090a1565b600280541415610fe5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b40565b60028055610ff63380848442613551565b50506001600255565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061103c575060085473ffffffffffffffffffffffffffffffffffffffff1633145b6110a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b73ffffffffffffffffffffffffffffffffffffffff166000908152601f6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6000611104600c546110fe61135c565b90613423565b905090565b60235460ff610100909104161515600114611180576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420696e206d6967726174696f6e000000000000000000000000000000006044820152606401610b40565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260216020908152604080832033845290915290205460ff1680156111cf5750336000908152601f602052604090205460ff165b611235576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4d69677261746f7220696e76616c6964206f7220756e617070726f76656400006044820152606401610b40565b6112428433858585613551565b50505050565b600080611254836115f2565b90508015611353576003546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152600092611315928592610a8e92670de0b6b3a7640000929116906370a082319060240160206040518083038186803b1580156112dd57600080fd5b505afa1580156112f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fe9190615564565b9050600061133a670de0b6b3a7640000610a8e6011548561342390919063ffffffff16565b905060115481111561134b57506011545b949350505050565b50600092915050565b60055460009073ffffffffffffffffffffffffffffffffffffffff16156113f757611104670de0b6b3a7640000610a8e601854600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630a3be7576040518163ffffffff1660e01b815260040160206040518083038186803b1580156112dd57600080fd5b50600b5490565b60028054141561146a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b40565b60028055602354640100000000900460ff16156114e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5769746864726177616c732070617573656400000000000000000000000000006044820152606401610b40565b6114ee333383613a22565b506001600255565b6000600280541415611564576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b40565b6002805560235465010000000000900460ff16156115de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5265776172647320636f6c6c656374696f6e20706175736564000000000000006044820152606401610b40565b6115e83333613f2b565b9050600160025590565b6000610d47670de0b6b3a7640000610a8e6010546110fe86612eea565b60235460ff610100909104161515600114611686576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420696e206d6967726174696f6e000000000000000000000000000000006044820152606401610b40565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260216020908152604080832033845290915290205460ff1680156116d55750336000908152601f602052604090205460ff165b61173b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4d69677261746f7220696e76616c6964206f7220756e617070726f76656400006044820152606401610b40565b611746823383613a22565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff16331480611787575060085473ffffffffffffffffffffffffffffffffffffffff1633145b6117ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b670de0b6b3a7640000831015611884576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4d756c74206d757374206265203e3d204d554c5449504c4945525f505245434960448201527f53494f4e000000000000000000000000000000000000000000000000000000006064820152608401610b40565b600081116118ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f766546585320706374206d6178206d757374206265203e3d20300000000000006044820152606401610b40565b600d839055601182905560108190556040518281527fc9d56ccdd6b954d8d74700db074cc667054f8e33c1b8d23e97021d4c588a87619060200160405180910390a17f56a7f617180f6beea050b873366dccd22ab6564e9a4c921b9be53a4af4e9bcc8600d5460405161196391815260200190565b60405180910390a17fce426dd9202a2e5a80566b295160d3891cadf200ec0b6a326ce9894fe7f2603060105460405161199e91815260200190565b60405180910390a1505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611a52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e65727368697000000000000000000000006064820152608401610b40565b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff93841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b60055473ffffffffffffffffffffffffffffffffffffffff1615801590611b2557508080611b25575060195442115b15611c7d576005546040517f6472eee100000000000000000000000000000000000000000000000000000000815230600482015242602482015273ffffffffffffffffffffffffffffffffffffffff90911690636472eee190604401602060405180830381600087803b158015611b9b57600080fd5b505af1158015611baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd39190615564565b601855600554604080517f513872bd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169163513872bd91600480820192602092909190829003018186803b158015611c4157600080fd5b505afa158015611c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c799190615564565b6019555b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331480611cbd575060085473ffffffffffffffffffffffffffffffffffffffff1633145b611d23576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b602354610100900460ff16611db75760065473ffffffffffffffffffffffffffffffffffffffff83811691161415611db7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420696e206d6967726174696f6e000000000000000000000000000000006044820152606401610b40565b6000546040517f42842e0e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff918216602482015260448101839052908316906342842e0e90606401600060405180830381600087803b158015611e3157600080fd5b505af1158015611e45573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff86168152602081018590527f57519b6a0997d7d44511836bcee0a36871aa79d445816f6c464abb0cd9d3f3e893500190505b60405180910390a15050565b60005473ffffffffffffffffffffffffffffffffffffffff16331480611edb575060085473ffffffffffffffffffffffffffffffffffffffff1633145b611f41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b6001821015611fac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d756c206d61782074696d65206d757374206265203e3d2031000000000000006044820152606401610b40565b6001811015612017576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d756c206d696e2074696d65206d757374206265203e3d2031000000000000006044820152606401610b40565b600e829055600f8190556040518281527f74fa102aff6c8f2f6340638f052d9364a1c84bbe95ef31eed189e87e357551da9060200160405180910390a16040518181527f53f6493eec470b97db35629d432373ea4232ee1505f5ff961b2ece5b5d92b81390602001611e92565b60005473ffffffffffffffffffffffffffffffffffffffff163314806120c1575060085473ffffffffffffffffffffffffffffffffffffffff1633145b612127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b602354610100900460ff166121bb5760065473ffffffffffffffffffffffffffffffffffffffff838116911614156121bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420696e206d6967726174696f6e000000000000000000000000000000006044820152606401610b40565b6000546121e090839073ffffffffffffffffffffffffffffffffffffffff1683614293565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018390527f55350610fe57096d8c0ffa30beede987326bccfcb0b4415804164d0dd50ce8b19101611e92565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601d6020526040812054908061225d84611248565b73ffffffffffffffffffffffffffffffffffffffff85166000908152601260205260408120549193509061229990600290610a8e9086906134d8565b90506000915060005b73ffffffffffffffffffffffffffffffffffffffff86166000908152601e60205260409020548110156124045773ffffffffffffffffffffffffffffffffffffffff86166000908152601e6020526040812080548390811061232d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020918290206040805160e0810182526006909302909101805483526001810154938301939093526002808401549183019190915260038301546060830181905260048401546080840181905260059094015480830b830b830b60a085015263010000009004820b820b90910b60c083015290925042106123b85750670de0b6b3a76400005b602082015160006123df670de0b6b3a7640000610a8e6123d8868a6134d8565b8590613423565b90506123eb87826134d8565b96505050505080806123fc90615c08565b9150506122a2565b50509193909250565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601e60209081526040808320805482518185028101850190935280835260609492939192909184015b828210156124d75760008481526020908190206040805160e08101825260068602909201805483526001808201548486015260028083015493850193909352600382015460608501526004820154608085015260059091015480830b830b830b60a085015263010000009004820b820b90910b60c08301529083529092019101612452565b505050509050919050565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061251f575060085473ffffffffffffffffffffffffffffffffffffffff1633145b612585576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b73ffffffffffffffffffffffffffffffffffffffff16600090815260226020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480612616575060085473ffffffffffffffffffffffffffffffffffffffff1633145b61267c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b73ffffffffffffffffffffffffffffffffffffffff166000908152601f6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480612708575060085473ffffffffffffffffffffffffffffffffffffffff1633145b61276e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b602380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff81166101009182900460ff1615909102179055565b60235460009060ff16156127c35750670de0b6b3a764000090565b60408051600280825260608201835260009260208301908036833701905050905060148054906101000a900463ffffffff168160008151811061282f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019063ffffffff16908163ffffffff1681525050600081600181518110612885577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff909216602092830291909101909101526007546040517f883bdbfd00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff169063883bdbfd906128f19085906004016157c5565b60006040518083038186803b15801561290957600080fd5b505afa15801561291d573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261296391908101906153ff565b509050600060148054906101000a900463ffffffff1660030b826000815181106129b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151836001815181106129f8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151612a0a9190615b33565b612a149190615953565b601354909150600290810b810b9082900b13612a34576000935050505090565b60135463010000009004600290810b810b9082900b12612a58576000935050505090565b6000601360069054906101000a900460020b60020b8260020b13612acf57601354612a9490600281810b9166010000000000009004900b615ad0565b601354600291820b91612aa991900b84615ad0565b612abe9060020b670de0b6b3a76400006159db565b612ac891906158eb565b9050612b34565b601354612af49066010000000000008104600290810b9163010000009004900b615ad0565b60020b82601360039054906101000a900460020b612b129190615ad0565b612b279060020b670de0b6b3a76400006159db565b612b3191906158eb565b90505b6000811215612b6e57612b67817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6159db565b9450612b72565b8094505b670de0b6b3a7640000851115612be4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f456d697373696f6e20666163746f7220746f6f206869676800000000000000006044820152606401610b40565b5050505090565b60005473ffffffffffffffffffffffffffffffffffffffff16331480612c28575060085473ffffffffffffffffffffffffffffffffffffffff1633145b612c8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480612d12575060085473ffffffffffffffffffffffffffffffffffffffff1633145b612d78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b602380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480612de7575060085473ffffffffffffffffffffffffffffffffffffffff1633145b612e4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b6023805491151565010000000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff931515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff951515630100000002959095167fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffff909316929092179390931791909116179055565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101829052819060005b73ffffffffffffffffffffffffffffffffffffffff85166000908152601e602052604090205481101561307c5773ffffffffffffffffffffffffffffffffffffffff85166000908152601e60205260409020805482908110612fb2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020918290206040805160e08101825260069093029091018054835260018101549383018490526002808201549284019290925260038101546060840152600481015460808401526005015480820b820b820b60a084015263010000009004810b810b900b60c0820152925080156130695760006130388460a00151614403565b905060006130498560c00151614403565b905061306461305d83838860200151614895565b87906134d8565b955050505b508061307481615c08565b915050612f27565b5061134b826002613344565b60005473ffffffffffffffffffffffffffffffffffffffff163314806130c5575060085473ffffffffffffffffffffffffffffffffffffffff1633145b61312b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b600b829055801561174657611746613307565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061317b575060085473ffffffffffffffffffffffffffffffffffffffff1633145b6131e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610b40565b602380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff8116620100009182900460ff1615909102179055565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601f602052604090205460ff166132ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c6964206d69677261746f72206164647265737300000000000000006044820152606401610b40565b33600090815260216020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6133116000611af6565b60095442111561332557613323614952565b565b600061332f613386565b6015819055905061333e614b98565b600a5550565b6000610a9a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614ba6565b6000601a54600014806133995750601b54155b156133a5575060155490565b6111046133d8601b54610a8e6133b96127a8565b6110fe6133c461135c565b6110fe600a546133d2614b98565b906133e1565b601554906134d8565b6000610a9a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614bf7565b60008261343257506000610d47565b600061343e8385615a93565b90508261344b85836159c7565b14610a9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60448201527f77000000000000000000000000000000000000000000000000000000000000006064820152608401610b40565b6000806134e583856158d3565b905083811015610a9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610b40565b84600161355e8282614c42565b6023546301000000900460ff16158061358b5750336000908152601f602052604090205460ff1615156001145b6135f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5374616b696e6720706175736564206f7220696e206d6967726174696f6e00006044820152606401610b40565b73ffffffffffffffffffffffffffffffffffffffff871660009081526022602052604090205460ff1615613681576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4164647265737320686173206265656e20677265796c697374656400000000006044820152606401610b40565b600f548410156136ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d696e696d756d207374616b652074696d65206e6f74206d65740000000000006044820152606401610b40565b600e54841115613759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f547279696e6720746f206c6f636b20666f7220746f6f206c6f6e6700000000006044820152606401610b40565b6000806000613769886001614d64565b93509350935050600061377b88610cf4565b9050601e60008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060e001604052808b81526020018681526020018981526020016137ec8b8b6134d890919063ffffffff16565b8152602080820194909452600286810b60408084019190915286820b6060938401528454600180820187556000968752958790208551600692830290910190815596850151958701959095558381015186830155918301516003860155608083015160048087019190915560a08401516005909601805460c090950151830b62ffffff9081166301000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000009096169790930b929092169590951792909217909155905490517f42842e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c811693820193909352306024820152604481018b90529116906342842e0e90606401600060405180830381600087803b15801561392857600080fd5b505af115801561393c573d6000803e3d6000fd5b5050601a5461394e92509050846134d8565b601a5573ffffffffffffffffffffffffffffffffffffffff8a166000908152601c602052604090205461398190846134d8565b73ffffffffffffffffffffffffffffffffffffffff8b166000908152601c60205260408120919091556139b5908b90614c42565b60408051848152602081018a905290810188905273ffffffffffffffffffffffffffffffffffffffff8a811660608301528b16907f31784953dbbbbfd278bcb87e70e78b0979b28f456dec0e601b24aa9a2727d1ce9060800160405180910390a250505050505050505050565b613a2c8383613f2b565b50613a736040518060e001604052806000815260200160008152602001600081526020016000815260200160008152602001600060020b8152602001600060020b81525090565b600060208201819052805b73ffffffffffffffffffffffffffffffffffffffff86166000908152601e6020526040902054811015613c0f5773ffffffffffffffffffffffffffffffffffffffff86166000908152601e60205260409020805482908110613b09577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906006020160000154841415613bfd5773ffffffffffffffffffffffffffffffffffffffff86166000908152601e60205260409020805482908110613b80577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020918290206040805160e08101825260069093029091018054835260018101549383019390935260028084015491830191909152600383015460608301526004830154608083015260059092015480830b830b830b60a083015263010000009004820b820b90910b60c08201529250905080613c0f565b80613c0781615c08565b915050613a7e565b5081518314613c7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f546f6b656e204944206e6f7420666f756e6400000000000000000000000000006044820152606401610b40565b816060015142101580613c9a575060235462010000900460ff1615156001145b80613cb95750336000908152601f602052604090205460ff1615156001145b613d1f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f5374616b65206973207374696c6c206c6f636b656421000000000000000000006044820152606401610b40565b60208201518015613f2357601a54613d3790826133e1565b601a5573ffffffffffffffffffffffffffffffffffffffff86166000908152601c6020526040902054613d6a90826133e1565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601c6020908152604080832093909355601e905220805483908110613dd4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000918252602082206006909102018181556001810182905560028101829055600381018290556004810182905560050180547fffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000169055613e36908790614c42565b6006546040517f42842e0e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff878116602483015260448201879052909116906342842e0e90606401600060405180830381600087803b158015613eb057600080fd5b505af1158015613ec4573d6000803e3d6000fd5b5050604080518481526020810188905273ffffffffffffffffffffffffffffffffffffffff898116828401529151918a1693507f88ac64fdaa180cbd77b625cbb795a39a7b7d1b3b478d09f28f6bb89ee0fa1e51925081900360600190a25b505050505050565b6000826001613f3a8282614c42565b73ffffffffffffffffffffffffffffffffffffffff85166000908152601760205260409020549250821561428b5773ffffffffffffffffffffffffffffffffffffffff808616600090815260176020526040812055600454613f9e91168585614293565b600080613fe76040518060e001604052806000815260200160008152602001600081526020016000815260200160008152602001600060020b8152602001600060020b81525090565b60005b73ffffffffffffffffffffffffffffffffffffffff89166000908152601e60205260409020548110156142195773ffffffffffffffffffffffffffffffffffffffff89166000908152601e60205260409020805482908110614075577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020918290206040805160e081018252600690930290910180548084526001820154948401949094526002808201549284019290925260038101546060840152600481015460808401526005015480820b820b820b60a084015263010000009004810b810b900b60c082015292501561420757604080516080810182528351815273ffffffffffffffffffffffffffffffffffffffff8a8116602083019081526fffffffffffffffffffffffffffffffff8385018181526060850182815260065496517ffc6f7865000000000000000000000000000000000000000000000000000000008152865160048201529351851660248501529051821660448401525116606482015291926000928392919091169063fc6f7865906084016040805180830381600087803b1580156141ae57600080fd5b505af11580156141c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141e691906155cc565b90925090506141f587836134d8565b965061420186826134d8565b95505050505b8061421181615c08565b915050613fea565b50600454604080518881526020810186905290810184905273ffffffffffffffffffffffffffffffffffffffff91821660608201528882166080820152908916907f96ad88e4f6444f9224c830f0448b73c991f51cce39424918e9cef4a691e02b489060a00160405180910390a25050505b505092915050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052915160009283929087169161432a919061571d565b6000604051808303816000865af19150503d8060008114614367576040519150601f19603f3d011682016040523d82523d6000602084013e61436c565b606091505b509150915081801561439657508051158061439657508080602001905181019061439691906154e6565b6143fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c4544006044820152606401610b40565b5050505050565b60008060008360020b1261441a578260020b614427565b8260020b61442790615c92565b90506144527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff27618615c55565b60020b8113156144be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f54000000000000000000000000000000000000000000000000000000000000006044820152606401610b40565b6000600182166144df577001000000000000000000000000000000006144f1565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff169050600282161561453057608061452b826ffff97272373d413259a46990580e213a615a93565b901c90505b600482161561455a576080614555826ffff2e50f5f656932ef12357cf3c7fdcc615a93565b901c90505b600882161561458457608061457f826fffe5caca7e10e4e61c3624eaa0941cd0615a93565b901c90505b60108216156145ae5760806145a9826fffcb9843d60f6159c9db58835c926644615a93565b901c90505b60208216156145d85760806145d3826fff973b41fa98c081472e6896dfb254c0615a93565b901c90505b60408216156146025760806145fd826fff2ea16466c96a3843ec78b326b52861615a93565b901c90505b608082161561462c576080614627826ffe5dee046a99a2a811c461f1969c3053615a93565b901c90505b610100821615614657576080614652826ffcbe86c7900a88aedcffc83b479aa3a4615a93565b901c90505b61020082161561468257608061467d826ff987a7253ac413176f2b074cf7815e54615a93565b901c90505b6104008216156146ad5760806146a8826ff3392b0822b70005940c7a398e4b70f3615a93565b901c90505b6108008216156146d85760806146d3826fe7159475a2c29b7443b29c7fa6e889d9615a93565b901c90505b6110008216156147035760806146fe826fd097f3bdfd2022b8845ad8f792aa5825615a93565b901c90505b61200082161561472e576080614729826fa9f746462d870fdf8a65dc1f90e061e5615a93565b901c90505b614000821615614759576080614754826f70d869a156d2a1b890bb3df62baf32f7615a93565b901c90505b61800082161561478457608061477f826f31be135f97d08fd981231505542fcfa6615a93565b901c90505b620100008216156147b05760806147ab826f09aa508b5b7a84e1c677de54f3e99bc9615a93565b901c90505b620200008216156147db5760806147d6826e5d6af8dedb81196699c329225ee604615a93565b901c90505b62040000821615614805576080614800826d2216e584f5fa1ea926041bedfe98615a93565b901c90505b6208000082161561482d576080614828826b048a170391f7dc42444e8fa2615a93565b901c90505b60008460020b131561486657614863817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6159c7565b90505b61487564010000000082615c41565b15614881576001614884565b60005b61134b9060ff16602083901c6158d3565b60008273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1611156148cf579192915b73ffffffffffffffffffffffffffffffffffffffff84166149487bffffffffffffffffffffffffffffffff000000000000000000000000606085901b166149168787615b90565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16614f9d565b61134b91906159c7565b60095442116149bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f506572696f6420686173206e6f742065787069726564207965742100000000006044820152606401610b40565b6000600c546149d7600954426133e190919063ffffffff16565b6149e191906159c7565b600480546040517f70a08231000000000000000000000000000000000000000000000000000000008152309281019290925291925060009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015614a5157600080fd5b505afa158015614a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a899190615564565b905080614aa8614a9a8460016158d3565b6110fe600c546110fe61135c565b1115614b10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4e6f7420656e6f7567682046585320617661696c61626c6500000000000000006044820152606401610b40565b600c54614b2f90614b26906110fe8560016134d8565b600954906134d8565b6009556000614b3c613386565b60158190559050614b4b614b98565b600a5560065460405173ffffffffffffffffffffffffffffffffffffffff90911681527f6f2b3b3aaf1881d69a5d40565500f93ea73df36e7b6a29bf48b21479a9237fe99060200161199e565b60006111044260095461515e565b60008183614be1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b40919061580f565b506000614bee84866159c7565b95945050505050565b60008184841115614c35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b40919061580f565b506000614bee8486615bc5565b8015614c5057614c50613307565b73ffffffffffffffffffffffffffffffffffffffff821615611746576000806000614c7a8561222c565b925092509250614c8985615174565b73ffffffffffffffffffffffffffffffffffffffff85166000908152601260205260409020829055828110614d0d576000614cc482856133e1565b601b54909150614cd490826134d8565b601b55614ce184826134d8565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601d6020526040902055506143fc565b6000614d1984836133e1565b601b54909150614d2990826133e1565b601b55614d3684826133e1565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601d6020526040902055505050505050565b600080600080600080600080600080600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166399fbab888d6040518263ffffffff1660e01b8152600401614dd091815260200190565b6101806040518083038186803b158015614de957600080fd5b505afa158015614dfd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614e21919061563e565b505050506fffffffffffffffffffffffffffffffff169750975097509750975097505050600099508098506013600c9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16148015614ec3575060145473ffffffffffffffffffffffffffffffffffffffff8681169116145b8015614ee5575060135462ffffff858116690100000000000000000090920416145b8015614efb5750601354600284810b91810b900b145b8015614f185750601354600283810b6301000000909204810b900b145b15614f265760019950614f8e565b8a15614f8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f57726f6e6720746f6b656e2063686172616374657269737469637300000000006044820152606401610b40565b50979a96995097505050505050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8587098587029250828110838203039150508060001415614ff55760008411614fea57600080fd5b508290049050610a9a565b80841161500157600080fd5b600084868809808403938111909203919050600085615040817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff615bc5565b61504b9060016158d3565b1695869004959384900493600081900304600101905061506b8184615a93565b90931792600061507c876003615a93565b600218905061508b8188615a93565b615096906002615bc5565b6150a09082615a93565b90506150ac8188615a93565b6150b7906002615bc5565b6150c19082615a93565b90506150cd8188615a93565b6150d8906002615bc5565b6150e29082615a93565b90506150ee8188615a93565b6150f9906002615bc5565b6151039082615a93565b905061510f8188615a93565b61511a906002615bc5565b6151249082615a93565b90506151308188615a93565b61513b906002615bc5565b6151459082615a93565b90506151518186615a93565b9998505050505050505050565b600081831061516d5781610a9a565b5090919050565b73ffffffffffffffffffffffffffffffffffffffff811615611c7d57600061519b82610a01565b73ffffffffffffffffffffffffffffffffffffffff83166000908152601760209081526040808320939093556015546016909152919020555050565b80516151e281615d55565b919050565b600082601f8301126151f7578081fd5b8151602061520c615207836158af565b615860565b80838252828201915082860187848660051b890101111561522b578586fd5b855b8581101561525257815161524081615d55565b8452928401929084019060010161522d565b5090979650505050505050565b8051600281900b81146151e257600080fd5b80516fffffffffffffffffffffffffffffffff811681146151e257600080fd5b805162ffffff811681146151e257600080fd5b6000602082840312156152b5578081fd5b8135610a9a81615d55565b600080600080608085870312156152d5578283fd5b84356152e081615d55565b93506020858101356152f181615d55565b935060408601359250606086013567ffffffffffffffff80821115615314578384fd5b818801915088601f830112615327578384fd5b81358181111561533957615339615d26565b615369847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601615860565b9150808252898482850101111561537e578485fd5b8084840185840137810190920192909252939692955090935050565b600080604083850312156153ac578182fd5b82356153b781615d55565b946020939093013593505050565b600080600080608085870312156153da578384fd5b84356153e581615d55565b966020860135965060408601359560600135945092505050565b60008060408385031215615411578182fd5b825167ffffffffffffffff80821115615428578384fd5b818501915085601f83011261543b578384fd5b8151602061544b615207836158af565b8083825282820191508286018a848660051b890101111561546a578889fd5b8896505b8487101561549a5780518060060b811461548657898afd5b83526001969096019591830191830161546e565b50918801519196509093505050808211156154b3578283fd5b506154c0858286016151e7565b9150509250929050565b6000602082840312156154db578081fd5b8135610a9a81615d77565b6000602082840312156154f7578081fd5b8151610a9a81615d77565b600080600060608486031215615516578081fd5b833561552181615d77565b9250602084013561553181615d77565b9150604084013561554181615d77565b809150509250925092565b60006020828403121561555d578081fd5b5035919050565b600060208284031215615575578081fd5b5051919050565b6000806040838503121561558e578182fd5b8235915060208301356155a081615d77565b809150509250929050565b600080604083850312156155bd578182fd5b50508035926020909101359150565b600080604083850312156155de578182fd5b505080516020909101519092909150565b600080600060608486031215615603578081fd5b505081359360208301359350604090920135919050565b60006020828403121561562b578081fd5b813563ffffffff81168114610a9a578182fd5b6000806000806000806000806000806000806101808d8f03121561566057898afd5b8c516bffffffffffffffffffffffff8116811461567b578a8bfd5b9b5061568960208e016151d7565b9a5061569760408e016151d7565b99506156a560608e016151d7565b98506156b360808e01615291565b97506156c160a08e0161525f565b96506156cf60c08e0161525f565b95506156dd60e08e01615271565b94506101008d015193506101208d015192506156fc6101408e01615271565b915061570b6101608e01615271565b90509295989b509295989b509295989b565b6000825161572f818460208701615bdc565b9190910192915050565b602080825282518282018190526000919060409081850190868401855b828110156157b85781518051855286810151878601528581015186860152606080820151908601526080808201519086015260a080820151600290810b9187019190915260c091820151900b9085015260e09093019290850190600101615756565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561580357835163ffffffff16835292840192918401916001016157e1565b50909695505050505050565b602081526000825180602084015261582e816040850160208701615bdc565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156158a7576158a7615d26565b604052919050565b600067ffffffffffffffff8211156158c9576158c9615d26565b5060051b60200190565b600082198211156158e6576158e6615cc8565b500190565b6000826158fa576158fa615cf7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561594e5761594e615cc8565b500590565b60008160060b8360060b8061596a5761596a615cf7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81147fffffffffffffffffffffffffffffffffffffffffffffffffff80000000000000831416156159be576159be615cc8565b90059392505050565b6000826159d6576159d6615cf7565b500490565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81841382841385830485118282161615615a1a57615a1a615cc8565b7f800000000000000000000000000000000000000000000000000000000000000084871286820588128184161615615a5457615a54615cc8565b858712925087820587128484161615615a6f57615a6f615cc8565b87850587128184161615615a8557615a85615cc8565b505050929093029392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615acb57615acb615cc8565b500290565b60008160020b8360020b828112817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80000001831281151615615b1257615b12615cc8565b81627fffff018313811615615b2957615b29615cc8565b5090039392505050565b60008160060b8360060b828112817fffffffffffffffffffffffffffffffffffffffffffffffffff8000000000000001831281151615615b7557615b75615cc8565b81667fffffffffffff018313811615615b2957615b29615cc8565b600073ffffffffffffffffffffffffffffffffffffffff83811690831681811015615bbd57615bbd615cc8565b039392505050565b600082821015615bd757615bd7615cc8565b500390565b60005b83811015615bf7578181015183820152602001615bdf565b838111156112425750506000910152565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615c3a57615c3a615cc8565b5060010190565b600082615c5057615c50615cf7565b500690565b60008160020b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff800000811415615c8b57615c8b615cc8565b9003919050565b60007f8000000000000000000000000000000000000000000000000000000000000000821415615cc457615cc4615cc8565b0390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114611c7d57600080fd5b8015158114611c7d57600080fdfea2646970667358221220ecd0e0c0ec87686ff17fb765e0b7ed2a3612c98f3c6ba242e3b51e3af5125fbd64736f6c63430008040033

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

000000000000000000000000ff5b4bcbf765fe363269114e1c765229a29edefd0000000000000000000000003432b6a60d23ca0dfca7761b7ab56459d9c964d0000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88000000000000000000000000c63b0708e2f7e69cb8a1df0e1389a98c35a76d520000000000000000000000008412ebf45bac1b340bbe8f318b928c466c4e39ca000000000000000000000000c8418af6358ffdda74e09ca9cc3fe03ca6adc5b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000853d955acef822db058eb8505911ed77f175b99e000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc864fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc8d2fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc89b

-----Decoded View---------------
Arg [0] : _owner (address): 0xfF5B4BCbf765FE363269114e1c765229a29eDeFD
Arg [1] : _rewardsToken0 (address): 0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0
Arg [2] : _stakingTokenNFT (address): 0xC36442b4a4522E871399CD717aBDD847Ab11FE88
Arg [3] : _lp_pool_address (address): 0xc63B0708E2F7e69CB8A1df0e1389A98C35A76D52
Arg [4] : _timelock_address (address): 0x8412ebf45bAC1B340BbE8F318b928C466c4E39CA
Arg [5] : _veFXS_address (address): 0xc8418aF6358FFddA74e09Ca9CC3Fe03Ca6aDC5b0
Arg [6] : _gauge_controller_address (address): 0x0000000000000000000000000000000000000000
Arg [7] : _uni_token0 (address): 0x853d955aCEf822Db058eb8505911ED77F175b99e
Arg [8] : _uni_token1 (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [9] : _uni_tick_lower (int24): -276380
Arg [10] : _uni_tick_upper (int24): -276270
Arg [11] : _uni_ideal_tick (int24): -276325

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 000000000000000000000000ff5b4bcbf765fe363269114e1c765229a29edefd
Arg [1] : 0000000000000000000000003432b6a60d23ca0dfca7761b7ab56459d9c964d0
Arg [2] : 000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88
Arg [3] : 000000000000000000000000c63b0708e2f7e69cb8a1df0e1389a98c35a76d52
Arg [4] : 0000000000000000000000008412ebf45bac1b340bbe8f318b928c466c4e39ca
Arg [5] : 000000000000000000000000c8418af6358ffdda74e09ca9cc3fe03ca6adc5b0
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 000000000000000000000000853d955acef822db058eb8505911ed77f175b99e
Arg [8] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [9] : fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc864
Arg [10] : fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc8d2
Arg [11] : fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc89b


Deployed Bytecode Sourcemap

144:706:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15833:332:6;;;;;;:::i;:::-;;:::i;:::-;;;25491:25:32;;;25479:2;25464:18;15833:332:6;;;;;;;;33602:179;;;;;;:::i;:::-;;:::i;:::-;;32967:295;;;;;;:::i;:::-;;:::i;7964:437::-;;;;;;:::i;:::-;;:::i;16681:188::-;;;;;;:::i;:::-;16832:30;16681:188;;;;;;;;;;13021:66:32;13009:79;;;12991:98;;12979:2;12964:18;16681:188:6;12946:149:32;387:138:26;;;;;;:::i;:::-;;:::i;31741:311:6:-;;;:::i;19372:161::-;;;;;;:::i;:::-;;:::i;28691:175::-;;;;;;:::i;:::-;;:::i;16487:122::-;;;:::i;27772:362::-;;;;;;:::i;:::-;;:::i;11462:913::-;;;;;;:::i;:::-;;:::i;16171:310::-;;;:::i;4963:35::-;;;;;;;;;;;;;;;12820:14:32;;12813:22;12795:41;;12783:2;12768:18;4963:35:6;12750:92:32;21539:197:6;;;;;;:::i;:::-;;:::i;7689:125::-;;;;;;:::i;:::-;7781:26;;7755:7;7781:26;;;:17;:26;;;;;;;7689:125;3565:25;;;;;;;;;;;;9632:42:32;9620:55;;;9602:74;;9590:2;9575:18;3565:25:6;9557:125:32;2753:39:6;;;;;;23727:198;;;:::i;11271:185::-;;;;;;:::i;:::-;;:::i;19066:180::-;;;;;;:::i;:::-;19210:10;19185:36;;;;:24;:36;;;;;;;;;:54;;;;;;;;;;19178:61;;;;;;19066:180;164:29:26;;;;;;;;;28167:303:6;;;;;;:::i;:::-;;:::i;3534:25::-;;;;;;;;;;;;4649:32;;;;;;;;;3463:23;;;;;;;;;;;;;;;13271:1:32;13260:21;;;;13242:40;;13230:2;13215:18;3463:23:6;13197:91:32;7849:109:6;7929:22;;7849:109;;30407:789;;;;;;:::i;:::-;;:::i;3015:36::-;;;;;;531:266:26;;;:::i;26777:421:6:-;;;;;;:::i;:::-;;:::i;29698:703::-;;;;;;:::i;:::-;;:::i;31202:533::-;;;;;;:::i;:::-;;:::i;28992:580::-;;;;;;:::i;:::-;;:::i;13659:1463::-;;;;;;:::i;:::-;;:::i;:::-;;;;26102:25:32;;;26158:2;26143:18;;26136:34;;;;26186:18;;;26179:34;26090:2;26075:18;13659:1463:6;26057:162:32;138:20:26;;;;;;;;;13528:125:6;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3430:27::-;;;;;;;;;;;;32058:135;;;;;;:::i;:::-;;:::i;4799:26::-;;;;;;;;;;;;3397:27;;;;;;;;;28515:137;;;;;;:::i;:::-;;:::i;3596:33::-;;;;;;;;;;;;;;;27390:10:32;27378:23;;;27360:42;;27348:2;27333:18;3596:33:6;27315:93:32;32311:106:6;;;:::i;9458:1807::-;;;:::i;2937:61::-;;;;;;4897:25;;;;;;;;;;;;33406:126;;;;;;:::i;:::-;;:::i;33268:132::-;;;:::i;32423:314::-;;;;;;:::i;:::-;;:::i;2863:50::-;;;;;;8407:902;;;;;;:::i;:::-;;:::i;2714:33::-;;;;;;7392:126;;;;;;:::i;:::-;7485:26;;7459:7;7485:26;;;:17;:26;;;;;;;7392:126;32743:218;;;;;;:::i;:::-;;:::i;2413:31::-;;;;;;;;;7238:111;7319:23;;7238:111;;32199:106;;;:::i;4928:29::-;;;;;;;;;;;;18781:222;;;;;;:::i;:::-;;:::i;3231:51::-;;;;;;3101:59;;;;;;4687:24;;;;;;;;;;;;3492:36;;;;;;;;;;;;;;;25324:8:32;25312:21;;;25294:40;;25282:2;25267:18;3492:36:6;25249:91:32;27204:386:6;;;:::i;15833:332::-;15887:7;15906:23;15932:16;:14;:16::i;:::-;16130:17;;;;;;;:8;:17;;;;;;;;;16047:23;:32;;;;;;;15906:42;;-1:-1:-1;15979:169:6;;:129;;16103:4;;15979:102;;16027:53;;15906:42;;16027:19;:53::i;:::-;15979:26;;;;;;;:17;:26;;;;;;;:47;:102::i;:::-;:123;;:129::i;:::-;:150;;:169::i;:::-;15958:200;15833:332;-1:-1:-1;;;15833:332:6:o;33602:179::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;;;;;;;;;33708:16:::1;:66:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;33602:179::o;32967:295::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;33084:4:::1;33062:18;:26;;;;33054:52;;;::::0;::::1;::::0;;19361:2:32;33054:52:6::1;::::0;::::1;19343:21:32::0;19400:2;19380:18;;;19373:30;19439:15;19419:18;;;19412:43;19472:18;;33054:52:6::1;19333:163:32::0;33054:52:6::1;33221:13;:34:::0;;::::1;::::0;;::::1;::::0;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;32967:295::o;7964:437::-;8023:7;8042:23;8080:192;8131:127;8212:28;;8131:55;8140:45;2538:4;8140:19;;:23;;:45;;;;:::i;:::-;8131:4;;:8;:55::i;:127::-;2538:4;;8080:33;:192::i;:::-;8042:230;;8304:19;;8286:15;:37;8282:80;;;-1:-1:-1;8343:19:6;;8282:80;8379:15;7964:437;-1:-1:-1;;7964:437:6:o;387:138:26:-;854:5;;;;840:10;:19;832:79;;;;;;;20391:2:32;832:79:26;;;20373:21:32;20430:2;20410:18;;;20403:30;20469:34;20449:18;;;20442:62;20540:17;20520:18;;;20513:45;20575:19;;832:79:26;20363:237:32;832:79:26;458:14:::1;:23:::0;;;::::1;;::::0;::::1;::::0;;::::1;::::0;;;496:22:::1;::::0;9602:74:32;;;496:22:26::1;::::0;9590:2:32;9575:18;496:22:26::1;;;;;;;387:138:::0;:::o;31741:311:6:-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;31830:15:::1;31813:14;:32:::0;;;31890:15:::1;::::0;31870:36:::1;::::0;31830:15;31870:19:::1;:36::i;:::-;31855:12;:51:::0;31928:16:::1;::::0;31920:39:::1;31928:16;31920:39:::0;31916:92:::1;;31974:23;31992:4;31974:17;:23::i;:::-;32022;::::0;::::1;::::0;;;::::1;31741:311::o:0;19372:161::-;1681:1:27;2270:7;;:19;;2262:63;;;;;;;24039:2:32;2262:63:27;;;24021:21:32;24078:2;24058:18;;;24051:30;24117:33;24097:18;;;24090:61;24168:18;;2262:63:27;24011:181:32;2262:63:27;1681:1;2400:18;;19457:69:6::1;19470:10;::::0;19494:8;19504:4;19510:15:::1;19457:12;:69::i;:::-;-1:-1:-1::0;;1638:1:27;2573:7;:22;19372:161:6:o;28691:175::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;28826:33:::1;;;::::0;;;:15:::1;:33;::::0;;;;28819:40;;;::::1;::::0;;28691:175::o;16487:122::-;16542:7;16568:34;16586:15;;16568:13;:11;:13::i;:::-;:17;;:34::i;:::-;16561:41;;16487:122;:::o;27772:362::-;5571:12;;;;;;;;:20;;:12;:20;5563:49;;;;;;;15431:2:32;5563:49:6;;;15413:21:32;15470:2;15450:18;;;15443:30;15509:18;15489;;;15482:46;15545:18;;5563:49:6;15403:166:32;5563:49:6;27926:40:::1;::::0;::::1;;::::0;;;:24:::1;:40;::::0;;;;;;;27967:10:::1;27926:52:::0;;;;;;;;::::1;;:83:::0;::::1;;;-1:-1:-1::0;27998:10:6::1;27982:27;::::0;;;:15:::1;:27;::::0;;;;;::::1;;27926:83;27918:126;;;::::0;::::1;::::0;;20032:2:32;27918:126:6::1;::::0;::::1;20014:21:32::0;20071:2;20051:18;;;20044:30;20110:32;20090:18;;;20083:60;20160:18;;27918:126:6::1;20004:180:32::0;27918:126:6::1;28054:73;28067:14;28083:10;28095:8;28105:4;28111:15;28054:12;:73::i;:::-;27772:362:::0;;;;:::o;11462:913::-;11525:7;11696:34;11733:28;11753:7;11733:19;:28::i;:::-;11696:65;-1:-1:-1;11775:30:6;;11771:528;;11852:5;;:24;;;;;:5;9620:55:32;;;11852:24:6;;;9602:74:32;11821:27:6;;11851:84;;11908:26;;11851:52;;2538:4;;11852:5;;;:15;;9575:18:32;;11852:24:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;11851:84::-;11821:114;;11962:24;11989:75;2538:4;11990:47;12016:20;;11991:19;11990:25;;:47;;;;:::i;11989:75::-;11962:102;;12159:20;;12140:16;:39;12136:84;;;-1:-1:-1;12200:20:6;;12136:84;12242:16;11462:913;-1:-1:-1;;;;11462:913:6:o;11771:528::-;-1:-1:-1;12298:1:6;;11462:913;-1:-1:-1;;11462:913:6:o;16171:310::-;16255:16;;16215;;16247:39;16255:16;16247:39;16243:232;;16313:83;16391:4;16313:73;16359:26;;16314:16;;;;;;;;;;;:37;;;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16243:232;-1:-1:-1;16446:18:6;;16171:310;:::o;21539:197::-;1681:1:27;2270:7;;:19;;2262:63;;;;;;;24039:2:32;2262:63:27;;;24021:21:32;24078:2;24058:18;;;24051:30;24117:33;24097:18;;;24090:61;24168:18;;2262:63:27;24011:181:32;2262:63:27;1681:1;2400:18;;21621:17:6::1;::::0;;;::::1;;;:26;21613:57;;;::::0;::::1;::::0;;18301:2:32;21613:57:6::1;::::0;::::1;18283:21:32::0;18340:2;18320:18;;;18313:30;18379:20;18359:18;;;18352:48;18417:18;;21613:57:6::1;18273:168:32::0;21613:57:6::1;21680:49;21696:10;21708;21720:8;21680:15;:49::i;:::-;-1:-1:-1::0;1638:1:27;2573:7;:22;21539:197:6:o;23727:198::-;23779:7;1681:1:27;2270:7;;:19;;2262:63;;;;;;;24039:2:32;2262:63:27;;;24021:21:32;24078:2;24058:18;;;24051:30;24117:33;24097:18;;;24090:61;24168:18;;2262:63:27;24011:181:32;2262:63:27;1681:1;2400:18;;23806:23:6::1;::::0;;;::::1;;;:32;23798:69;;;::::0;::::1;::::0;;21921:2:32;23798:69:6::1;::::0;::::1;21903:21:32::0;21960:2;21940:18;;;21933:30;21999:27;21979:18;;;21972:55;22044:18;;23798:69:6::1;21893:175:32::0;23798:69:6::1;23884:34;23895:10;23907;23884;:34::i;:::-;23877:41;;1638:1:27::0;2573:7;:22;23727:198:6;:::o;11271:185::-;11338:7;11364:85;2538:4;11364:59;11394:28;;11365:23;11380:7;11365:14;:23::i;28167:303::-;5571:12;;;;;;;;:20;;:12;:20;5563:49;;;;;;;15431:2:32;5563:49:6;;;15413:21:32;15470:2;15450:18;;;15443:30;15509:18;15489;;;15482:46;15545:18;;5563:49:6;15403:166:32;5563:49:6;28282:40:::1;::::0;::::1;;::::0;;;:24:::1;:40;::::0;;;;;;;28323:10:::1;28282:52:::0;;;;;;;;::::1;;:83:::0;::::1;;;-1:-1:-1::0;28354:10:6::1;28338:27;::::0;;;:15:::1;:27;::::0;;;;;::::1;;28282:83;28274:126;;;::::0;::::1;::::0;;20032:2:32;28274:126:6::1;::::0;::::1;20014:21:32::0;20071:2;20051:18;;;20044:30;20110:32;20090:18;;;20083:60;20160:18;;28274:126:6::1;20004:180:32::0;28274:126:6::1;28410:53;28426:14;28442:10;28454:8;28410:15;:53::i;:::-;28167:303:::0;;:::o;30407:789::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;2538:4:::1;30582:20;:44;;30574:93;;;::::0;::::1;::::0;;17188:2:32;30574:93:6::1;::::0;::::1;17170:21:32::0;17227:2;17207:18;;;17200:30;17266:34;17246:18;;;17239:62;17337:6;17317:18;;;17310:34;17361:19;;30574:93:6::1;17160:226:32::0;30574:93:6::1;30788:1;30756:29;:33;30748:72;;;::::0;::::1;::::0;;22628:2:32;30748:72:6::1;::::0;::::1;22610:21:32::0;22667:2;22647:18;;;22640:30;22706:28;22686:18;;;22679:56;22752:18;;30748:72:6::1;22600:176:32::0;30748:72:6::1;30831:19;:42:::0;;;30883:20:::1;:44:::0;;;30937:28:::1;:60:::0;;;31013:40:::1;::::0;25491:25:32;;;31013:40:6::1;::::0;25479:2:32;25464:18;31013:40:6::1;;;;;;;31068:50;31098:19;;31068:50;;;;25491:25:32::0;;25479:2;25464:18;;25446:76;31068:50:6::1;;;;;;;;31133:56;31160:28;;31133:56;;;;25491:25:32::0;;25479:2;25464:18;;25446:76;31133:56:6::1;;;;;;;;30407:789:::0;;;:::o;531:266:26:-;599:14;;;;585:10;:28;577:94;;;;;;;15009:2:32;577:94:26;;;14991:21:32;15048:2;15028:18;;;15021:30;15087:34;15067:18;;;15060:62;15158:23;15138:18;;;15131:51;15199:19;;577:94:26;14981:243:32;577:94:26;699:5;;;706:14;686:35;;;699:5;;;;9922:34:32;;706:14:26;;;;9987:2:32;9972:18;;9965:43;686:35:26;;9834:18:32;686:35:26;;;;;;;739:14;;;;731:22;;;;;;739:14;;;731:22;;;;763:27;;;531:266::o;26777:421:6:-;26852:16;;26844:39;26852:16;26844:39;;;;:102;;;26888:12;:57;;;;26923:21;;26905:15;:39;26888:57;26840:352;;;27038:16;;:76;;;;;27091:4;27038:76;;;10596:74:32;27098:15:6;10686:18:32;;;10679:34;27038:16:6;;;;;:44;;10569:18:32;;27038:76:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;27009:26;:105;27152:16;;:29;;;;;;;;:16;;;;;:27;;:29;;;;;;;;;;;;;;;:16;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;27128:21;:53;26840:352;26777:421;:::o;29698:703::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;29905:12:::1;::::0;::::1;::::0;::::1;;;29900:167;;29965:15;::::0;::::1;29941:40:::0;;::::1;29965:15:::0;::::1;29941:40;;29933:69;;;::::0;::::1;::::0;;15431:2:32;29933:69:6::1;::::0;::::1;15413:21:32::0;15470:2;15450:18;;;15443:30;15509:18;15489;;;15482:46;15545:18;;29933:69:6::1;15403:166:32::0;29933:69:6::1;30324:5;::::0;30254:86:::1;::::0;;;;30317:4:::1;30254:86;::::0;::::1;10282:34:32::0;30254:53:6::1;30324:5:::0;;::::1;10332:18:32::0;;;10325:43;10384:18;;;10377:34;;;30254:53:6;;::::1;::::0;::::1;::::0;10194:18:32;;30254:86:6::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;30355:39:6::1;::::0;;10626:42:32;10614:55;;10596:74;;10701:2;10686:18;;10679:34;;;30355:39:6::1;::::0;-1:-1:-1;10569:18:32;;-1:-1:-1;30355:39:6::1;;;;;;;;29698:703:::0;;:::o;31202:533::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;31397:1:::1;31364:29;:34;;31356:72;;;::::0;::::1;::::0;;14302:2:32;31356:72:6::1;::::0;::::1;14284:21:32::0;14341:2;14321:18;;;14314:30;14380:27;14360:18;;;14353:55;14425:18;;31356:72:6::1;14274:175:32::0;31356:72:6::1;31464:1;31446:14;:19;;31438:57;;;::::0;::::1;::::0;;19007:2:32;31438:57:6::1;::::0;::::1;18989:21:32::0;19046:2;19026:18;;;19019:30;19085:27;19065:18;;;19058:55;19130:18;;31438:57:6::1;18979:175:32::0;31438:57:6::1;31506:28;:60:::0;;;31576:13:::1;:30:::0;;;31622:59:::1;::::0;25491:25:32;;;31622:59:6::1;::::0;25479:2:32;25464:18;31622:59:6::1;;;;;;;31696:32;::::0;25491:25:32;;;31696:32:6::1;::::0;25479:2:32;25464:18;31696:32:6::1;25446:76:32::0;28992:580:6;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;29201:12:::1;::::0;::::1;::::0;::::1;;;29196:167;;29261:15;::::0;::::1;29237:40:::0;;::::1;29261:15:::0;::::1;29237:40;;29229:69;;;::::0;::::1;::::0;;15431:2:32;29229:69:6::1;::::0;::::1;15413:21:32::0;15470:2;15450:18;;;15443:30;15509:18;15489;;;15482:46;15545:18;;29229:69:6::1;15403:166:32::0;29229:69:6::1;29490:5;::::0;29448:61:::1;::::0;29476:12;;29490:5:::1;;29497:11:::0;29448:27:::1;:61::i;:::-;29524:41;::::0;;10626:42:32;10614:55;;10596:74;;10701:2;10686:18;;10679:34;;;29524:41:6::1;::::0;10569:18:32;29524:41:6::1;10551:168:32::0;13659:1463:6;13945:26;;;13749:27;13945:26;;;:17;:26;;;;;;;13749:27;14128:24;13963:7;14128:15;:24::i;:::-;14226:31;;;14162:33;14226:31;;;:22;:31;;;;;;14105:47;;-1:-1:-1;14162:33:6;14198:68;;14264:1;;14199:59;;14105:47;;14199:26;:59::i;14198:68::-;14162:104;;14400:1;14378:23;;14416:9;14411:705;14435:19;;;;;;;:10;:19;;;;;:26;14431:30;;14411:705;;;14509:19;;;14482:24;14509:19;;;:10;:19;;;;;:22;;14529:1;;14509:22;;;;;;;;;;;;;;;;;;;;;;;14482:49;;;;;;;;14509:22;;;;;;;14482:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14748:15:6;-1:-1:-1;14716:119:6;;-1:-1:-1;2538:4:6;14716:119;14869:17;;;;14849;14934:87;2538:4;14934:61;14948:46;:15;14968:25;14948:19;:46::i;:::-;14934:9;;:13;:61::i;:87::-;14900:121;-1:-1:-1;15057:48:6;:19;14900:121;15057:23;:48::i;:::-;15035:70;;14411:705;;;;14463:3;;;;;:::i;:::-;;;;14411:705;;;;13659:1463;;;;;;:::o;13528:125::-;13627:19;;;;;;;:10;:19;;;;;;;;13620:26;;;;;;;;;;;;;;;;;13590:18;;13620:26;;13627:19;;13620:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13528:125;;;:::o;32058:135::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;32167:18:::1;;;::::0;;;:8:::1;:18;::::0;;;;;;32144:42;;::::1;32167:18;::::0;;::::1;32165:21;32144:42;::::0;;32058:135::o;28515:137::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;28605:33:::1;;;::::0;;;:15:::1;:33;::::0;;;;:40;;;::::1;28641:4;28605:40;::::0;;28515:137::o;32311:106::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;32398:12:::1;::::0;;32382:28;;::::1;32398:12;::::0;;;::::1;;;32397:13;32382:28:::0;;::::1;;::::0;;32311:106::o;9458:1807::-;9592:20;;9505:23;;9592:20;;9588:53;;;-1:-1:-1;2538:4:6;;9458:1807::o;9588:53::-;9790:15;;;9803:1;9790:15;;;;;;;;9761:26;;9790:15;;;;;;;;;;-1:-1:-1;9790:15:6;9761:44;;9838:13;;;;;;;;;;9815:10;9826:1;9815:13;;;;;;;;;;;;;;;;;;;;;:37;;;;;;;;;;;9878:1;9862:10;9873:1;9862:13;;;;;;;;;;;;;;;;:17;;;;:13;;;;;;;;;;;:17;10088:7;;:27;;;;;10052:30;;10088:7;;;:15;;:27;;10104:10;;10088:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10051:64;;;10125:14;10198:13;;;;;;;;;;10148:64;;10170:15;10186:1;10170:18;;;;;;;;;;;;;;;;;;;;;;10149:15;10165:1;10149:18;;;;;;;;;;;;;;;;;;;;;;:39;;;;:::i;:::-;10148:64;;;;:::i;:::-;10289:14;;10125:88;;-1:-1:-1;10289:14:6;;;;10277:26;;;;;;;10273:40;;10312:1;10305:8;;;;;9458:1807;:::o;10273:40::-;10339:14;;;;;;;;;10327:26;;;;;;;10323:40;;10362:1;10355:8;;;;;9458:1807;:::o;10323:40::-;10567:23;10616:10;;;;;;;;;;;10604:22;;:8;:22;;;10600:307;;10734:14;;10721:27;;10734:14;;;;;10721:10;;;;;:27;:::i;:::-;10701:14;;10660:89;;;;;10690:25;;10701:14;;10690:8;:25;:::i;:::-;10661:55;;;;2600:4;10661:55;:::i;:::-;10660:89;;;;:::i;:::-;10641:108;;10600:307;;;10885:10;;10868:27;;10885:10;;;;;;;;10868:14;;;;;:27;:::i;:::-;10807:89;;10854:8;10837:14;;;;;;;;;;;:25;;;;:::i;:::-;10808:55;;;;2600:4;10808:55;:::i;:::-;10807:89;;;;:::i;:::-;10788:108;;10600:307;10971:1;10952:16;:20;10948:132;;;11000:21;11005:16;11000:2;:21;:::i;:::-;10974:48;;10948:132;;;11063:16;11037:43;;10948:132;2538:4;11124:15;:39;;11116:76;;;;;;;14656:2:32;11116:76:6;;;14638:21:32;14695:2;14675:18;;;14668:30;14734:26;14714:18;;;14707:54;14778:18;;11116:76:6;14628:174:32;11116:76:6;9458:1807;;;;;:::o;33406:126::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;33493:16:::1;:32:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;33406:126::o;33268:132::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;33373:20:::1;::::0;;33349:44;;::::1;33373:20;::::0;;::::1;33372:21;33349:44;::::0;;33268:132::o;32423:314::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;32592:13:::1;:30:::0;;32680:50;::::1;;::::0;::::1;::::0;32632:38;::::1;;::::0;::::1;::::0;32592:30;::::1;;::::0;::::1;32632:38:::0;;;;;;;;;;;;;;;::::1;32680:50:::0;;;::::1;;::::0;;32423:314::o;8407:902::-;-1:-1:-1;;;;;;;;8469:7:6;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8469:7:6;;8559:9;8554:531;8578:19;;;;;;;:10;:19;;;;;:26;8574:30;;8554:531;;;8635:19;;;;;;;:10;:19;;;;;:22;;8655:1;;8635:22;;;;;;;;;;;;;;;;;;;;;;;8625:32;;;;;;;;8635:22;;;;;;;8625:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8725:12:6;;8721:354;;8756:21;8780:47;8808:7;:18;;;8780:27;:47::i;:::-;8756:71;;8845:21;8869:47;8897:7;:18;;;8869:27;:47::i;:::-;8845:71;;8947:113;8962:97;9002:13;9017;9040:7;:17;;;8962:39;:97::i;:::-;8947:10;;:14;:113::i;:::-;8934:126;;8721:354;;;-1:-1:-1;8606:3:6;;;;:::i;:::-;;;;8554:531;;;-1:-1:-1;9284:17:6;:10;9299:1;9284:14;:17::i;32743:218::-;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;32859:18:::1;:40:::0;;;32910:45;::::1;;;32938:6;:4;:6::i;32199:106::-:0;5441:5;;;;5427:10;:19;;:53;;-1:-1:-1;5464:16:6;;;;5450:10;:30;5427:53;5419:87;;;;;;;16127:2:32;5419:87:6;;;16109:21:32;16166:2;16146:18;;;16139:30;16205:23;16185:18;;;16178:51;16246:18;;5419:87:6;16099:171:32;5419:87:6;32284:14:::1;::::0;;32266:32;;::::1;32284:14:::0;;;;::::1;;;32283:15;32266:32:::0;;::::1;;::::0;;32199:106::o;18781:222::-;18863:33;;;;;;;:15;:33;;;;;;;;18855:70;;;;;;;22275:2:32;18855:70:6;;;22257:21:32;22314:2;22294:18;;;22287:30;22353:26;22333:18;;;22326:54;22397:18;;18855:70:6;22247:174:32;18855:70:6;18960:10;18935:36;;;;:24;:36;;;;;;;;;:54;;;;;;;;;;:61;;;;18992:4;18935:61;;;18781:222::o;27204:386::-;27285:24;27303:5;27285:17;:24::i;:::-;27342:12;;27324:15;:30;27320:264;;;27370:14;:12;:14::i;:::-;27204:386::o;27320:264::-;27415:26;27444:16;:14;:16::i;:::-;27474:21;:42;;;27415:45;-1:-1:-1;27547:26:6;:24;:26::i;:::-;27530:14;:43;-1:-1:-1;27204:386:6:o;3107:130:29:-;3165:7;3191:39;3195:1;3198;3191:39;;;;;;;;;;;;;;;;;:3;:39::i;15265:562:6:-;15314:7;15337:23;;15364:1;15337:28;:59;;;-1:-1:-1;15369:22:6;;:27;15337:59;15333:488;;;-1:-1:-1;15419:21:6;;;15265:562::o;15333:488::-;15496:300;15543:235;15755:22;;15543:162;15688:16;:14;:16::i;:::-;15543:115;15644:13;:11;:13::i;:::-;15543:71;15599:14;;15543:26;:24;:26::i;:::-;:55;;:71::i;:235::-;15496:21;;;:25;:300::i;1308:134:29:-;1366:7;1392:43;1396:1;1399;1392:43;;;;;;;;;;;;;;;;;:3;:43::i;2193:459::-;2251:7;2492:6;2488:45;;-1:-1:-1;2521:1:29;2514:8;;2488:45;2543:9;2555:5;2559:1;2555;:5;:::i;:::-;2543:17;-1:-1:-1;2587:1:29;2578:5;2582:1;2543:17;2578:5;:::i;:::-;:10;2570:56;;;;;;;21519:2:32;2570:56:29;;;21501:21:32;21558:2;21538:18;;;21531:30;21597:34;21577:18;;;21570:62;21668:3;21648:18;;;21641:31;21689:19;;2570:56:29;21491:223:32;868:176:29;926:7;;957:5;961:1;957;:5;:::i;:::-;945:17;;985:1;980;:6;;972:46;;;;;;;16832:2:32;972:46:29;;;16814:21:32;16871:2;16851:18;;;16844:30;16910:29;16890:18;;;16883:57;16957:18;;972:46:29;16804:177:32;19725:1679:6;19930:14;19946:4;5710:42;5734:7;5743:8;5710:23;:42::i;:::-;19970:13:::1;::::0;;;::::1;;;:22;::::0;:61:::1;;-1:-1:-1::0;20012:10:6::1;19996:27;::::0;;;:15:::1;:27;::::0;;;;;::::1;;:35;;:27:::0;:35:::1;19970:61;19962:104;;;::::0;::::1;::::0;;18648:2:32;19962:104:6::1;::::0;::::1;18630:21:32::0;18687:2;18667:18;;;18660:30;18726:32;18706:18;;;18699:60;18776:18;;19962:104:6::1;18620:180:32::0;19962:104:6::1;20084:24;::::0;::::1;;::::0;;;:8:::1;:24;::::0;;;;;::::1;;:33;20076:73;;;::::0;::::1;::::0;;20807:2:32;20076:73:6::1;::::0;::::1;20789:21:32::0;20846:2;20826:18;;;20819:30;20885:29;20865:18;;;20858:57;20932:18;;20076:73:6::1;20779:177:32::0;20076:73:6::1;20175:13;;20167:4;:21;;20159:60;;;::::0;::::1;::::0;;16477:2:32;20159:60:6::1;::::0;::::1;16459:21:32::0;16516:2;16496:18;;;16489:30;16555:28;16535:18;;;16528:56;16601:18;;20159:60:6::1;16449:176:32::0;20159:60:6::1;20245:28;;20237:4;:36;;20229:75;;;::::0;::::1;::::0;;22983:2:32;20229:75:6::1;::::0;::::1;22965:21:32::0;23022:2;23002:18;;;22995:30;23061:29;23041:18;;;23034:57;23108:18;;20229:75:6::1;22955:177:32::0;20229:75:6::1;20317:17;20336:16:::0;20354::::1;20374:29;20388:8;20398:4;20374:13;:29::i;:::-;20314:89;;;;;;;20453:23;20479:20;20494:4;20479:14;:20::i;:::-;20453:46;;20513:10;:26;20524:14;20513:26;;;;;;;;;;;;;;;20562:273;;;;;;;;20593:8;20562:273;;;;20623:9;20562:273;;;;20654:15;20562:273;;;;20691:25;20711:4;20691:15;:19;;:25;;;;:::i;:::-;20562:273:::0;;::::1;::::0;;::::1;::::0;;;;::::1;::::0;;::::1;::::0;;;;;;;;;;::::1;::::0;;;;;20513:336;;::::1;::::0;;::::1;::::0;;-1:-1:-1;20513:336:6;;;;;;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;::::1;::::0;;;::::1;::::0;;;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;;;;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;::::0;;::::1;::::0;;::::1;;::::0;;::::1;::::0;::::1;::::0;;;;;;;::::1;::::0;;;::::1;::::0;;;;;;;::::1;::::0;;;20921:15;;:73;;;;;:15:::1;10300::32::0;;;20921:73:6;;::::1;10282:34:32::0;;;;20978:4:6::1;10332:18:32::0;;;10325:43;10384:18;;;10377:34;;;20921:15:6;::::1;::::0;:32:::1;::::0;10194:18:32;;20921:73:6::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;21061:23:6::1;::::0;:38:::1;::::0;-1:-1:-1;21061:23:6;-1:-1:-1;21089:9:6;21061:27:::1;:38::i;:::-;21035:23;:64:::0;21145:33:::1;::::0;::::1;;::::0;;;:17:::1;:33;::::0;;;;;:48:::1;::::0;21183:9;21145:37:::1;:48::i;:::-;21109:33;::::0;::::1;;::::0;;;:17:::1;:33;::::0;;;;:84;;;;21269:46:::1;::::0;21127:14;;21269:23:::1;:46::i;:::-;21331:66;::::0;;26455:25:32;;;26511:2;26496:18;;26489:34;;;26539:18;;;26532:34;;;21331:66:6::1;26602:55:32::0;;;26597:2;26582:18;;26575:83;21331:66:6;::::1;::::0;::::1;::::0;26442:3:32;26427:19;21331:66:6::1;;;;;;;5762:1;;;19725:1679:::0;;;;;;;:::o;21938:1659::-;22145:47;22156:14;22172:19;22145:10;:47::i;:::-;;22203:24;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22203:24:6;22257:1;22237:17;;;:21;;;22257:1;22299:274;22323:26;;;;;;;:10;:26;;;;;:33;22319:37;;22299:274;;;22393:26;;;;;;;:10;:26;;;;;:29;;22420:1;;22393:29;;;;;;;;;;;;;;;;;;;;;;;;:38;;;22381:8;:50;22377:186;;;22461:26;;;;;;;:10;:26;;;;;:29;;22488:1;;22461:29;;;;;;;;;;;;;;;;;;;;;;;22451:39;;;;;;;;22461:29;;;;;;;22451:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22524:1:6;-1:-1:-1;22524:1:6;22543:5;;22377:186;22358:3;;;;:::i;:::-;;;;22299:274;;;-1:-1:-1;22590:16:6;;:28;;22582:59;;;;;;;23339:2:32;22582:59:6;;;23321:21:32;23378:2;23358:18;;;23351:30;23417:20;23397:18;;;23390:48;23455:18;;22582:59:6;23311:168:32;22582:59:6;22678:7;:24;;;22659:15;:43;;:69;;;-1:-1:-1;22706:14:6;;;;;;;:22;;22724:4;22706:22;22659:69;:108;;;-1:-1:-1;22748:10:6;22732:27;;;;:15;:27;;;;;;;;:35;;:27;:35;22659:108;22651:143;;;;;;;15776:2:32;22651:143:6;;;15758:21:32;15815:2;15795:18;;;15788:30;15854:24;15834:18;;;15827:52;15896:18;;22651:143:6;15748:172:32;22651:143:6;22828:17;;;;22860:16;;22856:735;;22952:23;;:41;;22980:12;22952:27;:41::i;:::-;22926:23;:67;23043:33;;;;;;;:17;:33;;;;;;:51;;23081:12;23043:37;:51::i;:::-;23007:33;;;;;;;:17;:33;;;;;;;;:87;;;;23163:10;:26;;;:41;;23190:13;;23163:41;;;;;;;;;;;;;;;;;;;;;;;;;;23156:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23288:46;;23312:14;;23288:23;:46::i;:::-;23407:15;;:78;;;;;23448:4;23407:78;;;10282:34:32;23407:15:6;10352::32;;;10332:18;;;10325:43;10384:18;;;10377:34;;;23407:15:6;;;;:32;;10194:18:32;;23407:78:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;23505:75:6;;;25729:25:32;;;25785:2;25770:18;;25763:34;;;23505:75:6;25833:55:32;;;25813:18;;;25806:83;23505:75:6;;;;;;-1:-1:-1;23505:75:6;;-1:-1:-1;23505:75:6;;;25717:2:32;23505:75:6;;;22856:735;21938:1659;;;;;;:::o;24105:1485::-;24229:16;24204:8;24214:4;5710:42;5734:7;5743:8;5710:23;:42::i;:::-;24268:18:::1;::::0;::::1;;::::0;;;:8:::1;:18;::::0;;;;;;-1:-1:-1;24300:12:6;;24296:1287:::1;;24328:18;::::0;;::::1;24349:1;24328:18:::0;;;:8:::1;:18;::::0;;;;:22;24400:13:::1;::::0;24364:82:::1;::::0;24400:13:::1;24416:19:::0;24437:8;24364:27:::1;:82::i;:::-;24503:26;24547::::0;24591:24:::1;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24591:24:6::1;24634:9;24629:809;24653:20;::::0;::::1;;::::0;;;:10:::1;:20;::::0;;;;:27;24649:31;::::1;24629:809;;;24715:20;::::0;::::1;;::::0;;;:10:::1;:20;::::0;;;;:23;;24736:1;;24715:23;::::1;;;;;;;;;;;;;;::::0;;;::::1;::::0;;;;24705:33:::1;::::0;;::::1;::::0;::::1;::::0;;24715:23:::1;::::0;;::::1;::::0;;::::1;24705:33:::0;;;;;::::1;::::0;::::1;::::0;;;::::1;::::0;;;;::::1;::::0;;::::1;::::0;;;;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;;::::0;;;::::1;::::0;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;;;;-1:-1:-1;24819:21:6;24815:609:::1;;24924:231;::::0;;::::1;::::0;::::1;::::0;;24986:16;;24924:231;;::::1;::::0;;::::1;;::::0;::::1;::::0;;;25073:17:::1;24924:231:::0;;;;;;;;;;;;25216:15:::1;::::0;:39;;;;;24775:13:32;;25216:39:6::1;::::0;::::1;24757:32:32::0;24831:24;;24827:73;;24805:20;;;24798:103;24930:24;;25045:21;;25023:20;;;25016:51;25109:24;25105:33;25083:20;;;25076:63;24924:231:6;;-1:-1:-1;;;;25216:15:6;;;::::1;::::0;:23:::1;::::0;24729:19:32;;25216:39:6::1;::::0;::::1;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;25177:78:::0;;-1:-1:-1;25177:78:6;-1:-1:-1;25298:32:6::1;:18:::0;25177:78;25298:22:::1;:32::i;:::-;25277:53:::0;-1:-1:-1;25373:32:6::1;:18:::0;25396:8;25373:22:::1;:32::i;:::-;25352:53;;24815:609;;;;24682:3:::0;::::1;::::0;::::1;:::i;:::-;;;;24629:809;;;-1:-1:-1::0;25536:13:6::1;::::0;25457:115:::1;::::0;;26928:25:32;;;26984:2;26969:18;;26962:34;;;27012:18;;;27005:34;;;25457:115:6::1;25536:13:::0;;::::1;27131:2:32::0;27116:18;;27109:43;27189:15;;;27183:3;27168:19;;27161:44;25457:115:6;;::::1;::::0;::::1;::::0;26915:3:32;26900:19;25457:115:6::1;;;;;;;24296:1287;;;;24105:1485:::0;;;;;;:::o;559:357:31:-;752:45;;;741:10;10614:55:32;;;752:45:31;;;10596:74:32;10686:18;;;;10679:34;;;752:45:31;;;;;;;;;;10569:18:32;;;;752:45:31;;;;;;;;;;;;;741:57;;-1:-1:-1;;;;741:10:31;;;;:57;;752:45;741:57;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;705:93;;;;816:7;:57;;;;-1:-1:-1;828:11:31;;:16;;:44;;;859:4;848:24;;;;;;;;;;;;:::i;:::-;808:101;;;;;;;13942:2:32;808:101:31;;;13924:21:32;13981:2;13961:18;;;13954:30;14020:33;14000:18;;;13993:61;14071:18;;808:101:31;13914:181:32;808:101:31;559:357;;;;;:::o;1355:2587:30:-;1418:20;1450:15;1475:1;1468:4;:8;;;:57;;1519:4;1512:12;;1468:57;;;1495:4;1488:12;;1487:13;;;:::i;:::-;1450:75;-1:-1:-1;637:9:30;477:7;637:9;:::i;:::-;1562:16;;1550:7;1543:35;;1535:49;;;;;;;19703:2:32;1535:49:30;;;19685:21:32;19742:1;19722:18;;;19715:29;19780:3;19760:18;;;19753:31;19801:18;;1535:49:30;19675:150:32;1535:49:30;1595:13;1621:3;1611:13;;:93;;1669:35;1611:93;;;1632:34;1611:93;1595:109;;;-1:-1:-1;1728:3:30;1718:13;;:18;1714:83;;1794:3;1747:42;:5;1755:34;1747:42;:::i;:::-;1746:51;;1738:59;;1714:83;1821:3;1811:13;;:18;1807:83;;1887:3;1840:42;:5;1848:34;1840:42;:::i;:::-;1839:51;;1831:59;;1807:83;1914:3;1904:13;;:18;1900:83;;1980:3;1933:42;:5;1941:34;1933:42;:::i;:::-;1932:51;;1924:59;;1900:83;2007:4;1997:14;;:19;1993:84;;2074:3;2027:42;:5;2035:34;2027:42;:::i;:::-;2026:51;;2018:59;;1993:84;2101:4;2091:14;;:19;2087:84;;2168:3;2121:42;:5;2129:34;2121:42;:::i;:::-;2120:51;;2112:59;;2087:84;2195:4;2185:14;;:19;2181:84;;2262:3;2215:42;:5;2223:34;2215:42;:::i;:::-;2214:51;;2206:59;;2181:84;2289:4;2279:14;;:19;2275:84;;2356:3;2309:42;:5;2317:34;2309:42;:::i;:::-;2308:51;;2300:59;;2275:84;2383:5;2373:15;;:20;2369:85;;2451:3;2404:42;:5;2412:34;2404:42;:::i;:::-;2403:51;;2395:59;;2369:85;2478:5;2468:15;;:20;2464:85;;2546:3;2499:42;:5;2507:34;2499:42;:::i;:::-;2498:51;;2490:59;;2464:85;2573:5;2563:15;;:20;2559:85;;2641:3;2594:42;:5;2602:34;2594:42;:::i;:::-;2593:51;;2585:59;;2559:85;2668:5;2658:15;;:20;2654:85;;2736:3;2689:42;:5;2697:34;2689:42;:::i;:::-;2688:51;;2680:59;;2654:85;2763:6;2753:16;;:21;2749:86;;2832:3;2785:42;:5;2793:34;2785:42;:::i;:::-;2784:51;;2776:59;;2749:86;2859:6;2849:16;;:21;2845:86;;2928:3;2881:42;:5;2889:34;2881:42;:::i;:::-;2880:51;;2872:59;;2845:86;2955:6;2945:16;;:21;2941:86;;3024:3;2977:42;:5;2985:34;2977:42;:::i;:::-;2976:51;;2968:59;;2941:86;3051:6;3041:16;;:21;3037:86;;3120:3;3073:42;:5;3081:34;3073:42;:::i;:::-;3072:51;;3064:59;;3037:86;3147:7;3137:17;;:22;3133:86;;3216:3;3170:41;:5;3178:33;3170:41;:::i;:::-;3169:50;;3161:58;;3133:86;3243:7;3233:17;;:22;3229:85;;3311:3;3266:40;:5;3274:32;3266:40;:::i;:::-;3265:49;;3257:57;;3229:85;3338:7;3328:17;;:22;3324:83;;3404:3;3361:38;:5;3369:30;3361:38;:::i;:::-;3360:47;;3352:55;;3324:83;3431:7;3421:17;;:22;3417:78;;3492:3;3454:33;:5;3462:25;3454:33;:::i;:::-;3453:42;;3445:50;;3417:78;3517:1;3510:4;:8;;;3506:47;;;3528:25;3548:5;3528:17;:25;:::i;:::-;3520:33;;3506:47;3903:17;3912:7;3903:5;:17;:::i;:::-;:22;:30;;3932:1;3903:30;;;3928:1;3903:30;3886:48;;;;3896:2;3887:11;;;3886:48;:::i;4171:498:24:-;4321:15;4368:13;4352:29;;:13;:29;;;4348:98;;;4417:13;;4432;4348:98;4476:186;;;:170;4509:45;309:2:5;4509:45:24;;;;4572:29;4649:13;4572;:29;:::i;:::-;4476:170;;4619:13;4476:170;;:15;:170::i;:::-;:186;;;;:::i;25635:1136:6:-;25730:12;;25712:15;:30;25704:70;;;;;;;17945:2:32;25704:70:6;;;17927:21:32;17984:2;17964:18;;;17957:30;18023:29;18003:18;;;17996:57;18070:18;;25704:70:6;17917:177:32;25704:70:6;26129:27;26204:15;;26167:33;26187:12;;26167:15;:19;;:33;;;;:::i;:::-;26159:60;;;;:::i;:::-;26288:13;;;:38;;;;;26320:4;26288:38;;;9602:74:32;;;;26129:90:6;;-1:-1:-1;26269:16:6;;26288:13;;;:23;;9575:18:32;;26288:38:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;26269:57;-1:-1:-1;26269:57:6;26344:63;26383:23;:19;26405:1;26383:23;:::i;:::-;26344:34;26362:15;;26344:13;:11;:13::i;:63::-;:75;;26336:112;;;;;;;23686:2:32;26336:112:6;;;23668:21:32;23725:2;23705:18;;;23698:30;23764:26;23744:18;;;23737:54;23808:18;;26336:112:6;23658:174:32;26336:112:6;26524:15;;26474:67;;26491:49;;26492:26;:19;26516:1;26492:23;:26::i;26491:49::-;26474:12;;;:16;:67::i;:::-;26459:12;:82;26552:26;26581:16;:14;:16::i;:::-;26607:21;:42;;;26552:45;-1:-1:-1;26676:26:6;:24;:26::i;:::-;26659:14;:43;26747:15;;26718:46;;26747:15;;;;9602:74:32;;26718:46:6;;9590:2:32;9575:18;26718:46:6;9557:125:32;15128:131:6;15187:7;15213:39;15222:15;15239:12;;15213:8;:39::i;3752:338:29:-;3838:7;3938:12;3931:5;3923:28;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;3961:9:29;3973:5;3977:1;3973;:5;:::i;:::-;3961:17;3752:338;-1:-1:-1;;;;;3752:338:29:o;1766:187::-;1852:7;1887:12;1879:6;;;;1871:29;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;1910:9:29;1922:5;1926:1;1922;:5;:::i;16927:1510:6:-;17115:8;17111:44;;;17138:6;:4;:6::i;:::-;17177:21;;;;17173:1258;;17387:27;17432:28;17478:27;17522:30;17544:7;17522:21;:30::i;:::-;17366:186;;;;;;17611:20;17623:7;17611:11;:20::i;:::-;17704:31;;;;;;;:22;:31;;;;;:54;;;17842:42;;;17838:582;;17904:19;17926:44;:19;17950;17926:23;:44::i;:::-;18013:22;;17904:66;;-1:-1:-1;18013:39:6;;17904:66;18013:26;:39::i;:::-;17988:22;:64;18099:36;:19;18123:11;18099:23;:36::i;:::-;18070:26;;;;;;;:17;:26;;;;;:65;-1:-1:-1;17838:582:6;;;18174:19;18196:44;:19;18220;18196:23;:44::i;:::-;18283:22;;18174:66;;-1:-1:-1;18283:39:6;;18174:66;18283:26;:39::i;:::-;18258:22;:64;18369:36;:19;18393:11;18369:23;:36::i;:::-;18340:26;;;;;;;:17;:26;;;;;:65;-1:-1:-1;17173:1258:6;;;16927:1510;;:::o;12381:1095::-;12465:13;12480:17;12499:16;12517;12587:14;12615;12643:10;12667:15;12696;12725:18;12800:15;;;;;;;;;;;:25;;;12826:8;12800:35;;;;;;;;;;;;;25491:25:32;;25479:2;25464:18;;25446:76;12800:35:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;12545:290;;;;;;;;;;;;;;;;;;;;12882:5;12871:16;;12909:10;12897:22;;12983:10;;;;;;;;;;;12973:20;;:6;:20;;;12972:61;;;;-1:-1:-1;13022:10:6;;;13012:20;;;13022:10;;13012:20;12972:61;:103;;;;-1:-1:-1;13058:16:6;;;13051:23;;;13058:16;;;;;13051:23;12972:103;:149;;;;-1:-1:-1;13106:14:6;;;13093:27;;;13106:14;;;13093:27;;;12972:149;:195;;;;-1:-1:-1;13152:14:6;;;13139:27;;;13152:14;;;;;;13139:27;;;12972:195;12955:455;;;13203:4;13192:15;;12955:455;;;13315:13;13311:89;;;13348:37;;;;;21163:2:32;13348:37:6;;;21145:21:32;21202:2;21182:18;;;21175:30;21241:29;21221:18;;;21214:57;21288:18;;13348:37:6;21135:177:32;13311:89:6;-1:-1:-1;12381:1095:6;;;;-1:-1:-1;13448:9:6;-1:-1:-1;;;;;;12381:1095:6:o;742:3801:9:-;854:14;;;1364:6;1361:1;1358;1351:20;1400:1;1397;1393:9;1384:18;;1451:5;1447:2;1444:13;1436:5;1432:2;1428:14;1424:34;1415:43;;;1540:5;1549:1;1540:10;1536:179;;;1588:1;1574:11;:15;1566:24;;;;;;-1:-1:-1;1641:23:9;;;;-1:-1:-1;1691:13:9;;1536:179;1842:5;1828:11;:19;1820:28;;;;;;2125:17;2201:11;2198:1;2195;2188:25;2373:21;;;;2330:20;;2319:32;;;;2175:38;-1:-1:-1;2553:12:9;2608:11;2569:31;2608:11;2569:17;:31;:::i;:::-;:35;;2603:1;2569:35;:::i;:::-;2568:51;2713:22;;;;;2841:16;;;;;3089:1;3085:12;;;3081:23;3106:1;3077:31;;-1:-1:-1;3136:12:9;3077:31;3136:5;:12;:::i;:::-;3127:21;;;;3482:11;3497:15;3501:11;3497:1;:15;:::i;:::-;3516:1;3496:21;;-1:-1:-1;3743:17:9;3496:21;3743:11;:17;:::i;:::-;3739:21;;:1;:21;:::i;:::-;3732:28;;;;:::i;:::-;;-1:-1:-1;3801:17:9;3732:28;3801:11;:17;:::i;:::-;3797:21;;:1;:21;:::i;:::-;3790:28;;;;:::i;:::-;;-1:-1:-1;3860:17:9;3790:28;3860:11;:17;:::i;:::-;3856:21;;:1;:21;:::i;:::-;3849:28;;;;:::i;:::-;;-1:-1:-1;3919:17:9;3849:28;3919:11;:17;:::i;:::-;3915:21;;:1;:21;:::i;:::-;3908:28;;;;:::i;:::-;;-1:-1:-1;3978:17:9;3908:28;3978:11;:17;:::i;:::-;3974:21;;:1;:21;:::i;:::-;3967:28;;;;:::i;:::-;;-1:-1:-1;4038:17:9;3967:28;4038:11;:17;:::i;:::-;4034:21;;:1;:21;:::i;:::-;4027:28;;;;:::i;:::-;;-1:-1:-1;4502:11:9;4027:28;4502:5;:11;:::i;:::-;4493:20;742:3801;-1:-1:-1;;;;;;;;;742:3801:9:o;392:104:25:-;450:7;480:1;476;:5;:13;;488:1;476:13;;;-1:-1:-1;484:1:25;;392:104;-1:-1:-1;392:104:25:o;18443:297:6:-;18504:21;;;;18500:234;;18579:15;18597;18604:7;18597:6;:15::i;:::-;18626:17;;;;;;;:8;:17;;;;;;;;:27;;;;18702:21;;18667:23;:32;;;;;;:56;-1:-1:-1;18443:297:6;:::o;14:138:32:-;93:13;;115:31;93:13;115:31;:::i;:::-;74:78;;;:::o;157:763::-;222:5;275:3;268:4;260:6;256:17;252:27;242:2;;297:5;290;283:20;242:2;330:6;324:13;356:4;380:58;396:41;434:2;396:41;:::i;:::-;380:58;:::i;:::-;460:3;484:2;479:3;472:15;512:2;507:3;503:12;496:19;;547:2;539:6;535:15;599:3;594:2;588;585:1;581:10;573:6;569:23;565:32;562:41;559:2;;;620:5;613;606:20;559:2;646:5;660:231;674:2;671:1;668:9;660:231;;;738:3;732:10;755:31;780:5;755:31;:::i;:::-;799:18;;837:12;;;;869;;;;692:1;685:9;660:231;;;-1:-1:-1;909:5:32;;232:688;-1:-1:-1;;;;;;;232:688:32:o;925:164::-;1002:13;;1055:1;1044:20;;;1034:31;;1024:2;;1079:1;1076;1069:12;1094:192;1173:13;;1226:34;1215:46;;1205:57;;1195:2;;1276:1;1273;1266:12;1291:165;1369:13;;1422:8;1411:20;;1401:31;;1391:2;;1446:1;1443;1436:12;1461:257;1520:6;1573:2;1561:9;1552:7;1548:23;1544:32;1541:2;;;1594:6;1586;1579:22;1541:2;1638:9;1625:23;1657:31;1682:5;1657:31;:::i;1723:1212::-;1818:6;1826;1834;1842;1895:3;1883:9;1874:7;1870:23;1866:33;1863:2;;;1917:6;1909;1902:22;1863:2;1961:9;1948:23;1980:31;2005:5;1980:31;:::i;:::-;2030:5;-1:-1:-1;2054:2:32;2093:18;;;2080:32;2121:33;2080:32;2121:33;:::i;:::-;2173:7;-1:-1:-1;2227:2:32;2212:18;;2199:32;;-1:-1:-1;2282:2:32;2267:18;;2254:32;2305:18;2335:14;;;2332:2;;;2367:6;2359;2352:22;2332:2;2410:6;2399:9;2395:22;2385:32;;2455:7;2448:4;2444:2;2440:13;2436:27;2426:2;;2482:6;2474;2467:22;2426:2;2523;2510:16;2545:2;2541;2538:10;2535:2;;;2551:18;;:::i;:::-;2593:112;2701:2;2632:66;2625:4;2621:2;2617:13;2613:86;2609:95;2593:112;:::i;:::-;2580:125;;2728:2;2721:5;2714:17;2768:7;2763:2;2758;2754;2750:11;2746:20;2743:33;2740:2;;;2794:6;2786;2779:22;2740:2;2854;2849;2845;2841:11;2836:2;2829:5;2825:14;2812:45;2877:14;;2873:23;;;2866:39;;;;1853:1082;;;;-1:-1:-1;1853:1082:32;;-1:-1:-1;;1853:1082:32:o;2940:325::-;3008:6;3016;3069:2;3057:9;3048:7;3044:23;3040:32;3037:2;;;3090:6;3082;3075:22;3037:2;3134:9;3121:23;3153:31;3178:5;3153:31;:::i;:::-;3203:5;3255:2;3240:18;;;;3227:32;;-1:-1:-1;;;3027:238:32:o;3270:462::-;3356:6;3364;3372;3380;3433:3;3421:9;3412:7;3408:23;3404:33;3401:2;;;3455:6;3447;3440:22;3401:2;3499:9;3486:23;3518:31;3543:5;3518:31;:::i;:::-;3568:5;3620:2;3605:18;;3592:32;;-1:-1:-1;3671:2:32;3656:18;;3643:32;;3722:2;3707:18;3694:32;;-1:-1:-1;3391:341:32;-1:-1:-1;;;3391:341:32:o;3737:1309::-;3864:6;3872;3925:2;3913:9;3904:7;3900:23;3896:32;3893:2;;;3946:6;3938;3931:22;3893:2;3984:9;3978:16;4013:18;4054:2;4046:6;4043:14;4040:2;;;4075:6;4067;4060:22;4040:2;4118:6;4107:9;4103:22;4093:32;;4163:7;4156:4;4152:2;4148:13;4144:27;4134:2;;4190:6;4182;4175:22;4134:2;4224;4218:9;4246:4;4270:58;4286:41;4324:2;4286:41;:::i;4270:58::-;4350:3;4374:2;4369:3;4362:15;4402:2;4397:3;4393:12;4386:19;;4433:2;4429;4425:11;4481:7;4476:2;4470;4467:1;4463:10;4459:2;4455:19;4451:28;4448:41;4445:2;;;4507:6;4499;4492:22;4445:2;4534:6;4525:15;;4549:269;4563:2;4560:1;4557:9;4549:269;;;4627:3;4621:10;4678:5;4675:1;4664:20;4657:5;4654:31;4644:2;;4704:6;4696;4689:22;4644:2;4726:18;;4581:1;4574:9;;;;;4764:12;;;;4796;;4549:269;;;-1:-1:-1;4873:18:32;;;4867:25;4837:5;;-1:-1:-1;4867:25:32;;-1:-1:-1;;;4904:16:32;;;4901:2;;;4938:6;4930;4923:22;4901:2;;4966:74;5032:7;5021:8;5010:9;5006:24;4966:74;:::i;:::-;4956:84;;;3883:1163;;;;;:::o;5051:251::-;5107:6;5160:2;5148:9;5139:7;5135:23;5131:32;5128:2;;;5181:6;5173;5166:22;5128:2;5225:9;5212:23;5244:28;5266:5;5244:28;:::i;5307:255::-;5374:6;5427:2;5415:9;5406:7;5402:23;5398:32;5395:2;;;5448:6;5440;5433:22;5395:2;5485:9;5479:16;5504:28;5526:5;5504:28;:::i;5567:521::-;5635:6;5643;5651;5704:2;5692:9;5683:7;5679:23;5675:32;5672:2;;;5725:6;5717;5710:22;5672:2;5769:9;5756:23;5788:28;5810:5;5788:28;:::i;:::-;5835:5;-1:-1:-1;5892:2:32;5877:18;;5864:32;5905:30;5864:32;5905:30;:::i;:::-;5954:7;-1:-1:-1;6013:2:32;5998:18;;5985:32;6026:30;5985:32;6026:30;:::i;:::-;6075:7;6065:17;;;5662:426;;;;;:::o;6093:190::-;6152:6;6205:2;6193:9;6184:7;6180:23;6176:32;6173:2;;;6226:6;6218;6211:22;6173:2;-1:-1:-1;6254:23:32;;6163:120;-1:-1:-1;6163:120:32:o;6288:194::-;6358:6;6411:2;6399:9;6390:7;6386:23;6382:32;6379:2;;;6432:6;6424;6417:22;6379:2;-1:-1:-1;6460:16:32;;6369:113;-1:-1:-1;6369:113:32:o;6487:319::-;6552:6;6560;6613:2;6601:9;6592:7;6588:23;6584:32;6581:2;;;6634:6;6626;6619:22;6581:2;6675:9;6662:23;6652:33;;6735:2;6724:9;6720:18;6707:32;6748:28;6770:5;6748:28;:::i;:::-;6795:5;6785:15;;;6571:235;;;;;:::o;6811:258::-;6879:6;6887;6940:2;6928:9;6919:7;6915:23;6911:32;6908:2;;;6961:6;6953;6946:22;6908:2;-1:-1:-1;;6989:23:32;;;7059:2;7044:18;;;7031:32;;-1:-1:-1;6898:171:32:o;7074:255::-;7153:6;7161;7214:2;7202:9;7193:7;7189:23;7185:32;7182:2;;;7235:6;7227;7220:22;7182:2;-1:-1:-1;;7263:16:32;;7319:2;7304:18;;;7298:25;7263:16;;7298:25;;-1:-1:-1;7172:157:32:o;7334:326::-;7411:6;7419;7427;7480:2;7468:9;7459:7;7455:23;7451:32;7448:2;;;7501:6;7493;7486:22;7448:2;-1:-1:-1;;7529:23:32;;;7599:2;7584:18;;7571:32;;-1:-1:-1;7650:2:32;7635:18;;;7622:32;;7438:222;-1:-1:-1;7438:222:32:o;7665:296::-;7723:6;7776:2;7764:9;7755:7;7751:23;7747:32;7744:2;;;7797:6;7789;7782:22;7744:2;7841:9;7828:23;7891:10;7884:5;7880:22;7873:5;7870:33;7860:2;;7922:6;7914;7907:22;7966:1206;8129:6;8137;8145;8153;8161;8169;8177;8185;8193;8201;8209:7;8218;8272:3;8260:9;8251:7;8247:23;8243:33;8240:2;;;8294:6;8286;8279:22;8240:2;8331:9;8325:16;8381:26;8374:5;8370:38;8363:5;8360:49;8350:2;;8428:6;8420;8413:22;8350:2;8456:5;-1:-1:-1;8480:49:32;8525:2;8510:18;;8480:49;:::i;:::-;8470:59;;8548:49;8593:2;8582:9;8578:18;8548:49;:::i;:::-;8538:59;;8616:49;8661:2;8650:9;8646:18;8616:49;:::i;:::-;8606:59;;8684:49;8728:3;8717:9;8713:19;8684:49;:::i;:::-;8674:59;;8752:48;8795:3;8784:9;8780:19;8752:48;:::i;:::-;8742:58;;8819:48;8862:3;8851:9;8847:19;8819:48;:::i;:::-;8809:58;;8886:50;8931:3;8920:9;8916:19;8886:50;:::i;:::-;8876:60;;8976:3;8965:9;8961:19;8955:26;8945:36;;9021:3;9010:9;9006:19;9000:26;8990:36;;9046:50;9091:3;9080:9;9076:19;9046:50;:::i;:::-;9035:61;;9116:50;9161:3;9150:9;9146:19;9116:50;:::i;:::-;9105:61;;8230:942;;;;;;;;;;;;;;:::o;9177:274::-;9306:3;9344:6;9338:13;9360:53;9406:6;9401:3;9394:4;9386:6;9382:17;9360:53;:::i;:::-;9429:16;;;;;9314:137;-1:-1:-1;;9314:137:32:o;10724:1271::-;10949:2;11001:21;;;11071:13;;10974:18;;;11093:22;;;10920:4;;10949:2;11134;;11152:18;;;;11193:15;;;10920:4;11239:730;11253:6;11250:1;11247:13;11239:730;;;11312:13;;11350:9;;11338:22;;11400:11;;;11394:18;11380:12;;;11373:40;11453:11;;;11447:18;11433:12;;;11426:40;11489:4;11533:11;;;11527:18;11513:12;;;11506:40;11569:4;11613:11;;;11607:18;11593:12;;;11586:40;11649:4;11692:11;;;11686:18;11727:1;11762:28;;;11748:12;;;11741:50;;;;11814:4;11873:11;;;11867:18;11852:34;;11838:12;;;11831:56;11916:4;11907:14;;;;11944:15;;;;11275:1;11268:9;11239:730;;;-1:-1:-1;11986:3:32;;10929:1066;-1:-1:-1;;;;;;;10929:1066:32:o;12000:650::-;12169:2;12221:21;;;12291:13;;12194:18;;;12313:22;;;12140:4;;12169:2;12392:15;;;;12366:2;12351:18;;;12140:4;12438:186;12452:6;12449:1;12446:13;12438:186;;;12517:13;;12532:10;12513:30;12501:43;;12599:15;;;;12564:12;;;;12474:1;12467:9;12438:186;;;-1:-1:-1;12641:3:32;;12149:501;-1:-1:-1;;;;;;12149:501:32:o;13293:442::-;13442:2;13431:9;13424:21;13405:4;13474:6;13468:13;13517:6;13512:2;13501:9;13497:18;13490:34;13533:66;13592:6;13587:2;13576:9;13572:18;13567:2;13559:6;13555:15;13533:66;:::i;:::-;13651:2;13639:15;13656:66;13635:88;13620:104;;;;13726:2;13616:113;;13414:321;-1:-1:-1;;13414:321:32:o;27413:334::-;27484:2;27478:9;27540:2;27530:13;;27545:66;27526:86;27514:99;;27643:18;27628:34;;27664:22;;;27625:62;27622:2;;;27690:18;;:::i;:::-;27726:2;27719:22;27458:289;;-1:-1:-1;27458:289:32:o;27752:181::-;27810:4;27843:18;27835:6;27832:30;27829:2;;;27865:18;;:::i;:::-;-1:-1:-1;27910:1:32;27906:14;27922:4;27902:25;;27819:114::o;27938:128::-;27978:3;28009:1;28005:6;28002:1;27999:13;27996:2;;;28015:18;;:::i;:::-;-1:-1:-1;28051:9:32;;27986:80::o;28071:308::-;28110:1;28136;28126:2;;28141:18;;:::i;:::-;28258:66;28255:1;28252:73;28183:66;28180:1;28177:73;28173:153;28170:2;;;28329:18;;:::i;:::-;-1:-1:-1;28363:10:32;;28116:263::o;28384:389::-;28422:1;28463;28460;28449:16;28499:1;28496;28485:16;28520:3;28510:2;;28527:18;;:::i;:::-;28648:66;28643:3;28640:75;28571:66;28566:3;28563:75;28559:157;28556:2;;;28719:18;;:::i;:::-;28753:14;;;28428:345;-1:-1:-1;;;28428:345:32:o;28778:120::-;28818:1;28844;28834:2;;28849:18;;:::i;:::-;-1:-1:-1;28883:9:32;;28824:74::o;28903:679::-;28942:7;28974:66;29066:7;29063:1;29059:15;29100:7;29097:1;29093:15;29151:1;29147:2;29143:10;29140:1;29137:17;29132:2;29128;29124:11;29120:35;29117:2;;;29158:18;;:::i;:::-;29197:66;29289:7;29286:1;29282:15;29342:1;29338:2;29333:11;29330:1;29326:19;29321:2;29317;29313:11;29309:37;29306:2;;;29349:18;;:::i;:::-;29395:7;29392:1;29388:15;29378:25;;29448:1;29444:2;29439:11;29436:1;29432:19;29427:2;29423;29419:11;29415:37;29412:2;;;29455:18;;:::i;:::-;29520:1;29516:2;29511:11;29508:1;29504:19;29499:2;29495;29491:11;29487:37;29484:2;;;29527:18;;:::i;:::-;-1:-1:-1;;;29567:9:32;;;;;28954:628;-1:-1:-1;;;28954:628:32:o;29587:228::-;29627:7;29753:1;29685:66;29681:74;29678:1;29675:81;29670:1;29663:9;29656:17;29652:105;29649:2;;;29760:18;;:::i;:::-;-1:-1:-1;29800:9:32;;29639:176::o;29820:399::-;29858:4;29902:1;29899;29888:16;29938:1;29935;29924:16;29968:4;29963:3;29959:14;30082:3;30014:66;30010:76;30005:3;30001:86;29996:2;29989:10;29985:103;29982:2;;;30091:18;;:::i;:::-;30154:3;30144:8;30140:18;30135:3;30131:28;30127:2;30123:37;30120:2;;;30163:18;;:::i;:::-;-1:-1:-1;30200:13:32;;;29867:352;-1:-1:-1;;;29867:352:32:o;30224:407::-;30262:4;30306:1;30303;30292:16;30342:1;30339;30328:16;30372:4;30367:3;30363:14;30486:3;30418:66;30414:76;30409:3;30405:86;30400:2;30393:10;30389:103;30386:2;;;30495:18;;:::i;:::-;30566:3;30548:16;30544:26;30539:3;30535:36;30531:2;30527:45;30524:2;;;30575:18;;:::i;30636:254::-;30676:4;30705:42;30797:10;;;;30767;;30819:12;;;30816:2;;;30834:18;;:::i;:::-;30871:13;;30685:205;-1:-1:-1;;;30685:205:32:o;30895:125::-;30935:4;30963:1;30960;30957:8;30954:2;;;30968:18;;:::i;:::-;-1:-1:-1;31005:9:32;;30944:76::o;31025:258::-;31097:1;31107:113;31121:6;31118:1;31115:13;31107:113;;;31197:11;;;31191:18;31178:11;;;31171:39;31143:2;31136:10;31107:113;;;31238:6;31235:1;31232:13;31229:2;;;-1:-1:-1;;31273:1:32;31255:16;;31248:27;31078:205::o;31288:195::-;31327:3;31358:66;31351:5;31348:77;31345:2;;;31428:18;;:::i;:::-;-1:-1:-1;31475:1:32;31464:13;;31335:148::o;31488:112::-;31520:1;31546;31536:2;;31551:18;;:::i;:::-;-1:-1:-1;31585:9:32;;31526:74::o;31605:240::-;31639:3;31686:5;31683:1;31672:20;31716:66;31707:7;31704:79;31701:2;;;31786:18;;:::i;:::-;31822:17;;;31647:198;-1:-1:-1;31647:198:32:o;31850:193::-;31885:3;31916:66;31909:5;31906:77;31903:2;;;31986:18;;:::i;:::-;32022:15;;31893:150::o;32048:184::-;32100:77;32097:1;32090:88;32197:4;32194:1;32187:15;32221:4;32218:1;32211:15;32237:184;32289:77;32286:1;32279:88;32386:4;32383:1;32376:15;32410:4;32407:1;32400:15;32426:184;32478:77;32475:1;32468:88;32575:4;32572:1;32565:15;32599:4;32596:1;32589:15;32615:154;32701:42;32694:5;32690:54;32683:5;32680:65;32670:2;;32759:1;32756;32749:12;32774:118;32860:5;32853:13;32846:21;32839:5;32836:32;32826:2;;32882:1;32879;32872:12

Swarm Source

ipfs://ecd0e0c0ec87686ff17fb765e0b7ed2a3612c98f3c6ba242e3b51e3af5125fbd

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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