Contract Address Details

0x4C6e1a645FD9D27A1D0aC27992DCBbcb98ea04Da

Contract Name
StrategyCommonChefLPMilkomeda
Creator
0x65eea9–3c935b at 0x0e8c4d–6018a5
Balance
0 mADA
Tokens
Fetching tokens...
Transactions
1 Transactions
Transfers
0 Transfers
Gas Used
46,140
Last Balance Update
44752599
Contract name:
StrategyCommonChefLPMilkomeda




Optimization enabled
false
Compiler version
v0.6.12+commit.27d51765




EVM Version
default




Verified at
2022-04-12T06:08:45.691924Z

Constructor Arguments

0000000000000000000000008d6a70271a09e646a55a6edfa2c250d61e6ed4f80000000000000000000000000000000000000000000000000000000000000010000000000000000000000000e1e1b4582760fca9664d725412165c7cf04f5f440000000000000000000000009d2e30c2fb648bee307edbafdb461b09df79516c00000000000000000000000065eea94b8d9aefdb55ffafa842a859d35d3c935b00000000000000000000000065eea94b8d9aefdb55ffafa842a859d35d3c935b00000000000000000000000081111113f03bfa747710d815106fa2833798b28e000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000063a5e4cd5e15ac66ea47134eb60e6b30a51b2bf000000000000000000000000ae83571000af4499798d1e3b0fa0070eb3a3e3f90000000000000000000000000000000000000000000000000000000000000003000000000000000000000000063a5e4cd5e15ac66ea47134eb60e6b30a51b2bf000000000000000000000000ae83571000af4499798d1e3b0fa0070eb3a3e3f900000000000000000000000065e66a61d0a8f1e686c2d6083ad611a10d84d97a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000063a5e4cd5e15ac66ea47134eb60e6b30a51b2bf000000000000000000000000ae83571000af4499798d1e3b0fa0070eb3a3e3f9

Arg [0] (address) : 0x8d6a70271a09e646a55a6edfa2c250d61e6ed4f8
Arg [1] (uint256) : 16
Arg [2] (address) : 0xe1e1b4582760fca9664d725412165c7cf04f5f44
Arg [3] (address) : 0x9d2e30c2fb648bee307edbafdb461b09df79516c
Arg [4] (address) : 0x65eea94b8d9aefdb55ffafa842a859d35d3c935b
Arg [5] (address) : 0x65eea94b8d9aefdb55ffafa842a859d35d3c935b
Arg [6] (address) : 0x81111113f03bfa747710d815106fa2833798b28e
Arg [7] (address[]) : [0x063a5e4cd5e15ac66ea47134eb60e6b30a51b2bf, 0xae83571000af4499798d1e3b0fa0070eb3a3e3f9]
Arg [8] (address[]) : [0x063a5e4cd5e15ac66ea47134eb60e6b30a51b2bf, 0xae83571000af4499798d1e3b0fa0070eb3a3e3f9, 0x65e66a61d0a8f1e686c2d6083ad611a10d84d97a]
Arg [9] (address[]) : [0x063a5e4cd5e15ac66ea47134eb60e6b30a51b2bf, 0xae83571000af4499798d1e3b0fa0070eb3a3e3f9]

              

Contract source code

// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/utils/Context.sol

pragma solidity >=0.6.0 <0.8.0;

/*
 * @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 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: @openzeppelin/contracts/token/ERC20/IERC20.sol

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
  /**
   * @dev Returns the amount of tokens in existence.
   */
  function totalSupply() external view returns (uint256);

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

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

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

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

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

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

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

// File: @openzeppelin/contracts/math/SafeMath.sol

pragma solidity >=0.6.0 <0.8.0;

/**
 * @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, with an overflow flag.
   *
   * _Available since v3.4._
   */
  function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    uint256 c = a + b;
    if (c < a) return (false, 0);
    return (true, c);
  }

  /**
   * @dev Returns the substraction of two unsigned integers, with an overflow flag.
   *
   * _Available since v3.4._
   */
  function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    if (b > a) return (false, 0);
    return (true, a - b);
  }

  /**
   * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
   *
   * _Available since v3.4._
   */
  function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
    if (a == 0) return (true, 0);
    uint256 c = a * b;
    if (c / a != b) return (false, 0);
    return (true, c);
  }

  /**
   * @dev Returns the division of two unsigned integers, with a division by zero flag.
   *
   * _Available since v3.4._
   */
  function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    if (b == 0) return (false, 0);
    return (true, a / b);
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
   *
   * _Available since v3.4._
   */
  function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    if (b == 0) return (false, 0);
    return (true, a % b);
  }

  /**
   * @dev Returns the addition of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `+` operator.
   *
   * Requirements:
   *
   * - Addition cannot overflow.
   */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    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) {
    require(b <= a, 'SafeMath: subtraction overflow');
    return a - b;
  }

  /**
   * @dev Returns the multiplication of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `*` operator.
   *
   * Requirements:
   *
   * - Multiplication cannot overflow.
   */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    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, reverting 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) {
    require(b > 0, 'SafeMath: division by zero');
    return a / b;
  }

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

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
   * overflow (when the result is negative).
   *
   * CAUTION: This function is deprecated because it requires allocating memory for the error
   * message unnecessarily. For custom revert reasons use {trySub}.
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   *
   * - Subtraction cannot overflow.
   */
  function sub(
    uint256 a,
    uint256 b,
    string memory errorMessage
  ) internal pure returns (uint256) {
    require(b <= a, errorMessage);
    return a - b;
  }

  /**
   * @dev Returns the integer division of two unsigned integers, reverting with custom message on
   * division by zero. The result is rounded towards zero.
   *
   * CAUTION: This function is deprecated because it requires allocating memory for the error
   * message unnecessarily. For custom revert reasons use {tryDiv}.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   *
   * - The divisor cannot be zero.
   */
  function div(
    uint256 a,
    uint256 b,
    string memory errorMessage
  ) internal pure returns (uint256) {
    require(b > 0, errorMessage);
    return a / b;
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * reverting with custom message when dividing by zero.
   *
   * CAUTION: This function is deprecated because it requires allocating memory for the error
   * message unnecessarily. For custom revert reasons use {tryMod}.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   *
   * - The divisor cannot be zero.
   */
  function mod(
    uint256 a,
    uint256 b,
    string memory errorMessage
  ) internal pure returns (uint256) {
    require(b > 0, errorMessage);
    return a % b;
  }
}

// File: @openzeppelin/contracts/token/ERC20/ERC20.sol

pragma solidity >=0.6.0 <0.8.0;

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

  mapping(address => uint256) private _balances;

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

  uint256 private _totalSupply;

  string private _name;
  string private _symbol;
  uint8 private _decimals;

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

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

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

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

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

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

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

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

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

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

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

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

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

    _beforeTokenTransfer(sender, recipient, amount);

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

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

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

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

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

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

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

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

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

  /**
   * @dev Sets {decimals} to a value other than the default one of 18.
   *
   * WARNING: This function should only be called from the constructor. Most
   * applications that interact with token contracts will not expect
   * {decimals} to ever change, and may work incorrectly if it does.
   */
  function _setupDecimals(uint8 decimals_) internal virtual {
    _decimals = decimals_;
  }

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

// File: @openzeppelin/contracts/utils/Address.sol

pragma solidity >=0.6.2 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

pragma solidity >=0.6.0 <0.9.0;

interface IUniswapRouterETH {
  function addLiquidity(
    address tokenA,
    address tokenB,
    uint256 amountADesired,
    uint256 amountBDesired,
    uint256 amountAMin,
    uint256 amountBMin,
    address to,
    uint256 deadline
  )
    external
    returns (
      uint256 amountA,
      uint256 amountB,
      uint256 liquidity
    );

  function addLiquidityETH(
    address token,
    uint256 amountTokenDesired,
    uint256 amountTokenMin,
    uint256 amountETHMin,
    address to,
    uint256 deadline
  )
    external
    payable
    returns (
      uint256 amountToken,
      uint256 amountETH,
      uint256 liquidity
    );

  function removeLiquidity(
    address tokenA,
    address tokenB,
    uint256 liquidity,
    uint256 amountAMin,
    uint256 amountBMin,
    address to,
    uint256 deadline
  ) external returns (uint256 amountA, uint256 amountB);

  function removeLiquidityETH(
    address token,
    uint256 liquidity,
    uint256 amountTokenMin,
    uint256 amountETHMin,
    address to,
    uint256 deadline
  ) external returns (uint256 amountToken, uint256 amountETH);

  function swapExactTokensForTokens(
    uint256 amountIn,
    uint256 amountOutMin,
    address[] calldata path,
    address to,
    uint256 deadline
  ) external returns (uint256[] memory amounts);

  function swapExactETHForTokens(
    uint256 amountOutMin,
    address[] calldata path,
    address to,
    uint256 deadline
  ) external payable returns (uint256[] memory amounts);

  function swapExactTokensForETH(
    uint256 amountIn,
    uint256 amountOutMin,
    address[] calldata path,
    address to,
    uint256 deadline
  ) external returns (uint256[] memory amounts);

  function getAmountsOut(uint256 amountIn, address[] calldata path)
    external
    view
    returns (uint256[] memory amounts);
}

pragma solidity ^0.6.0;

interface IUniswapV2Pair {
  function factory() external view returns (address);

  function token0() external view returns (address);

  function token1() external view returns (address);

  function burn(address to) external returns (uint256 amount0, uint256 amount1);

  function getReserves()
    external
    view
    returns (
      uint112 reserve0,
      uint112 reserve1,
      uint32 blockTimestampLast
    );
}

pragma solidity ^0.6.0;

interface IMasterChef {
  function deposit(uint256 _pid, uint256 _amount) external;

  function withdraw(uint256 _pid, uint256 _amount) external;

  function enterStaking(uint256 _amount) external;

  function leaveStaking(uint256 _amount) external;

  function userInfo(uint256 _pid, address _user) external view returns (uint256, uint256);

  function emergencyWithdraw(uint256 _pid) external;
}

// File: @openzeppelin/contracts/access/Ownable.sol

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
  address private _owner;

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

  /**
   * @dev Initializes the contract setting the deployer as the initial owner.
   */
  constructor() internal {
    address msgSender = _msgSender();
    _owner = msgSender;
    emit OwnershipTransferred(address(0), msgSender);
  }

  /**
   * @dev Returns the address of the current owner.
   */
  function owner() public view virtual returns (address) {
    return _owner;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(owner() == _msgSender(), 'Ownable: caller is not the owner');
    _;
  }

  /**
   * @dev Leaves the contract without owner. It will not be possible to call
   * `onlyOwner` functions anymore. Can only be called by the current owner.
   *
   * NOTE: Renouncing ownership will leave the contract without an owner,
   * thereby removing any functionality that is only available to the owner.
   */
  function renounceOwnership() public virtual onlyOwner {
    emit OwnershipTransferred(_owner, address(0));
    _owner = address(0);
  }

  /**
   * @dev Transfers ownership of the contract to a new account (`newOwner`).
   * Can only be called by the current owner.
   */
  function transferOwnership(address newOwner) public virtual onlyOwner {
    require(newOwner != address(0), 'Ownable: new owner is the zero address');
    emit OwnershipTransferred(_owner, newOwner);
    _owner = newOwner;
  }
}

// File: @openzeppelin/contracts/utils/Pausable.sol

pragma solidity >=0.6.0 <0.8.0;

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

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

  bool private _paused;

  /**
   * @dev Initializes the contract in unpaused state.
   */
  constructor() internal {
    _paused = false;
  }

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

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

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

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

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

pragma solidity ^0.6.12;

contract StratManager is Ownable, Pausable {
  /**
   * @dev Contracts:
   * {keeper} - Address to manage a few lower risk features of the strat
   * {strategist} - Address of the strategy author/deployer where strategist fee will go.
   * {vault} - Address of the vault that controls the strategy's funds.
   * {unirouter} - Address of exchange to execute swaps.
   */
  address public keeper;
  address public strategist;
  address public unirouter;
  address public vault;
  address public feeRecipient;

  /**
   * @dev Initializes the base strategy.
   * @param _keeper address to use as alternative owner.
   * @param _strategist address where strategist fees go.
   * @param _unirouter router to use for swaps
   * @param _feeRecipient address where to send fees.
   */
  constructor(
    address _keeper,
    address _strategist,
    address _unirouter,
    address _feeRecipient
  ) public {
    keeper = _keeper;
    strategist = _strategist;
    unirouter = _unirouter;
    feeRecipient = _feeRecipient;
  }

  // checks that caller is either owner or keeper.
  modifier onlyManager() {
    require(msg.sender == owner() || msg.sender == keeper, '!manager');
    _;
  }

  /**
   * @dev Updates address of the strat keeper.
   * @param _keeper new keeper address.
   */
  function setKeeper(address _keeper) external onlyManager {
    keeper = _keeper;
  }

  /**
   * @dev Updates address where strategist fee earnings will go.
   * @param _strategist new strategist address.
   */
  function setStrategist(address _strategist) external {
    require(msg.sender == strategist, '!strategist');
    strategist = _strategist;
  }

  /**
   * @dev Updates router that will be used for swaps.
   * @param _unirouter new unirouter address.
   */
  function setUnirouter(address _unirouter) external onlyOwner {
    unirouter = _unirouter;
  }

  /**
   * @dev Updates parent vault.
   * @param _vault new vault address.
   */
  function setVault(address _vault) external onlyOwner {
    vault = _vault;
  }

  /**
   * @dev Updates fee recipient.
   * @param _feeRecipient new fee recipient address.
   */
  function setfeeRecipient(address _feeRecipient) external onlyOwner {
    feeRecipient = _feeRecipient;
  }

  /**
   * @dev Function to synchronize balances before new user deposit.
   * Can be overridden in the strategy.
   */
  function beforeDeposit() external virtual {}
}

pragma solidity ^0.6.12;

abstract contract FeeManager is StratManager {
  uint256 public constant STRATEGIST_FEE = 400;
  uint256 public constant MAX_FEE = 1000;
  uint256 public constant MAX_CALL_FEE = 111;

  uint256 public constant WITHDRAWAL_FEE_CAP = 50;
  uint256 public constant WITHDRAWAL_MAX = 10000;

  uint256 public withdrawalFee = 0;

  uint256 public callFee = 0;
  uint256 public fee = MAX_FEE - STRATEGIST_FEE - callFee;

  function setCallFee(uint256 _fee) public onlyManager {
    require(_fee <= MAX_CALL_FEE, '!cap');

    callFee = _fee;
    fee = MAX_FEE - STRATEGIST_FEE - callFee;
  }

  function setWithdrawalFee(uint256 _fee) public onlyManager {
    require(_fee <= WITHDRAWAL_FEE_CAP, '!cap');

    withdrawalFee = _fee;
  }
}

pragma solidity >=0.6.0 <0.8.0;

library StringUtils {
  function concat(string memory a, string memory b) internal pure returns (string memory) {
    return string(abi.encodePacked(a, b));
  }
}

pragma solidity ^0.6.0;

contract StrategyCommonChefLP is StratManager, FeeManager {
  using SafeERC20 for IERC20;
  using SafeMath for uint256;

  // Tokens used
  address public native;
  address public output;
  address public want;
  address public lpToken0;
  address public lpToken1;

  // Third party contracts
  address public chef;
  uint256 public poolId;

  bool public harvestOnDeposit;
  uint256 public lastHarvest;
  string public pendingRewardsFunctionName;

  // Routes
  address[] public outputToNativeRoute;
  address[] public outputToLp0Route;
  address[] public outputToLp1Route;

  event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl);
  event Deposit(uint256 tvl);
  event Withdraw(uint256 tvl);

  constructor(
    address _want,
    uint256 _poolId,
    address _chef,
    address _unirouter,
    address _keeper,
    address _strategist,
    address _feeRecipient,
    address[] memory _outputToNativeRoute,
    address[] memory _outputToLp0Route,
    address[] memory _outputToLp1Route
  ) public StratManager(_keeper, _strategist, _unirouter, _feeRecipient) {
    want = _want;
    poolId = _poolId;
    chef = _chef;

    output = _outputToNativeRoute[0];
    native = _outputToNativeRoute[_outputToNativeRoute.length - 1];
    outputToNativeRoute = _outputToNativeRoute;

    // setup lp routing
    lpToken0 = IUniswapV2Pair(want).token0();
    require(_outputToLp0Route[0] == output, 'outputToLp0Route[0] != output');
    require(
      _outputToLp0Route[_outputToLp0Route.length - 1] == lpToken0,
      'outputToLp0Route[last] != lpToken0'
    );
    outputToLp0Route = _outputToLp0Route;

    lpToken1 = IUniswapV2Pair(want).token1();
    require(_outputToLp1Route[0] == output, 'outputToLp1Route[0] != output');
    require(
      _outputToLp1Route[_outputToLp1Route.length - 1] == lpToken1,
      'outputToLp1Route[last] != lpToken1'
    );
    outputToLp1Route = _outputToLp1Route;

    _giveAllowances();
  }

  // puts the funds to work
  function deposit() public whenNotPaused {
    uint256 wantBal = IERC20(want).balanceOf(address(this));

    if (wantBal > 0) {
      IMasterChef(chef).deposit(poolId, wantBal);
      emit Deposit(balanceOf());
    }
  }

  function withdraw(uint256 _amount) external {
    require(msg.sender == vault, '!vault');

    uint256 wantBal = IERC20(want).balanceOf(address(this));

    if (wantBal < _amount) {
      IMasterChef(chef).withdraw(poolId, _amount.sub(wantBal));
      wantBal = IERC20(want).balanceOf(address(this));
    }

    if (wantBal > _amount) {
      wantBal = _amount;
    }

    if (tx.origin != owner() && !paused()) {
      uint256 withdrawalFeeAmount = wantBal.mul(withdrawalFee).div(WITHDRAWAL_MAX);
      wantBal = wantBal.sub(withdrawalFeeAmount);
    }

    IERC20(want).safeTransfer(vault, wantBal);

    emit Withdraw(balanceOf());
  }

  function beforeDeposit() external override {
    if (harvestOnDeposit) {
      require(msg.sender == vault, '!vault');
      _harvest(tx.origin);
    }
  }

  function harvest() external virtual {
    _harvest(tx.origin);
  }

  function harvest(address callFeeRecipient) external virtual {
    _harvest(callFeeRecipient);
  }

  function managerHarvest() external onlyManager {
    _harvest(tx.origin);
  }

  // compounds earnings and charges performance fee
  function _harvest(address callFeeRecipient) internal whenNotPaused {
    IMasterChef(chef).deposit(poolId, 0);
    uint256 outputBal = IERC20(output).balanceOf(address(this));
    if (outputBal > 0) {
      chargeFees(callFeeRecipient);
      addLiquidity();
      uint256 wantHarvested = balanceOfWant();
      deposit();

      lastHarvest = block.timestamp;
      emit StratHarvest(msg.sender, wantHarvested, balanceOf());
    }
  }

  // performance fees
  function chargeFees(address callFeeRecipient) internal {
    uint256 toNative = IERC20(output).balanceOf(address(this)).mul(45).div(1000);
    IUniswapRouterETH(unirouter).swapExactTokensForTokens(
      toNative,
      0,
      outputToNativeRoute,
      address(this),
      now
    );

    uint256 nativeBal = IERC20(native).balanceOf(address(this));

    if(callFee > 0) {
      uint256 callFeeAmount = nativeBal.mul(callFee).div(MAX_FEE);
      IERC20(native).safeTransfer(callFeeRecipient, callFeeAmount);
    }

    uint256 feeAmount = nativeBal.mul(fee).div(MAX_FEE);
    IERC20(native).safeTransfer(feeRecipient, feeAmount);

    uint256 strategistFee = nativeBal.mul(STRATEGIST_FEE).div(MAX_FEE);
    IERC20(native).safeTransfer(strategist, strategistFee);
  }

  // Adds liquidity to AMM and gets more LP tokens.
  function addLiquidity() internal {
    uint256 outputHalf = IERC20(output).balanceOf(address(this)).div(2);

    if (lpToken0 != output) {
      IUniswapRouterETH(unirouter).swapExactTokensForTokens(
        outputHalf,
        0,
        outputToLp0Route,
        address(this),
        now
      );
    }

    if (lpToken1 != output) {
      IUniswapRouterETH(unirouter).swapExactTokensForTokens(
        outputHalf,
        0,
        outputToLp1Route,
        address(this),
        now
      );
    }

    uint256 lp0Bal = IERC20(lpToken0).balanceOf(address(this));
    uint256 lp1Bal = IERC20(lpToken1).balanceOf(address(this));
    IUniswapRouterETH(unirouter).addLiquidity(
      lpToken0,
      lpToken1,
      lp0Bal,
      lp1Bal,
      1,
      1,
      address(this),
      now
    );
  }

  // calculate the total underlaying 'want' held by the strat.
  function balanceOf() public view returns (uint256) {
    return balanceOfWant().add(balanceOfPool());
  }

  // it calculates how much 'want' this contract holds.
  function balanceOfWant() public view returns (uint256) {
    return IERC20(want).balanceOf(address(this));
  }

  // it calculates how much 'want' the strategy has working in the farm.
  function balanceOfPool() public view returns (uint256) {
    (uint256 _amount, ) = IMasterChef(chef).userInfo(poolId, address(this));
    return _amount;
  }

  function setPendingRewardsFunctionName(string calldata _pendingRewardsFunctionName)
    external
    onlyManager
  {
    pendingRewardsFunctionName = _pendingRewardsFunctionName;
  }

  // returns rewards unharvested
  function rewardsAvailable() public view returns (uint256) {
    string memory signature = StringUtils.concat(pendingRewardsFunctionName, '(uint256,address)');
    bytes memory result = Address.functionStaticCall(
      chef,
      abi.encodeWithSignature(signature, poolId, address(this))
    );
    return abi.decode(result, (uint256));
  }

  // native reward amount for calling harvest
  function callReward() public view returns (uint256) {
    uint256 outputBal = rewardsAvailable();
    uint256 nativeOut;
    if (outputBal > 0) {
      try IUniswapRouterETH(unirouter).getAmountsOut(outputBal, outputToNativeRoute) returns (
        uint256[] memory amountOut
      ) {
        nativeOut = amountOut[amountOut.length - 1];
      } catch {}
    }

    return nativeOut.mul(45).div(1000).mul(callFee).div(MAX_FEE);
  }

  function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyManager {
    harvestOnDeposit = _harvestOnDeposit;

    if (harvestOnDeposit) {
      setWithdrawalFee(0);
    } else {
      setWithdrawalFee(10);
    }
  }

  // called as part of strat migration. Sends all the available funds back to the vault.
  function retireStrat() external {
    require(msg.sender == vault, '!vault');

    IMasterChef(chef).emergencyWithdraw(poolId);

    uint256 wantBal = IERC20(want).balanceOf(address(this));
    IERC20(want).transfer(vault, wantBal);
  }

  // pauses deposits and withdraws all funds from third party systems.
  function panic() public onlyManager {
    pause();
    IMasterChef(chef).emergencyWithdraw(poolId);
  }

  function pause() public onlyManager {
    _pause();

    _removeAllowances();
  }

  function unpause() external onlyManager {
    _unpause();

    _giveAllowances();

    deposit();
  }

  function _giveAllowances() internal {
    IERC20(want).safeApprove(chef, uint256(-1));
    IERC20(output).safeApprove(unirouter, uint256(-1));

    IERC20(lpToken0).safeApprove(unirouter, 0);
    IERC20(lpToken0).safeApprove(unirouter, uint256(-1));

    IERC20(lpToken1).safeApprove(unirouter, 0);
    IERC20(lpToken1).safeApprove(unirouter, uint256(-1));
  }

  function _removeAllowances() internal {
    IERC20(want).safeApprove(chef, 0);
    IERC20(output).safeApprove(unirouter, 0);
    IERC20(lpToken0).safeApprove(unirouter, 0);
    IERC20(lpToken1).safeApprove(unirouter, 0);
  }

  function outputToNative() external view returns (address[] memory) {
    return outputToNativeRoute;
  }

  function outputToLp0() external view returns (address[] memory) {
    return outputToLp0Route;
  }

  function outputToLp1() external view returns (address[] memory) {
    return outputToLp1Route;
  }
}

pragma solidity ^0.6.12;

interface IGasPrice {
  function maxGasPrice() external returns (uint256);
}

pragma solidity ^0.6.12;

contract GasThrottler {
  bool public shouldGasThrottle = true;

  address public gasprice = address(0x27A362aEF318A52A07463FfF6AFA5e870E347f99);

  modifier gasThrottle() {
    if (shouldGasThrottle && Address.isContract(gasprice)) {
      require(tx.gasprice <= IGasPrice(gasprice).maxGasPrice(), 'gas is too high!');
    }
    _;
  }
}

pragma solidity ^0.6.0;

contract StrategyCommonChefLPMilkomeda is StrategyCommonChefLP, GasThrottler {
  constructor(
    address _want,
    uint256 _poolId,
    address _chef,
    address _unirouter,
    address _keeper,
    address _strategist,
    address _feeRecipient,
    address[] memory _outputToNativeRoute,
    address[] memory _outputToLp0Route,
    address[] memory _outputToLp1Route
  )
    public
    StrategyCommonChefLP(
      _want,
      _poolId,
      _chef,
      _unirouter,
      _keeper,
      _strategist,
      _feeRecipient,
      _outputToNativeRoute,
      _outputToLp0Route,
      _outputToLp1Route
    )
  {}

  function harvest() external override whenNotPaused gasThrottle {
    _harvest(tx.origin);
  }

  function harvest(address callFeeRecipient) external override gasThrottle {
    _harvest(callFeeRecipient);
  }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_want","internalType":"address"},{"type":"uint256","name":"_poolId","internalType":"uint256"},{"type":"address","name":"_chef","internalType":"address"},{"type":"address","name":"_unirouter","internalType":"address"},{"type":"address","name":"_keeper","internalType":"address"},{"type":"address","name":"_strategist","internalType":"address"},{"type":"address","name":"_feeRecipient","internalType":"address"},{"type":"address[]","name":"_outputToNativeRoute","internalType":"address[]"},{"type":"address[]","name":"_outputToLp0Route","internalType":"address[]"},{"type":"address[]","name":"_outputToLp1Route","internalType":"address[]"}]},{"type":"event","name":"Deposit","inputs":[{"type":"uint256","name":"tvl","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"StratHarvest","inputs":[{"type":"address","name":"harvester","internalType":"address","indexed":true},{"type":"uint256","name":"wantHarvested","internalType":"uint256","indexed":false},{"type":"uint256","name":"tvl","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"uint256","name":"tvl","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_CALL_FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"STRATEGIST_FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"WITHDRAWAL_FEE_CAP","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"WITHDRAWAL_MAX","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOfPool","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOfWant","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"beforeDeposit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"callFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"callReward","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"chef","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"fee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"feeRecipient","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"gasprice","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"harvest","inputs":[{"type":"address","name":"callFeeRecipient","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"harvest","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"harvestOnDeposit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"keeper","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastHarvest","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"lpToken0","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"lpToken1","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"managerHarvest","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"native","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"output","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"outputToLp0","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"outputToLp0Route","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"outputToLp1","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"outputToLp1Route","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"outputToNative","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"outputToNativeRoute","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"panic","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"pendingRewardsFunctionName","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"poolId","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"retireStrat","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"rewardsAvailable","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setCallFee","inputs":[{"type":"uint256","name":"_fee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setHarvestOnDeposit","inputs":[{"type":"bool","name":"_harvestOnDeposit","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setKeeper","inputs":[{"type":"address","name":"_keeper","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPendingRewardsFunctionName","inputs":[{"type":"string","name":"_pendingRewardsFunctionName","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setStrategist","inputs":[{"type":"address","name":"_strategist","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setUnirouter","inputs":[{"type":"address","name":"_unirouter","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setVault","inputs":[{"type":"address","name":"_vault","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setWithdrawalFee","inputs":[{"type":"uint256","name":"_fee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setfeeRecipient","inputs":[{"type":"address","name":"_feeRecipient","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"shouldGasThrottle","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"strategist","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"unirouter","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"vault","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"want","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"withdrawalFee","inputs":[]}]
            

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106103995760003560e01c8063748747e6116101e9578063be12a9781161010f578063dfbdc437116100ad578063f2fde38b1161007c578063f2fde38b14610d9b578063fb61778714610ddf578063fbfa77cf14610de9578063fd63a88714610e1d57610399565b8063dfbdc43714610d0d578063e7a7250a14610d2b578063f1a392da14610d49578063f20eaeb814610d6757610399565b8063d0e30db0116100e9578063d0e30db014610c97578063d801d94614610ca1578063d92f3d7314610cab578063ddca3f4314610cef57610399565b8063be12a97814610bdd578063c1a3d44c14610c35578063c7b9d53014610c5357610399565b80638da5cb5b116101875780639f8b5da1116101565780639f8b5da114610b3d578063ac1e502514610b5d578063aced166114610b8b578063bc063e1a14610bbf57610399565b80638da5cb5b14610a6e57806390321e1a14610aa257806397fd323d14610ac0578063989ef4e314610ade57610399565b80638456cb59116101c35780638456cb59146109f2578063877562b6146109fc5780638912cb8b14610a305780638bc7e8c414610a5057610399565b8063748747e61461094c5780637d38ca651461099057806384213b9e146109ae57610399565b806336c6cf21116102ce578063573fef0a1161026c5780636817031b1161023b5780636817031b146108ac5780636ec232d3146108f0578063715018a614610924578063722713f71461092e57610399565b8063573fef0a146107d557806359e79138146107df5780635c975abb146108585780635ee167c01461087857610399565b80634641257d116102a85780634641257d1461076f57806346904840146107795780634700d305146107ad57806354518b1a146107b757610399565b806336c6cf21146106ef5780633e0dc34e146107475780633f4ba83a1461076557610399565b80631fc8bc5d1161033b578063264658261161031557806326465826146105f2578063277e5cfd146106205780632ad5a53f146106a35780632e1a7d4d146106c157610399565b80631fc8bc5d146105565780631fe4a6861461058a578063257ae0de146105be57610399565b80631158808611610377578063115880861461047157806311b0b42d1461048f57806313e120b1146104c35780631f1fcd511461052257610399565b80630587f7851461039e5780630e5c011e146103fd5780630e8fbb5a14610441575b600080fd5b6103a6610e75565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156103e95780820151818401526020810190506103ce565b505050509050019250505060405180910390f35b61043f6004803603602081101561041357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f03565b005b61046f6004803603602081101561045757600080fd5b81019080803515159060200190929190505050611072565b005b6104796111be565b6040518082815260200191505060405180910390f35b6104976112a2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cb6112c8565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561050e5780820151818401526020810190506104f3565b505050509050019250505060405180910390f35b61052a611356565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61055e61137c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105926113a2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105c66113c8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61061e6004803603602081101561060857600080fd5b81019080803590602001909291905050506113ee565b005b610628611580565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561066857808201518184015260208101905061064d565b50505050905090810190601f1680156106955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106ab61161e565b6040518082815260200191505060405180910390f35b6106ed600480360360208110156106d757600080fd5b8101908080359060200190929190505050611623565b005b61071b6004803603602081101561070557600080fd5b8101908080359060200190929190505050611a74565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61074f611ab0565b6040518082815260200191505060405180910390f35b61076d611ab6565b005b610777611bd0565b005b610781611db9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107b5611ddf565b005b6107bf611f78565b6040518082815260200191505060405180910390f35b6107dd611f7e565b005b610856600480360360208110156107f557600080fd5b810190808035906020019064010000000081111561081257600080fd5b82018360208201111561082457600080fd5b8035906020019184600183028401116401000000008311171561084657600080fd5b9091929391929390505050612062565b005b610860612178565b60405180821515815260200191505060405180910390f35b61088061218e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108ee600480360360208110156108c257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121b4565b005b6108f86122a7565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61092c6122cd565b005b61093661243a565b6040518082815260200191505060405180910390f35b61098e6004803603602081101561096257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612462565b005b6109986125a6565b6040518082815260200191505060405180910390f35b6109f0600480360360208110156109c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506125ac565b005b6109fa61269f565b005b610a046127b1565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610a386127d7565b60405180821515815260200191505060405180910390f35b610a586127ea565b6040518082815260200191505060405180910390f35b610a766127f0565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aaa612819565b6040518082815260200191505060405180910390f35b610ac861281f565b6040518082815260200191505060405180910390f35b610ae6612a71565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610b29578082015181840152602081019050610b0e565b505050509050019250505060405180910390f35b610b45612aff565b60405180821515815260200191505060405180910390f35b610b8960048036036020811015610b7357600080fd5b8101908080359060200190929190505050612b12565b005b610b93612c93565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610bc7612cb9565b6040518082815260200191505060405180910390f35b610c0960048036036020811015610bf357600080fd5b8101908080359060200190929190505050612cbf565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c3d612cfb565b6040518082815260200191505060405180910390f35b610c9560048036036020811015610c6957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612dc6565b005b610c9f612ecd565b005b610ca96130f2565b005b610ced60048036036020811015610cc157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506131fd565b005b610cf76132f0565b6040518082815260200191505060405180910390f35b610d156132f6565b6040518082815260200191505060405180910390f35b610d336132fb565b6040518082815260200191505060405180910390f35b610d51613525565b6040518082815260200191505060405180910390f35b610d6f61352b565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ddd60048036036020811015610db157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613551565b005b610de7613743565b005b610df1613a51565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e4960048036036020811015610e3357600080fd5b8101908080359060200190929190505050613a77565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60606015805480602002602001604051908101604052809291908181526020018280548015610ef957602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610eaf575b5050505050905090565b601660009054906101000a900460ff168015610f465750610f45601660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613c90565b5b1561106657601660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633de39c116040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610fb557600080fd5b505af1158015610fc9573d6000803e3d6000fd5b505050506040513d6020811015610fdf57600080fd5b81019080805190602001909291905050503a1115611065576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f67617320697320746f6f2068696768210000000000000000000000000000000081525060200191505060405180910390fd5b5b61106f81613ca3565b50565b61107a6127f0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806111005750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611172576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f216d616e6167657200000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80601060006101000a81548160ff021916908315150217905550601060009054906101000a900460ff16156111b0576111ab6000612b12565b6111bb565b6111ba600a612b12565b5b50565b600080600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166393f1a40b600f54306040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050604080518083038186803b15801561125357600080fd5b505afa158015611267573d6000803e3d6000fd5b505050506040513d604081101561127d57600080fd5b8101908080519060200190929190805190602001909291905050505090508091505090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060601380548060200260200160405190810160405280929190818152602001828054801561134c57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611302575b5050505050905090565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6113f66127f0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061147c5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6114ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f216d616e6167657200000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b606f811115611565576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f216361700000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b806007819055506007546101906103e8030360088190555050565b60128054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116165780601f106115eb57610100808354040283529160200191611616565b820191906000526020600020905b8154815290600101906020018083116115f957829003601f168201915b505050505081565b606f81565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146116e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f217661756c74000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561177157600080fd5b505afa158015611785573d6000803e3d6000fd5b505050506040513d602081101561179b57600080fd5b810190808051906020019092919050505090508181101561192657600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663441a3e70600f5461180a8486613f1690919063ffffffff16565b6040518363ffffffff1660e01b81526004018083815260200182815260200192505050600060405180830381600087803b15801561184757600080fd5b505af115801561185b573d6000803e3d6000fd5b50505050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156118e857600080fd5b505afa1580156118fc573d6000803e3d6000fd5b505050506040513d602081101561191257600080fd5b810190808051906020019092919050505090505b81811115611932578190505b61193a6127f0565b73ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161415801561197a5750611978612178565b155b156119c35760006119aa61271061199c60065485613f9990919063ffffffff16565b61401f90919063ffffffff16565b90506119bf8183613f1690919063ffffffff16565b9150505b611a32600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166140a89092919063ffffffff16565b7f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d611a5b61243a565b6040518082815260200191505060405180910390a15050565b60148181548110611a8157fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600f5481565b611abe6127f0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611b445750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611bb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f216d616e6167657200000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611bbe61414a565b611bc6614234565b611bce612ecd565b565b611bd8612178565b15611c4b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b601660009054906101000a900460ff168015611c8e5750611c8d601660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613c90565b5b15611dae57601660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633de39c116040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611cfd57600080fd5b505af1158015611d11573d6000803e3d6000fd5b505050506040513d6020811015611d2757600080fd5b81019080805190602001909291905050503a1115611dad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f67617320697320746f6f2068696768210000000000000000000000000000000081525060200191505060405180910390fd5b5b611db732613ca3565b565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611de76127f0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611e6d5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611edf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f216d616e6167657200000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611ee761269f565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635312ea8e600f546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611f5e57600080fd5b505af1158015611f72573d6000803e3d6000fd5b50505050565b61271081565b601060009054906101000a900460ff161561206057600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612056576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f217661756c74000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b61205f32613ca3565b5b565b61206a6127f0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806120f05750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612162576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f216d616e6167657200000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b818160129190612173929190615c60565b505050565b60008060149054906101000a900460ff16905090565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6121bc614552565b73ffffffffffffffffffffffffffffffffffffffff166121da6127f0565b73ffffffffffffffffffffffffffffffffffffffff1614612263576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b601660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6122d5614552565b73ffffffffffffffffffffffffffffffffffffffff166122f36127f0565b73ffffffffffffffffffffffffffffffffffffffff161461237c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600061245d6124476111be565b61244f612cfb565b61455a90919063ffffffff16565b905090565b61246a6127f0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806124f05750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612562576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f216d616e6167657200000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61019081565b6125b4614552565b73ffffffffffffffffffffffffffffffffffffffff166125d26127f0565b73ffffffffffffffffffffffffffffffffffffffff161461265b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6126a76127f0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061272d5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61279f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f216d616e6167657200000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6127a76145e2565b6127af6146ce565b565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601060009054906101000a900460ff1681565b60065481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60075481565b60008061282a6132fb565b9050600080821115612a1a57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f8360136040518363ffffffff1660e01b81526004018083815260200180602001828103825283818154815260200191508054801561290757602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116128bd575b5050935050505060006040518083038186803b15801561292657600080fd5b505afa9250505080156129f457506040513d6000823e3d601f19601f82011682018060405250602081101561295a57600080fd5b810190808051604051939291908464010000000082111561297a57600080fd5b8382019150602082018581111561299057600080fd5b82518660208202830111640100000000821117156129ad57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156129e45780820151818401526020810190506129c9565b5050505090500160405250505060015b6129fd57612a19565b80600182510381518110612a0d57fe5b60200260200101519150505b5b612a6a6103e8612a5c600754612a4e6103e8612a40602d88613f9990919063ffffffff16565b61401f90919063ffffffff16565b613f9990919063ffffffff16565b61401f90919063ffffffff16565b9250505090565b60606014805480602002602001604051908101604052809291908181526020018280548015612af557602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612aab575b5050505050905090565b601660009054906101000a900460ff1681565b612b1a6127f0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612ba05750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612c12576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f216d616e6167657200000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6032811115612c89576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f216361700000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8060068190555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6103e881565b60138181548110612ccc57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612d8657600080fd5b505afa158015612d9a573d6000803e3d6000fd5b505050506040513d6020811015612db057600080fd5b8101908080519060200190929190505050905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612e89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f217374726174656769737400000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b612ed5612178565b15612f48576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612fd357600080fd5b505afa158015612fe7573d6000803e3d6000fd5b505050506040513d6020811015612ffd57600080fd5b8101908080519060200190929190505050905060008111156130ef57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e2bbb158600f54836040518363ffffffff1660e01b81526004018083815260200182815260200192505050600060405180830381600087803b15801561309857600080fd5b505af11580156130ac573d6000803e3d6000fd5b505050507f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e384266130d961243a565b6040518082815260200191505060405180910390a15b50565b6130fa6127f0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806131805750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6131f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f216d616e6167657200000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6131fb32613ca3565b565b613205614552565b73ffffffffffffffffffffffffffffffffffffffff166132236127f0565b73ffffffffffffffffffffffffffffffffffffffff16146132ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60085481565b603281565b600060606133d860128054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156133985780601f1061336d57610100808354040283529160200191613398565b820191906000526020600020905b81548152906001019060200180831161337b57829003601f168201915b50505050506040518060400160405280601181526020017f2875696e743235362c6164647265737329000000000000000000000000000000815250614890565b905060606134f6600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683600f5430604051602401808381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050604051602081830303815290604052906040518082805190602001908083835b602083106134775780518252602082019150602081019050602083039250613454565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614958565b905080806020019051602081101561350d57600080fd5b81019080805190602001909291905050509250505090565b60115481565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b613559614552565b73ffffffffffffffffffffffffffffffffffffffff166135776127f0565b73ffffffffffffffffffffffffffffffffffffffff1614613600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613686576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615cfe6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613806576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f217661756c74000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635312ea8e600f546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561387d57600080fd5b505af1158015613891573d6000803e3d6000fd5b505050506000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561392057600080fd5b505afa158015613934573d6000803e3d6000fd5b505050506040513d602081101561394a57600080fd5b81019080805190602001909291905050509050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613a1257600080fd5b505af1158015613a26573d6000803e3d6000fd5b505050506040513d6020811015613a3c57600080fd5b81019080805190602001909291905050505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60158181548110613a8457fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000811480613b81575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613b4457600080fd5b505afa158015613b58573d6000803e3d6000fd5b505050506040513d6020811015613b6e57600080fd5b8101908080519060200190929190505050145b613bd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180615dde6036913960400191505060405180910390fd5b613c738363095ea7b360e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614985565b505050565b6060613c878484600085614a74565b90509392505050565b600080823b905060008111915050919050565b613cab612178565b15613d1e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e2bbb158600f5460006040518363ffffffff1660e01b81526004018083815260200182815260200192505050600060405180830381600087803b158015613d9e57600080fd5b505af1158015613db2573d6000803e3d6000fd5b505050506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015613e4157600080fd5b505afa158015613e55573d6000803e3d6000fd5b505050506040513d6020811015613e6b57600080fd5b810190808051906020019092919050505090506000811115613f1257613e9082614c1d565b613e98615191565b6000613ea2612cfb565b9050613eac612ecd565b426011819055503373ffffffffffffffffffffffffffffffffffffffff167f9bc239f1724cacfb88cb1d66a2dc437467699b68a8c90d7b63110cf4b6f9241082613ef461243a565b604051808381526020018281526020019250505060405180910390a2505b5050565b600082821115613f8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b818303905092915050565b600080831415613fac5760009050614019565b6000828402905082848281613fbd57fe5b0414614014576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615d6f6021913960400191505060405180910390fd5b809150505b92915050565b6000808211614096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060200191505060405180910390fd5b81838161409f57fe5b04905092915050565b6141458363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614985565b505050565b614152612178565b6141c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa614207614552565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6142c3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613ab39092919063ffffffff16565b614352600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613ab39092919063ffffffff16565b6143c2600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613ab39092919063ffffffff16565b614451600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613ab39092919063ffffffff16565b6144c1600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613ab39092919063ffffffff16565b614550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613ab39092919063ffffffff16565b565b600033905090565b6000808284019050838110156145d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6145ea612178565b1561465d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586146a1614552565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b61473e600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613ab39092919063ffffffff16565b6147ae600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613ab39092919063ffffffff16565b61481e600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613ab39092919063ffffffff16565b61488e600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613ab39092919063ffffffff16565b565b606082826040516020018083805190602001908083835b602083106148ca57805182526020820191506020810190506020830392506148a7565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b6020831061491b57805182526020820191506020810190506020830392506148f8565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052905092915050565b606061497d8383604051806060016040528060258152602001615d4a60259139615a65565b905092915050565b60606149e7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613c789092919063ffffffff16565b9050600081511115614a6f57808060200190516020811015614a0857600080fd5b8101908080519060200190929190505050614a6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615db4602a913960400191505060405180910390fd5b5b505050565b606082471015614acf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615d246026913960400191505060405180910390fd5b614ad885613c90565b614b4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310614b9a5780518252602082019150602081019050602083039250614b77565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614bfc576040519150601f19603f3d011682016040523d82523d6000602084013e614c01565b606091505b5091509150614c11828286615b94565b92505050949350505050565b6000614d0a6103e8614cfc602d600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015614cb357600080fd5b505afa158015614cc7573d6000803e3d6000fd5b505050506040513d6020811015614cdd57600080fd5b8101908080519060200190929190505050613f9990919063ffffffff16565b61401f90919063ffffffff16565b9050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338ed1739826000601330426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281038252858181548152602001915080548015614e0957602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311614dbf575b50509650505050505050600060405180830381600087803b158015614e2d57600080fd5b505af1158015614e41573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614e6b57600080fd5b8101908080516040519392919084640100000000821115614e8b57600080fd5b83820191506020820185811115614ea157600080fd5b8251866020820283011164010000000082111715614ebe57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614ef5578082015181840152602081019050614eda565b50505050905001604052505050506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015614f8e57600080fd5b505afa158015614fa2573d6000803e3d6000fd5b505050506040513d6020811015614fb857600080fd5b81019080805190602001909291905050509050600060075411156150525760006150016103e8614ff360075485613f9990919063ffffffff16565b61401f90919063ffffffff16565b90506150508482600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166140a89092919063ffffffff16565b505b600061507d6103e861506f60085485613f9990919063ffffffff16565b61401f90919063ffffffff16565b90506150ee600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166140a89092919063ffffffff16565b60006151196103e861510b61019086613f9990919063ffffffff16565b61401f90919063ffffffff16565b905061518a600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166140a89092919063ffffffff16565b5050505050565b600061526a6002600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561522157600080fd5b505afa158015615235573d6000803e3d6000fd5b505050506040513d602081101561524b57600080fd5b810190808051906020019092919050505061401f90919063ffffffff16565b9050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146154db57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338ed1739826000601430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182810382528581815481526020019150805480156153e057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311615396575b50509650505050505050600060405180830381600087803b15801561540457600080fd5b505af1158015615418573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561544257600080fd5b810190808051604051939291908464010000000082111561546257600080fd5b8382019150602082018581111561547857600080fd5b825186602082028301116401000000008211171561549557600080fd5b8083526020830192505050908051906020019060200280838360005b838110156154cc5780820151818401526020810190506154b1565b50505050905001604052505050505b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461574a57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338ed1739826000601530426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818154815260200191508054801561564f57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311615605575b50509650505050505050600060405180830381600087803b15801561567357600080fd5b505af1158015615687573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156156b157600080fd5b81019080805160405193929190846401000000008211156156d157600080fd5b838201915060208201858111156156e757600080fd5b825186602082028301116401000000008211171561570457600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561573b578082015181840152602081019050615720565b50505050905001604052505050505b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156157d557600080fd5b505afa1580156157e9573d6000803e3d6000fd5b505050506040513d60208110156157ff57600080fd5b810190808051906020019092919050505090506000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561589d57600080fd5b505afa1580156158b1573d6000803e3d6000fd5b505050506040513d60208110156158c757600080fd5b81019080805190602001909291905050509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e8e33700600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858560018030426040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015615a0e57600080fd5b505af1158015615a22573d6000803e3d6000fd5b505050506040513d6060811015615a3857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505050565b6060615a7084613c90565b615ac5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180615d906024913960400191505060405180910390fd5b600060608573ffffffffffffffffffffffffffffffffffffffff16856040518082805190602001908083835b60208310615b145780518252602082019150602081019050602083039250615af1565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114615b74576040519150601f19603f3d011682016040523d82523d6000602084013e615b79565b606091505b5091509150615b89828286615b94565b925050509392505050565b60608315615ba457829050615c59565b600083511115615bb75782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615c1e578082015181840152602081019050615c03565b50505050905090810190601f168015615c4b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10615ca157803560ff1916838001178555615ccf565b82800160010185558215615ccf579182015b82811115615cce578235825591602001919060010190615cb3565b5b509050615cdc9190615ce0565b5090565b5b80821115615cf9576000816000905550600101615ce1565b509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212201cd700072afc9717d0707745441ddc3f7123054e8b5fe02a7521b3eef2b8be4e64736f6c634300060c0033