Contract Address Details

0xF159F12AFA5Cb531CA6FE7547Ead782dBa931900

Contract Name
StratMuesliSwap
Creator
0xd01710–81935c at 0x841984–f63de9
Balance
0 mADA
Tokens
Fetching tokens...
Transactions
1,189 Transactions
Transfers
4,485 Transfers
Gas Used
449,659,458
Last Balance Update
42078274
Contract name:
StratMuesliSwap




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




Optimization runs
200
EVM Version
default




Verified at
2022-04-16T03:45:07.515367Z

Constructor Arguments

00000000000000000000000044634f8e1e1588d5ae1f387269d0b260d5aa7ff100000000000000000000000000000000000000000000000000000000000000050000000000000000000000001662eba5ff3546d407ee0c73d94665d96dad2c2a0000000000000000000000007f27352d5f83db87a5a3e00f4b07cc2138d8ee52

Arg [0] (address) : 0x44634f8e1e1588d5ae1f387269d0b260d5aa7ff1
Arg [1] (uint256) : 5
Arg [2] (address) : 0x1662eba5ff3546d407ee0c73d94665d96dad2c2a
Arg [3] (address) : 0x7f27352d5f83db87a5a3e00f4b07cc2138d8ee52

              

Contract source code

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

// File @openzeppelin/contracts/GSN/Context.sol@v3.1.0

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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@v3.1.0



pragma solidity ^0.6.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@v3.1.0



pragma solidity ^0.6.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, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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


// File @openzeppelin/contracts/utils/Address.sol@v3.1.0



pragma solidity ^0.6.2;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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/ERC20.sol@v3.1.0



pragma solidity ^0.6.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;
    using Address for address;

    mapping (address => uint256) private _balances;

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

    uint256 private _totalSupply;

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

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

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    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 is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

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

    /**
     * @dev 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 {
        _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/token/ERC20/SafeERC20.sol@v3.1.0



pragma solidity ^0.6.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");
        }
    }
}


// File contracts/interfaces/IMasterChefMuesliswap.sol



pragma solidity ^0.6.0;

interface IMasterChefMuesliswap {
    function deposit(uint256 _pid, uint256 _amount) external;
    function withdraw(uint256 _pid, uint256 _amount) external;
    function pendingCake(uint256 _pid, address _user) external view returns (uint256);
    function userInfo(uint256 _pid, address _user) external view returns (uint256, uint256);
    function emergencyWithdraw(uint256 _pid) external;
}


// File contracts/common/IUniswapRouterETH.sol



pragma solidity >=0.6.0 <0.9.0;

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

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

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

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

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

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

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


// File contracts/common/IUniswapV2Pair.sol



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 (uint amount0, uint amount1);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}


// File @openzeppelin/contracts/access/Ownable.sol@v3.1.0



pragma solidity ^0.6.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.
 */
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 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@v3.1.0



pragma solidity ^0.6.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.
 */
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 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());
    }
}


// File contracts/common/StratManager.sol



pragma solidity ^0.6.12;


contract StratManager is Ownable, Pausable {
    /**
     * @dev Lemuria Finance Contracts:
     * {keeper} - Address to manage a few lower risk features of the strat
     * {keeper2} - Address to manage lower risk features of the strat
     * {harvester} - Address that calls autocomp functions
     * {treasury} - Address of the strategy author/deployer where treasury fee will go.
     * {vault} - Address of the vault that controls the strategy's funds.
     * {unirouter} - Address of exchange to execute swaps.
     */
    address public keeper = 0x9A9B5Cef142c49ADE1BbC03E0108fDF83C1f6e22;
    address public keeper2 = 0xD0171089B89F7F4c8D6689412AB354710481935c;
    address public harvester = 0x433CABbCA680305933A94eA1cbC385a410104cDa;
    address public treasury = 0xc2BB01646AcB1A1B74fe7524615AD0C1CCD4adf3;
    address public lemuriaFeeRecipient =0xC472ebDAE644476C8b93BA746D6Db6c880c4a376;
    address public vault = 0x0000000000000000000000000000000000000000;
    address public unirouter;

    address constant zero = 0x0000000000000000000000000000000000000000;
    /**
     * @dev Initializes the base strategy.
     * @param _unirouter router to use for swaps
     */
    constructor(
        address _unirouter
    ) public {
        unirouter = _unirouter;
    }

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

    // verifies that the caller is not a contract.
    modifier onlyEOA() {
        require(msg.sender == tx.origin, "!EOA");
        _;
    }

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

    /**
     * @dev Updates address of the strat keeper.
     * @param _keeper new keeper address.
     */
    function setKeeper(address _keeper) external  {
        require(msg.sender == keeper, "!NotKeeper!");
        keeper = _keeper;
    }

    /**
     * @dev Updates address of the strat keeper.
     * @param _keeper2 new keeper2 address.
     */
    function setKeeper2(address _keeper2) external  {
        require(msg.sender == keeper2, "!NotKeeper2!");
        keeper2 = _keeper2;
    }

    /**
     * @dev Updates address where treasury fee earnings will go.
     * @param _treasury new treasury address.
     */
    function setTreasury(address _treasury) external {
        require(msg.sender == treasury, "!treasury");
        treasury = _treasury;
    }

    /**
     * @dev Updates parent vault.
     * @param _vault new vault address.
     * can only be called once, so set to onlyManager
     */
    function setVault(address _vault) external onlyManager {
        require(vault == zero, "nope");
        vault = _vault;
    }

    /**
     * @dev Updates Lemuria fee recipient.
     * @param _lemuriaFeeRecipient new Lemuria fee recipient address.
     */
    function setLemuriaFeeRecipient(address _lemuriaFeeRecipient) external onlyOwner {
        lemuriaFeeRecipient = _lemuriaFeeRecipient;
    }

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

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


// File contracts/common/FeeManager.sol



pragma solidity 0.6.12;

abstract contract FeeManager is StratManager {
    uint constant public TREASURY_FEE = 112;
    uint constant public MAX_FEE = 1000;
    uint constant public MAX_CALL_FEE = 111;

    uint constant public WITHDRAWAL_FEE_CAP = 50;
    uint constant public WITHDRAWAL_MAX = 10000;
    
    uint public withdrawalFee = 0; 

    uint public callFee = 111;
    uint public lemuriaFee = MAX_FEE - TREASURY_FEE - callFee;  //   1000-112-111=777

    function setCallFee(uint256 _fee) external onlyManager {
        require(_fee <= MAX_CALL_FEE, "!cap");
        callFee = _fee;
        lemuriaFee = MAX_FEE - TREASURY_FEE - callFee;
    }
    
    function setWithdrawalFee(uint256 _fee) external onlyManager {
        require(_fee <= WITHDRAWAL_FEE_CAP, "!cap");

        withdrawalFee = _fee;
    }
}


// File contracts/strategy/StratMuesliSwap.sol



pragma solidity 0.6.12;







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

    // Tokens used
    address constant public wrapped = address(0xAE83571000aF4499798d1e3b0fA0070EB3A3E3F9);  //  WADA. 
    address constant public output = address(0x2D7289Df2f41a25D3A628258081aD7B99eb4C83B);   //  MUESLI
    address public want;
    address public lpToken0;
    address public lpToken1;
    address public dualReward;


    // Third party contracts
    address constant public masterchef = address(0x39B8571f510C8afbb1595FF7CB2d048df699aA71);   //  Muesli Masterchef 
    uint256 public poolId;

    //  BOOLEAN
    bool public harvestOnDeposit;
    bool public harvestOnWithdrawal;
    bool public isRetired = false;

    //  Timer indicating last harvest timestamp
    uint256 public lastHarvest;

    // Routes
    address[] public outputToWrappedRoute = [output, wrapped];
    address[] public outputToLp0Route;
    address[] public outputToLp1Route;
    address[] public lp0ToOutputRoute;
    address[] public lp1ToOutputRoute;
    address[] public dualRewardToOutputRoute = [dualReward, output];

    /**
     * @dev events for contract
     */
    event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl);
    event Deposit(uint256 tvl);
    event Withdraw(uint256 tvl);
    event panicking();
    event dustConverted();
    event autoHarvestSet(bool isHarvDep, bool isHarvWith);
    event dualRewardSet(address dualReward);

    constructor(
        address _want,
        uint256 _poolId,
        address _unirouter,
        address _dualReward
    ) StratManager(_unirouter) public {
        dualReward = _dualReward;
        want = _want;
        lpToken0 = IUniswapV2Pair(want).token0();
        lpToken1 = IUniswapV2Pair(want).token1();
        poolId = _poolId;

        if (lpToken0 == wrapped) {
            outputToLp0Route = [output, wrapped];
            lp0ToOutputRoute = [wrapped, output];
        } else if (lpToken0 != output) {
            outputToLp0Route = [output, wrapped, lpToken0];
            lp0ToOutputRoute = [lpToken0, wrapped, output];
        }

        if (lpToken1 == wrapped) {
            outputToLp1Route = [output, wrapped];
            lp0ToOutputRoute = [output, wrapped];
        } else if (lpToken1 != output) {
            outputToLp1Route = [output, wrapped, lpToken1];
            lp1ToOutputRoute = [lpToken1, wrapped, output];
        }

        dualRewardToOutputRoute = [dualReward, output];
        _giveAllowances();
    }

    function setDualReward(address _dualReward) external onlyManager {
        require(_dualReward != want, "must set to token");
        dualReward = _dualReward;
        dualRewardToOutputRoute = [dualReward, output];
        IERC20(dualReward).safeApprove(unirouter, 0);
        IERC20(dualReward).safeApprove(unirouter, uint256(-1));
        emit dualRewardSet(dualReward);
    }

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

        if (wantBal > 0) {
            IMasterChefMuesliswap(masterchef).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) {
            IMasterChefMuesliswap(masterchef).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());
    }

    // set bool harvestOnDeposit and harvestOnWithdrawal
    function setAutoHarvest(bool _harvestOnDeposit, bool _harvestOnWithdrawal) external onlyManager {
        harvestOnDeposit = _harvestOnDeposit;
        harvestOnWithdrawal = _harvestOnWithdrawal;
        emit autoHarvestSet(harvestOnDeposit, harvestOnWithdrawal);
    }

    function beforeDeposit() external override {
        if (harvestOnDeposit) {
            require(msg.sender == vault, "!vault");
            _harvest(tx.origin);                            //  before harvest, call harvest, pass in argument of tx.origin
        }
    }

    function beforeWithdraw() external override {
        if (harvestOnWithdrawal) {
            require(msg.sender == vault, "!vault");
            _harvest(tx.origin);                            //  before withdrawal, call harvest, pass in argument of tx.origin
        }
    }

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

    //  call harvest, param public callFee, for frontend
    function harvest(address callFeeRecipient) external virtual {
        _harvest(callFeeRecipient);
    }

    //  call harvest, manager
    function managerHarvest() external onlyManager {
        _harvest(tx.origin);
    }

    // compounds earnings and charges performance fee
    function _harvest(address callFeeRecipient) internal whenNotPaused  {
        IMasterChefMuesliswap(masterchef).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 toOutput = IERC20(dualReward).balanceOf(address(this));
        if (toOutput > 0) {
            IUniswapRouterETH(unirouter).swapExactTokensForTokens(toOutput, 0, dualRewardToOutputRoute, address(this), now.add(600));
        }

        uint256 toWrapped = IERC20(output).balanceOf(address(this)).mul(42).div(1000);          //  wrapped amount   4.20% fees
        IUniswapRouterETH(unirouter).swapExactTokensForTokens(toWrapped, 0, outputToWrappedRoute, address(this), now.add(600));

        uint256 wrappedBal = IERC20(wrapped).balanceOf(address(this));

        uint256 callFeeAmount = wrappedBal.mul(callFee).div(MAX_FEE);               //  callFee amount = amount must go to the caller of the harvest function 
        IERC20(wrapped).safeTransfer(callFeeRecipient, callFeeAmount);              //  send callFee amount to tx.origin 

        uint256 lemuriaFeeAmount = wrappedBal.mul(lemuriaFee).div(MAX_FEE);         //  user rewards + LEMURIA buybacks
        IERC20(wrapped).safeTransfer(lemuriaFeeRecipient, lemuriaFeeAmount);

        uint256 treasuryFee = wrappedBal.mul(TREASURY_FEE).div(MAX_FEE);            //  LEMURIA protocol profit fee 
        IERC20(wrapped).safeTransfer(treasury, treasuryFee);
    }

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

    // it calculates how much 'rewardToken' the strategy is earning.
    function pendingRewards() public view returns (uint256) {
        uint256 _amount = IMasterChefMuesliswap(masterchef).pendingCake(poolId, address(this));
        return _amount;
    }

    function dualRewardBal() external view returns (uint256) {
        uint256 _dualRewardBal = IERC20(dualReward).balanceOf(address(this));
        return _dualRewardBal;
    }

    function outputBal() external view returns (uint256) {
        uint256 _outputBal = IERC20(output).balanceOf(address(this));
        return _outputBal;
    }
    
    function lp0Bal() external view returns (uint256) {
        uint256 _lp0Bal = IERC20(lpToken0).balanceOf(address(this));
        return _lp0Bal;
    }

    function lp1Bal() external view returns (uint256) {
        uint256 _lp1Bal = IERC20(lpToken1).balanceOf(address(this));
        return _lp1Bal;
    }

    // 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, ) = IMasterChefMuesliswap(masterchef).userInfo(poolId, address(this));
        return _amount;
    }

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

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

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

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

    function setHarvestOnWithdrawal(bool _harvestOnWithdrawal) external onlyManager {
        harvestOnWithdrawal = _harvestOnWithdrawal;
    }

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

        IMasterChefMuesliswap(masterchef).emergencyWithdraw(poolId);

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

        isRetired = true;

    }

    // Converts dust tokens into output tokens, which will be reinvested on the next harvest().
    function convertDust() external onlyManager {
        uint256 lpToken0Bal = IERC20(lpToken0).balanceOf(address(this));
        uint256 lpToken1Bal = IERC20(lpToken1).balanceOf(address(this));

        if (lpToken0Bal != 0) { 
            IUniswapRouterETH(unirouter).swapExactTokensForTokens(lpToken0Bal, 0, lp0ToOutputRoute, address(this), now.add(600));
        }
        if (lpToken1Bal != 0) { 
            IUniswapRouterETH(unirouter).swapExactTokensForTokens(lpToken1Bal, 0, lp1ToOutputRoute, address(this), now.add(600));
        }
        
        emit dustConverted();
    }

    // after retirement, if any dust remains
    function removeDust() external onlyManager {
        require(isRetired, "nope");
        uint256 _lp0Bal = IERC20(lpToken0).balanceOf(address(this));
        uint256 _lp1Bal = IERC20(lpToken1).balanceOf(address(this));
        uint256 outputDust = IERC20(output).balanceOf(address(this));

        if (_lp0Bal != 0) {
            IERC20(lpToken0).safeTransfer(treasury, _lp0Bal);
        }
        if (_lp1Bal != 0) {
            IERC20(lpToken1).safeTransfer(treasury, _lp1Bal);
        }
        if (lpToken0 != output && lpToken1 != output && outputDust != 0) {
            IERC20(output).safeTransfer(treasury, outputDust);
        }
    }

    // pauses deposits and withdraws all funds from third party systems.
    function panic() external onlyManager {
        pause();
        IMasterChefMuesliswap(masterchef).emergencyWithdraw(poolId);
        emit panicking();
    }

    function pause() public onlyManager {
        _pause();

        _removeAllowances();
    }

    function unpause() external onlyManager {
        _unpause();

        _giveAllowances();

        deposit();
    }

    function _giveAllowances() internal {
        IERC20(want).safeApprove(masterchef, 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));

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

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

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_want","internalType":"address"},{"type":"uint256","name":"_poolId","internalType":"uint256"},{"type":"address","name":"_unirouter","internalType":"address"},{"type":"address","name":"_dualReward","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":"event","name":"autoHarvestSet","inputs":[{"type":"bool","name":"isHarvDep","internalType":"bool","indexed":false},{"type":"bool","name":"isHarvWith","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"dualRewardSet","inputs":[{"type":"address","name":"dualReward","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"dustConverted","inputs":[],"anonymous":false},{"type":"event","name":"panicking","inputs":[],"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":"TREASURY_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":"nonpayable","outputs":[],"name":"beforeWithdraw","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":"nonpayable","outputs":[],"name":"convertDust","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"dualReward","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"dualRewardBal","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"dualRewardToOutputRoute","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"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":"bool","name":"","internalType":"bool"}],"name":"harvestOnWithdrawal","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"harvester","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isRetired","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"keeper","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"keeper2","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastHarvest","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lemuriaFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"lemuriaFeeRecipient","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lp0Bal","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"lp0ToOutputRoute","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lp1Bal","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"lp1ToOutputRoute","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"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":"masterchef","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"output","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"outputBal","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":"outputToLp1Route","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"outputToWrappedRoute","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":"uint256","name":"","internalType":"uint256"}],"name":"pendingRewards","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"poolId","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeDust","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"retireStrat","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setAutoHarvest","inputs":[{"type":"bool","name":"_harvestOnDeposit","internalType":"bool"},{"type":"bool","name":"_harvestOnWithdrawal","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setCallFee","inputs":[{"type":"uint256","name":"_fee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDualReward","inputs":[{"type":"address","name":"_dualReward","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setHarvestOnDeposit","inputs":[{"type":"bool","name":"_harvestOnDeposit","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setHarvestOnWithdrawal","inputs":[{"type":"bool","name":"_harvestOnWithdrawal","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setHarvester","inputs":[{"type":"address","name":"_harvester","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setKeeper","inputs":[{"type":"address","name":"_keeper","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setKeeper2","inputs":[{"type":"address","name":"_keeper2","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setLemuriaFeeRecipient","inputs":[{"type":"address","name":"_lemuriaFeeRecipient","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTreasury","inputs":[{"type":"address","name":"_treasury","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":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"treasury","inputs":[]},{"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":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"wrapped","inputs":[]}]
            

Deployed ByteCode

0x608060405234801561001057600080fd5b506004361061041d5760003560e01c8063715018a61161022b578063c4d9f31d11610130578063eded3fda116100b8578063f2fde38b11610087578063f2fde38b1461085b578063fb1db27814610881578063fb61778714610889578063fbfa77cf14610891578063fd63a887146108995761041d565b8063eded3fda1461081d578063f0f4426014610825578063f1a392da1461084b578063f20eaeb8146108535761041d565b8063d0e30db0116100ff578063d0e30db0146107f5578063d801d946146107fd578063d8a843d314610805578063dfbdc4371461080d578063e361999e146108155761041d565b8063c4d9f31d14610799578063cb2dcd2b146107bf578063cc522654146107e5578063cd1ed20c146107ed5761041d565b806390321e1a116101b3578063aced166111610182578063aced166114610771578063b83b6a9814610779578063bc063e1a14610781578063be9533cb14610789578063c1a3d44c146107915761041d565b806390321e1a1461072757806391c61b211461072f57806397fd323d1461074c578063ac1e5025146107545761041d565b8063877562b6116101fa578063877562b6146106ff5780638912cb8b146107075780638bc7e8c41461070f5780638ce1a483146107175780638da5cb5b1461071f5761041d565b8063715018a6146106c1578063722713f7146106c9578063748747e6146106d15780638456cb59146106f75761041d565b80633e0dc34e1161033157806354518b1a116102b95780635ee167c0116102885780635ee167c01461066457806361d027b31461066c5780636817031b146106745780636a237abe1461069a5780636c33d247146106b95761041d565b806354518b1a14610625578063548d099c1461062d578063573fef0a146106545780635c975abb1461065c5761041d565b80634641257d116103005780634641257d146105e95780634700d305146105f157806349343cee146105f95780634bdaeac11461061557806350e70d481461061d5761041d565b80633e0dc34e146105c95780633f4ba83a146105d1578063419f7753146105d957806342a630ee146105e15761041d565b806315de1daa116103b45780632646582611610383578063264658261461054d5780632ad5a53f1461056a5780632e1a7d4d14610572578063313adde11461058f57806336c6cf21146105ac5761041d565b806315de1daa146104fa5780631d172127146105205780631f1fcd511461053d578063257ae0de146105455761041d565b806310da2253116103f057806310da2253146104a957806311588086146104b157806313e2bcda146104b957806314c2ed50146104c15761041d565b806305689bf81461042257806305f68f1d1461044a5780630e5c011e146104645780630e8fbb5a1461048a575b600080fd5b6104486004803603602081101561043857600080fd5b50356001600160a01b03166108b6565b005b610452610a75565b60408051918252519081900360200190f35b6104486004803603602081101561047a57600080fd5b50356001600160a01b0316610af7565b610448600480360360208110156104a057600080fd5b50351515610b03565b610452610bad565b610452610bb3565b610452610c3b565b6104de600480360360208110156104d757600080fd5b5035610c8b565b604080516001600160a01b039092168252519081900360200190f35b6104486004803603602081101561051057600080fd5b50356001600160a01b0316610cb2565b6104de6004803603602081101561053657600080fd5b5035610d6b565b6104de610d78565b6104de610d87565b6104486004803603602081101561056357600080fd5b5035610d96565b610452610e7a565b6104486004803603602081101561058857600080fd5b5035610e7f565b6104de600480360360208110156105a557600080fd5b503561110c565b6104de600480360360208110156105c257600080fd5b5035611119565b610452611126565b61044861112c565b6104486111dd565b61044861123e565b610448611235565b610448611551565b61060161168f565b604080519115158252519081900360200190f35b6104de61169e565b6104de6116ad565b6104526116c5565b6104486004803603604081101561064357600080fd5b5080351515906020013515156116cb565b6104486117ce565b610601611821565b6104de611831565b6104de611840565b6104486004803603602081101561068a57600080fd5b50356001600160a01b031661184f565b610448600480360360208110156106b057600080fd5b5035151561194f565b610448611a00565b610448611ee4565b610452611f98565b610448600480360360208110156106e757600080fd5b50356001600160a01b0316611fb8565b610448612027565b6104de6120ce565b6106016120dd565b6104526120e6565b6104526120ec565b6104de6120f1565b610452612100565b6104de6004803603602081101561074557600080fd5b5035612106565b610452612113565b6104486004803603602081101561076a57600080fd5b50356122df565b6104de6123ba565b6106016123c9565b6104526123d7565b6104de6123dd565b6104526123ec565b610448600480360360208110156107af57600080fd5b50356001600160a01b0316612468565b610448600480360360208110156107d557600080fd5b50356001600160a01b03166124d8565b610452612564565b6104de6125b4565b6104486125c3565b61044861274d565b6104de6127e4565b6104526127f3565b6104526127f8565b610452612848565b6104486004803603602081101561083b57600080fd5b50356001600160a01b03166128a8565b610452612915565b6104de61291b565b6104486004803603602081101561087157600080fd5b50356001600160a01b031661292d565b6104de612a37565b610448612a4f565b6104de612bb8565b6104de600480360360208110156108af57600080fd5b5035612bc7565b6108be6120f1565b6001600160a01b0316336001600160a01b031614806108e757506001546001600160a01b031633145b806108fc57506002546001600160a01b031633145b8061091157506003546001600160a01b031633145b61094d576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b600b546001600160a01b03828116911614156109a4576040805162461bcd60e51b815260206004820152601160248201527036bab9ba1039b2ba103a37903a37b5b2b760791b604482015290519081900360640190fd5b600e80546001600160a01b0319166001600160a01b03838116919091179182905560408051808201909152911681526000805160206142ad83398151915260208201526109f59060179060026141b7565b50600754600e54610a14916001600160a01b0391821691166000612bd4565b600754600e54610a33916001600160a01b039182169116600019612bd4565b600e54604080516001600160a01b039092168252517f2619c71fd4343b49b756f87f8760eb16c92c02938ad7e247c0ecb18fd85b09719181900360200190a150565b600d54604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015610ac557600080fd5b505afa158015610ad9573d6000803e3d6000fd5b505050506040513d6020811015610aef57600080fd5b505191505090565b610b0081612cfe565b50565b610b0b6120f1565b6001600160a01b0316336001600160a01b03161480610b3457506001546001600160a01b031633145b80610b4957506002546001600160a01b031633145b80610b5e57506003546001600160a01b031633145b610b9a576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b6010805460ff1916911515919091179055565b600a5481565b600f54604080516393f1a40b60e01b81526004810192909252306024830152805160009283927339b8571f510c8afbb1595ff7cb2d048df699aa71926393f1a40b926044808201939291829003018186803b158015610c1157600080fd5b505afa158015610c25573d6000803e3d6000fd5b505050506040513d6040811015610aef57600080fd5b604080516370a0823160e01b8152306004820152905160009182916000805160206142ad833981519152916370a08231916024808301926020929190829003018186803b158015610ac557600080fd5b60158181548110610c9857fe5b6000918252602090912001546001600160a01b0316905081565b610cba6120f1565b6001600160a01b0316336001600160a01b03161480610ce357506001546001600160a01b031633145b80610cf857506002546001600160a01b031633145b80610d0d57506003546001600160a01b031633145b610d49576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60128181548110610c9857fe5b600b546001600160a01b031681565b6007546001600160a01b031681565b610d9e6120f1565b6001600160a01b0316336001600160a01b03161480610dc757506001546001600160a01b031633145b80610ddc57506002546001600160a01b031633145b80610df157506003546001600160a01b031633145b610e2d576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b606f811115610e6c576040805162461bcd60e51b815260206004808301919091526024820152630216361760e41b604482015290519081900360640190fd5b600981905561037803600a55565b606f81565b6006546001600160a01b03163314610ec7576040805162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b604482015290519081900360640190fd5b600b54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610f1257600080fd5b505afa158015610f26573d6000803e3d6000fd5b505050506040513d6020811015610f3c57600080fd5b505190508181101561104057600f547339b8571f510c8afbb1595ff7cb2d048df699aa719063441a3e7090610f718585612ec2565b6040518363ffffffff1660e01b81526004018083815260200182815260200192505050600060405180830381600087803b158015610fae57600080fd5b505af1158015610fc2573d6000803e3d6000fd5b5050600b54604080516370a0823160e01b815230600482015290516001600160a01b0390921693506370a082319250602480820192602092909190829003018186803b15801561101157600080fd5b505afa158015611025573d6000803e3d6000fd5b505050506040513d602081101561103b57600080fd5b505190505b8181111561104b5750805b6110536120f1565b6001600160a01b0316326001600160a01b0316141580156110795750611077611821565b155b156110b15760006110a161271061109b60085485612f0d90919063ffffffff16565b90612f66565b90506110ad8282612ec2565b9150505b600654600b546110ce916001600160a01b03918216911683612fa8565b7f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d6110f7611f98565b60408051918252519081900360200190a15050565b60168181548110610c9857fe5b60138181548110610c9857fe5b600f5481565b6111346120f1565b6001600160a01b0316336001600160a01b0316148061115d57506001546001600160a01b031633145b8061117257506002546001600160a01b031633145b8061118757506003546001600160a01b031633145b6111c3576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b6111cb612ffa565b6111d36130a2565b6111db6125c3565b565b601054610100900460ff16156111db576006546001600160a01b03163314611235576040805162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b604482015290519081900360640190fd5b6111db32612cfe565b6112466120f1565b6001600160a01b0316336001600160a01b0316148061126f57506001546001600160a01b031633145b8061128457506002546001600160a01b031633145b8061129957506003546001600160a01b031633145b6112d5576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b60105462010000900460ff1661131b576040805162461bcd60e51b815260206004808301919091526024820152636e6f706560e01b604482015290519081900360640190fd5b600c54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561136657600080fd5b505afa15801561137a573d6000803e3d6000fd5b505050506040513d602081101561139057600080fd5b5051600d54604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156113e357600080fd5b505afa1580156113f7573d6000803e3d6000fd5b505050506040513d602081101561140d57600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916000805160206142ad833981519152916370a08231916024808301926020929190829003018186803b15801561146057600080fd5b505afa158015611474573d6000803e3d6000fd5b505050506040513d602081101561148a57600080fd5b5051905082156114b157600454600c546114b1916001600160a01b03918216911685612fa8565b81156114d457600454600d546114d4916001600160a01b03918216911684612fa8565b600c546001600160a01b03166000805160206142ad833981519152148015906115165750600d546001600160a01b03166000805160206142ad83398151915214155b801561152157508015155b1561154c5760045461154c906000805160206142ad833981519152906001600160a01b031683612fa8565b505050565b6115596120f1565b6001600160a01b0316336001600160a01b0316148061158257506001546001600160a01b031633145b8061159757506002546001600160a01b031633145b806115ac57506003546001600160a01b031633145b6115e8576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b6115f0612027565b7339b8571f510c8afbb1595ff7cb2d048df699aa716001600160a01b0316635312ea8e600f546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561164c57600080fd5b505af1158015611660573d6000803e3d6000fd5b50506040517f4a96f8c20dd7c086bee57b6a39fe6d0f8fa0d27c970fd6bd73012b527a55b960925060009150a1565b60105462010000900460ff1681565b6003546001600160a01b031681565b73ae83571000af4499798d1e3b0fa0070eb3a3e3f981565b61271081565b6116d36120f1565b6001600160a01b0316336001600160a01b031614806116fc57506001546001600160a01b031633145b8061171157506002546001600160a01b031633145b8061172657506003546001600160a01b031633145b611762576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b6010805460ff19168315151761ff001916610100831515810291909117918290556040805160ff80851615158252929093049091161515602083015280517f6c13e52575f6bd9e9cbfae67f2be6fd92da686b2bdc55df4245d699434d876349281900390910190a15050565b60105460ff16156111db576006546001600160a01b03163314611235576040805162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b604482015290519081900360640190fd5b600054600160a01b900460ff1690565b600c546001600160a01b031681565b6004546001600160a01b031681565b6118576120f1565b6001600160a01b0316336001600160a01b0316148061188057506001546001600160a01b031633145b8061189557506002546001600160a01b031633145b806118aa57506003546001600160a01b031633145b6118e6576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b6006546001600160a01b03161561192d576040805162461bcd60e51b815260206004808301919091526024820152636e6f706560e01b604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6119576120f1565b6001600160a01b0316336001600160a01b0316148061198057506001546001600160a01b031633145b8061199557506002546001600160a01b031633145b806119aa57506003546001600160a01b031633145b6119e6576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b601080549115156101000261ff0019909216919091179055565b611a086120f1565b6001600160a01b0316336001600160a01b03161480611a3157506001546001600160a01b031633145b80611a4657506002546001600160a01b031633145b80611a5b57506003546001600160a01b031633145b611a97576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b600c54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611ae257600080fd5b505afa158015611af6573d6000803e3d6000fd5b505050506040513d6020811015611b0c57600080fd5b5051600d54604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015611b5f57600080fd5b505afa158015611b73573d6000803e3d6000fd5b505050506040513d6020811015611b8957600080fd5b505190508115611d22576007546001600160a01b03166338ed1739836000601530611bb6426102586131ae565b6040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b031681526020018381526020018281038252858181548152602001915080548015611c3557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611c17575b50509650505050505050600060405180830381600087803b158015611c5957600080fd5b505af1158015611c6d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611c9657600080fd5b8101908080516040519392919084600160201b821115611cb557600080fd5b908301906020820185811115611cca57600080fd5b82518660208202830111600160201b82111715611ce657600080fd5b82525081516020918201928201910280838360005b83811015611d13578181015183820152602001611cfb565b50505050905001604052505050505b8015611eb7576007546001600160a01b03166338ed1739826000601630611d4b426102586131ae565b6040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b031681526020018381526020018281038252858181548152602001915080548015611dca57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611dac575b50509650505050505050600060405180830381600087803b158015611dee57600080fd5b505af1158015611e02573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611e2b57600080fd5b8101908080516040519392919084600160201b821115611e4a57600080fd5b908301906020820185811115611e5f57600080fd5b82518660208202830111600160201b82111715611e7b57600080fd5b82525081516020918201928201910280838360005b83811015611ea8578181015183820152602001611e90565b50505050905001604052505050505b6040517f675266e8e1b7f576592cbaff271475ae9596de248953f05a62b1f23878c8207590600090a15050565b611eec613208565b6000546001600160a01b03908116911614611f4e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000611fb3611fa5610bb3565b611fad6123ec565b906131ae565b905090565b6001546001600160a01b03163314612005576040805162461bcd60e51b815260206004820152600b60248201526a214e6f744b65657065722160a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61202f6120f1565b6001600160a01b0316336001600160a01b0316148061205857506001546001600160a01b031633145b8061206d57506002546001600160a01b031633145b8061208257506003546001600160a01b031633145b6120be576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b6120c661320c565b6111db61329a565b600d546001600160a01b031681565b60105460ff1681565b60085481565b607081565b6000546001600160a01b031690565b60095481565b60178181548110610c9857fe5b60008061211e612848565b9050600081156122ac576007546040805163d06ca61f60e01b8152600481018581526024820192835260128054604484018190526001600160a01b039095169463d06ca61f9488949293929091606490910190849080156121a857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161218a575b5050935050505060006040518083038186803b1580156121c757600080fd5b505afa92505050801561228757506040513d6000823e601f3d908101601f1916820160405260208110156121fa57600080fd5b8101908080516040519392919084600160201b82111561221957600080fd5b90830190602082018581111561222e57600080fd5b82518660208202830111600160201b8211171561224a57600080fd5b82525081516020918201928201910280838360005b8381101561227757818101518382015260200161225f565b5050505090500160405250505060015b612290576122ac565b806001825103815181106122a057fe5b60200260200101519150505b6122d86103e861109b6009546122d26103e861109b602a88612f0d90919063ffffffff16565b90612f0d565b9250505090565b6122e76120f1565b6001600160a01b0316336001600160a01b0316148061231057506001546001600160a01b031633145b8061232557506002546001600160a01b031633145b8061233a57506003546001600160a01b031633145b612376576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b60328111156123b5576040805162461bcd60e51b815260206004808301919091526024820152630216361760e41b604482015290519081900360640190fd5b600855565b6001546001600160a01b031681565b601054610100900460ff1681565b6103e881565b6005546001600160a01b031681565b600b54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561243757600080fd5b505afa15801561244b573d6000803e3d6000fd5b505050506040513d602081101561246157600080fd5b5051905090565b6002546001600160a01b031633146124b6576040805162461bcd60e51b815260206004820152600c60248201526b214e6f744b6565706572322160a01b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6124e0613208565b6000546001600160a01b03908116911614612542576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b600c54604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015610ac557600080fd5b6002546001600160a01b031681565b600054600160a01b900460ff1615612615576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561266057600080fd5b505afa158015612674573d6000803e3d6000fd5b505050506040513d602081101561268a57600080fd5b505190508015610b00577339b8571f510c8afbb1595ff7cb2d048df699aa716001600160a01b031663e2bbb158600f54836040518363ffffffff1660e01b81526004018083815260200182815260200192505050600060405180830381600087803b1580156126f857600080fd5b505af115801561270c573d6000803e3d6000fd5b505050507f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e38426612739611f98565b60408051918252519081900360200190a150565b6127556120f1565b6001600160a01b0316336001600160a01b0316148061277e57506001546001600160a01b031633145b8061279357506002546001600160a01b031633145b806127a857506003546001600160a01b031633145b611235576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b600e546001600160a01b031681565b603281565b600e54604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015610ac557600080fd5b600f5460408051631175a1dd60e01b815260048101929092523060248301525160009182917339b8571f510c8afbb1595ff7cb2d048df699aa7191631175a1dd916044808301926020929190829003018186803b158015610ac557600080fd5b6004546001600160a01b031633146128f3576040805162461bcd60e51b815260206004820152600960248201526821747265617375727960b81b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60115481565b6000805160206142ad83398151915281565b612935613208565b6000546001600160a01b03908116911614612997576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166129dc5760405162461bcd60e51b815260040180806020018281038252602681526020018061423c6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b7339b8571f510c8afbb1595ff7cb2d048df699aa7181565b6006546001600160a01b03163314612a97576040805162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b604482015290519081900360640190fd5b7339b8571f510c8afbb1595ff7cb2d048df699aa716001600160a01b0316635312ea8e600f546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612af357600080fd5b505af1158015612b07573d6000803e3d6000fd5b5050600b54604080516370a0823160e01b81523060048201529051600094506001600160a01b0390921692506370a08231916024808301926020929190829003018186803b158015612b5857600080fd5b505afa158015612b6c573d6000803e3d6000fd5b505050506040513d6020811015612b8257600080fd5b5051600654600b54919250612ba4916001600160a01b03908116911683612fa8565b506010805462ff0000191662010000179055565b6006546001600160a01b031681565b60148181548110610c9857fe5b801580612c5a575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015612c2c57600080fd5b505afa158015612c40573d6000803e3d6000fd5b505050506040513d6020811015612c5657600080fd5b5051155b612c955760405162461bcd60e51b81526004018080602001828103825260368152602001806142cd6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261154c908490613347565b6060612cf684846000856133f8565b949350505050565b600054600160a01b900460ff1615612d50576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b7339b8571f510c8afbb1595ff7cb2d048df699aa716001600160a01b031663e2bbb158600f5460006040518363ffffffff1660e01b81526004018083815260200182815260200192505050600060405180830381600087803b158015612db557600080fd5b505af1158015612dc9573d6000803e3d6000fd5b5050604080516370a0823160e01b81523060048201529051600093506000805160206142ad83398151915292506370a0823191602480820192602092909190829003018186803b158015612e1c57600080fd5b505afa158015612e30573d6000803e3d6000fd5b505050506040513d6020811015612e4657600080fd5b505190508015612ebe57612e59826135a3565b612e61613b2f565b6000612e6b6123ec565b9050612e756125c3565b42601155337f9bc239f1724cacfb88cb1d66a2dc437467699b68a8c90d7b63110cf4b6f9241082612ea4611f98565b6040805192835260208301919091528051918290030190a2505b5050565b6000612f0483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506140bf565b90505b92915050565b600082612f1c57506000612f07565b82820282848281612f2957fe5b0414612f045760405162461bcd60e51b81526004018080602001828103825260218152602001806142626021913960400191505060405180910390fd5b6000612f0483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614119565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261154c908490613347565b600054600160a01b900460ff1661304f576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa613085613208565b604080516001600160a01b039092168252519081900360200190a1565b600b546130cf906001600160a01b03167339b8571f510c8afbb1595ff7cb2d048df699aa71600019612bd4565b6007546130f7906000805160206142ad833981519152906001600160a01b0316600019612bd4565b600754600c54613115916001600160a01b0391821691166000612bd4565b600754600c54613134916001600160a01b039182169116600019612bd4565b600754600d54613152916001600160a01b0391821691166000612bd4565b600754600d54613171916001600160a01b039182169116600019612bd4565b600754600e5461318f916001600160a01b0391821691166000612bd4565b600754600e546111db916001600160a01b039182169116600019612bd4565b600082820183811015612f04576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b600054600160a01b900460ff161561325e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613085613208565b600b546132c6906001600160a01b03167339b8571f510c8afbb1595ff7cb2d048df699aa716000612bd4565b6007546132ed906000805160206142ad833981519152906001600160a01b03166000612bd4565b600754600c5461330b916001600160a01b0391821691166000612bd4565b600754600d54613329916001600160a01b0391821691166000612bd4565b600754600e546111db916001600160a01b0391821691166000612bd4565b606061339c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612ce79092919063ffffffff16565b80519091501561154c578080602001905160208110156133bb57600080fd5b505161154c5760405162461bcd60e51b815260040180806020018281038252602a815260200180614283602a913960400191505060405180910390fd5b60606134038561417e565b613454576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106134935780518252601f199092019160209182019101613474565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146134f5576040519150601f19603f3d011682016040523d82523d6000602084013e6134fa565b606091505b5091509150811561350e579150612cf69050565b80511561351e5780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613568578181015183820152602001613550565b50505050905090810190601f1680156135955780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b600e54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156135ee57600080fd5b505afa158015613602573d6000803e3d6000fd5b505050506040513d602081101561361857600080fd5b5051905080156137b1576007546001600160a01b03166338ed1739826000601730613645426102586131ae565b6040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b0316815260200183815260200182810382528581815481526020019150805480156136c457602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116136a6575b50509650505050505050600060405180830381600087803b1580156136e857600080fd5b505af11580156136fc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561372557600080fd5b8101908080516040519392919084600160201b82111561374457600080fd5b90830190602082018581111561375957600080fd5b82518660208202830111600160201b8211171561377557600080fd5b82525081516020918201928201910280838360005b838110156137a257818101518382015260200161378a565b50505050905001604052505050505b600061384b6103e861109b602a6000805160206142ad8339815191526001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561381957600080fd5b505afa15801561382d573d6000803e3d6000fd5b505050506040513d602081101561384357600080fd5b505190612f0d565b6007549091506001600160a01b03166338ed1739826000601230613871426102586131ae565b6040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b0316815260200183815260200182810382528581815481526020019150805480156138f057602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116138d2575b50509650505050505050600060405180830381600087803b15801561391457600080fd5b505af1158015613928573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561395157600080fd5b8101908080516040519392919084600160201b82111561397057600080fd5b90830190602082018581111561398557600080fd5b82518660208202830111600160201b821117156139a157600080fd5b82525081516020918201928201910280838360005b838110156139ce5781810151838201526020016139b6565b505050509190910160408181526370a0823160e01b8252306004830152516000965073ae83571000af4499798d1e3b0fa0070eb3a3e3f995506370a08231945060248083019450602093509091829003018186803b158015613a2f57600080fd5b505afa158015613a43573d6000803e3d6000fd5b505050506040513d6020811015613a5957600080fd5b5051600954909150600090613a77906103e89061109b908590612f0d565b9050613a9873ae83571000af4499798d1e3b0fa0070eb3a3e3f98683612fa8565b6000613ab56103e861109b600a5486612f0d90919063ffffffff16565b600554909150613ae49073ae83571000af4499798d1e3b0fa0070eb3a3e3f9906001600160a01b031683612fa8565b6000613af76103e861109b866070612f0d565b600454909150613b269073ae83571000af4499798d1e3b0fa0070eb3a3e3f9906001600160a01b031683612fa8565b50505050505050565b6000613bc360026000805160206142ad8339815191526001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015613b9157600080fd5b505afa158015613ba5573d6000803e3d6000fd5b505050506040513d6020811015613bbb57600080fd5b505190612f66565b600c549091506001600160a01b03166000805160206142ad83398151915214613d6d576007546040516338ed173960e01b8152600481018381526000602483018190523060648401819052426084850181905260a0604486019081526013805460a488018190526001600160a01b03909816976338ed1739978a97929594939160c49091019086908015613c8057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613c62575b50509650505050505050600060405180830381600087803b158015613ca457600080fd5b505af1158015613cb8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015613ce157600080fd5b8101908080516040519392919084600160201b821115613d0057600080fd5b908301906020820185811115613d1557600080fd5b82518660208202830111600160201b82111715613d3157600080fd5b82525081516020918201928201910280838360005b83811015613d5e578181015183820152602001613d46565b50505050905001604052505050505b600d546001600160a01b03166000805160206142ad83398151915214613f14576007546040516338ed173960e01b8152600481018381526000602483018190523060648401819052426084850181905260a0604486019081526014805460a488018190526001600160a01b03909816976338ed1739978a97929594939160c49091019086908015613e2757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613e09575b50509650505050505050600060405180830381600087803b158015613e4b57600080fd5b505af1158015613e5f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015613e8857600080fd5b8101908080516040519392919084600160201b821115613ea757600080fd5b908301906020820185811115613ebc57600080fd5b82518660208202830111600160201b82111715613ed857600080fd5b82525081516020918201928201910280838360005b83811015613f05578181015183820152602001613eed565b50505050905001604052505050505b600c54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015613f5f57600080fd5b505afa158015613f73573d6000803e3d6000fd5b505050506040513d6020811015613f8957600080fd5b5051600d54604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015613fdc57600080fd5b505afa158015613ff0573d6000803e3d6000fd5b505050506040513d602081101561400657600080fd5b5051600754600c54600d546040805162e8e33760e81b81526001600160a01b0393841660048201529183166024830152604482018790526064820185905260016084830181905260a48301523060c48301524260e48301525193945091169163e8e3370091610104808201926060929091908290030181600087803b15801561408e57600080fd5b505af11580156140a2573d6000803e3d6000fd5b505050506040513d60608110156140b857600080fd5b5050505050565b600081848411156141115760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315613568578181015183820152602001613550565b505050900390565b600081836141685760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315613568578181015183820152602001613550565b50600083858161417457fe5b0495945050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612cf6575050151592915050565b82805482825590600052602060002090810192821561420c579160200282015b8281111561420c57825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906141d7565b5061421892915061421c565b5090565b5b808211156142185780546001600160a01b031916815560010161421d56fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565640000000000000000000000002d7289df2f41a25d3a628258081ad7b99eb4c83b5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a264697066735822122089f542518cfad99e41bd0ba14d69a9f3ce88588b04c0af8c90d491416c97344664736f6c634300060c0033