ETH Price: $3,390.22 (+4.36%)
Gas: 2 Gwei

Contract

0x7af00CF8D3a8A75210a5Ed74f2254E2EC43B5B5b
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Get Reward203944822024-07-27 1:04:352 days ago1722042275IN
0x7af00CF8...EC43B5B5b
0 ETH0.000556851.80758627
Get Reward203944562024-07-27 0:59:232 days ago1722041963IN
0x7af00CF8...EC43B5B5b
0 ETH0.000598151.79763903
Get Reward203924732024-07-26 18:20:112 days ago1722018011IN
0x7af00CF8...EC43B5B5b
0 ETH0.001281683.51064829
Withdraw Locked203688122024-07-23 11:04:115 days ago1721732651IN
0x7af00CF8...EC43B5B5b
0 ETH0.002342476.46116969
Withdraw Locked203688082024-07-23 11:03:235 days ago1721732603IN
0x7af00CF8...EC43B5B5b
0 ETH0.002356976.32268366
Get Reward203688022024-07-23 11:02:115 days ago1721732531IN
0x7af00CF8...EC43B5B5b
0 ETH0.002280635.55266078
Lock Longer203125062024-07-15 14:27:3513 days ago1721053655IN
0x7af00CF8...EC43B5B5b
0 ETH0.002330268.17745794
Get Reward203124822024-07-15 14:22:4713 days ago1721053367IN
0x7af00CF8...EC43B5B5b
0 ETH0.003060589.03101418
Withdraw Locked202856662024-07-11 20:30:2317 days ago1720729823IN
0x7af00CF8...EC43B5B5b
0 ETH0.001679224.85385014
Get Reward202856592024-07-11 20:28:5917 days ago1720729739IN
0x7af00CF8...EC43B5B5b
0 ETH0.001741554.55157523
Withdraw Locked202753792024-07-10 10:03:5919 days ago1720605839IN
0x7af00CF8...EC43B5B5b
0 ETH0.002081274.98890368
Withdraw Locked201961652024-06-29 8:31:2330 days ago1719649883IN
0x7af00CF8...EC43B5B5b
0 ETH0.001039832.99793299
Withdraw Locked201961622024-06-29 8:30:4730 days ago1719649847IN
0x7af00CF8...EC43B5B5b
0 ETH0.001210273.1666795
Withdraw Locked201840892024-06-27 16:02:2331 days ago1719504143IN
0x7af00CF8...EC43B5B5b
0 ETH0.0061755117.01111639
Withdraw Locked201840832024-06-27 16:01:1131 days ago1719504071IN
0x7af00CF8...EC43B5B5b
0 ETH0.0063194416.85166813
Withdraw Locked201812052024-06-27 6:22:3532 days ago1719469355IN
0x7af00CF8...EC43B5B5b
0 ETH0.001880545.18000305
Withdraw Locked201811952024-06-27 6:20:3532 days ago1719469235IN
0x7af00CF8...EC43B5B5b
0 ETH0.001949414.7236722
Get Reward201811652024-06-27 6:14:3532 days ago1719468875IN
0x7af00CF8...EC43B5B5b
0 ETH0.002321595.02680855
Get Reward201775542024-06-26 18:08:3532 days ago1719425315IN
0x7af00CF8...EC43B5B5b
0 ETH0.0032630110.153881
Get Reward201423422024-06-21 20:00:1137 days ago1719000011IN
0x7af00CF8...EC43B5B5b
0 ETH0.001546024.09077348
Get Reward201244212024-06-19 7:54:1140 days ago1718783651IN
0x7af00CF8...EC43B5B5b
0 ETH0.00213815.84292411
Get Reward201054382024-06-16 16:06:1142 days ago1718553971IN
0x7af00CF8...EC43B5B5b
0 ETH0.001850115.23818984
Get Reward201028682024-06-16 7:30:2343 days ago1718523023IN
0x7af00CF8...EC43B5B5b
0 ETH0.000867364.30156661
Stake Locked201028672024-06-16 7:30:1143 days ago1718523011IN
0x7af00CF8...EC43B5B5b
0 ETH0.001667814.10246137
Withdraw Locked201027862024-06-16 7:13:5943 days ago1718522039IN
0x7af00CF8...EC43B5B5b
0 ETH0.001639634.70551651
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xA64ed401...c9637fd54
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
FraxUnifiedFarm_ERC20_FraxswapV2

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 100000 runs

Other Settings:
default evmVersion, GNU GPLv2 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2022-10-04
*/

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.8.0;

// Sources flattened with hardhat v2.11.1 https://hardhat.org

// File contracts/Math/Math.sol


/**
 * @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 contracts/Curve/IveFXS.sol

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 contracts/Curve/IFraxGaugeController.sol


// 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) external view returns (uint256);
    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)
        external
        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 contracts/Common/Context.sol


/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with 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 contracts/Math/SafeMath.sol


/**
 * @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 contracts/ERC20/IERC20.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 contracts/Uniswap/TransferHelper.sol


// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

    function safeTransfer(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferETH(address to, uint value) internal {
        (bool success,) = to.call{value:value}(new bytes(0));
        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
    }
}


// File contracts/Curve/IFraxGaugeFXSRewardsDistributor.sol


interface IFraxGaugeFXSRewardsDistributor {
  function acceptOwnership() external;
  function curator_address() external view returns(address);
  function currentReward(address gauge_address) external view returns(uint256 reward_amount);
  function distributeReward(address gauge_address) external returns(uint256 weeks_elapsed, uint256 reward_tally);
  function distributionsOn() external view returns(bool);
  function gauge_whitelist(address) external view returns(bool);
  function is_middleman(address) external view returns(bool);
  function last_time_gauge_paid(address) external view returns(uint256);
  function nominateNewOwner(address _owner) external;
  function nominatedOwner() external view returns(address);
  function owner() external view returns(address);
  function recoverERC20(address tokenAddress, uint256 tokenAmount) external;
  function setCurator(address _new_curator_address) external;
  function setGaugeController(address _gauge_controller_address) external;
  function setGaugeState(address _gauge_address, bool _is_middleman, bool _is_active) external;
  function setTimelock(address _new_timelock) external;
  function timelock_address() external view returns(address);
  function toggleDistributions() external;
}


// File contracts/Utils/ReentrancyGuard.sol


/**
 * @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 contracts/Staking/Owned.sol


// 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 contracts/Misc_AMOs/convex/IConvexBaseRewardPool.sol


interface IConvexBaseRewardPool {
  function addExtraReward(address _reward) external returns (bool);
  function balanceOf(address account) external view returns (uint256);
  function clearExtraRewards() external;
  function currentRewards() external view returns (uint256);
  function donate(uint256 _amount) external returns (bool);
  function duration() external view returns (uint256);
  function earned(address account) external view returns (uint256);
  function extraRewards(uint256) external view returns (address);
  function extraRewardsLength() external view returns (uint256);
  function getReward() external returns (bool);
  function getReward(address _account, bool _claimExtras) external returns (bool);
  function historicalRewards() external view returns (uint256);
  function lastTimeRewardApplicable() external view returns (uint256);
  function lastUpdateTime() external view returns (uint256);
  function newRewardRatio() external view returns (uint256);
  function operator() external view returns (address);
  function periodFinish() external view returns (uint256);
  function pid() external view returns (uint256);
  function queueNewRewards(uint256 _rewards) external returns (bool);
  function queuedRewards() external view returns (uint256);
  function rewardManager() external view returns (address);
  function rewardPerToken() external view returns (uint256);
  function rewardPerTokenStored() external view returns (uint256);
  function rewardRate() external view returns (uint256);
  function rewardToken() external view returns (address);
  function rewards(address) external view returns (uint256);
  function stake(uint256 _amount) external returns (bool);
  function stakeAll() external returns (bool);
  function stakeFor(address _for, uint256 _amount) external returns (bool);
  function stakingToken() external view returns (address);
  function totalSupply() external view returns (uint256);
  function userRewardPerTokenPaid(address) external view returns (uint256);
  function withdraw(uint256 amount, bool claim) external returns (bool);
  function withdrawAll(bool claim) external;
  function withdrawAllAndUnwrap(bool claim) external;
  function withdrawAndUnwrap(uint256 amount, bool claim) external returns (bool);
}


// File contracts/Staking/FraxUnifiedFarmTemplate.sol


// ====================================================================
// |     ______                   _______                             |
// |    / _____________ __  __   / ____(_____  ____ _____  ________   |
// |   / /_  / ___/ __ `| |/_/  / /_  / / __ \/ __ `/ __ \/ ___/ _ \  |
// |  / __/ / /  / /_/ _>  <   / __/ / / / / / /_/ / / / / /__/  __/  |
// | /_/   /_/   \__,_/_/|_|  /_/   /_/_/ /_/\__,_/_/ /_/\___/\___/   |
// |                                                                  |
// ====================================================================
// ====================== FraxUnifiedFarmTemplate =====================
// ====================================================================
// Farming contract that accounts for veFXS
// Overrideable for UniV3, ERC20s, etc
// New for V2
//      - Multiple reward tokens possible
//      - Can add to existing locked stakes
//      - Contract is aware of proxied veFXS
//      - veFXS multiplier formula changed
// 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
// Dennis: github.com/denett

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








// Extra rewards

contract FraxUnifiedFarmTemplate is Owned, ReentrancyGuard {

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

    // Instances
    IveFXS private immutable veFXS = IveFXS(0xc8418aF6358FFddA74e09Ca9CC3Fe03Ca6aDC5b0);
    
    // Frax related
    address internal immutable frax_address = 0x853d955aCEf822Db058eb8505911ED77F175b99e;
    uint256 public fraxPerLPStored;

    // Constant for various precisions
    uint256 internal constant MULTIPLIER_PRECISION = 1e18;

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

    // Lock time and multiplier settings
    uint256 public lock_max_multiplier = uint256(2e18); // E18. 1x = e18
    uint256 public lock_time_for_max_multiplier = 1 * 365 * 86400; // 1 year
    // uint256 public lock_time_for_max_multiplier = 2 * 86400; // 2 days
    uint256 public lock_time_min = 594000; // 6.875 * 86400 (~7 day)

    // veFXS related
    uint256 public vefxs_boost_scale_factor = uint256(4e18); // E18. 4x = 4e18; 100 / scale_factor = % vefxs supply needed for max boost
    uint256 public vefxs_max_multiplier = uint256(2e18); // E18. 1x = 1e18
    uint256 public vefxs_per_frax_for_max_boost = uint256(4e18); // E18. 2e18 means 2 veFXS must be held by the staker per 1 FRAX
    mapping(address => uint256) internal _vefxsMultiplierStored;
    mapping(address => bool) internal valid_vefxs_proxies;
    mapping(address => mapping(address => bool)) internal proxy_allowed_stakers;

    // Reward addresses, gauge addresses, reward rates, and reward managers
    mapping(address => address) public rewardManagers; // token addr -> manager addr
    address[] internal rewardTokens;
    address[] internal gaugeControllers;
    address[] internal rewardDistributors;
    uint256[] internal rewardRatesManual;
    mapping(address => uint256) public rewardTokenAddrToIdx; // token addr -> token index
    
    // Reward period
    uint256 public constant 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) public lastRewardClaimTime; // staker addr -> timestamp
    
    // Gauge tracking
    uint256[] private last_gauge_relative_weights;
    uint256[] private last_gauge_time_totals;

    // Balance tracking
    uint256 internal _total_liquidity_locked;
    uint256 internal _total_combined_weight;
    mapping(address => uint256) internal _locked_liquidity;
    mapping(address => uint256) internal _combined_weights;
    mapping(address => uint256) public proxy_lp_balances; // Keeps track of LP balances proxy-wide. Needed to make sure the proxy boost is kept in line


    // Stakers set which proxy(s) they want to use
    mapping(address => address) public staker_designated_proxies; // Keep public so users can see on the frontend if they have a proxy

    // Admin booleans for emergencies and overrides
    bool public stakesUnlocked; // Release locked stakes in case of emergency
    bool internal withdrawalsPaused; // For emergencies
    bool internal rewardsCollectionPaused; // For emergencies
    bool internal stakingPaused; // For emergencies

    /* ========== STRUCTS ========== */
    // In children...


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

    modifier onlyByOwnGov() {
        require(msg.sender == owner || msg.sender == 0x8412ebf45bAC1B340BbE8F318b928C466c4E39CA, "Not owner or timelock");
        _;
    }

    modifier onlyTknMgrs(address reward_token_address) {
        require(msg.sender == owner || isTokenManagerFor(msg.sender, reward_token_address), "Not owner or tkn mgr");
        _;
    }

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

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

    constructor (
        address _owner,
        address[] memory _rewardTokens,
        address[] memory _rewardManagers,
        uint256[] memory _rewardRatesManual,
        address[] memory _gaugeControllers,
        address[] memory _rewardDistributors
    ) Owned(_owner) {

        // Address arrays
        rewardTokens = _rewardTokens;
        gaugeControllers = _gaugeControllers;
        rewardDistributors = _rewardDistributors;
        rewardRatesManual = _rewardRatesManual;

        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];

            // Push in empty relative weights to initialize the array
            last_gauge_relative_weights.push(0);

            // Push in empty time totals to initialize the array
            last_gauge_time_totals.push(0);
        }

        // Other booleans
        stakesUnlocked = false;

        // Initialization
        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp + rewardsDuration;
    }

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

    // ------ REWARD RELATED ------

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

    // All the reward tokens
    function getAllRewardTokens() external view returns (address[] memory) {
        return rewardTokens;
    }

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

    function rewardRates(uint256 token_idx) public view returns (uint256 rwd_rate) {
        address gauge_controller_address = gaugeControllers[token_idx];
        if (gauge_controller_address != address(0)) {
            rwd_rate = (IFraxGaugeController(gauge_controller_address).global_emission_rate() * last_gauge_relative_weights[token_idx]) / 1e18;
        }
        else {
            rwd_rate = rewardRatesManual[token_idx];
        }
    }

    // Amount of reward tokens per LP token / liquidity unit
    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] + (
                    ((lastTimeRewardApplicable() - lastUpdateTime) * rewardRates(i) * 1e18) / _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] = ((_combined_weights[account] * (reward_arr[i] - userRewardsPerTokenPaid[account][i])) / 1e18)
                                + 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[](rewardRatesManual.length);

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


    // ------ LIQUIDITY AND WEIGHTS ------

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

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

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

    // 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];
    }

    // Calculated the combined weight for an account
    function calcCurCombinedWeight(address account) public virtual view 
        returns (
            uint256 old_combined_weight,
            uint256 new_vefxs_multiplier,
            uint256 new_combined_weight
        )
    {
        revert("Need cCCW logic");
    }

    // ------ LOCK RELATED ------

    // Multiplier amount, given the length of the lock
    function lockMultiplier(uint256 secs) public view returns (uint256) {
        // return Math.min(
        //     lock_max_multiplier,
        //     uint256(MULTIPLIER_PRECISION) + (
        //         (secs * (lock_max_multiplier - MULTIPLIER_PRECISION)) / lock_time_for_max_multiplier
        //     )
        // ) ;
        return Math.min(
            lock_max_multiplier,
            (secs * lock_max_multiplier) / lock_time_for_max_multiplier
        ) ;
    }

    // ------ FRAX RELATED ------

    function userStakedFrax(address account) public view returns (uint256) {
        return (fraxPerLPStored * _locked_liquidity[account]) / MULTIPLIER_PRECISION;
    }

    function proxyStakedFrax(address proxy_address) public view returns (uint256) {
        return (fraxPerLPStored * proxy_lp_balances[proxy_address]) / MULTIPLIER_PRECISION;
    }

    // Max LP that can get max veFXS boosted for a given address at its current veFXS balance
    function maxLPForMaxBoost(address account) external view returns (uint256) {
        return (veFXS.balanceOf(account) * MULTIPLIER_PRECISION * MULTIPLIER_PRECISION) / (vefxs_per_frax_for_max_boost * fraxPerLPStored);
    }

    // Meant to be overridden
    function fraxPerLPToken() public virtual view returns (uint256) {
        revert("Need fPLPT logic");
    }

    // ------ veFXS RELATED ------

    function minVeFXSForMaxBoost(address account) public view returns (uint256) {
        return (userStakedFrax(account) * vefxs_per_frax_for_max_boost) / MULTIPLIER_PRECISION;
    }

    function minVeFXSForMaxBoostProxy(address proxy_address) public view returns (uint256) {
        return (proxyStakedFrax(proxy_address) * vefxs_per_frax_for_max_boost) / MULTIPLIER_PRECISION;
    }

    function getProxyFor(address addr) public view returns (address){
        if (valid_vefxs_proxies[addr]) {
            // If addr itself is a proxy, return that.
            // If it farms itself directly, it should use the shared LP tally in proxyStakedFrax
            return addr;
        }
        else {
            // Otherwise, return the proxy, or address(0)
            return staker_designated_proxies[addr];
        }
    }

    function veFXSMultiplier(address account) public view returns (uint256 vefxs_multiplier) {
        // Use either the user's or their proxy's veFXS balance
        uint256 vefxs_bal_to_use = 0;
        address the_proxy = getProxyFor(account);
        vefxs_bal_to_use = (the_proxy == address(0)) ? veFXS.balanceOf(account) : veFXS.balanceOf(the_proxy);

        // First option based on fraction of total veFXS supply, with an added scale factor
        uint256 mult_optn_1 = (vefxs_bal_to_use * vefxs_max_multiplier * vefxs_boost_scale_factor) 
                            / (veFXS.totalSupply() * MULTIPLIER_PRECISION);
        
        // Second based on old method, where the amount of FRAX staked comes into play
        uint256 mult_optn_2;
        {
            uint256 veFXS_needed_for_max_boost;

            // Need to use proxy-wide FRAX balance if applicable, to prevent exploiting
            veFXS_needed_for_max_boost = (the_proxy == address(0)) ? minVeFXSForMaxBoost(account) : minVeFXSForMaxBoostProxy(the_proxy);

            if (veFXS_needed_for_max_boost > 0){ 
                uint256 user_vefxs_fraction = (vefxs_bal_to_use * MULTIPLIER_PRECISION) / veFXS_needed_for_max_boost;
                
                mult_optn_2 = (user_vefxs_fraction * vefxs_max_multiplier) / MULTIPLIER_PRECISION;
            }
            else mult_optn_2 = 0; // This will happen with the first stake, when user_staked_frax is 0
        }

        // Select the higher of the two
        vefxs_multiplier = (mult_optn_1 > mult_optn_2 ? mult_optn_1 : mult_optn_2);

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

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


    // Proxy can allow a staker to use their veFXS balance (the staker will have to reciprocally toggle them too)
    // Must come before stakerSetVeFXSProxy
    // CALLED BY PROXY
    function proxyToggleStaker(address staker_address) external {
        require(valid_vefxs_proxies[msg.sender], "Invalid proxy");
        proxy_allowed_stakers[msg.sender][staker_address] = !proxy_allowed_stakers[msg.sender][staker_address]; 

        // Disable the staker's set proxy if it was the toggler and is currently on
        if (staker_designated_proxies[staker_address] == msg.sender){
            staker_designated_proxies[staker_address] = address(0); 

            // Remove the LP as well
            proxy_lp_balances[msg.sender] -= _locked_liquidity[staker_address];
        }
    }

    // Staker can allow a veFXS proxy (the proxy will have to toggle them first)
    // CALLED BY STAKER
    function stakerSetVeFXSProxy(address proxy_address) external {
        require(valid_vefxs_proxies[proxy_address], "Invalid proxy");
        require(proxy_allowed_stakers[proxy_address][msg.sender], "Proxy has not allowed you yet");
        
        // Corner case sanity check to make sure LP isn't double counted
        address old_proxy_addr = staker_designated_proxies[msg.sender];
        if (old_proxy_addr != address(0)) {
            // Remove the LP count from the old proxy
            proxy_lp_balances[old_proxy_addr] -= _locked_liquidity[msg.sender];
        }

        // Set the new proxy
        staker_designated_proxies[msg.sender] = proxy_address; 

        // Add the the LP as well
        proxy_lp_balances[proxy_address] += _locked_liquidity[msg.sender];
    }

    // ------ STAKING ------
    // In children...


    // ------ WITHDRAWING ------
    // In children...


    // ------ REWARDS SYNCING ------

    function updateRewardAndBalance(address account, bool sync_too) public {
        // 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 - old_combined_weight;
                _total_combined_weight = _total_combined_weight + weight_diff;
                _combined_weights[account] = old_combined_weight + weight_diff;
            } else {
                uint256 weight_diff = old_combined_weight - new_combined_weight;
                _total_combined_weight = _total_combined_weight - weight_diff;
                _combined_weights[account] = old_combined_weight - 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];
            }
        }
    }


    // ------ REWARDS CLAIMING ------

    function getRewardExtraLogic(address destination_address) public nonReentrant {
        require(rewardsCollectionPaused == false, "Rewards collection paused");
        return _getRewardExtraLogic(msg.sender, destination_address);
    }

    function _getRewardExtraLogic(address rewardee, address destination_address) internal virtual {
        revert("Need gREL logic");
    }

    // Two different getReward functions are needed because of delegateCall and msg.sender issues
    // For backwards-compatibility
    function getReward(address destination_address) external nonReentrant returns (uint256[] memory) {
        return _getReward(msg.sender, destination_address, true);
    }

    function getReward2(address destination_address, bool claim_extra_too) external nonReentrant returns (uint256[] memory) {
        return _getReward(msg.sender, destination_address, claim_extra_too);
    }

    // No withdrawer == msg.sender check needed since this is only internally callable
    function _getReward(address rewardee, address destination_address, bool do_extra_logic) internal updateRewardAndBalanceMdf(rewardee, true) returns (uint256[] memory rewards_before) {
        // Update the last reward claim time first, as an extra reentrancy safeguard
        lastRewardClaimTime[rewardee] = block.timestamp;
        
        // Make sure rewards collection isn't paused
        require(rewardsCollectionPaused == false, "Rewards collection paused");
        
        // 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;
            if (rewards_before[i] > 0) {
                TransferHelper.safeTransfer(rewardTokens[i], destination_address, rewards_before[i]);

                emit RewardPaid(rewardee, rewards_before[i], rewardTokens[i], destination_address);
            }
        }

        // Handle additional reward logic
        if (do_extra_logic) {
            _getRewardExtraLogic(rewardee, destination_address);
        }
    }


    // ------ FARM SYNCING ------

    // If the period expired, renew it
    function retroCatchUp() internal {
        // Pull in rewards from the rewards distributor, if applicable
        for (uint256 i = 0; i < rewardDistributors.length; i++){ 
            address reward_distributor_address = rewardDistributors[i];
            if (reward_distributor_address != address(0)) {
                IFraxGaugeFXSRewardsDistributor(reward_distributor_address).distributeReward(address(this));
            }
        }

        // 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 - 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) * rewardsDuration * (num_periods_elapsed + 1)) <= IERC20(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 + ((num_periods_elapsed + 1) * rewardsDuration);

        // Update the rewards and time
        _updateStoredRewardsAndTime();

        // Update the fraxPerLPStored
        fraxPerLPStored = fraxPerLPToken();

        // Pull in rewards and set the reward rate for one week, based off of that
        // If the rewards get messed up for some reason, set this to 0 and it will skip
        // if (rewardRatesManual[1] != 0 && rewardRatesManual[2] != 0) {
        //     // CRV & CVX
        //     // ====================================
        //     uint256 crv_before = ERC20(rewardTokens[1]).balanceOf(address(this));
        //     uint256 cvx_before = ERC20(rewardTokens[2]).balanceOf(address(this));
        //     IConvexBaseRewardPool(0x329cb014b562d5d42927cfF0dEdF4c13ab0442EF).getReward(
        //         address(this),
        //         true
        //     );
        //     uint256 crv_after = ERC20(rewardTokens[1]).balanceOf(address(this));
        //     uint256 cvx_after = ERC20(rewardTokens[2]).balanceOf(address(this));

        //     // Set the new reward rate
        //     rewardRatesManual[1] = (crv_after - crv_before) / rewardsDuration;
        //     rewardRatesManual[2] = (cvx_after - cvx_before) / rewardsDuration;
        // }

    }

    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_gauge_weights(bool force_update) public {
        // Loop through the gauge controllers
        for (uint256 i = 0; i < gaugeControllers.length; i++){ 
            address gauge_controller_address = gaugeControllers[i];
            if (gauge_controller_address != address(0)) {
                if (force_update || (block.timestamp > last_gauge_time_totals[i])){
                    // Update the gauge_relative_weight
                    last_gauge_relative_weights[i] = IFraxGaugeController(gauge_controller_address).gauge_relative_weight_write(address(this), block.timestamp);
                    last_gauge_time_totals[i] = IFraxGaugeController(gauge_controller_address).time_total();
                }
            }
        }
    }

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

        // Update the fraxPerLPStored
        fraxPerLPStored = fraxPerLPToken();

        if (block.timestamp >= periodFinish) {
            retroCatchUp();
        }
        else {
            _updateStoredRewardsAndTime();
        }
    }

    /* ========== RESTRICTED FUNCTIONS - Curator callable ========== */
    
    // ------ FARM SYNCING ------
    // In children...

    // ------ PAUSES ------

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

    /* ========== RESTRICTED FUNCTIONS - Owner or timelock only ========== */
    
    function unlockStakes() external onlyByOwnGov {
        stakesUnlocked = !stakesUnlocked;
    }

    // Adds a valid veFXS proxy address
    function toggleValidVeFXSProxy(address _proxy_addr) external onlyByOwnGov {
        valid_vefxs_proxies[_proxy_addr] = !valid_vefxs_proxies[_proxy_addr];
    }

    // 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 onlyTknMgrs(tokenAddress) {
        // 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
        // Also, other tokens, like the staking token, airdrops, or accidental deposits, can be withdrawn by the owner
        if (
                (isRewardToken && rewardManagers[tokenAddress] == msg.sender)
                || (!isRewardToken && (msg.sender == owner))
            ) {
            TransferHelper.safeTransfer(tokenAddress, msg.sender, tokenAmount);
            return;
        }
        // If none of the above conditions are true
        else {
            revert("No valid tokens to recover");
        }
    }

    function setMiscVariables(
        uint256[6] memory _misc_vars
        // [0]: uint256 _lock_max_multiplier, 
        // [1] uint256 _vefxs_max_multiplier, 
        // [2] uint256 _vefxs_per_frax_for_max_boost,
        // [3] uint256 _vefxs_boost_scale_factor,
        // [4] uint256 _lock_time_for_max_multiplier,
        // [5] uint256 _lock_time_min
    ) external onlyByOwnGov {
        require(_misc_vars[0] >= MULTIPLIER_PRECISION, "Must be >= MUL PREC");
        require((_misc_vars[1] >= 0) && (_misc_vars[2] >= 0) && (_misc_vars[3] >= 0), "Must be >= 0");
        require((_misc_vars[4] >= 1) && (_misc_vars[5] >= 1), "Must be >= 1");

        lock_max_multiplier = _misc_vars[0];
        vefxs_max_multiplier = _misc_vars[1];
        vefxs_per_frax_for_max_boost = _misc_vars[2];
        vefxs_boost_scale_factor = _misc_vars[3];
        lock_time_for_max_multiplier = _misc_vars[4];
        lock_time_min = _misc_vars[5];
    }

    // The owner or the reward token managers can set reward rates 
    function setRewardVars(address reward_token_address, uint256 _new_rate, address _gauge_controller_address, address _rewards_distributor_address) external onlyTknMgrs(reward_token_address) {
        rewardRatesManual[rewardTokenAddrToIdx[reward_token_address]] = _new_rate;
        gaugeControllers[rewardTokenAddrToIdx[reward_token_address]] = _gauge_controller_address;
        rewardDistributors[rewardTokenAddrToIdx[reward_token_address]] = _rewards_distributor_address;
    }

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

    /* ========== EVENTS ========== */
    event RewardPaid(address indexed user, uint256 amount, address token_address, address destination_address);

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


// File contracts/Fraxswap/core/interfaces/IUniswapV2PairV5.sol


interface IUniswapV2PairV5 {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;
    function initialize(address, address) external;
}


// File contracts/Fraxswap/core/interfaces/IFraxswapPair.sol


// ====================================================================
// |     ______                   _______                             |
// |    / _____________ __  __   / ____(_____  ____ _____  ________   |
// |   / /_  / ___/ __ `| |/_/  / /_  / / __ \/ __ `/ __ \/ ___/ _ \  |
// |  / __/ / /  / /_/ _>  <   / __/ / / / / / /_/ / / / / /__/  __/  |
// | /_/   /_/   \__,_/_/|_|  /_/   /_/_/ /_/\__,_/_/ /_/\___/\___/   |
// |                                                                  |
// ====================================================================
// ========================= IFraxswapPair ==========================
// ====================================================================
// Fraxswap LP Pair Interface
// Inspired by https://www.paradigm.xyz/2021/07/twamm
// https://github.com/para-dave/twamm

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

// Primary Author(s)
// Rich Gee: https://github.com/zer0blockchain
// Dennis: https://github.com/denett

// Reviewer(s) / Contributor(s)
// Travis Moore: https://github.com/FortisFortuna
// Sam Kazemian: https://github.com/samkazemian

interface IFraxswapPair is IUniswapV2PairV5 {
    // TWAMM

    event LongTermSwap0To1(address indexed addr, uint256 orderId, uint256 amount0In, uint256 numberOfTimeIntervals);
    event LongTermSwap1To0(address indexed addr, uint256 orderId, uint256 amount1In, uint256 numberOfTimeIntervals);
    event CancelLongTermOrder(address indexed addr, uint256 orderId, address sellToken, uint256 unsoldAmount, address buyToken, uint256 purchasedAmount);
    event WithdrawProceedsFromLongTermOrder(address indexed addr, uint256 orderId, address indexed proceedToken, uint256 proceeds, bool orderExpired);
    
    function fee() external view returns (uint);

    function longTermSwapFrom0To1(uint256 amount0In, uint256 numberOfTimeIntervals) external returns (uint256 orderId);
    function longTermSwapFrom1To0(uint256 amount1In, uint256 numberOfTimeIntervals) external returns (uint256 orderId);
    function cancelLongTermSwap(uint256 orderId) external;
    function withdrawProceedsFromLongTermSwap(uint256 orderId) external returns (bool is_expired, address rewardTkn, uint256 totalReward);
    function executeVirtualOrders(uint256 blockTimestamp) external;

    function getAmountOut(uint amountIn, address tokenIn) external view returns (uint);
    function getAmountIn(uint amountOut, address tokenOut) external view returns (uint);

    function orderTimeInterval() external returns (uint256);
    function getTWAPHistoryLength() external view returns (uint);
    function getTwammReserves() external view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast, uint112 _twammReserve0, uint112 _twammReserve1, uint256 _fee);
    function getReserveAfterTwamm(uint256 blockTimestamp) external view returns (uint112 _reserve0, uint112 _reserve1, uint256 lastVirtualOrderTimestamp, uint112 _twammReserve0, uint112 _twammReserve1);
    function getNextOrderID() external view returns (uint256);
    function getOrderIDsForUser(address user) external view returns (uint256[] memory);
    function getOrderIDsForUserLength(address user) external view returns (uint256);
//    function getDetailedOrdersForUser(address user, uint256 offset, uint256 limit) external view returns (LongTermOrdersLib.Order[] memory detailed_orders);
    function twammUpToDate() external view returns (bool);
    function getTwammState() external view returns (uint256 token0Rate, uint256 token1Rate, uint256 lastVirtualOrderTimestamp, uint256 orderTimeInterval_rtn, uint256 rewardFactorPool0, uint256 rewardFactorPool1);
    function getTwammSalesRateEnding(uint256 _blockTimestamp) external view returns (uint256 orderPool0SalesRateEnding, uint256 orderPool1SalesRateEnding);
    function getTwammRewardFactor(uint256 _blockTimestamp) external view returns (uint256 rewardFactorPool0AtTimestamp, uint256 rewardFactorPool1AtTimestamp);
    function getTwammOrder(uint256 orderId) external view returns (uint256 id, uint256 creationTimestamp, uint256 expirationTimestamp, uint256 saleRate, address owner, address sellTokenAddr, address buyTokenAddr);
    function getTwammOrderProceedsView(uint256 orderId, uint256 blockTimestamp) external view returns (bool orderExpired, uint256 totalReward);
    function getTwammOrderProceeds(uint256 orderId) external returns (bool orderExpired, uint256 totalReward);


    function togglePauseNewSwaps() external;
}


// File contracts/Staking/FraxUnifiedFarm_ERC20.sol


// ====================================================================
// |     ______                   _______                             |
// |    / _____________ __  __   / ____(_____  ____ _____  ________   |
// |   / /_  / ___/ __ `| |/_/  / /_  / / __ \/ __ `/ __ \/ ___/ _ \  |
// |  / __/ / /  / /_/ _>  <   / __/ / / / / / /_/ / / / / /__/  __/  |
// | /_/   /_/   \__,_/_/|_|  /_/   /_/_/ /_/\__,_/_/ /_/\___/\___/   |
// |                                                                  |
// ====================================================================
// ======================= FraxUnifiedFarm_ERC20 ======================
// ====================================================================
// For ERC20 Tokens
// Uses FraxUnifiedFarmTemplate.sol

// -------------------- VARIES --------------------

// Convex wrappers
// import "../Misc_AMOs/convex/IConvexStakingWrapperFrax.sol";
// import "../Misc_AMOs/convex/IDepositToken.sol";
// import "../Misc_AMOs/curve/I2pool.sol";
// import "../Misc_AMOs/curve/I2poolToken.sol";

// Fraxswap

// G-UNI
// import "../Misc_AMOs/gelato/IGUniPool.sol";

// mStable
// import '../Misc_AMOs/mstable/IFeederPool.sol';

// StakeDAO sdETH-FraxPut
// import '../Misc_AMOs/stakedao/IOpynPerpVault.sol';

// StakeDAO Vault
// import '../Misc_AMOs/stakedao/IStakeDaoVault.sol';

// Uniswap V2
// import '../Uniswap/Interfaces/IUniswapV2Pair.sol';

// Vesper
// import '../Misc_AMOs/vesper/IVPool.sol';

// ------------------------------------------------

contract FraxUnifiedFarm_ERC20 is FraxUnifiedFarmTemplate {

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

    // -------------------- COMMON -------------------- 
    bool internal frax_is_token0;

    // -------------------- VARIES --------------------

    // Convex stkcvxFPIFRAX, stkcvxFRAXBP, etc
    // IConvexStakingWrapperFrax public stakingToken;
    // I2poolToken public curveToken;
    // I2pool public curvePool;

    // Fraxswap
    IFraxswapPair public stakingToken;

    // G-UNI
    // IGUniPool public stakingToken;
    
    // mStable
    // IFeederPool public stakingToken;

    // sdETH-FraxPut Vault
    // IOpynPerpVault public stakingToken;

    // StakeDAO Vault
    // IStakeDaoVault public stakingToken;

    // Uniswap V2
    // IUniswapV2Pair public stakingToken;

    // Vesper
    // IVPool public stakingToken;

    // ------------------------------------------------

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

    /* ========== STRUCTS ========== */

    // Struct for the stake
    struct LockedStake {
        bytes32 kek_id;
        uint256 start_timestamp;
        uint256 liquidity;
        uint256 ending_timestamp;
        uint256 lock_multiplier; // 6 decimals of precision. 1x = 1000000
    }
    
    /* ========== CONSTRUCTOR ========== */

    constructor (
        address _owner,
        address[] memory _rewardTokens,
        address[] memory _rewardManagers,
        uint256[] memory _rewardRatesManual,
        address[] memory _gaugeControllers,
        address[] memory _rewardDistributors,
        address _stakingToken
    ) 
    FraxUnifiedFarmTemplate(_owner, _rewardTokens, _rewardManagers, _rewardRatesManual, _gaugeControllers, _rewardDistributors)
    {

        // -------------------- VARIES --------------------

        // Fraxswap
        // stakingToken = IFraxswapPair(_stakingToken);
        // address token0 = stakingToken.token0();
        // frax_is_token0 = (token0 == frax_address);

        // G-UNI
        // stakingToken = IGUniPool(_stakingToken);
        // address token0 = address(stakingToken.token0());
        // frax_is_token0 = (token0 == frax_address);

        // mStable
        // stakingToken = IFeederPool(_stakingToken);

        // StakeDAO sdETH-FraxPut Vault
        // stakingToken = IOpynPerpVault(_stakingToken);

        // StakeDAO Vault
        // stakingToken = IStakeDaoVault(_stakingToken);

        // Uniswap V2
        // stakingToken = IUniswapV2Pair(_stakingToken);
        // address token0 = stakingToken.token0();
        // if (token0 == frax_address) frax_is_token0 = true;
        // else frax_is_token0 = false;

        // Vesper
        // stakingToken = IVPool(_stakingToken);
    }

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

    // ------ FRAX RELATED ------

    function fraxPerLPToken() public virtual view override returns (uint256) {
        // Get the amount of FRAX 'inside' of the lp tokens
        uint256 frax_per_lp_token;

        // Convex stkcvxFPIFRAX and stkcvxFRAXBP only
        // ============================================
        // {
        //     // Half of the LP is FRAXBP
        //     // Using 0.5 * virtual price for gas savings
        //     frax_per_lp_token = curvePool.get_virtual_price() / 2; 
        // }

        // Convex Stable/FRAXBP
        // ============================================
        // {
        //     // Half of the LP is FRAXBP. Half of that should be FRAX.
        //     // Using 0.25 * virtual price for gas savings
        //     frax_per_lp_token = curvePool.get_virtual_price() / 4; 
        // }

        // Convex Volatile/FRAXBP
        // ============================================
        // {
        //     // Half of the LP is FRAXBP. Half of that should be FRAX.
        //     // Using 0.25 * lp price for gas savings
        //     frax_per_lp_token = curvePool.lp_price() / 4; 
        // }

        // Fraxswap
        // ============================================
        // {
        //     uint256 total_frax_reserves;
        //     (uint256 _reserve0, uint256 _reserve1, , ,) = (stakingToken.getReserveAfterTwamm(block.timestamp));
        //     if (frax_is_token0) total_frax_reserves = _reserve0;
        //     else total_frax_reserves = _reserve1;

        //     frax_per_lp_token = (total_frax_reserves * 1e18) / stakingToken.totalSupply();
        // }

        // G-UNI
        // ============================================
        // {
        //     (uint256 reserve0, uint256 reserve1) = stakingToken.getUnderlyingBalances();
        //     uint256 total_frax_reserves = frax_is_token0 ? reserve0 : reserve1;

        //     frax_per_lp_token = (total_frax_reserves * 1e18) / stakingToken.totalSupply();
        // }

        // mStable
        // ============================================
        // {
        //     uint256 total_frax_reserves;
        //     (, IFeederPool.BassetData memory vaultData) = (stakingToken.getBasset(frax_address));
        //     total_frax_reserves = uint256(vaultData.vaultBalance);
        //     frax_per_lp_token = (total_frax_reserves * 1e18) / stakingToken.totalSupply();
        // }

        // StakeDAO sdETH-FraxPut Vault
        // ============================================
        // {
        //    uint256 frax3crv_held = stakingToken.totalUnderlyingControlled();
        
        //    // Optimistically assume 50/50 FRAX/3CRV ratio in the metapool to save gas
        //    frax_per_lp_token = ((frax3crv_held * 1e18) / stakingToken.totalSupply()) / 2;
        // }

        // StakeDAO Vault
        // ============================================
        // {
        //    uint256 frax3crv_held = stakingToken.balance();
        
        //    // Optimistically assume 50/50 FRAX/3CRV ratio in the metapool to save gas
        //    frax_per_lp_token = ((frax3crv_held * 1e18) / stakingToken.totalSupply()) / 2;
        // }

        // Uniswap V2
        // ============================================
        // {
        //     uint256 total_frax_reserves;
        //     (uint256 reserve0, uint256 reserve1, ) = (stakingToken.getReserves());
        //     if (frax_is_token0) total_frax_reserves = reserve0;
        //     else total_frax_reserves = reserve1;

        //     frax_per_lp_token = (total_frax_reserves * 1e18) / stakingToken.totalSupply();
        // }

        // Vesper
        // ============================================
        // frax_per_lp_token = stakingToken.pricePerShare();

        return frax_per_lp_token;
    }

    // ------ LIQUIDITY AND WEIGHTS ------

    function calcCurrLockMultiplier(address account, uint256 stake_idx) public view returns (uint256 midpoint_lock_multiplier) {
        // Get the stake
        LockedStake memory thisStake = lockedStakes[account][stake_idx];

        // Handles corner case where user never claims for a new stake
        // Don't want the multiplier going above the max
        uint256 accrue_start_time;
        if (lastRewardClaimTime[account] < thisStake.start_timestamp) {
            accrue_start_time = thisStake.start_timestamp;
        }
        else {
            accrue_start_time = lastRewardClaimTime[account];
        }
        
        // 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 - accrue_start_time;
                uint256 time_after_expiry = block.timestamp - thisStake.ending_timestamp;

                // Average the pre-expiry lock multiplier
                uint256 pre_expiry_avg_multiplier = lockMultiplier(time_before_expiry / 2);

                // Get the weighted-average lock_multiplier
                // uint256 numerator = (pre_expiry_avg_multiplier * time_before_expiry) + (MULTIPLIER_PRECISION * time_after_expiry);
                uint256 numerator = (pre_expiry_avg_multiplier * time_before_expiry) + (0 * time_after_expiry);
                midpoint_lock_multiplier = numerator / (time_before_expiry + time_after_expiry);
            }
            else {
                // Otherwise, it needs to just be 1x
                // midpoint_lock_multiplier = MULTIPLIER_PRECISION;

                // Otherwise, it needs to just be 0x
                midpoint_lock_multiplier = 0;
            }
        }
        // If the lock is not expired
        else {
            // Decay the lock multiplier based on the time left
            uint256 avg_time_left;
            {
                uint256 time_left_p1 = thisStake.ending_timestamp - accrue_start_time;
                uint256 time_left_p2 = thisStake.ending_timestamp - block.timestamp;
                avg_time_left = (time_left_p1 + time_left_p2) / 2;
            }
            midpoint_lock_multiplier = lockMultiplier(avg_time_left);
        }

        // Sanity check: make sure it never goes above the initial multiplier
        if (midpoint_lock_multiplier > thisStake.lock_multiplier) midpoint_lock_multiplier = thisStake.lock_multiplier;
    }

    // Calculate the combined weight for an account
    function calcCurCombinedWeight(address account) public override 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;
        if (
            (_locked_liquidity[account] == 0 && _combined_weights[account] == 0) || 
            (new_vefxs_multiplier >= _vefxsMultiplierStored[account])
        ) {
            // This is only called for the first stake to make sure the veFXS multiplier is not cut in half
            // Also used if the user increased or maintained their position
            midpoint_vefxs_multiplier = new_vefxs_multiplier;
        }
        else {
            // Handles natural decay with a non-increased veFXS position
            midpoint_vefxs_multiplier = (new_vefxs_multiplier + _vefxsMultiplierStored[account]) / 2;
        }

        // 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];

            // Calculate the midpoint lock multiplier
            uint256 midpoint_lock_multiplier = calcCurrLockMultiplier(account, i);

            // Calculate the combined boost
            uint256 liquidity = thisStake.liquidity;
            uint256 combined_boosted_amount = liquidity + ((liquidity * (midpoint_lock_multiplier + midpoint_vefxs_multiplier)) / MULTIPLIER_PRECISION);
            new_combined_weight += combined_boosted_amount;
        }
    }

    // ------ LOCK RELATED ------

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

    // Returns the length of the locked stakes for a given account
    function lockedStakesOfLength(address account) external view returns (uint256) {
        return lockedStakes[account].length;
    }

    // // All the locked stakes for a given account [old-school method]
    // function lockedStakesOfMultiArr(address account) external view returns (
    //     bytes32[] memory kek_ids,
    //     uint256[] memory start_timestamps,
    //     uint256[] memory liquidities,
    //     uint256[] memory ending_timestamps,
    //     uint256[] memory lock_multipliers
    // ) {
    //     for (uint256 i = 0; i < lockedStakes[account].length; i++){ 
    //         LockedStake memory thisStake = lockedStakes[account][i];
    //         kek_ids[i] = thisStake.kek_id;
    //         start_timestamps[i] = thisStake.start_timestamp;
    //         liquidities[i] = thisStake.liquidity;
    //         ending_timestamps[i] = thisStake.ending_timestamp;
    //         lock_multipliers[i] = thisStake.lock_multiplier;
    //     }
    // }

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

    // ------ STAKING ------

    function _getStake(address staker_address, bytes32 kek_id) internal view returns (LockedStake memory locked_stake, uint256 arr_idx) {
        for (uint256 i = 0; i < lockedStakes[staker_address].length; i++){ 
            if (kek_id == lockedStakes[staker_address][i].kek_id){
                locked_stake = lockedStakes[staker_address][i];
                arr_idx = i;
                break;
            }
        }
        require(locked_stake.kek_id == kek_id, "Stake not found");
        
    }

    // Add additional LPs to an existing locked stake
    function lockAdditional(bytes32 kek_id, uint256 addl_liq) nonReentrant updateRewardAndBalanceMdf(msg.sender, true) public {
        // Get the stake and its index
        (LockedStake memory thisStake, uint256 theArrayIndex) = _getStake(msg.sender, kek_id);

        // Calculate the new amount
        uint256 new_amt = thisStake.liquidity + addl_liq;

        // Checks
        require(addl_liq >= 0, "Must be positive");

        // Pull the tokens from the sender
        TransferHelper.safeTransferFrom(address(stakingToken), msg.sender, address(this), addl_liq);

        // Update the stake
        lockedStakes[msg.sender][theArrayIndex] = LockedStake(
            kek_id,
            thisStake.start_timestamp,
            new_amt,
            thisStake.ending_timestamp,
            thisStake.lock_multiplier
        );

        // Update liquidities
        _total_liquidity_locked += addl_liq;
        _locked_liquidity[msg.sender] += addl_liq;
        {
            address the_proxy = getProxyFor(msg.sender);
            if (the_proxy != address(0)) proxy_lp_balances[the_proxy] += addl_liq;
        }

        // Need to call to update the combined weights
        updateRewardAndBalance(msg.sender, false);

        emit LockedAdditional(msg.sender, kek_id, addl_liq);
    }

    // Extends the lock of an existing stake
    function lockLonger(bytes32 kek_id, uint256 new_ending_ts) nonReentrant updateRewardAndBalanceMdf(msg.sender, true) public {
        // Get the stake and its index
        (LockedStake memory thisStake, uint256 theArrayIndex) = _getStake(msg.sender, kek_id);

        // Check
        require(new_ending_ts > block.timestamp, "Must be in the future");

        // Calculate some times
        uint256 time_left = (thisStake.ending_timestamp > block.timestamp) ? thisStake.ending_timestamp - block.timestamp : 0;
        uint256 new_secs = new_ending_ts - block.timestamp;

        // Checks
        // require(time_left > 0, "Already expired");
        require(new_secs > time_left, "Cannot shorten lock time");
        require(new_secs >= lock_time_min, "Minimum stake time not met");
        require(new_secs <= lock_time_for_max_multiplier, "Trying to lock for too long");

        // Update the stake
        lockedStakes[msg.sender][theArrayIndex] = LockedStake(
            kek_id,
            block.timestamp,
            thisStake.liquidity,
            new_ending_ts,
            lockMultiplier(new_secs)
        );

        // Need to call to update the combined weights
        updateRewardAndBalance(msg.sender, false);

        emit LockedLonger(msg.sender, kek_id, new_secs, block.timestamp, new_ending_ts);
    }

    

    // Two different stake functions are needed because of delegateCall and msg.sender issues (important for proxies)
    function stakeLocked(uint256 liquidity, uint256 secs) nonReentrant external returns (bytes32) {
        return _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 updateRewardAndBalanceMdf(staker_address, true) returns (bytes32) {
        require(stakingPaused == false, "Staking paused");
        require(secs >= lock_time_min, "Minimum stake time not met");
        require(secs <= lock_time_for_max_multiplier,"Trying to lock for too long");

        // Pull in the required token(s)
        // Varies per farm
        TransferHelper.safeTransferFrom(address(stakingToken), source_address, address(this), liquidity);

        // Get the lock multiplier and kek_id
        uint256 lock_multiplier = lockMultiplier(secs);
        bytes32 kek_id = keccak256(abi.encodePacked(staker_address, start_timestamp, liquidity, _locked_liquidity[staker_address]));
        
        // Create the locked stake
        lockedStakes[staker_address].push(LockedStake(
            kek_id,
            start_timestamp,
            liquidity,
            start_timestamp + secs,
            lock_multiplier
        ));

        // Update liquidities
        _total_liquidity_locked += liquidity;
        _locked_liquidity[staker_address] += liquidity;
        {
            address the_proxy = getProxyFor(staker_address);
            if (the_proxy != address(0)) proxy_lp_balances[the_proxy] += liquidity;
        }
        
        // Need to call again to make sure everything is correct
        updateRewardAndBalance(staker_address, false);

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

        return kek_id;
    }

    // ------ WITHDRAWING ------

    // Two different withdrawLocked functions are needed because of delegateCall and msg.sender issues (important for proxies)
    function withdrawLocked(bytes32 kek_id, address destination_address) nonReentrant external returns (uint256) {
        require(withdrawalsPaused == false, "Withdrawals paused");
        return _withdrawLocked(msg.sender, destination_address, kek_id);
    }

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

        // Get the stake and its index
        (LockedStake memory thisStake, uint256 theArrayIndex) = _getStake(staker_address, kek_id);
        require(block.timestamp >= thisStake.ending_timestamp || stakesUnlocked == true, "Stake is still locked!");
        uint256 liquidity = thisStake.liquidity;

        if (liquidity > 0) {

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

            // Update liquidities
            _total_liquidity_locked -= liquidity;
            _locked_liquidity[staker_address] -= liquidity;
            {
                address the_proxy = getProxyFor(staker_address);
                if (the_proxy != address(0)) proxy_lp_balances[the_proxy] -= liquidity;
            }

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

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

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

        return liquidity;
    }


    function _getRewardExtraLogic(address rewardee, address destination_address) internal override {
        // Do nothing
    }

    /* ========== RESTRICTED FUNCTIONS - Owner or timelock only ========== */

    // Inherited...

    /* ========== EVENTS ========== */
    event LockedAdditional(address indexed user, bytes32 kek_id, uint256 amount);
    event LockedLonger(address indexed user, bytes32 kek_id, uint256 new_secs, uint256 new_start_ts, uint256 new_end_ts);
    event StakeLocked(address indexed user, uint256 amount, uint256 secs, bytes32 kek_id, address source_address);
    event WithdrawLocked(address indexed user, uint256 liquidity, bytes32 kek_id, address destination_address);
}


// File contracts/Staking/Variants/FraxUnifiedFarm_ERC20_FraxswapV2.sol



contract FraxUnifiedFarm_ERC20_FraxswapV2 is FraxUnifiedFarm_ERC20 {

    constructor (
        address _owner,
        address[] memory _rewardTokens,
        address[] memory _rewardManagers,
        uint256[] memory _rewardRates,
        address[] memory _gaugeControllers,
        address[] memory _rewardDistributors,
        address _stakingToken 
    ) 
    FraxUnifiedFarm_ERC20(_owner , _rewardTokens, _rewardManagers, _rewardRates, _gaugeControllers, _rewardDistributors, _stakingToken)
    {
        // Fraxswap
        stakingToken = IFraxswapPair(_stakingToken);
        address token0 = stakingToken.token0();
        frax_is_token0 = (token0 == frax_address);
    }

    function fraxPerLPToken() public view override returns (uint256) {
        // Get the amount of FRAX 'inside' of the lp tokens
        uint256 frax_per_lp_token;

        // Fraxswap
        // ============================================
        {
            uint256 total_frax_reserves;
            // Technically getReserveAfterTwamm is more accurate, but if the TWAMM becomes paused, it will eventually gas out
            // (uint256 _reserve0, uint256 _reserve1, , ,) = (stakingToken.getReserveAfterTwamm(block.timestamp));
            (uint256 _reserve0, uint256 _reserve1, ) = (stakingToken.getReserves());
            if (frax_is_token0) total_frax_reserves = _reserve0;
            else total_frax_reserves = _reserve1;

            frax_per_lp_token = (total_frax_reserves * 1e18) / stakingToken.totalSupply();
        }

        return frax_per_lp_token;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address[]","name":"_rewardTokens","type":"address[]"},{"internalType":"address[]","name":"_rewardManagers","type":"address[]"},{"internalType":"uint256[]","name":"_rewardRates","type":"uint256[]"},{"internalType":"address[]","name":"_gaugeControllers","type":"address[]"},{"internalType":"address[]","name":"_rewardDistributors","type":"address[]"},{"internalType":"address","name":"_stakingToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bytes32","name":"kek_id","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LockedAdditional","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bytes32","name":"kek_id","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"new_secs","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"new_start_ts","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"new_end_ts","type":"uint256"}],"name":"LockedLonger","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"secs","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"kek_id","type":"bytes32"},{"indexed":false,"internalType":"address","name":"source_address","type":"address"}],"name":"StakeLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"liquidity","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"kek_id","type":"bytes32"},{"indexed":false,"internalType":"address","name":"destination_address","type":"address"}],"name":"WithdrawLocked","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","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"},{"internalType":"uint256","name":"stake_idx","type":"uint256"}],"name":"calcCurrLockMultiplier","outputs":[{"internalType":"uint256","name":"midpoint_lock_multiplier","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"reward_token_address","type":"address"},{"internalType":"address","name":"new_manager_address","type":"address"}],"name":"changeTokenManager","outputs":[],"stateMutability":"nonpayable","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":"new_earned","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fraxPerLPStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fraxPerLPToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllRewardTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getProxyFor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"destination_address","type":"address"}],"name":"getReward","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"destination_address","type":"address"},{"internalType":"bool","name":"claim_extra_too","type":"bool"}],"name":"getReward2","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"destination_address","type":"address"}],"name":"getRewardExtraLogic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256[]","name":"rewards_per_duration_arr","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"caller_addr","type":"address"},{"internalType":"address","name":"reward_token_addr","type":"address"}],"name":"isTokenManagerFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastRewardClaimTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"kek_id","type":"bytes32"},{"internalType":"uint256","name":"addl_liq","type":"uint256"}],"name":"lockAdditional","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"kek_id","type":"bytes32"},{"internalType":"uint256","name":"new_ending_ts","type":"uint256"}],"name":"lockLonger","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":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"lockedStakes","outputs":[{"internalType":"bytes32","name":"kek_id","type":"bytes32"},{"internalType":"uint256","name":"start_timestamp","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"ending_timestamp","type":"uint256"},{"internalType":"uint256","name":"lock_multiplier","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"lockedStakesOf","outputs":[{"components":[{"internalType":"bytes32","name":"kek_id","type":"bytes32"},{"internalType":"uint256","name":"start_timestamp","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"ending_timestamp","type":"uint256"},{"internalType":"uint256","name":"lock_multiplier","type":"uint256"}],"internalType":"struct FraxUnifiedFarm_ERC20.LockedStake[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"lockedStakesOfLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"maxLPForMaxBoost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"proxy_address","type":"address"}],"name":"minVeFXSForMaxBoostProxy","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":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"proxy_address","type":"address"}],"name":"proxyStakedFrax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker_address","type":"address"}],"name":"proxyToggleStaker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"proxy_lp_balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"","type":"address"}],"name":"rewardManagers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token_idx","type":"uint256"}],"name":"rewardRates","outputs":[{"internalType":"uint256","name":"rwd_rate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardTokenAddrToIdx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsPerToken","outputs":[{"internalType":"uint256[]","name":"newRewardsPerTokenStored","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[6]","name":"_misc_vars","type":"uint256[6]"}],"name":"setMiscVariables","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":"address","name":"reward_token_address","type":"address"},{"internalType":"uint256","name":"_new_rate","type":"uint256"},{"internalType":"address","name":"_gauge_controller_address","type":"address"},{"internalType":"address","name":"_rewards_distributor_address","type":"address"}],"name":"setRewardVars","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"secs","type":"uint256"}],"name":"stakeLocked","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"proxy_address","type":"address"}],"name":"stakerSetVeFXSProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"staker_designated_proxies","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakesUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IFraxswapPair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sync","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"force_update","type":"bool"}],"name":"sync_gauge_weights","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_proxy_addr","type":"address"}],"name":"toggleValidVeFXSProxy","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":"unlockStakes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"sync_too","type":"bool"}],"name":"updateRewardAndBalance","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":"vefxs_multiplier","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vefxs_boost_scale_factor","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":"bytes32","name":"kek_id","type":"bytes32"},{"internalType":"address","name":"destination_address","type":"address"}],"name":"withdrawLocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103cf5760003560e01c80638bad86a7116101ff578063d42fc9b41161011a578063e7f30582116100ad578063f2caeb1e1161007c578063f2caeb1e14610944578063f77e34d114610957578063facefb641461096a578063fff6cae91461097d57600080fd5b8063e7f3058214610916578063ebe2b12b14610929578063f288baf614610932578063f2a8d3491461093b57600080fd5b8063de1a6551116100e9578063de1a6551146108e0578063e01f62bf146108f3578063e1ba95d2146108fb578063e44b9fa51461090357600080fd5b8063d42fc9b414610871578063d5e1a9c614610884578063d7400d5614610897578063d9f96e8d146108aa57600080fd5b8063c00007b011610192578063cc2abd6411610161578063cc2abd6414610839578063cdc82e801461084c578063d2010fb414610855578063d2fbdc0d1461085e57600080fd5b8063c00007b0146107d4578063c3543826146107e7578063c8f33c91146107fa578063ca6df29d1461080357600080fd5b8063a0f23476116101ce578063a0f234761461079c578063aa1d4fce146107af578063b85efd06146107b8578063b94c4dcb146107cb57600080fd5b80638bad86a71461072e5780638da5cb5b1461075c57806391cf600a1461077c5780639637927f1461078f57600080fd5b806353a47bb7116102ef57806372f702f31161028257806379ba50971161025157806379ba5097146106e05780637d6ef08e146106e85780637f472e54146107085780638980f11f1461071b57600080fd5b806372f702f314610656578063774d4ae71461067f5780637910d17b146106925780637970833e146106a557600080fd5b806369339245116102be57806369339245146106055780636c430dbb146106255780636e27cef91461064557806370641a361461064e57600080fd5b806353a47bb7146105c257806355189773146105e25780635bfd9258146105f557806364f2c060146105fd57600080fd5b8063231b68dc11610367578063386a952511610336578063386a95251461055c578063387edc861461056657806341a16f3f146105795780634fd2b536146105af57600080fd5b8063231b68dc1461049657806328408bab146104b95780632c0c2a0a1461051357806336f89af21461052657600080fd5b806317b18c89116103a357806317b18c89146104485780631c1f78eb1461045b5780631e090f01146104635780631face8561461048357600080fd5b80628cc262146103d45780630d7bac4f146103fd57806312edb24c1461041e5780631627540c14610433575b600080fd5b6103e76103e2366004614998565b610985565b6040516103f491906149b3565b60405180910390f35b61041061040b3660046149f7565b610b04565b6040519081526020016103f4565b610426610b30565b6040516103f49190614a10565b610446610441366004614998565b610b9f565b005b610410610456366004614a5e565b610cc4565b6103e7610d4e565b610476610471366004614998565b610def565b6040516103f49190614a80565b610410610491366004614998565b610ea3565b6104a96104a4366004614aee565b610ee9565b60405190151581526020016103f4565b6104ee6104c7366004614998565b602080526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103f4565b610410610521366004614998565b610f57565b610410610534366004614998565b73ffffffffffffffffffffffffffffffffffffffff166000908152601e602052604090205490565b61041062093a8081565b610446610574366004614998565b61126b565b6104ee610587366004614998565b600f6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6104106105bd366004614998565b611355565b6001546104ee9073ffffffffffffffffffffffffffffffffffffffff1681565b6104466105f0366004614b2f565b611376565b61041061149a565b601c54610410565b610410610613366004614998565b60146020526000908152604090205481565b610410610633366004614998565b60186020526000908152604090205481565b61041060085481565b6103e7611621565b6021546104ee9065010000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b61041061068d366004614b66565b611780565b6103e76106a0366004614b2f565b61198c565b6106b86106b3366004614b66565b611a08565b604080519586526020860194909452928401919091526060830152608082015260a0016103f4565b610446611a56565b6104106106f6366004614998565b601f6020526000908152604090205481565b610410610716366004614998565b611ba1565b610446610729366004614b66565b611bb8565b61074161073c366004614998565b611da1565b604080519384526020840192909252908201526060016103f4565b6000546104ee9073ffffffffffffffffffffffffffffffffffffffff1681565b61044661078a366004614998565b611fd5565b6021546104a99060ff1681565b6104106107aa366004614998565b6120c8565b61041060095481565b6104466107c6366004614a5e565b6121a0565b61041060075481565b6103e76107e2366004614998565b6123f9565b6104ee6107f5366004614998565b612481565b61041060055481565b610410610811366004614998565b73ffffffffffffffffffffffffffffffffffffffff1660009081526022602052604090205490565b610446610847366004614b90565b6124e3565b61041060065481565b61041060035481565b61044661086c366004614a5e565b612619565b61041061087f366004614998565b61297d565b610446610892366004614bdb565b6129b9565b6104466108a5366004614998565b612ba8565b6104106108b8366004614998565b73ffffffffffffffffffffffffffffffffffffffff166000908152601d602052604090205490565b6104466108ee366004614aee565b612dc3565b601b54610410565b610446612eaa565b610410610911366004614c28565b612f7b565b610446610924366004614998565b613069565b61041060045481565b610410600a5481565b610410600b5481565b6104106109523660046149f7565b6131c7565b610446610965366004614c4b565b6132de565b610446610978366004614c97565b6134b0565b610446613670565b60606000610991611621565b60105490915067ffffffffffffffff8111156109af576109af614c68565b6040519080825280602002602001820160405280156109d8578160200160208202803683370190505b5073ffffffffffffffffffffffffffffffffffffffff84166000908152601e602052604090205490925015610afe5760005b601054811015610afc5773ffffffffffffffffffffffffffffffffffffffff84166000818152601760209081526040808320858452825280832054938352601682528083208584529091529020548351670de0b6b3a76400009190859085908110610a7757610a77614d3c565b6020026020010151610a899190614d9a565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601e6020526040902054610ab99190614dad565b610ac39190614dc4565b610acd9190614dff565b838281518110610adf57610adf614d3c565b602090810291909101015280610af481614e12565b915050610a0a565b505b50919050565b600654600754600091610b2a91610b1b8286614dad565b610b259190614dc4565b6136a0565b92915050565b60606010805480602002602001604051908101604052809291908181526020018280548015610b9557602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610b6a575b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e000000000000000000000000000000000060648201526084015b60405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229060200160405180910390a150565b60006002805403610d31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c42565b60028055610d4233808585426136b8565b60016002559392505050565b60135460609067ffffffffffffffff811115610d6c57610d6c614c68565b604051908082528060200260200182016040528015610d95578160200160208202803683370190505b50905060005b601354811015610deb5762093a80610db2826131c7565b610dbc9190614dad565b828281518110610dce57610dce614d3c565b602090810291909101015280610de381614e12565b915050610d9b565b5090565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602260209081526040808320805482518185028101850190935280835260609492939192909184015b82821015610e9857838290600052602060002090600502016040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152505081526020019060010190610e34565b505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601f6020526040812054600354670de0b6b3a764000091610edf91614dad565b610b2a9190614dc4565b6000805473ffffffffffffffffffffffffffffffffffffffff90811690841603610f1557506001610b2a565b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600f6020526040902054818516911603610f4e57506001610b2a565b50600092915050565b60008080610f6484612481565b905073ffffffffffffffffffffffffffffffffffffffff811615611037576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f000000000000000000000000c8418af6358ffdda74e09ca9cc3fe03ca6adc5b016906370a0823190602401602060405180830381865afa15801561100e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110329190614e4a565b6110e7565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301527f000000000000000000000000c8418af6358ffdda74e09ca9cc3fe03ca6adc5b016906370a0823190602401602060405180830381865afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190614e4a565b91506000670de0b6b3a76400007f000000000000000000000000c8418af6358ffdda74e09ca9cc3fe03ca6adc5b073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561115f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111839190614e4a565b61118d9190614dad565b600954600a5461119d9086614dad565b6111a79190614dad565b6111b19190614dc4565b905060008073ffffffffffffffffffffffffffffffffffffffff8416156111e0576111db84611ba1565b6111e9565b6111e987611355565b9050801561123b57600081611206670de0b6b3a764000088614dad565b6112109190614dc4565b9050670de0b6b3a7640000600a54826112299190614dad565b6112339190614dc4565b925050611240565b600091505b5080821161124e5780611250565b815b9450600a5485111561126257600a5494505b50505050919050565b60028054036112d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c42565b6002805560215462010000900460ff161561134d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5265776172647320636f6c6c656374696f6e20706175736564000000000000006044820152606401610c42565b506001600255565b6000670de0b6b3a7640000600b5461136c8461297d565b610edf9190614dad565b801561138457611384613670565b73ffffffffffffffffffffffffffffffffffffffff8216156114965760008060006113ae85611da1565b9250925092506113bd85613ac0565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600c602052604090208290558281106114415760006113f88483614d9a565b905080601c546114089190614dff565b601c556114158185614dff565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601e602052604090205550611492565b600061144d8285614d9a565b905080601c5461145d9190614d9a565b601c5561146a8185614d9a565b73ffffffffffffffffffffffffffffffffffffffff87166000908152601e6020526040902055505b5050505b5050565b6000806000806000602160059054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561150f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115339190614e81565b506021546dffffffffffffffffffffffffffff928316945091169150640100000000900460ff16156115675781925061156b565b8092505b602160059054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115fc9190614e4a565b61160e84670de0b6b3a7640000614dad565b6116189190614dc4565b95945050505050565b6060601b54600014806116345750601c54155b1561168e576015805480602002602001604051908101604052809291908181526020018280548015610b9557602002820191906000526020600020905b815481526020019060010190808311611671575050505050905090565b60105467ffffffffffffffff8111156116a9576116a9614c68565b6040519080825280602002602001820160405280156116d2578160200160208202803683370190505b50905060005b601554811015610deb57601c546116ee826131c7565b6005546116f9613bc0565b6117039190614d9a565b61170d9190614dad565b61171f90670de0b6b3a7640000614dad565b6117299190614dc4565b6015828154811061173c5761173c614d3c565b90600052602060002001546117519190614dff565b82828151811061176357611763614d3c565b60209081029190910101528061177881614e12565b9150506116d8565b73ffffffffffffffffffffffffffffffffffffffff821660009081526022602052604081208054829190849081106117ba576117ba614d3c565b600091825260208083206040805160a081018252600590940290910180548452600181015484840181905260028201548584015260038201546060860152600490910154608085015273ffffffffffffffffffffffffffffffffffffffff891685526018909252832054919350111561183857506020810151611860565b5073ffffffffffffffffffffffffffffffffffffffff84166000908152601860205260409020545b4282606001511161192057606082015173ffffffffffffffffffffffffffffffffffffffff861660009081526018602052604090205410156119175760008183606001516118ae9190614d9a565b905060008360600151426118c29190614d9a565b905060006118d461040b600285614dc4565b905060006118e28382614dad565b6118ec8584614dad565b6118f69190614dff565b90506119028385614dff565b61190c9082614dc4565b965050505050611970565b60009250611970565b6000808284606001516119339190614d9a565b905060004285606001516119479190614d9a565b905060026119558284614dff565b61195f9190614dc4565b9250505061196c81610b04565b9350505b816080015183111561198457816080015192505b505092915050565b606060028054036119f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c42565b60028055610d42338484613bd3565b60226020528160005260406000208181548110611a2457600080fd5b600091825260209091206005909102018054600182015460028301546003840154600490940154929550909350919085565b60015473ffffffffffffffffffffffffffffffffffffffff163314611afd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e65727368697000000000000000000000006064820152608401610c42565b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff93841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b6000670de0b6b3a7640000600b5461136c84610ea3565b600054829073ffffffffffffffffffffffffffffffffffffffff16331480611be55750611be53382610ee9565b611c4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f74206f776e6572206f7220746b6e206d67720000000000000000000000006044820152606401610c42565b6000805b601054811015611cc5578473ffffffffffffffffffffffffffffffffffffffff1660108281548110611c8357611c83614d3c565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1603611cb35760019150611cc5565b80611cbd81614e12565b915050611c4f565b50808015611cf9575073ffffffffffffffffffffffffffffffffffffffff8481166000908152600f60205260409020541633145b80611d24575080158015611d24575060005473ffffffffffffffffffffffffffffffffffffffff1633145b15611d3a57611d34843385613e9f565b50505050565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e6f2076616c696420746f6b656e7320746f207265636f7665720000000000006044820152606401610c42565b505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601e60205260408120549080611dd284610f57565b73ffffffffffffffffffffffffffffffffffffffff85166000908152601d602052604081205491935090158015611e2c575073ffffffffffffffffffffffffffffffffffffffff85166000908152601e6020526040902054155b80611e5c575073ffffffffffffffffffffffffffffffffffffffff85166000908152600c60205260409020548310155b15611e68575081611ea8565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600c6020526040902054600290611e9b9085614dff565b611ea59190614dc4565b90505b6000915060005b73ffffffffffffffffffffffffffffffffffffffff8616600090815260226020526040902054811015611fcc5773ffffffffffffffffffffffffffffffffffffffff86166000908152602260205260408120805483908110611f1357611f13614d3c565b90600052602060002090600502016040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152505090506000611f6c8884611780565b60408301519091506000670de0b6b3a7640000611f898785614dff565b611f939084614dad565b611f9d9190614dc4565b611fa79083614dff565b9050611fb38188614dff565b9650505050508080611fc490614e12565b915050611eaf565b50509193909250565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061200e5750738412ebf45bac1b340bbe8f318b928c466c4e39ca33145b612074576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610c42565b73ffffffffffffffffffffffffffffffffffffffff166000908152600d6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b6000600354600b546120da9190614dad565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152670de0b6b3a76400009182917f000000000000000000000000c8418af6358ffdda74e09ca9cc3fe03ca6adc5b016906370a0823190602401602060405180830381865afa158015612172573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121969190614e4a565b61136c9190614dad565b600280540361220b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c42565b6002805533600161221c8282611376565b6000806122293387614008565b91509150600085836040015161223f9190614dff565b905060215461226f9065010000000000900473ffffffffffffffffffffffffffffffffffffffff163330896141cd565b6040805160a0810182528881526020858101518183015281830184905260608087015190830152608080870151908301523360009081526022909152919091208054849081106122c1576122c1614d3c565b9060005260206000209060050201600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015590505085601b60008282546123169190614dff565b9091555050336000908152601d60205260408120805488929061233a908490614dff565b909155506000905061234b33612481565b905073ffffffffffffffffffffffffffffffffffffffff8116156123a45773ffffffffffffffffffffffffffffffffffffffff81166000908152601f60205260408120805489929061239e908490614dff565b90915550505b506123b0336000611376565b604080518881526020810188905233917f2640b32e7e5d0fa2a21ea06b22fbd75fda0fda384a895a5fdeef43646de47a0c910160405180910390a2505060016002555050505050565b60606002805403612466576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c42565b6002805561247633836001613bd3565b600160025592915050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600d602052604081205460ff16156124b3575090565b5073ffffffffffffffffffffffffffffffffffffffff90811660009081526020805260409020541690565b919050565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061251c5750738412ebf45bac1b340bbe8f318b928c466c4e39ca33145b612582576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610c42565b6021805491151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff931515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff951515630100000002959095167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff00ff909316929092179390931791909116179055565b6002805403612684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c42565b600280553360016126958282611376565b6000806126a23387614008565b9150915042851161270f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4d75737420626520696e207468652066757475726500000000000000000000006044820152606401610c42565b600042836060015111612723576000612733565b4283606001516127339190614d9a565b905060006127414288614d9a565b90508181116127ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f43616e6e6f742073686f7274656e206c6f636b2074696d6500000000000000006044820152606401610c42565b600854811015612818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d696e696d756d207374616b652074696d65206e6f74206d65740000000000006044820152606401610c42565b600754811115612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f547279696e6720746f206c6f636b20666f7220746f6f206c6f6e6700000000006044820152606401610c42565b6040518060a00160405280898152602001428152602001856040015181526020018881526020016128b483610b04565b90523360009081526022602052604090208054859081106128d7576128d7614d3c565b90600052602060002090600502016000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040155905050612925336000611376565b6040805189815260208101839052428183015260608101899052905133917fc2cf1aae6decacbc52f96b4e4fec96d4ebab5236e4ed987165537bc463014a43919081900360800190a250506001600255505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601d6020526040812054600354670de0b6b3a764000091610edf91614dad565b600054849073ffffffffffffffffffffffffffffffffffffffff163314806129e657506129e63382610ee9565b612a4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f74206f776e6572206f7220746b6e206d67720000000000000000000000006044820152606401610c42565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260146020526040902054601380548692908110612a8757612a87614d3c565b9060005260206000200181905550826011601460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481548110612ae857612ae8614d3c565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055918716815260149091526040902054601280548492908110612b5957612b59614d3c565b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600d602052604090205460ff16612c37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642070726f7879000000000000000000000000000000000000006044820152606401610c42565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600e6020908152604080832033845290915290205460ff16612cd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f50726f787920686173206e6f7420616c6c6f77656420796f75207965740000006044820152606401610c42565b33600090815260208052604090205473ffffffffffffffffffffffffffffffffffffffff168015612d4657336000908152601d602090815260408083205473ffffffffffffffffffffffffffffffffffffffff85168452601f9092528220805491929091612d40908490614d9a565b90915550505b3360009081526020808052604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8716908117909155601d835281842054908452601f9092528220805491929091612dba908490614dff565b90915550505050565b600054829073ffffffffffffffffffffffffffffffffffffffff16331480612df05750612df03382610ee9565b612e56576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f74206f776e6572206f7220746b6e206d67720000000000000000000000006044820152606401610c42565b5073ffffffffffffffffffffffffffffffffffffffff9182166000908152600f6020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480612ee35750738412ebf45bac1b340bbe8f318b928c466c4e39ca33145b612f49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610c42565b602180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b60006002805403612fe8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c42565b60028055602154610100900460ff161561305e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5769746864726177616c732070617573656400000000000000000000000000006044820152606401610c42565b610d4233838561436b565b336000908152600d602052604090205460ff166130e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642070726f7879000000000000000000000000000000000000006044820152606401610c42565b336000818152600e6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8681168552908352818420805460ff8116157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009091161790559180529091205416036131c45773ffffffffffffffffffffffffffffffffffffffff811660009081526020808052604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055601d825280832054338452601f90925282208054919290916131be908490614d9a565b90915550505b50565b600080601183815481106131dd576131dd614d3c565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905080156132b857670de0b6b3a76400006019848154811061322357613223614d3c565b90600052602060002001548273ffffffffffffffffffffffffffffffffffffffff16630a3be7576040518163ffffffff1660e01b8152600401602060405180830381865afa158015613279573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061329d9190614e4a565b6132a79190614dad565b6132b19190614dc4565b9150610afe565b601383815481106132cb576132cb614d3c565b9060005260206000200154915050919050565b60005b6011548110156114965760006011828154811061330057613300614d3c565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050801561349d5782806133525750601a828154811061334457613344614d3c565b906000526020600020015442115b1561349d576040517f6472eee100000000000000000000000000000000000000000000000000000000815230600482015242602482015273ffffffffffffffffffffffffffffffffffffffff821690636472eee1906044016020604051808303816000875af11580156133c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133ed9190614e4a565b6019838154811061340057613400614d3c565b90600052602060002001819055508073ffffffffffffffffffffffffffffffffffffffff1663513872bd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061347d9190614e4a565b601a838154811061349057613490614d3c565b6000918252602090912001555b50806134a881614e12565b9150506132e1565b60005473ffffffffffffffffffffffffffffffffffffffff163314806134e95750738412ebf45bac1b340bbe8f318b928c466c4e39ca33145b61354f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610c42565b8051670de0b6b3a764000011156135c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4d757374206265203e3d204d554c2050524543000000000000000000000000006044820152606401610c42565b60808101516001118015906135dc575060a0810151600111155b613642576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4d757374206265203e3d203100000000000000000000000000000000000000006044820152606401610c42565b80516006556020810151600a556040810151600b556060810151600955608081015160075560a00151600855565b61367a60006132de565b61368261149a565b6003556004544210613698576136966145ce565b565b613696614901565b60008183106136af57816136b1565b825b9392505050565b60008560016136c78282611376565b6021546301000000900460ff161561373b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f5374616b696e67207061757365640000000000000000000000000000000000006044820152606401610c42565b6008548510156137a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d696e696d756d207374616b652074696d65206e6f74206d65740000000000006044820152606401610c42565b600754851115613813576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f547279696e6720746f206c6f636b20666f7220746f6f206c6f6e6700000000006044820152606401610c42565b6021546138419065010000000000900473ffffffffffffffffffffffffffffffffffffffff168830896141cd565b600061384c86610b04565b73ffffffffffffffffffffffffffffffffffffffff8a166000908152601d602090815260408083205490517fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060608f901b169281019290925260348201899052605482018b9052607482015291925090609401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012073ffffffffffffffffffffffffffffffffffffffff8e1660009081526022835283902060a0850184528185529184018a90529183018b9052909250906060810161393f8a8a614dff565b815260209081018590528254600181810185556000948552828520845160059093020191825591830151918101919091556040820151600282015560608201516003820155608090910151600490910155601b80548a92906139a2908490614dff565b909155505073ffffffffffffffffffffffffffffffffffffffff8a166000908152601d6020526040812080548a92906139dc908490614dff565b90915550600090506139ed8b612481565b905073ffffffffffffffffffffffffffffffffffffffff811615613a465773ffffffffffffffffffffffffffffffffffffffff81166000908152601f6020526040812080548b9290613a40908490614dff565b90915550505b50613a528a6000611376565b604080518981526020810189905290810182905273ffffffffffffffffffffffffffffffffffffffff8a811660608301528b16907ff400e72e69ef4402819dfc57eeddc66f5eb69bf405e0e8098b1946ec1ac14a229060800160405180910390a29998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116156131c4576000613ae782610985565b905060005b8151811015613b5557818181518110613b0757613b07614d3c565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff85166000908152601783526040808220858352909352919091205580613b4d81614e12565b915050613aec565b5060005b8151811015611d9c5760158181548110613b7557613b75614d3c565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff8616835260168252604080842085855290925291205580613bb881614e12565b915050613b59565b6000613bce426004546136a0565b905090565b6060836001613be28282611376565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260186020526040902042905560215462010000900460ff1615613c7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5265776172647320636f6c6c656374696f6e20706175736564000000000000006044820152606401610c42565b60105467ffffffffffffffff811115613c9857613c98614c68565b604051908082528060200260200182016040528015613cc1578160200160208202803683370190505b50925060005b601054811015613e955773ffffffffffffffffffffffffffffffffffffffff871660009081526017602090815260408083208484529091529020548451859083908110613d1657613d16614d3c565b60209081029190910181019190915273ffffffffffffffffffffffffffffffffffffffff881660009081526017825260408082208483529092529081208190558451859083908110613d6a57613d6a614d3c565b60200260200101511115613e8357613dd960108281548110613d8e57613d8e614d3c565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1687868481518110613dcc57613dcc614d3c565b6020026020010151613e9f565b8673ffffffffffffffffffffffffffffffffffffffff167f1d2f2ca53af5d2f333bd32fdd45f9c52ad8ebe31414f7792912077fcb3876dff858381518110613e2357613e23614d3c565b602002602001015160108481548110613e3e57613e3e614d3c565b600091825260209182902001546040805193845273ffffffffffffffffffffffffffffffffffffffff918216928401929092528a169082015260600160405180910390a25b80613e8d81614e12565b915050613cc7565b5050509392505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691613f369190614eea565b6000604051808303816000865af19150503d8060008114613f73576040519150601f19603f3d011682016040523d82523d6000602084013e613f78565b606091505b5091509150818015613fa2575080511580613fa2575080806020019051810190613fa29190614f06565b611492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c4544006044820152606401610c42565b61403d6040518060a0016040528060008019168152602001600081526020016000815260200160008152602001600081525090565b6000805b73ffffffffffffffffffffffffffffffffffffffff851660009081526022602052604090205481101561415b5773ffffffffffffffffffffffffffffffffffffffff851660009081526022602052604090208054829081106140a5576140a5614d3c565b90600052602060002090600502016000015484036141495773ffffffffffffffffffffffffffffffffffffffff851660009081526022602052604090208054829081106140f4576140f4614d3c565b90600052602060002090600502016040518060a001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481525050925080915061415b565b8061415381614e12565b915050614041565b50815183146141c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5374616b65206e6f7420666f756e6400000000000000000000000000000000006044820152606401610c42565b9250929050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052915160009283929088169161426c9190614eea565b6000604051808303816000865af19150503d80600081146142a9576040519150601f19603f3d011682016040523d82523d6000602084013e6142ae565b606091505b50915091508180156142d85750805115806142d85750808060200190518101906142d89190614f06565b614363576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f464160448201527f494c4544000000000000000000000000000000000000000000000000000000006064820152608401610c42565b505050505050565b600061437984846001613bd3565b506000806143878685614008565b915091508160600151421015806143a5575060215460ff1615156001145b61440b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f5374616b65206973207374696c6c206c6f636b656421000000000000000000006044820152606401610c42565b604082015180156145c4576021546144439065010000000000900473ffffffffffffffffffffffffffffffffffffffff168783613e9f565b80601b60008282546144559190614d9a565b909155505073ffffffffffffffffffffffffffffffffffffffff87166000908152601d60205260408120805483929061448f908490614d9a565b90915550600090506144a088612481565b905073ffffffffffffffffffffffffffffffffffffffff8116156144f95773ffffffffffffffffffffffffffffffffffffffff81166000908152601f6020526040812080548492906144f3908490614d9a565b90915550505b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260226020526040902080548390811061453157614531614d3c565b600091825260208220600590910201818155600181018290556002810182905560038101829055600401819055614569908890611376565b604080518281526020810187905273ffffffffffffffffffffffffffffffffffffffff888116828401529151918916917f1d9308f6b22a2754a1c622bb30889e8f8f956c83e524d039e9d65d5f052eb9089181900360600190a25b9695505050505050565b60005b6012548110156146bf576000601282815481106145f0576145f0614d3c565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905080156146ac576040517f092193ab00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff82169063092193ab9060240160408051808303816000875af1158015614685573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146a99190614f23565b50505b50806146b781614e12565b9150506145d1565b50600062093a80600454426146d49190614d9a565b6146de9190614dc4565b905060005b6010548110156148c1576010818154811061470057614700614d3c565b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa158015614777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061479b9190614e4a565b6147a6836001614dff565b62093a806147b3846131c7565b6147bd9190614dad565b6147c79190614dad565b1115601082815481106147dc576147dc614d3c565b60009182526020918290200154604080517f4e6f7420656e6f7567682072657761726420746f6b656e7320617661696c6162938101939093527f6c653a20000000000000000000000000000000000000000000000000000000009083015260601b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166044820152605801604051602081830303815290604052906148ae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c429190614f47565b50806148b981614e12565b9150506146e3565b5062093a806148d1826001614dff565b6148db9190614dad565b6004546148e89190614dff565b6004556148f3614901565b6148fb61149a565b60035550565b600061490b611621565b905060005b6015548110156149655781818151811061492c5761492c614d3c565b60200260200101516015828154811061494757614947614d3c565b6000918252602090912001558061495d81614e12565b915050614910565b5061496e613bc0565b60055550565b803573ffffffffffffffffffffffffffffffffffffffff811681146124de57600080fd5b6000602082840312156149aa57600080fd5b6136b182614974565b6020808252825182820181905260009190848201906040850190845b818110156149eb578351835292840192918401916001016149cf565b50909695505050505050565b600060208284031215614a0957600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156149eb57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101614a2c565b60008060408385031215614a7157600080fd5b50508035926020909101359150565b602080825282518282018190526000919060409081850190868401855b82811015614ae15781518051855286810151878601528581015186860152606080820151908601526080908101519085015260a09093019290850190600101614a9d565b5091979650505050505050565b60008060408385031215614b0157600080fd5b614b0a83614974565b9150614b1860208401614974565b90509250929050565b80151581146131c457600080fd5b60008060408385031215614b4257600080fd5b614b4b83614974565b91506020830135614b5b81614b21565b809150509250929050565b60008060408385031215614b7957600080fd5b614b8283614974565b946020939093013593505050565b600080600060608486031215614ba557600080fd5b8335614bb081614b21565b92506020840135614bc081614b21565b91506040840135614bd081614b21565b809150509250925092565b60008060008060808587031215614bf157600080fd5b614bfa85614974565b935060208501359250614c0f60408601614974565b9150614c1d60608601614974565b905092959194509250565b60008060408385031215614c3b57600080fd5b82359150614b1860208401614974565b600060208284031215614c5d57600080fd5b81356136b181614b21565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060c08284031215614ca957600080fd5b82601f830112614cb857600080fd5b60405160c0810181811067ffffffffffffffff82111715614d02577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040528060c0840185811115614d1757600080fd5b845b81811015614d31578035835260209283019201614d19565b509195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610b2a57610b2a614d6b565b8082028115828204841417610b2a57610b2a614d6b565b600082614dfa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b80820180821115610b2a57610b2a614d6b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614e4357614e43614d6b565b5060010190565b600060208284031215614e5c57600080fd5b5051919050565b80516dffffffffffffffffffffffffffff811681146124de57600080fd5b600080600060608486031215614e9657600080fd5b614e9f84614e63565b9250614ead60208501614e63565b9150604084015163ffffffff81168114614bd057600080fd5b60005b83811015614ee1578181015183820152602001614ec9565b50506000910152565b60008251614efc818460208701614ec6565b9190910192915050565b600060208284031215614f1857600080fd5b81516136b181614b21565b60008060408385031215614f3657600080fd5b505080516020909101519092909150565b6020815260008251806020840152614f66816040850160208701614ec6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220f01c27bdaeeafbdccd9fd14362cfb02a82c26e3b0f4c6cdd6ae82e0d6dd56b8564736f6c63430008110033

Deployed Bytecode Sourcemap

87198:1599:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35332:529;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;37542:477;;;;;;:::i;:::-;;:::i;:::-;;;1374:25:1;;;1362:2;1347:18;37542:477:0;1228:177:1;33611:109:0;;;:::i;:::-;;;;;;;:::i;22957:141::-;;;;;;:::i;:::-;;:::i;:::-;;82181:190;;;;;;:::i;:::-;;:::i;35925:339::-;;;:::i;77436:133::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;38238:179::-;;;;;;:::i;:::-;;:::i;33275:298::-;;;;;;:::i;:::-;;:::i;:::-;;;3977:14:1;;3970:22;3952:41;;3940:2;3925:18;33275:298:0;3812:187:1;30651:60:0;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4180:42:1;4168:55;;;4150:74;;4138:2;4123:18;30651:60:0;4004:226:1;39786:1752:0;;;;;;:::i;:::-;;:::i;36978:127::-;;;;;;:::i;:::-;37071:26;;37044:7;37071:26;;;:17;:26;;;;;;;36978:127;29591:48;;29633:6;29591:48;;45653:238;;;;;;:::i;:::-;;:::i;29219:49::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;38938:181;;;;;;:::i;:::-;;:::i;22725:29::-;;;;;;;;;43487:1522;;;;;;:::i;:::-;;:::i;87903:891::-;;;:::i;36692:111::-;36773:22;;36692:111;;29472:55;;;;;;:::i;:::-;;;;;;;;;;;;;;29983:54;;;;;;:::i;:::-;;;;;;;;;;;;;;28493:37;;;;;;34435:681;;;:::i;66265:33::-;;;;;;;;;;;;72627:2692;;;;;;:::i;:::-;;:::i;46360:206::-;;;;;;:::i;:::-;;:::i;66768:53::-;;;;;;:::i;:::-;;:::i;:::-;;;;5449:25:1;;;5505:2;5490:18;;5483:34;;;;5533:18;;;5526:34;;;;5591:2;5576:18;;5569:34;5634:3;5619:19;;5612:35;5436:3;5421:19;66768:53:0;5190:463:1;23106:271:0;;;:::i;30442:52::-;;;;;;:::i;:::-;;;;;;;;;;;;;;39127:199;;;;;;:::i;:::-;;:::i;53358:1013::-;;;;;;:::i;:::-;;:::i;75380:1961::-;;;;;;:::i;:::-;;:::i;:::-;;;;5860:25:1;;;5916:2;5901:18;;5894:34;;;;5944:18;;;5937:34;5848:2;5833:18;75380:1961:0;5658:319:1;22698:20:0;;;;;;;;;53068:161;;;;;;:::i;:::-;;:::i;30842:26::-;;;;;;;;;38520:224;;;;;;:::i;:::-;;:::i;28587:55::-;;;;;;79310:1325;;;;;;:::i;:::-;;:::i;28340:61::-;;;;;;46180:172;;;;;;:::i;:::-;;:::i;39334:444::-;;;;;;:::i;:::-;;:::i;28186:29::-;;;;;;77645:133;;;;;;:::i;:::-;77742:21;;77715:7;77742:21;;;:12;:21;;;;;:28;;77645:133;52518:311;;;;;;:::i;:::-;;:::i;28266:50::-;;;;;;27989:30;;;;;;80689:1357;;;;;;:::i;:::-;;:::i;38064:166::-;;;;;;:::i;:::-;;:::i;55414:483::-;;;;;;:::i;:::-;;:::i;42521:800::-;;;;;;:::i;:::-;;:::i;36526:128::-;;;;;;:::i;:::-;36620:26;;36593:7;36620:26;;;:17;:26;;;;;;;36526:128;55972:207;;;;;;:::i;:::-;;:::i;36362:113::-;36444:23;;36362:113;;52922:97;;;:::i;84444:259::-;;;;;;:::i;:::-;;:::i;41796:610::-;;;;;;:::i;:::-;;:::i;28152:27::-;;;;;;28725:51;;;;;;28801:59;;;;;;33913:452;;;;;;:::i;:::-;;:::i;51208:761::-;;;;;;:::i;:::-;;:::i;54379:958::-;;;;;;:::i;:::-;;:::i;51977:363::-;;;:::i;35332:529::-;35386:27;35426;35456:17;:15;:17::i;:::-;35511:12;:19;35426:47;;-1:-1:-1;35497:34:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35497:34:0;-1:-1:-1;35548:26:0;;;35577:1;35548:26;;;:17;:26;;;;;;35484:47;;-1:-1:-1;35548:30:0;35544:310;;35599:9;35594:249;35618:12;:19;35614:23;;35594:249;;;35808:16;;;;;;;:7;:16;;;;;;;;:19;;;;;;;;;35727:32;;;:23;:32;;;;;:35;;;;;;;;;35711:13;;35767:4;;35727:35;35711:10;;35825:1;;35711:13;;;;;;:::i;:::-;;;;;;;:51;;;;:::i;:::-;35681:26;;;;;;;:17;:26;;;;;;:82;;;;:::i;:::-;35680:91;;;;:::i;:::-;35679:148;;;;:::i;:::-;35663:10;35674:1;35663:13;;;;;;;;:::i;:::-;;;;;;;;;;:164;35639:3;;;;:::i;:::-;;;;35594:249;;;;35544:310;35415:446;35332:529;;;:::o;37542:477::-;37906:19;;37971:28;;37601:7;;37883:127;;37941:26;37906:19;37941:4;:26;:::i;:::-;37940:59;;;;:::i;:::-;37883:8;:127::i;:::-;37876:134;37542:477;-1:-1:-1;;37542:477:0:o;33611:109::-;33664:16;33700:12;33693:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33611:109;:::o;22957:141::-;23437:5;;;;23423:10;:19;23415:79;;;;;;;10268:2:1;23415:79:0;;;10250:21:1;10307:2;10287:18;;;10280:30;10346:34;10326:18;;;10319:62;10417:17;10397:18;;;10390:45;10452:19;;23415:79:0;;;;;;;;;23029:14:::1;:23:::0;;;::::1;;::::0;::::1;::::0;;::::1;::::0;;;23068:22:::1;::::0;4150:74:1;;;23068:22:0::1;::::0;4138:2:1;4123:18;23068:22:0::1;;;;;;;22957:141:::0;:::o;82181:190::-;82266:7;21632:1;22238:7;;:19;22230:63;;;;;;;10684:2:1;22230:63:0;;;10666:21:1;10723:2;10703:18;;;10696:30;10762:33;10742:18;;;10735:61;10813:18;;22230:63:0;10482:355:1;22230:63:0;21632:1;22371:18;;82293:70:::1;82306:10;::::0;82330:9;82341:4;82347:15:::1;82293:12;:70::i;:::-;21588:1:::0;22550:7;:22;82286:77;82181:190;-1:-1:-1;;;82181:190:0:o;35925:339::-;36075:17;:24;35980:41;;36061:39;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36061:39:0;;36034:66;;36118:9;36113:144;36137:17;:24;36133:28;;36113:144;;;29633:6;36213:14;36225:1;36213:11;:14::i;:::-;:32;;;;:::i;:::-;36183:24;36208:1;36183:27;;;;;;;;:::i;:::-;;;;;;;;;;:62;36163:3;;;;:::i;:::-;;;;36113:144;;;;35925:339;:::o;77436:133::-;77540:21;;;;;;;:12;:21;;;;;;;;77533:28;;;;;;;;;;;;;;;;;77500:20;;77533:28;;77540:21;;77533:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;77436:133;;;:::o;38238:179::-;38353:32;;;38307:7;38353:32;;;:17;:32;;;;;;38335:15;;28117:4;;38335:50;;;:::i;:::-;38334:75;;;;:::i;33275:298::-;33371:4;33406:5;;;;;;33391:20;;;;33387:136;;-1:-1:-1;33420:4:0;33413:11;;33387:136;33462:48;:33;;;;;;;:14;:33;;;;;;:48;;;:33;;:48;33458:65;;-1:-1:-1;33519:4:0;33512:11;;33458:65;-1:-1:-1;33559:5:0;33275:298;;;;:::o;39786:1752::-;39849:24;;;40010:20;40022:7;40010:11;:20::i;:::-;39990:40;-1:-1:-1;40061:23:0;;;;40060:81;;40115:26;;;;;:15;4168:55:1;;;40115:26:0;;;4150:74:1;40115:5:0;:15;;;;4123:18:1;;40115:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;40060:81;;;40088:24;;;;;:15;4168:55:1;;;40088:24:0;;;4150:74:1;40088:5:0;:15;;;;4123:18:1;;40088:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;40041:100;;40247:19;28117:4;40371:5;:17;;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:42;;;;:::i;:::-;40312:24;;40289:20;;40270:39;;:16;:39;:::i;:::-;:66;;;;:::i;:::-;40269:145;;;;:::i;:::-;40247:167;-1:-1:-1;40523:19:0;;40738:23;;;;40737:94;;40796:35;40821:9;40796:24;:35::i;:::-;40737:94;;;40765:28;40785:7;40765:19;:28::i;:::-;40708:123;-1:-1:-1;40852:30:0;;40848:323;;40903:27;40977:26;40934:39;28117:4;40934:16;:39;:::i;:::-;40933:70;;;;:::i;:::-;40903:100;;28117:4;41077:20;;41055:19;:42;;;;:::i;:::-;41054:67;;;;:::i;:::-;41040:81;;40883:254;40848:323;;;41170:1;41156:15;;40848:323;40553:699;41339:11;41325;:25;:53;;41367:11;41325:53;;;41353:11;41325:53;41305:74;;41469:20;;41450:16;:39;41446:84;;;41510:20;;41491:39;;41446:84;39875:1663;;;;39786:1752;;;:::o;45653:238::-;21632:1;22238:7;;:19;22230:63;;;;;;;10684:2:1;22230:63:0;;;10666:21:1;10723:2;10703:18;;;10696:30;10762:33;10742:18;;;10735:61;10813:18;;22230:63:0;10482:355:1;22230:63:0;21632:1;22371:18;;45750:23:::1;::::0;;;::::1;;;:32;45742:70;;;::::0;::::1;::::0;;11233:2:1;45742:70:0::1;::::0;::::1;11215:21:1::0;11272:2;11252:18;;;11245:30;11311:27;11291:18;;;11284:55;11356:18;;45742:70:0::1;11031:349:1::0;45742:70:0::1;-1:-1:-1::0;21588:1:0;22550:7;:22;45653:238::o;38938:181::-;39005:7;28117:4;39059:28;;39033:23;39048:7;39033:14;:23::i;:::-;:54;;;;:::i;43487:1522::-;43674:8;43670:46;;;43698:6;:4;:6::i;:::-;43740:21;;;;43736:1266;;43954:27;44000:28;44047:27;44092:30;44114:7;44092:21;:30::i;:::-;43932:190;;;;;;44184:20;44196:7;44184:11;:20::i;:::-;44280:31;;;;;;;:22;:31;;;;;:54;;;44421:42;;;44417:572;;44484:19;44506:41;44528:19;44506;:41;:::i;:::-;44484:63;;44616:11;44591:22;;:36;;;;:::i;:::-;44566:22;:61;44675:33;44697:11;44675:19;:33;:::i;:::-;44646:26;;;;;;;:17;:26;;;;;:62;-1:-1:-1;44417:572:0;;;44749:19;44771:41;44793:19;44771;:41;:::i;:::-;44749:63;;44881:11;44856:22;;:36;;;;:::i;:::-;44831:22;:61;44940:33;44962:11;44940:19;:33;:::i;:::-;44911:26;;;;;;;:17;:26;;;;;:62;-1:-1:-1;44417:572:0;43763:1239;;;43736:1266;43487:1522;;:::o;87903:891::-;87959:7;88040:25;88171:27;88457:17;88476;88500:12;;;;;;;;;;;:24;;;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;88546:14:0;;88456:71;;;;;-1:-1:-1;88456:71:0;;;-1:-1:-1;88546:14:0;;;;;88542:102;;;88584:9;88562:31;;88542:102;;;88635:9;88613:31;;88542:102;88712:12;;;;;;;;;;;:24;;;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;88682;:19;88704:4;88682:26;:::i;:::-;88681:57;;;;:::i;:::-;88661:77;87903:891;-1:-1:-1;;;;;87903:891:0:o;34435:681::-;34483:41;34541:23;;34568:1;34541:28;:59;;;-1:-1:-1;34573:22:0;;:27;34541:59;34537:572;;;34624:21;34617:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34435:681;:::o;34537:572::-;34728:12;:19;34714:34;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34714:34:0;;34687:61;;34768:9;34763:289;34787:21;:28;34783:32;;34763:289;;;34995:22;;34970:14;34982:1;34970:11;:14::i;:::-;34952;;34923:26;:24;:26::i;:::-;:43;;;;:::i;:::-;34922:62;;;;:::i;:::-;:69;;34987:4;34922:69;:::i;:::-;34921:96;;;;:::i;:::-;34871:21;34893:1;34871:24;;;;;;;;:::i;:::-;;;;;;;;;:165;;;;:::i;:::-;34841:24;34866:1;34841:27;;;;;;;;:::i;:::-;;;;;;;;;;:195;34817:3;;;;:::i;:::-;;;;34763:289;;72627:2692;72818:21;;;72716:32;72818:21;;;:12;:21;;;;;:32;;72716;;72818:21;72840:9;;72818:32;;;;;;:::i;:::-;;;;;;;;;72787:63;;;;;;;;72818:32;;;;;;;72787:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;73033:28;;;;;:19;:28;;;;;;72787:63;;-1:-1:-1;;73029:224:0;;;-1:-1:-1;73126:25:0;;;;73029:224;;;-1:-1:-1;73213:28:0;;;;;;;:19;:28;;;;;;73029:224;73342:15;73312:9;:26;;;:45;73308:1802;;73537:26;;;;73506:28;;;;;;;:19;:28;;;;;;:57;73502:1087;;;73583:26;73641:17;73612:9;:26;;;:46;;;;:::i;:::-;73583:75;;73677:25;73723:9;:26;;;73705:15;:44;;;;:::i;:::-;73677:72;-1:-1:-1;73829:33:0;73865:38;73880:22;73901:1;73880:18;:22;:::i;73865:38::-;73829:74;-1:-1:-1;74120:17:0;74192:21;74196:17;74120;74192:21;:::i;:::-;74141:46;74169:18;74141:25;:46;:::i;:::-;74140:74;;;;:::i;:::-;74120:94;-1:-1:-1;74273:38:0;74294:17;74273:18;:38;:::i;:::-;74260:52;;:9;:52;:::i;:::-;74233:79;;73564:764;;;;73308:1802;;73502:1087;74572:1;74545:28;;73308:1802;;;74734:21;74789:20;74841:17;74812:9;:26;;;:46;;;;:::i;:::-;74789:69;;74877:20;74929:15;74900:9;:26;;;:44;;;;:::i;:::-;74877:67;-1:-1:-1;75011:1:0;74980:27;74877:67;74980:12;:27;:::i;:::-;74979:33;;;;:::i;:::-;74963:49;;74770:258;;75069:29;75084:13;75069:14;:29::i;:::-;75042:56;;74654:456;73308:1802;75232:9;:25;;;75205:24;:52;75201:110;;;75286:9;:25;;;75259:52;;75201:110;72750:2569;;72627:2692;;;;:::o;46360:206::-;46462:16;21632:1;22238:7;;:19;22230:63;;;;;;;10684:2:1;22230:63:0;;;10666:21:1;10723:2;10703:18;;;10696:30;10762:33;10742:18;;;10735:61;10813:18;;22230:63:0;10482:355:1;22230:63:0;21632:1;22371:18;;46498:60:::1;46509:10;46521:19:::0;46542:15;46498:10:::1;:60::i;66768:53::-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;66768:53:0;;-1:-1:-1;66768:53:0;;;:::o;23106:271::-;23175:14;;;;23161:10;:28;23153:94;;;;;;;12235:2:1;23153:94:0;;;12217:21:1;12274:2;12254:18;;;12247:30;12313:34;12293:18;;;12286:62;12384:23;12364:18;;;12357:51;12425:19;;23153:94:0;12033:417:1;23153:94:0;23276:5;;;23283:14;23263:35;;;23276:5;;;;12690:34:1;;23283:14:0;;;;12755:2:1;12740:18;;12733:43;23263:35:0;;12602:18:1;23263:35:0;;;;;;;23317:14;;;;23309:22;;;;;;23317:14;;;23309:22;;;;23342:27;;;23106:271::o;39127:199::-;39205:7;28117:4;39266:28;;39233:30;39249:13;39233:15;:30::i;53358:1013::-;31469:5;;53444:12;;31469:5;;31455:10;:19;;:74;;;31478:51;31496:10;31508:20;31478:17;:51::i;:::-;31447:107;;;;;;;12989:2:1;31447:107:0;;;12971:21:1;13028:2;13008:18;;;13001:30;13067:22;13047:18;;;13040:50;13107:18;;31447:107:0;12787:344:1;31447:107:0;53526:18:::1;53568:9:::0;53563:192:::1;53587:12;:19:::0;53583:23;::::1;53563:192;;;53651:12;53632:31;;:12;53645:1;53632:15;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;::::0;::::1;;:31:::0;53628:116:::1;;53700:4;53684:20;;53723:5;;53628:116;53608:3:::0;::::1;::::0;::::1;:::i;:::-;;;;53563:192;;;;53981:13;:59;;;;-1:-1:-1::0;53998:42:0::1;:28:::0;;::::1;;::::0;;;:14:::1;:28;::::0;;;;;::::1;54030:10;53998:42;53981:59;53980:123;;;;54064:13;54063:14;:39;;;;-1:-1:-1::0;54096:5:0::1;::::0;::::1;;54082:10;:19;54063:39;53958:406;;;54134:66;54162:12;54176:10;54188:11;54134:27;:66::i;:::-;54215:7;53358:1013:::0;;;:::o;53958:406::-:1;54316:36;::::0;::::1;::::0;;13338:2:1;54316:36:0::1;::::0;::::1;13320:21:1::0;13377:2;13357:18;;;13350:30;13416:28;13396:18;;;13389:56;13462:18;;54316:36:0::1;13136:350:1::0;31565:1:0::1;53358:1013:::0;;;:::o;75380:1961::-;75683:26;;;75481:27;75683:26;;;:17;:26;;;;;;;75481:27;75870:24;75701:7;75870:15;:24::i;:::-;75970:26;;;75907:33;75970:26;;;:17;:26;;;;;;75847:47;;-1:-1:-1;75907:33:0;75970:31;:66;;;;-1:-1:-1;76005:26:0;;;;;;;:17;:26;;;;;;:31;75970:66;75969:143;;;-1:-1:-1;76080:31:0;;;;;;;:22;:31;;;;;;76056:55;;;75969:143;75951:638;;;-1:-1:-1;76353:20:0;75951:638;;;76541:31;;;;;;;:22;:31;;;;;;76576:1;;76518:54;;:20;:54;:::i;:::-;76517:60;;;;:::i;:::-;76489:88;;75951:638;76724:1;76702:23;;76741:9;76736:598;76760:21;;;;;;;:12;:21;;;;;:28;76756:32;;76736:598;;;76841:21;;;76810:28;76841:21;;;:12;:21;;;;;:24;;76863:1;;76841:24;;;;;;:::i;:::-;;;;;;;;;;;76810:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;76937:32;76972:34;76995:7;77004:1;76972:22;:34::i;:::-;77088:19;;;;76937:69;;-1:-1:-1;77068:17:0;28117:4;77183:52;77210:25;76937:69;77183:52;:::i;:::-;77170:66;;:9;:66;:::i;:::-;77169:91;;;;:::i;:::-;77156:105;;:9;:105;:::i;:::-;77122:139;-1:-1:-1;77276:46:0;77122:139;77276:46;;:::i;:::-;;;76795:539;;;;76790:3;;;;;:::i;:::-;;;;76736:598;;;;75610:1731;75380:1961;;;;;:::o;53068:161::-;31266:5;;;;31252:10;:19;;:79;;-1:-1:-1;31289:42:0;31275:10;:56;31252:79;31244:113;;;;;;;13693:2:1;31244:113:0;;;13675:21:1;13732:2;13712:18;;;13705:30;13771:23;13751:18;;;13744:51;13812:18;;31244:113:0;13491:345:1;31244:113:0;53189:32:::1;;;::::0;;;:19:::1;:32;::::0;;;;;;53153:68;;::::1;53189:32;::::0;;::::1;53188:33;53153:68;::::0;;53068:161::o;38520:224::-;38586:7;38720:15;;38689:28;;:46;;;;:::i;:::-;38614:24;;;;;:15;4168:55:1;;;38614:24:0;;;4150:74:1;28117:4:0;;;;38614:5;:15;;;;4123:18:1;;38614:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:47;;;;:::i;79310:1325::-;21632:1;22238:7;;:19;22230:63;;;;;;;10684:2:1;22230:63:0;;;10666:21:1;10723:2;10703:18;;;10696:30;10762:33;10742:18;;;10735:61;10813:18;;22230:63:0;10482:355:1;22230:63:0;21632:1;22371:18;;79407:10:::1;79419:4;31660:41;79407:10:::0;79419:4;31660:22:::1;:41::i;:::-;79484:28:::2;79514:21:::0;79539:29:::2;79549:10;79561:6;79539:9;:29::i;:::-;79483:85;;;;79618:15;79658:8;79636:9;:19;;;:30;;;;:::i;:::-;79618:48:::0;-1:-1:-1;79837:12:0::2;::::0;79797:91:::2;::::0;79837:12;;::::2;;;79852:10;79872:4;79879:8:::0;79797:31:::2;:91::i;:::-;79972:186;::::0;;::::2;::::0;::::2;::::0;;;;;::::2;80019:25:::0;;::::2;::::0;79972:186;;::::2;::::0;;;;;;;;80081:26;;::::2;::::0;79972:186;;;;;80122:25;;::::2;::::0;79972:186;;;;79943:10:::2;-1:-1:-1::0;79930:24:0;;;:12:::2;:24:::0;;;;;;;:39;;79955:13;;79930:39;::::2;;;;;:::i;:::-;;;;;;;;;;;:228;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;80229:8;80202:23;;:35;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;80266:10:0::2;80248:29;::::0;;;:17:::2;:29;::::0;;;;:41;;80281:8;;80248:29;:41:::2;::::0;80281:8;;80248:41:::2;:::i;:::-;::::0;;;-1:-1:-1;80315:17:0::2;::::0;-1:-1:-1;80335:23:0::2;80347:10;80335:11;:23::i;:::-;80315:43:::0;-1:-1:-1;80377:23:0::2;::::0;::::2;::::0;80373:69:::2;;80402:28;::::0;::::2;;::::0;;;:17:::2;:28;::::0;;;;:40;;80434:8;;80402:28;:40:::2;::::0;80434:8;;80402:40:::2;:::i;:::-;::::0;;;-1:-1:-1;;80373:69:0::2;80300:154;80522:41;80545:10;80557:5;80522:22;:41::i;:::-;80581:46;::::0;;14360:25:1;;;14416:2;14401:18;;14394:34;;;80598:10:0::2;::::0;80581:46:::2;::::0;14333:18:1;80581:46:0::2;;;;;;;-1:-1:-1::0;;21588:1:0;22550:7;:22;-1:-1:-1;;;;;79310:1325:0:o;46180:172::-;46259:16;21632:1;22238:7;;:19;22230:63;;;;;;;10684:2:1;22230:63:0;;;10666:21:1;10723:2;10703:18;;;10696:30;10762:33;10742:18;;;10735:61;10813:18;;22230:63:0;10482:355:1;22230:63:0;21632:1;22371:18;;46295:49:::1;46306:10;46318:19:::0;46339:4:::1;46295:10;:49::i;:::-;21588:1:::0;22550:7;:22;46288:56;46180:172;-1:-1:-1;;46180:172:0:o;39334:444::-;39413:25;;;39390:7;39413:25;;;:19;:25;;;;;;;;39409:362;;;-1:-1:-1;39616:4:0;39334:444::o;39409:362::-;-1:-1:-1;39728:31:0;;;;;;;;:25;:31;;;;;;;;39334:444::o;39409:362::-;39334:444;;;:::o;52518:311::-;31266:5;;;;31252:10;:19;;:79;;-1:-1:-1;31289:42:0;31275:10;:56;31252:79;31244:113;;;;;;;13693:2:1;31244:113:0;;;13675:21:1;13732:2;13712:18;;;13705:30;13771:23;13751:18;;;13744:51;13812:18;;31244:113:0;13491:345:1;31244:113:0;52681:13:::1;:30:::0;;52771:50;::::1;;::::0;::::1;::::0;52722:38;::::1;;52681:30;52722:38;::::0;52681:30;::::1;;::::0;::::1;52722:38:::0;;;;;;;;;;;;;;;::::1;52771:50:::0;;;::::1;;::::0;;52518:311::o;80689:1357::-;21632:1;22238:7;;:19;22230:63;;;;;;;10684:2:1;22230:63:0;;;10666:21:1;10723:2;10703:18;;;10696:30;10762:33;10742:18;;;10735:61;10813:18;;22230:63:0;10482:355:1;22230:63:0;21632:1;22371:18;;80787:10:::1;80799:4;31660:41;80787:10:::0;80799:4;31660:22:::1;:41::i;:::-;80864:28:::2;80894:21:::0;80919:29:::2;80929:10;80941:6;80919:9;:29::i;:::-;80863:85;;;;81003:15;80987:13;:31;80979:65;;;::::0;::::2;::::0;;14641:2:1;80979:65:0::2;::::0;::::2;14623:21:1::0;14680:2;14660:18;;;14653:30;14719:23;14699:18;;;14692:51;14760:18;;80979:65:0::2;14439:345:1::0;80979:65:0::2;81090:17;81140:15;81111:9;:26;;;:44;81110:97;;81206:1;81110:97;;;81188:15;81159:9;:26;;;:44;;;;:::i;:::-;81090:117:::0;-1:-1:-1;81218:16:0::2;81237:31;81253:15;81237:13:::0;:31:::2;:::i;:::-;81218:50;;81374:9;81363:8;:20;81355:57;;;::::0;::::2;::::0;;14991:2:1;81355:57:0::2;::::0;::::2;14973:21:1::0;15030:2;15010:18;;;15003:30;15069:26;15049:18;;;15042:54;15113:18;;81355:57:0::2;14789:348:1::0;81355:57:0::2;81443:13;;81431:8;:25;;81423:64;;;::::0;::::2;::::0;;15344:2:1;81423:64:0::2;::::0;::::2;15326:21:1::0;15383:2;15363:18;;;15356:30;15422:28;15402:18;;;15395:56;15468:18;;81423:64:0::2;15142:350:1::0;81423:64:0::2;81518:28;;81506:8;:40;;81498:80;;;::::0;::::2;::::0;;15699:2:1;81498:80:0::2;::::0;::::2;15681:21:1::0;15738:2;15718:18;;;15711:30;15777:29;15757:18;;;15750:57;15824:18;;81498:80:0::2;15497:351:1::0;81498:80:0::2;81662:174;;;;;;;;81688:6;81662:174;;;;81709:15;81662:174;;;;81739:9;:19;;;81662:174;;;;81773:13;81662:174;;;;81801:24;81816:8;81801:14;:24::i;:::-;81662:174:::0;;81633:10:::2;81620:24;::::0;;;:12:::2;:24;::::0;;;;:39;;81645:13;;81620:39;::::2;;;;;:::i;:::-;;;;;;;;;;;:216;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81905:41;81928:10;81940:5;81905:22;:41::i;:::-;81964:74;::::0;;16084:25:1;;;16140:2;16125:18;;16118:34;;;82007:15:0::2;16168:18:1::0;;;16161:34;16226:2;16211:18;;16204:34;;;81964:74:0;;81977:10:::2;::::0;81964:74:::2;::::0;;;;;16071:3:1;81964:74:0;;::::2;-1:-1:-1::0;;21588:1:0;22550:7;:22;-1:-1:-1;;;;;;80689:1357:0:o;38064:166::-;38172:26;;;38126:7;38172:26;;;:17;:26;;;;;;38154:15;;28117:4;;38154:44;;;:::i;55414:483::-;31469:5;;55580:20;;31469:5;;31455:10;:19;;:74;;;31478:51;31496:10;31508:20;31478:17;:51::i;:::-;31447:107;;;;;;;12989:2:1;31447:107:0;;;12971:21:1;13028:2;13008:18;;;13001:30;13067:22;13047:18;;;13040:50;13107:18;;31447:107:0;12787:344:1;31447:107:0;55631:42:::1;::::0;::::1;;::::0;;;:20:::1;:42;::::0;;;;;55613:17:::1;:61:::0;;55677:9;;55631:42;55613:61;::::1;;;;;:::i;:::-;;;;;;;;:73;;;;55760:25;55697:16;55714:20;:42;55735:20;55714:42;;;;;;;;;;;;;;;;55697:60;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;;;;::::1;:88:::0;;;::::1;;::::0;;::::1;;::::0;;55815:42;;::::1;::::0;;:20:::1;:42:::0;;;;;;;55796:18:::1;:62:::0;;55861:28;;55815:42;55796:62;::::1;;;;;:::i;:::-;;;;;;;;;:93;;;;;;;;;;;;;;;;;;55414:483:::0;;;;;:::o;42521:800::-;42601:34;;;;;;;:19;:34;;;;;;;;42593:60;;;;;;;16451:2:1;42593:60:0;;;16433:21:1;16490:2;16470:18;;;16463:30;16529:15;16509:18;;;16502:43;16562:18;;42593:60:0;16249:337:1;42593:60:0;42672:36;;;;;;;:21;:36;;;;;;;;42709:10;42672:48;;;;;;;;;;42664:90;;;;;;;16793:2:1;42664:90:0;;;16775:21:1;16832:2;16812:18;;;16805:30;16871:31;16851:18;;;16844:59;16920:18;;42664:90:0;16591:353:1;42664:90:0;42900:10;42849:22;42874:37;;;:25;:37;;;;;;;;42926:28;;42922:182;;43081:10;43063:29;;;;:17;:29;;;;;;;;;;43026:33;;;;:17;:33;;;;;:66;;43063:29;;43026:33;;:66;;43063:29;;43026:66;:::i;:::-;;;;-1:-1:-1;;42922:182:0;43172:10;43146:37;;;;:25;:37;;;;;;;:53;;;;:37;:53;;;;;;;;43284:17;:29;;;;;;43248:32;;;:17;:32;;;;;:65;;43284:29;;43248:32;;:65;;43284:29;;43248:65;:::i;:::-;;;;-1:-1:-1;;;;42521:800:0:o;55972:207::-;31469:5;;56080:20;;31469:5;;31455:10;:19;;:74;;;31478:51;31496:10;31508:20;31478:17;:51::i;:::-;31447:107;;;;;;;12989:2:1;31447:107:0;;;12971:21:1;13028:2;13008:18;;;13001:30;13067:22;13047:18;;;13040:50;13107:18;;31447:107:0;12787:344:1;31447:107:0;-1:-1:-1;56113:36:0::1;::::0;;::::1;;::::0;;;:14:::1;:36;::::0;;;;:58;;;::::1;::::0;;;::::1;;::::0;;55972:207::o;52922:97::-;31266:5;;;;31252:10;:19;;:79;;-1:-1:-1;31289:42:0;31275:10;:56;31252:79;31244:113;;;;;;;13693:2:1;31244:113:0;;;13675:21:1;13732:2;13712:18;;;13705:30;13771:23;13751:18;;;13744:51;13812:18;;31244:113:0;13491:345:1;31244:113:0;52997:14:::1;::::0;;52979:32;;::::1;52997:14;::::0;;::::1;52996:15;52979:32;::::0;;52922:97::o;84444:259::-;84544:7;21632:1;22238:7;;:19;22230:63;;;;;;;10684:2:1;22230:63:0;;;10666:21:1;10723:2;10703:18;;;10696:30;10762:33;10742:18;;;10735:61;10813:18;;22230:63:0;10482:355:1;22230:63:0;21632:1;22371:18;;84572:17:::1;::::0;::::1;::::0;::::1;;;:26;84564:57;;;::::0;::::1;::::0;;17151:2:1;84564:57:0::1;::::0;::::1;17133:21:1::0;17190:2;17170:18;;;17163:30;17229:20;17209:18;;;17202:48;17267:18;;84564:57:0::1;16949:342:1::0;84564:57:0::1;84639:56;84655:10;84667:19;84688:6;84639:15;:56::i;41796:610::-:0;41895:10;41875:31;;;;:19;:31;;;;;;;;41867:57;;;;;;;16451:2:1;41867:57:0;;;16433:21:1;16490:2;16470:18;;;16463:30;16529:15;16509:18;;;16502:43;16562:18;;41867:57:0;16249:337:1;41867:57:0;42010:10;41988:33;;;;:21;:33;;;;;;;;;:49;;;;;;;;;;;;;;;;41987:50;41935:102;;;;;;;42140:41;;;;;;;;:55;42136:263;;42211:41;;;42263:1;42211:41;;;:25;:41;;;;;;;:54;;;;;;42354:17;:33;;;;;;42339:10;42321:29;;:17;:29;;;;;:66;;42354:33;;42321:29;;:66;;42354:33;;42321:66;:::i;:::-;;;;-1:-1:-1;;42136:263:0;41796:610;:::o;33913:452::-;33974:16;34003:32;34038:16;34055:9;34038:27;;;;;;;;:::i;:::-;;;;;;;;;;;;;;-1:-1:-1;34080:38:0;;34076:282;;34261:4;34219:27;34247:9;34219:38;;;;;;;;:::i;:::-;;;;;;;;;34168:24;34147:67;;;:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:110;;;;:::i;:::-;34146:119;;;;:::i;:::-;34135:130;;34076:282;;;34318:17;34336:9;34318:28;;;;;;;;:::i;:::-;;;;;;;;;34307:39;;33992:373;33913:452;;;:::o;51208:761::-;51325:9;51320:642;51344:16;:23;51340:27;;51320:642;;;51389:32;51424:16;51441:1;51424:19;;;;;;;;:::i;:::-;;;;;;;;;;;;;;-1:-1:-1;51462:38:0;;51458:493;;51525:12;:61;;;;51560:22;51583:1;51560:25;;;;;;;;:::i;:::-;;;;;;;;;51542:15;:43;51525:61;51521:415;;;51700:106;;;;;51783:4;51700:106;;;17470:74:1;51790:15:0;17560:18:1;;;17553:34;51700:74:0;;;;;;17443:18:1;;51700:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;51667:27;51695:1;51667:30;;;;;;;;:::i;:::-;;;;;;;;:139;;;;51878:24;51857:57;;;:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;51829:22;51852:1;51829:25;;;;;;;;:::i;:::-;;;;;;;;;;:87;51521:415;-1:-1:-1;51369:3:0;;;;:::i;:::-;;;;51320:642;;54379:958;31266:5;;;;31252:10;:19;;:79;;-1:-1:-1;31289:42:0;31275:10;:56;31252:79;31244:113;;;;;;;13693:2:1;31244:113:0;;;13675:21:1;13732:2;13712:18;;;13705:30;13771:23;13751:18;;;13744:51;13812:18;;31244:113:0;13491:345:1;31244:113:0;54788:13;;28117:4:::1;-1:-1:-1::0;54788:37:0::1;54780:69;;;::::0;::::1;::::0;;17800:2:1;54780:69:0::1;::::0;::::1;17782:21:1::0;17839:2;17819:18;;;17812:30;17878:21;17858:18;;;17851:49;17917:18;;54780:69:0::1;17598:343:1::0;54780:69:0::1;54973:13:::0;;::::1;::::0;54990:1:::1;-1:-1:-1::0;54973:18:0;::::1;::::0;54972:44:::1;;-1:-1:-1::0;54997:13:0;;::::1;::::0;55014:1:::1;-1:-1:-1::0;54997:18:0::1;54972:44;54964:69;;;::::0;::::1;::::0;;18489:2:1;54964:69:0::1;::::0;::::1;18471:21:1::0;18528:2;18508:18;;;18501:30;18567:14;18547:18;;;18540:42;18599:18;;54964:69:0::1;18287:336:1::0;54964:69:0::1;55068:13:::0;;55046:19:::1;:35:::0;55068:13:::1;55115::::0;::::1;::::0;55092:20:::1;:36:::0;55170:13;;::::1;::::0;55139:28:::1;:44:::0;55221:13;;::::1;::::0;55194:24:::1;:40:::0;55276:13;;::::1;::::0;55245:28:::1;:44:::0;55316:13;::::1;::::0;55300::::1;:29:::0;54379:958::o;51977:363::-;52060:25;52079:5;52060:18;:25::i;:::-;52155:16;:14;:16::i;:::-;52137:15;:34;52207:12;;52188:15;:31;52184:149;;52236:14;:12;:14::i;:::-;51977:363::o;52184:149::-;52292:29;:27;:29::i;523:106::-;581:7;612:1;608;:5;:13;;620:1;608:13;;;616:1;608:13;601:20;523:106;-1:-1:-1;;;523:106:0:o;82567:1705::-;82813:7;82782:14;82798:4;31660:41;31683:7;31692:8;31660:22;:41::i;:::-;82841:13:::1;::::0;;;::::1;;;:22;82833:49;;;::::0;::::1;::::0;;18830:2:1;82833:49:0::1;::::0;::::1;18812:21:1::0;18869:2;18849:18;;;18842:30;18908:16;18888:18;;;18881:44;18942:18;;82833:49:0::1;18628:338:1::0;82833:49:0::1;82909:13;;82901:4;:21;;82893:60;;;::::0;::::1;::::0;;15344:2:1;82893:60:0::1;::::0;::::1;15326:21:1::0;15383:2;15363:18;;;15356:30;15422:28;15402:18;;;15395:56;15468:18;;82893:60:0::1;15142:350:1::0;82893:60:0::1;82980:28;;82972:4;:36;;82964:75;;;::::0;::::1;::::0;;15699:2:1;82964:75:0::1;::::0;::::1;15681:21:1::0;15738:2;15718:18;;;15711:30;15777:29;15757:18;;;15750:57;15824:18;;82964:75:0::1;15497:351:1::0;82964:75:0::1;83162:12;::::0;83122:96:::1;::::0;83162:12;;::::1;;;83177:14:::0;83201:4:::1;83208:9:::0;83122:31:::1;:96::i;:::-;83278:23;83304:20;83319:4;83304:14;:20::i;:::-;83423:33;::::0;::::1;83335:14;83423:33:::0;;;:17:::1;:33;::::0;;;;;;;;83362:95;;19217:66:1;19204:2;19200:15;;;19196:88;83362:95:0;;::::1;19184:101:1::0;;;;19301:12;;;19294:28;;;19338:12;;;19331:28;;;19375:12;;;19368:28;83278:46:0;;-1:-1:-1;83335:14:0;19412:13:1;;83362:95:0::1;::::0;;;;;::::1;::::0;;;;;;83352:106;;83362:95:::1;83352:106:::0;;::::1;::::0;83515:28:::1;::::0;::::1;;::::0;;;:12:::1;:28:::0;;;;;83549:164:::1;::::0;::::1;::::0;;;;;;;::::1;::::0;;;;;;;;;83352:106;;-1:-1:-1;83515:28:0;83549:164;;;83650:22:::1;83668:4:::0;83596:15;83650:22:::1;:::i;:::-;83549:164:::0;;::::1;::::0;;::::1;::::0;;;83515:199;;::::1;::::0;;::::1;::::0;;-1:-1:-1;83515:199: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;83758:23:::1;:36:::0;;83785:9;;-1:-1:-1;83758:36:0::1;::::0;83785:9;;83758:36:::1;:::i;:::-;::::0;;;-1:-1:-1;;83805:33:0::1;::::0;::::1;;::::0;;;:17:::1;:33;::::0;;;;:46;;83842:9;;83805:33;:46:::1;::::0;83842:9;;83805:46:::1;:::i;:::-;::::0;;;-1:-1:-1;83877:17:0::1;::::0;-1:-1:-1;83897:27:0::1;83909:14:::0;83897:11:::1;:27::i;:::-;83877:47:::0;-1:-1:-1;83943:23:0::1;::::0;::::1;::::0;83939:70:::1;;83968:28;::::0;::::1;;::::0;;;:17:::1;:28;::::0;;;;:41;;84000:9;;83968:28;:41:::1;::::0;84000:9;;83968:41:::1;:::i;:::-;::::0;;;-1:-1:-1;;83939:70:0::1;83862:159;84107:45;84130:14;84146:5;84107:22;:45::i;:::-;84170:68;::::0;;19667:25:1;;;19723:2;19708:18;;19701:34;;;19751:18;;;19744:34;;;84170:68:0::1;19814:55:1::0;;;19809:2;19794:18;;19787:83;84170:68:0;::::1;::::0;::::1;::::0;19654:3:1;19639:19;84170:68:0::1;;;;;;;84258:6:::0;82567:1705;-1:-1:-1;;;;;;;;;82567:1705:0:o;45017:585::-;45079:21;;;;45075:520;;45156:27;45186:15;45193:7;45186:6;:15::i;:::-;45156:45;;45264:9;45259:118;45283:10;:17;45279:1;:21;45259:118;;;45348:10;45359:1;45348:13;;;;;;;;:::i;:::-;;;;;;;;;;;;45326:16;;;;;;;:7;:16;;;;;;:19;;;;;;;;;;:35;45343:1;45302:3;45343:1;45302:3;:::i;:::-;;;;45259:118;;;;45444:9;45439:145;45463:10;:17;45459:1;:21;45439:145;;;45544:21;45566:1;45544:24;;;;;;;;:::i;:::-;;;;;;;;;;;;;45506:32;;;;;:23;:32;;;;;;:35;;;;;;;;:62;45539:1;45482:3;45539:1;45482:3;:::i;:::-;;;;45439:145;;33772:133;33831:7;33858:39;33867:15;33884:12;;33858:8;:39::i;:::-;33851:46;;33772:133;:::o;46662:1194::-;46810:31;46785:8;46795:4;31660:41;31683:7;31692:8;31660:22;:41::i;:::-;46940:29:::1;::::0;::::1;;::::0;;;:19:::1;:29;::::0;;;;46972:15:::1;46940:47:::0;;47070:23:::1;::::0;;;::::1;;;:32;47062:70;;;::::0;::::1;::::0;;11233:2:1;47062:70:0::1;::::0;::::1;11215:21:1::0;11272:2;11252:18;;;11245:30;11311:27;11291:18;;;11284:55;11356:18;;47062:70:0::1;11031:349:1::0;47062:70:0::1;47244:12;:19:::0;47230:34:::1;::::0;::::1;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;47230:34:0::1;;47213:51;;47282:9;47277:419;47301:12;:19:::0;47297:23;::::1;47277:419;;;47362:17;::::0;::::1;;::::0;;;:7:::1;:17;::::0;;;;;;;:20;;;;;;;;;47342:17;;:14;;47380:1;;47342:17;::::1;;;;;:::i;:::-;;::::0;;::::1;::::0;;;;;;:40;;;;47397:17:::1;::::0;::::1;47420:1;47397:17:::0;;;:7:::1;:17:::0;;;;;;:20;;;;;;;;;:24;;;47440:17;;:14;;47415:1;;47440:17;::::1;;;;;:::i;:::-;;;;;;;:21;47436:249;;;47482:84;47510:12;47523:1;47510:15;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;47527:19;47548:14;47563:1;47548:17;;;;;;;;:::i;:::-;;;;;;;47482:27;:84::i;:::-;47603:8;47592:77;;;47613:14;47628:1;47613:17;;;;;;;;:::i;:::-;;;;;;;47632:12;47645:1;47632:15;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;;::::1;::::0;47592:77:::1;::::0;;20083:25:1;;;47632:15:0::1;::::0;;::::1;20185:18:1::0;;;20178:43;;;;20257:15;;20237:18;;;20230:43;20071:2;20056:18;47592:77:0::1;;;;;;;47436:249;47322:3:::0;::::1;::::0;::::1;:::i;:::-;;;;47277:419;;;;46662:1194:::0;;;;;;;:::o;17612:361::-;17807:45;;;17796:10;17488:55:1;;;17807:45:0;;;17470:74:1;17560:18;;;;17553:34;;;17807:45:0;;;;;;;;;;17443:18:1;;;;17807:45:0;;;;;;;;;;;;;17796:57;;-1:-1:-1;;;;17796:10:0;;;;:57;;17807:45;17796:57;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17760:93;;;;17872:7;:57;;;;-1:-1:-1;17884:11:0;;:16;;:44;;;17915:4;17904:24;;;;;;;;;;;;:::i;:::-;17864:101;;;;;;;21283:2:1;17864:101:0;;;21265:21:1;21322:2;21302:18;;;21295:30;21361:33;21341:18;;;21334:61;21412:18;;17864:101:0;21081:355:1;78739:508:0;78821:31;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;78821:31:0;78854:15;;78882:280;78906:28;;;;;;;:12;:28;;;;;:35;78902:39;;78882:280;;;78977:28;;;;;;;:12;:28;;;;;:31;;79006:1;;78977:31;;;;;;:::i;:::-;;;;;;;;;;;:38;;;78967:6;:48;78963:188;;79050:28;;;;;;;:12;:28;;;;;:31;;79079:1;;79050:31;;;;;;:::i;:::-;;;;;;;;;;;79035:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;79110:1;79100:11;;79130:5;;78963:188;78943:3;;;;:::i;:::-;;;;78882:280;;;-1:-1:-1;79180:19:0;;:29;;79172:57;;;;;;;21643:2:1;79172:57:0;;;21625:21:1;21682:2;21662:18;;;21655:30;21721:17;21701:18;;;21694:45;21756:18;;79172:57:0;21441:339:1;79172:57:0;78739:508;;;;;:::o;17981:402::-;18206:51;;;18195:10;22066:15:1;;;18206:51:0;;;22048:34:1;22118:15;;;22098:18;;;22091:43;22150:18;;;;22143:34;;;18206:51:0;;;;;;;;;;21960:18:1;;;;18206:51:0;;;;;;;;;;;;;18195:63;;-1:-1:-1;;;;18195:10:0;;;;:63;;18206:51;18195:63;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18159:99;;;;18277:7;:57;;;;-1:-1:-1;18289:11:0;;:16;;:44;;;18320:4;18309:24;;;;;;;;;;;;:::i;:::-;18269:106;;;;;;;22390:2:1;18269:106:0;;;22372:21:1;22429:2;22409:18;;;22402:30;22468:34;22448:18;;;22441:62;22539:6;22519:18;;;22512:34;22563:19;;18269:106:0;22188:400:1;18269:106:0;18069:314;;17981:402;;;;:::o;84838:1555::-;84984:7;85067:53;85078:14;85094:19;85115:4;85067:10;:53::i;:::-;;85174:28;85204:21;85229:33;85239:14;85255:6;85229:9;:33::i;:::-;85173:89;;;;85300:9;:26;;;85281:15;:45;;:71;;;-1:-1:-1;85330:14:0;;;;:22;;:14;:22;85281:71;85273:106;;;;;;;22795:2:1;85273:106:0;;;22777:21:1;22834:2;22814:18;;;22807:30;22873:24;22853:18;;;22846:52;22915:18;;85273:106:0;22593:346:1;85273:106:0;85410:19;;;;85446:13;;85442:915;;85626:12;;85590:82;;85626:12;;;;;85641:19;85662:9;85590:27;:82::i;:::-;85751:9;85724:23;;:36;;;;;;;:::i;:::-;;;;-1:-1:-1;;85775:33:0;;;;;;;:17;:33;;;;;:46;;85812:9;;85775:33;:46;;85812:9;;85775:46;:::i;:::-;;;;-1:-1:-1;85855:17:0;;-1:-1:-1;85875:27:0;85887:14;85875:11;:27::i;:::-;85855:47;-1:-1:-1;85925:23:0;;;;85921:70;;85950:28;;;;;;;:17;:28;;;;;:41;;85982:9;;85950:28;:41;;85982:9;;85950:41;:::i;:::-;;;;-1:-1:-1;;85921:70:0;-1:-1:-1;86078:28:0;;;;;;;:12;:28;;;;;:43;;86107:13;;86078:43;;;;;;:::i;:::-;;;;;;;;;;;;;86071:50;;;;;;;;;;;;;;;;;;;;;;;;;;86208:45;;86231:14;;86208:22;:45::i;:::-;86275:70;;;23146:25:1;;;23202:2;23187:18;;23180:34;;;86275:70:0;23250:55:1;;;23230:18;;;23223:83;86275:70:0;;;;;;;;;;;23134:2:1;86275:70:0;;;85442:915;86376:9;84838:1555;-1:-1:-1;;;;;;84838:1555:0:o;47943:2814::-;48064:9;48059:327;48083:18;:25;48079:29;;48059:327;;;48130:34;48167:18;48186:1;48167:21;;;;;;;;:::i;:::-;;;;;;;;;;;;;;-1:-1:-1;48207:40:0;;48203:172;;48268:91;;;;;48353:4;48268:91;;;4150:74:1;48268:76:0;;;;;;4123:18:1;;48268:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;48203:172;-1:-1:-1;48110:3:0;;;;:::i;:::-;;;;48059:327;;;;48746:27;29633:6;48802:12;;48784:15;:30;;;;:::i;:::-;48776:57;;;;:::i;:::-;48746:87;;48972:9;48967:284;48991:12;:19;48987:23;;48967:284;;;49113:12;49126:1;49113:15;;;;;;;;:::i;:::-;;;;;;;;;;;49106:48;;;;;49148:4;49106:48;;;4150:74:1;49113:15:0;;;;;49106:33;;4123:18:1;;49106:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;49077:23;:19;49099:1;49077:23;:::i;:::-;29633:6;49041:14;49053:1;49041:11;:14::i;:::-;:32;;;;:::i;:::-;:60;;;;:::i;:::-;49040:114;;49220:12;49233:1;49220:15;;;;;;;;:::i;:::-;;;;;;;;;;;;49163:73;;;23809:34:1;49163:73:0;;;23797:47:1;;;;23874:6;23860:12;;;23853:28;23919:2;23915:15;;;23897:12;;;23890:110;24016:12;;49163:73:0;;;;;;;;;;;;49032:207;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;49012:3:0;;;;:::i;:::-;;;;48967:284;;;-1:-1:-1;29633:6:0;49463:23;:19;49485:1;49463:23;:::i;:::-;49462:43;;;;:::i;:::-;49446:12;;:60;;;;:::i;:::-;49431:12;:75;49559:29;:27;:29::i;:::-;49658:16;:14;:16::i;:::-;49640:15;:34;-1:-1:-1;47943:2814:0:o;50765:435::-;50852:34;50889:17;:15;:17::i;:::-;50852:54;;50969:9;50964:133;50988:21;:28;50984:32;;50964:133;;;51065:17;51083:1;51065:20;;;;;;;;:::i;:::-;;;;;;;51038:21;51060:1;51038:24;;;;;;;;:::i;:::-;;;;;;;;;;:47;51018:3;;;;:::i;:::-;;;;50964:133;;;;51166:26;:24;:26::i;:::-;51149:14;:43;-1:-1:-1;50765:435:0:o;14:196:1:-;82:20;;142:42;131:54;;121:65;;111:93;;200:1;197;190:12;215:186;274:6;327:2;315:9;306:7;302:23;298:32;295:52;;;343:1;340;333:12;295:52;366:29;385:9;366:29;:::i;406:632::-;577:2;629:21;;;699:13;;602:18;;;721:22;;;548:4;;577:2;800:15;;;;774:2;759:18;;;548:4;843:169;857:6;854:1;851:13;843:169;;;918:13;;906:26;;987:15;;;;952:12;;;;879:1;872:9;843:169;;;-1:-1:-1;1029:3:1;;406:632;-1:-1:-1;;;;;;406:632:1:o;1043:180::-;1102:6;1155:2;1143:9;1134:7;1130:23;1126:32;1123:52;;;1171:1;1168;1161:12;1123:52;-1:-1:-1;1194:23:1;;1043:180;-1:-1:-1;1043:180:1:o;1410:681::-;1581:2;1633:21;;;1703:13;;1606:18;;;1725:22;;;1552:4;;1581:2;1804:15;;;;1778:2;1763:18;;;1552:4;1847:218;1861:6;1858:1;1855:13;1847:218;;;1926:13;;1941:42;1922:62;1910:75;;2040:15;;;;2005:12;;;;1883:1;1876:9;1847:218;;2096:248;2164:6;2172;2225:2;2213:9;2204:7;2200:23;2196:32;2193:52;;;2241:1;2238;2231:12;2193:52;-1:-1:-1;;2264:23:1;;;2334:2;2319:18;;;2306:32;;-1:-1:-1;2096:248:1:o;2531:1011::-;2760:2;2812:21;;;2882:13;;2785:18;;;2904:22;;;2731:4;;2760:2;2945;;2963:18;;;;3004:15;;;2731:4;3047:469;3061:6;3058:1;3055:13;3047:469;;;3120:13;;3158:9;;3146:22;;3208:11;;;3202:18;3188:12;;;3181:40;3261:11;;;3255:18;3241:12;;;3234:40;3297:4;3341:11;;;3335:18;3321:12;;;3314:40;3377:4;3421:11;;;3415:18;3401:12;;;3394:40;3463:4;3454:14;;;;3491:15;;;;3083:1;3076:9;3047:469;;;-1:-1:-1;3533:3:1;;2531:1011;-1:-1:-1;;;;;;;2531:1011:1:o;3547:260::-;3615:6;3623;3676:2;3664:9;3655:7;3651:23;3647:32;3644:52;;;3692:1;3689;3682:12;3644:52;3715:29;3734:9;3715:29;:::i;:::-;3705:39;;3763:38;3797:2;3786:9;3782:18;3763:38;:::i;:::-;3753:48;;3547:260;;;;;:::o;4235:118::-;4321:5;4314:13;4307:21;4300:5;4297:32;4287:60;;4343:1;4340;4333:12;4358:315;4423:6;4431;4484:2;4472:9;4463:7;4459:23;4455:32;4452:52;;;4500:1;4497;4490:12;4452:52;4523:29;4542:9;4523:29;:::i;:::-;4513:39;;4602:2;4591:9;4587:18;4574:32;4615:28;4637:5;4615:28;:::i;:::-;4662:5;4652:15;;;4358:315;;;;;:::o;4931:254::-;4999:6;5007;5060:2;5048:9;5039:7;5035:23;5031:32;5028:52;;;5076:1;5073;5066:12;5028:52;5099:29;5118:9;5099:29;:::i;:::-;5089:39;5175:2;5160:18;;;;5147:32;;-1:-1:-1;;;4931:254:1:o;6235:511::-;6303:6;6311;6319;6372:2;6360:9;6351:7;6347:23;6343:32;6340:52;;;6388:1;6385;6378:12;6340:52;6427:9;6414:23;6446:28;6468:5;6446:28;:::i;:::-;6493:5;-1:-1:-1;6550:2:1;6535:18;;6522:32;6563:30;6522:32;6563:30;:::i;:::-;6612:7;-1:-1:-1;6671:2:1;6656:18;;6643:32;6684:30;6643:32;6684:30;:::i;:::-;6733:7;6723:17;;;6235:511;;;;;:::o;6751:403::-;6837:6;6845;6853;6861;6914:3;6902:9;6893:7;6889:23;6885:33;6882:53;;;6931:1;6928;6921:12;6882:53;6954:29;6973:9;6954:29;:::i;:::-;6944:39;;7030:2;7019:9;7015:18;7002:32;6992:42;;7053:38;7087:2;7076:9;7072:18;7053:38;:::i;:::-;7043:48;;7110:38;7144:2;7133:9;7129:18;7110:38;:::i;:::-;7100:48;;6751:403;;;;;;;:::o;7159:254::-;7227:6;7235;7288:2;7276:9;7267:7;7263:23;7259:32;7256:52;;;7304:1;7301;7294:12;7256:52;7340:9;7327:23;7317:33;;7369:38;7403:2;7392:9;7388:18;7369:38;:::i;7418:241::-;7474:6;7527:2;7515:9;7506:7;7502:23;7498:32;7495:52;;;7543:1;7540;7533:12;7495:52;7582:9;7569:23;7601:28;7623:5;7601:28;:::i;7664:184::-;7716:77;7713:1;7706:88;7813:4;7810:1;7803:15;7837:4;7834:1;7827:15;7853:915;7935:6;7988:3;7976:9;7967:7;7963:23;7959:33;7956:53;;;8005:1;8002;7995:12;7956:53;8054:7;8047:4;8036:9;8032:20;8028:34;8018:62;;8076:1;8073;8066:12;8018:62;8109:2;8103:9;8151:3;8143:6;8139:16;8221:6;8209:10;8206:22;8185:18;8173:10;8170:34;8167:62;8164:242;;;8262:77;8259:1;8252:88;8363:4;8360:1;8353:15;8391:4;8388:1;8381:15;8164:242;8422:2;8415:22;8457:6;8501:3;8486:19;;8517;;;8514:39;;;8549:1;8546;8539:12;8514:39;8573:9;8591:146;8607:6;8602:3;8599:15;8591:146;;;8675:17;;8663:30;;8722:4;8713:14;;;;8624;8591:146;;;-1:-1:-1;8756:6:1;;7853:915;-1:-1:-1;;;;;7853:915:1:o;8773:184::-;8825:77;8822:1;8815:88;8922:4;8919:1;8912:15;8946:4;8943:1;8936:15;8962:184;9014:77;9011:1;9004:88;9111:4;9108:1;9101:15;9135:4;9132:1;9125:15;9151:128;9218:9;;;9239:11;;;9236:37;;;9253:18;;:::i;9284:168::-;9357:9;;;9388;;9405:15;;;9399:22;;9385:37;9375:71;;9426:18;;:::i;9457:274::-;9497:1;9523;9513:189;;9558:77;9555:1;9548:88;9659:4;9656:1;9649:15;9687:4;9684:1;9677:15;9513:189;-1:-1:-1;9716:9:1;;9457:274::o;9736:125::-;9801:9;;;9822:10;;;9819:36;;;9835:18;;:::i;9866:195::-;9905:3;9936:66;9929:5;9926:77;9923:103;;10006:18;;:::i;:::-;-1:-1:-1;10053:1:1;10042:13;;9866:195::o;10842:184::-;10912:6;10965:2;10953:9;10944:7;10940:23;10936:32;10933:52;;;10981:1;10978;10971:12;10933:52;-1:-1:-1;11004:16:1;;10842:184;-1:-1:-1;10842:184:1:o;11385:188::-;11464:13;;11517:30;11506:42;;11496:53;;11486:81;;11563:1;11560;11553:12;11578:450;11665:6;11673;11681;11734:2;11722:9;11713:7;11709:23;11705:32;11702:52;;;11750:1;11747;11740:12;11702:52;11773:40;11803:9;11773:40;:::i;:::-;11763:50;;11832:49;11877:2;11866:9;11862:18;11832:49;:::i;:::-;11822:59;;11924:2;11913:9;11909:18;11903:25;11968:10;11961:5;11957:22;11950:5;11947:33;11937:61;;11994:1;11991;11984:12;20284:250;20369:1;20379:113;20393:6;20390:1;20387:13;20379:113;;;20469:11;;;20463:18;20450:11;;;20443:39;20415:2;20408:10;20379:113;;;-1:-1:-1;;20526:1:1;20508:16;;20501:27;20284:250::o;20539:287::-;20668:3;20706:6;20700:13;20722:66;20781:6;20776:3;20769:4;20761:6;20757:17;20722:66;:::i;:::-;20804:16;;;;;20539:287;-1:-1:-1;;20539:287:1:o;20831:245::-;20898:6;20951:2;20939:9;20930:7;20926:23;20922:32;20919:52;;;20967:1;20964;20957:12;20919:52;20999:9;20993:16;21018:28;21040:5;21018:28;:::i;23317:245::-;23396:6;23404;23457:2;23445:9;23436:7;23432:23;23428:32;23425:52;;;23473:1;23470;23463:12;23425:52;-1:-1:-1;;23496:16:1;;23552:2;23537:18;;;23531:25;23496:16;;23531:25;;-1:-1:-1;23317:245:1:o;24039:455::-;24188:2;24177:9;24170:21;24151:4;24220:6;24214:13;24263:6;24258:2;24247:9;24243:18;24236:34;24279:79;24351:6;24346:2;24335:9;24331:18;24326:2;24318:6;24314:15;24279:79;:::i;:::-;24410:2;24398:15;24415:66;24394:88;24379:104;;;;24485:2;24375:113;;24039:455;-1:-1:-1;;24039:455:1:o

Swarm Source

ipfs://f01c27bdaeeafbdccd9fd14362cfb02a82c26e3b0f4c6cdd6ae82e0d6dd56b85

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.