Contract 0x1f95a36b7074e1c759828eb3dc229563af64356b

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x8a3b122fbbc39c77b58ca73bc08c10ca5756b514bdbb88ca12b1bc337270dde9Harvest477606852022-09-26 3:10:351 min ago0x797b7418dd299d2356d01d251b6805588f519a4d IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00068172426
0x37db98a404b58248f92d11619873f4a6893b97de2f4bad00f79eae22e694b87cHarvest477600002022-09-26 2:57:1414 mins ago0x815e3af4e537658d40881516a276cb606ee975d8 IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00065101596
0x8e7cb7ae3807cf6afbd62791391cabef7ec613a85e945cc3e631b4023cc4f8fdHarvest477592842022-09-26 2:44:2527 mins ago0x68d1cfd127c9cf0de5375fdfb92713e0de72ee05 IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00054042864
0x6d2510f3a02e80618a5a8097dad6e99ecba9e09b9f1c2497fe2d82fdfc4e6616Harvest477585902022-09-26 2:31:5640 mins ago0x68d1cfd127c9cf0de5375fdfb92713e0de72ee05 IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00065715762
0x2641206205932a0994b24e7c302bb9120f336461f564c10e24f95d13c34b75e9Harvest477578352022-09-26 2:18:4753 mins ago0x724c28471608c946345165e9eb7b80e8736ad9af IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00063873264
0xe75923467b8b7e9ac8ff292a88b3643ea83ca1bc3a71ba44b21478d16d4a0ba4Harvest477571132022-09-26 2:05:521 hr 6 mins ago0x724c28471608c946345165e9eb7b80e8736ad9af IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00065101596
0xdd4784f6300619c27e0f0d3c9503150673c7abc0092e1afdf627392ed5bd61baHarvest477563542022-09-26 1:53:031 hr 19 mins ago0x797b7418dd299d2356d01d251b6805588f519a4d IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00055616928
0xa24c5f50d3f582bf1386c69b4b7f9c39dcf28796b846939d5b601c75c4eac9cfHarvest477556472022-09-26 1:40:001 hr 32 mins ago0x797b7418dd299d2356d01d251b6805588f519a4d IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00065715762
0x8942d4d3e40ca2df10b86a4d559cac9aa0ba55186e11c91ac1be8f24ab94eaf9Harvest477549132022-09-26 1:27:001 hr 45 mins ago0x724c28471608c946345165e9eb7b80e8736ad9af IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.000657771786
0x1be419f20033131137c33227163ada504f673b6e6329bd251b053164888335d9Harvest477541662022-09-26 1:14:071 hr 57 mins ago0x68d1cfd127c9cf0de5375fdfb92713e0de72ee05 IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00065715762
0xc42c6f61ead352cdadabfd79502f602d9d1d87ae24ebd506b793c4688c281bcfHarvest477534542022-09-26 1:01:092 hrs 10 mins ago0xa3c6c62cba6a4fd7b16062e7426c9a78a5790c7d IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00063873264
0x21d3da161989b6af1e571388cc91b7f1c35afd5b5fb00c8992b70a953cc2e66fHarvest477527482022-09-26 0:48:322 hrs 23 mins ago0x68d1cfd127c9cf0de5375fdfb92713e0de72ee05 IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00056141616
0xc4ba52fd083bcd1aabe954c97a04aba575778927f5f562fee233fabdf8d63f93Harvest477520442022-09-26 0:35:332 hrs 36 mins ago0x815e3af4e537658d40881516a276cb606ee975d8 IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00063259098
0x3065421092c2617bcbdc5645a583ebaf276739f9501fa02f58b51b3342012718Harvest477513202022-09-26 0:23:042 hrs 49 mins ago0x815e3af4e537658d40881516a276cb606ee975d8 IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.0006448743
0x4e5c5a973333e2d406e4b5e723265b9585297e2998db96b0a71a9b57bd75c3e6Harvest477506152022-09-26 0:10:253 hrs 1 min ago0xa3c6c62cba6a4fd7b16062e7426c9a78a5790c7d IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00063873264
0x547943204a123da0e19746c89cacacfa52f7c9251c5873f31dc23771747bf8b5Harvest477499032022-09-25 23:57:493 hrs 14 mins ago0x68d1cfd127c9cf0de5375fdfb92713e0de72ee05 IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00066944094
0xda1e081dd4cae5d898a6735814e5bee046493aa1e19d8f212abaf3b0e0787e25Harvest477491712022-09-25 23:44:423 hrs 27 mins ago0x68d1cfd127c9cf0de5375fdfb92713e0de72ee05 IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00063873264
0x6811571136fd7487c04e5595a1fcc6967f0753e4b3f34ac551430035e6000908Harvest477484462022-09-25 23:32:093 hrs 39 mins ago0x797b7418dd299d2356d01d251b6805588f519a4d IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.0006448743
0x7f9e04cb63ffda50d3a7629677567e2b19b2a1fbafe6286fe9ae6e3fa00bb024Harvest477477102022-09-25 23:19:253 hrs 52 mins ago0x68d1cfd127c9cf0de5375fdfb92713e0de72ee05 IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.0006448743
0x724d2428a3577f125a7ec67a83e440678f57b71b9396d29daf766bb015628f65Harvest477469622022-09-25 23:06:404 hrs 5 mins ago0x724c28471608c946345165e9eb7b80e8736ad9af IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00065101596
0xb2ad118acca69232cbdd3e1935b0260d402b480a23ba4f7a8438aae1a6d6de31Harvest477462132022-09-25 22:53:504 hrs 18 mins ago0xa3c6c62cba6a4fd7b16062e7426c9a78a5790c7d IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.000703428886
0x62616e6fa6dd1099501d92e923eb116bfac0ad12883186be3c7340a82df6ca05Harvest477454422022-09-25 22:40:074 hrs 31 mins ago0x724c28471608c946345165e9eb7b80e8736ad9af IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.000788097811
0x12179d20cc8b63163dabc4fefd972d29ac8a720eb4aed812893445652ed90d6dHarvest477446312022-09-25 22:24:494 hrs 47 mins ago0x724c28471608c946345165e9eb7b80e8736ad9af IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.000831887847
0x43a6d5903a02779befe8d3bc2287a1677ce597ef4091ae595f80fc16eebfde6aHarvest477437892022-09-25 22:08:295 hrs 3 mins ago0x68d1cfd127c9cf0de5375fdfb92713e0de72ee05 IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.00096424062
0xfff0e656dbcdd842fbefcde439d311b8e86fdb63d42e0b5a268f26834b0a60d4Harvest477428962022-09-25 21:50:025 hrs 22 mins ago0x68d1cfd127c9cf0de5375fdfb92713e0de72ee05 IN  0x1f95a36b7074e1c759828eb3dc229563af64356b0 FTM0.000786746646
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x43e9bd1e34dfc7165f841a7ce677d266c891bd0076a3d184b0f33c4d5927dd1e428270792022-07-15 16:11:2072 days 11 hrs ago 0x4b6b6a3af8c882b53c2cc99f016c89b231ce441d  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SpookyV2MatrixLpAutoCompound

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 2 of 17 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    bool private _paused;

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

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

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

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

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

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

File 3 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        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 4 of 17 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 5 of 17 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using 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'
        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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 6 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 7 of 17 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 8 of 17 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 9 of 17 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    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 removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) 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 swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        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 swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 10 of 17 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 11 of 17 : IMasterChef.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

interface IMasterChef {
    function pendingShare(uint256 _pid, address _user)
        external
        view
        returns (uint256);

    function deposit(uint256 _pid, uint256 _amount) external;
    function deposit(uint256 _pid, uint256 _amount, address _to) external;
    function harvest(uint256 _pid, address _to) external;

    function withdraw(uint256 _pid, uint256 _amount) external;

    function withdrawAndHarvest(uint256 _pid, uint256 _amount, address _to) external;

    function withdrawAndHarvestShort(uint256 _pid, uint128 _amount) external;
    function harvestShort(uint256 _pid) external;
    function depositShort(uint256 _pid, uint128 _amount) external;
    function userInfo(uint256 _pid, address _user)
        external
        view
        returns (uint256, uint256);

    function emergencyWithdraw(uint256 _pid) external;
    function withdrawAll(uint256 _pid) external;

    function emergencyWithdraw(uint256 _pid, address _to) external;
}

File 12 of 17 : IMatrixStrategy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IMatrixStrategy {
    function vault() external view returns (address);

    function want() external view returns (IERC20);

    function beforeDeposit() external;

    function deposit() external;

    function withdraw(uint256) external;

    function balanceOf() external view returns (uint256);

    function harvest() external;

    function retireStrat() external;

    function panic() external;

    function pause() external;

    function unpause() external;

    function paused() external view returns (bool);
}

File 13 of 17 : IUniswapV2Pair.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

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

  function name() external pure returns (string memory);

  function symbol() external pure returns (string memory);

  function decimals() external pure returns (uint8);

  function totalSupply() external view returns (uint);

  function balanceOf(address owner) external view returns (uint);

  function allowance(address owner, address spender) external view returns (uint);

  function approve(address spender, uint value) external returns (bool);

  function transfer(address to, uint value) external returns (bool);

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

  function DOMAIN_SEPARATOR() external view returns (bytes32);

  function PERMIT_TYPEHASH() external pure returns (bytes32);

  function nonces(address owner) external view returns (uint);

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

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

  function MINIMUM_LIQUIDITY() external pure returns (uint);

  function factory() external view returns (address);

  function token0() external view returns (address);

  function token1() external view returns (address);

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

  function price0CumulativeLast() external view returns (uint);

  function price1CumulativeLast() external view returns (uint);

  function kLast() external view returns (uint);

  function mint(address to) external returns (uint liquidity);

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

  function swap(
    uint amount0Out,
    uint amount1Out,
    address to,
    bytes calldata data
  ) external;

  function skim(address to) external;

  function sync() external;

  function initialize(address, address) external;

  function stable() external returns (bool);
}

File 14 of 17 : MatrixLpAutoCompound.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

import "./MatrixStrategyBase.sol";
import "./MatrixSwapHelper.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "../interfaces/IUniswapV2Pair.sol";
import "../interfaces/IMasterChef.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

/// @title Base Lp+MasterChef AutoCompound Strategy Framework,
/// all LP strategies will inherit this contract
contract MatrixLpAutoCompound is MatrixStrategyBase, MatrixSwapHelper {
    using SafeERC20 for IERC20;
    using EnumerableSet for EnumerableSet.AddressSet;

    uint256 public poolId;
    address public masterchef;
    address public output;
    address public lpToken0;
    address public lpToken1;
    address public USDC = 0x04068DA6C83AFCFA0e13ba15A6696662335D5B75;

    constructor(
        address _want,
        uint256 _poolId,
        address _masterchef,
        address _output,
        address _uniRouter,
        address _vault,
        address _treasury
    )
        MatrixStrategyBase(_want, _vault, _treasury)
        MatrixSwapHelper(_uniRouter)
    {
        _initialize(_masterchef, _output, _poolId);
    }

    function _initialize(
        address _masterchef,
        address _output,
        uint256 _poolId
    ) internal virtual {
        masterchef = _masterchef;
        output = _output;
        lpToken0 = IUniswapV2Pair(want).token0();
        lpToken1 = IUniswapV2Pair(want).token1();
        poolId = _poolId;

        _setWhitelistedAddresses();
        _setDefaultSwapPaths();
        _giveAllowances();
    }

    /// @notice Allows strategy governor to setup custom path and dexes for token swaps
    function setSwapPath(
        address _fromToken,
        address _toToken,
        address _unirouter,
        address[] memory _path
    ) external onlyOwner {
        _setSwapPath(_fromToken, _toToken, _unirouter, _path);
    }

    /// @notice Override this to enable other routers or token swap paths
    function _setWhitelistedAddresses() internal virtual {
        whitelistedAddresses.add(unirouter);
        whitelistedAddresses.add(USDC);
        whitelistedAddresses.add(want);
        whitelistedAddresses.add(output);
        whitelistedAddresses.add(wrapped);
        whitelistedAddresses.add(lpToken0);
        whitelistedAddresses.add(lpToken1);
    }

    function _setDefaultSwapPaths() internal virtual {
        // Default output to lp0 paths
        if (lpToken0 == wrapped) {
            address[] memory _path = new address[](2);
            _path[0] = output;
            _path[1] = wrapped;
            _setSwapPath(output, lpToken0, address(0), _path);
        } else if (lpToken0 != output) {
            address[] memory _path = new address[](3);
            _path[0] = output;
            _path[1] = wrapped;
            _path[2] = lpToken0;
            _setSwapPath(output, lpToken0, address(0), _path);
        }

        // Default output to lp1 paths
        if (lpToken1 == wrapped) {
            address[] memory _path = new address[](2);
            _path[0] = output;
            _path[1] = wrapped;
            _setSwapPath(output, lpToken1, address(0), _path);
        } else if (lpToken1 != output) {
            address[] memory _path = new address[](3);
            _path[0] = output;
            _path[1] = wrapped;
            _path[2] = lpToken1;
            _setSwapPath(output, lpToken1, address(0), _path);
        }

        if (output != wrapped) {
            address[] memory _path = new address[](2);
            _path[0] = output;
            _path[1] = wrapped;
            _setSwapPath(output, wrapped, address(0), _path);
        }
    }

    function _giveAllowances() internal override {
        IERC20(want).safeApprove(masterchef, 0);
        IERC20(want).safeApprove(masterchef, type(uint256).max);

        IERC20(output).safeApprove(unirouter, 0);
        IERC20(output).safeApprove(unirouter, type(uint256).max);

        IERC20(lpToken0).safeApprove(unirouter, 0);
        IERC20(lpToken0).safeApprove(unirouter, type(uint256).max);

        IERC20(lpToken1).safeApprove(unirouter, 0);
        IERC20(lpToken1).safeApprove(unirouter, type(uint256).max);
    }

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

    /// @dev total value managed by strategy is want + want staked in MasterChef
    function totalValue() public view virtual override returns (uint256) {
        (uint256 _totalStaked, ) = IMasterChef(masterchef).userInfo(
            poolId,
            address(this)
        );
        return IERC20(want).balanceOf(address(this)) + _totalStaked;
    }

    function _deposit() internal virtual override {
        uint256 _wantBalance = IERC20(want).balanceOf(address(this));
        IMasterChef(masterchef).deposit(poolId, _wantBalance);
    }

    function _beforeWithdraw(uint256 _amout) internal virtual override {
        IMasterChef(masterchef).withdraw(poolId, _amout);
    }

    function _beforeHarvest() internal virtual {
        IMasterChef(masterchef).deposit(poolId, 0);
    }

    function _harvest()
        internal
        virtual
        override
        returns (uint256 _wantHarvested, uint256 _wrappedFeesAccrued)
    {
        _beforeHarvest();
        uint256 _outputBalance = IERC20(output).balanceOf(address(this));
        if (_outputBalance > 0) {
            if (output != wrapped) {
                _wrappedFeesAccrued = _swap(
                    output,
                    wrapped,
                    (_outputBalance * totalFee) / PERCENT_DIVISOR
                );
                _outputBalance = IERC20(output).balanceOf(address(this));
            } else {
                _wrappedFeesAccrued =
                    (_outputBalance * totalFee) /
                    PERCENT_DIVISOR;
                _outputBalance -= _wrappedFeesAccrued;
            }
            _wantHarvested = _addLiquidity(_outputBalance);
            
            if (lpToken0 == wrapped || lpToken1 == wrapped) {
                // Anything left here in wrapped after adding liquidity
                // Are fees accrued
                _wrappedFeesAccrued = IERC20(wrapped).balanceOf(address(this));
            }
        }
    }

    function _addLiquidity(uint256 _outputAmount)
        internal
        virtual
        returns (uint256 _wantHarvested)
    {
        uint256 _wantBalanceBefore = IERC20(want).balanceOf(address(this));
        uint256 _lpToken0BalanceBefore = IERC20(lpToken0).balanceOf(
            address(this)
        );
        uint256 _lpToken1BalanceBefore = IERC20(lpToken1).balanceOf(
            address(this)
        );
        if (output == lpToken0) {
            _swap(output, lpToken1, _outputAmount / 2);
        } else if (output == lpToken1) {
            _swap(output, lpToken0, _outputAmount / 2);
        } else {
            _swap(output, lpToken0, _outputAmount / 2);
            _swap(output, lpToken1, IERC20(output).balanceOf(address(this)));
        }

        uint256 _lp0Balance = (lpToken0 != wrapped)
            ? IERC20(lpToken0).balanceOf(address(this))
            : IERC20(lpToken0).balanceOf(address(this)) -
                _lpToken0BalanceBefore;
        uint256 _lp1Balance = (lpToken1 != wrapped)
            ? IERC20(lpToken1).balanceOf(address(this))
            : IERC20(lpToken1).balanceOf(address(this)) -
                _lpToken1BalanceBefore;

        IUniswapV2Router02(unirouter).addLiquidity(
            lpToken0,
            lpToken1,
            _lp0Balance,
            _lp1Balance,
            1,
            1,
            address(this),
            block.timestamp
        );
        return IERC20(want).balanceOf(address(this)) - _wantBalanceBefore;
    }

    function _beforePanic() internal virtual override {
        IMasterChef(masterchef).emergencyWithdraw(poolId);
    }

    /// @dev _beforeRetireStrat behaves exactly like _beforePanic hook
    function _beforeRetireStrat() internal override {
        _beforePanic();
    }
}

File 15 of 17 : MatrixStrategyBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

import "../interfaces/IMatrixStrategy.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";

/// @title Base Strategy Framework, all strategies will inherit this
abstract contract MatrixStrategyBase is Ownable, Pausable {
    using SafeERC20 for IERC20;

    // Matrix contracts
    address public immutable vault;
    address public treasury;
    address public partner;

    // Tokens used
    address public wrapped =
        address(0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83);
    address public immutable want;

    uint256 public callFee = 1000;
    uint256 public partnerFee = 0;
    uint256 public treasuryFee = 9000;
    uint256 public securityFee = 10;
    uint256 public totalFee = 450;

    /***
     * {MAX_FEE} - Maximum fee allowed by the strategy. Hard-capped at 5%.
     * {PERCENT_DIVISOR} - Constant used to safely calculate the correct percentages.
     */

    uint256 public constant MAX_FEE = 500;
    uint256 public constant PERCENT_DIVISOR = 10000;

    /**
     * {Harvested} Event that is fired each time someone harvests the strat.
     * {TotalFeeUpdated} Event that is fired each time the total fee is updated.
     * {CallFeeUpdated} Event that is fired each time the call fee is updated.
     * {TreasuryUpdated} Event that is fired each time treasury address is updated.
     */
    event Harvested(
        address indexed harvester,
        uint256 _wantHarvested,
        uint256 _totalValueBefore,
        uint256 _totalValueAfter
    );
    event TotalFeeUpdated(uint256 newFee);
    event CallFeeUpdated(uint256 newCallFee, uint256 newTreasuryFee);
    event SecurityFeeUpdated(uint256 newSecurityFee);
    event PartnerFeeUpdated(uint256 newPartnerFee, uint256 newTreasuryFee);

    event TreasuryUpdated(
        address indexed _oldTreasury,
        address indexed _newTreasury
    );

    modifier onlyVault() {
        require(msg.sender == vault, "!vault");
        _;
    }

    constructor(
        address _want,
        address _vault,
        address _treasury
    ) {
        require(_vault != address(0), "vault-is-zero");
        require(_treasury != address(0), "treasury-is-zero");
        require(_want != address(0), "want-is-zero");

        vault = _vault;
        treasury = _treasury;
        want = _want;
    }

    /**
     * @dev updates the total fee, capped at 5%
     */
    function updateTotalFee(uint256 _totalFee)
        external
        onlyOwner
        returns (bool)
    {
        require(_totalFee <= MAX_FEE, "fee-too-high");
        totalFee = _totalFee;
        emit TotalFeeUpdated(totalFee);
        return true;
    }

    /**
     * @dev updates security fee, capped at 5%
     */
    function updateSecurityFee(uint256 _securityFee)
        external
        onlyOwner
        returns (bool)
    {
        require(_securityFee <= MAX_FEE, "fee-too-high");
        securityFee = _securityFee;
        emit SecurityFeeUpdated(securityFee);
        return true;
    }

    /**
     * @dev updates the call fee and adjusts the treasury fee to cover the difference
     */
    function updateCallFee(uint256 _callFee) external onlyOwner returns (bool) {
        callFee = _callFee;
        treasuryFee = PERCENT_DIVISOR - callFee - partnerFee;
        emit CallFeeUpdated(callFee, treasuryFee);
        return true;
    }

    /**
     * @dev updates the partner fee and adjusts the treasury fee to cover the difference
     */
    function updatePartnerFee(uint256 _partnerFee) external onlyOwner returns (bool) {
        require(partner != address(0), "partner-not-set");

        partnerFee = _partnerFee;
        treasuryFee = PERCENT_DIVISOR - partnerFee - callFee;
        emit PartnerFeeUpdated(partnerFee, treasuryFee);
        return true;
    }

    function updateTreasury(address _newTreasury)
        external
        onlyOwner
        returns (bool)
    {
        require(_newTreasury != address(0), "treasury-is-zero");
        treasury = _newTreasury;
        return true;
    }

    function updatePartner(address _newPartner)
        external
        onlyOwner
        returns (bool)
    {
        require(_newPartner != address(0), "partner-is-zero");
        partner = _newPartner;
        return true;
    }

    /**
     * @dev Puts funds in strategy at work
     * @notice Only vault can call this when not paused
     */
    function deposit() external virtual whenNotPaused onlyVault {
        _deposit();
    }

    function withdraw(uint256 _amount) external virtual onlyVault {
        uint256 _balanceHere = IERC20(want).balanceOf(address(this));

        if (_balanceHere < _amount) {
            _beforeWithdraw(_amount - _balanceHere);
            _balanceHere = IERC20(want).balanceOf(address(this));
        }

        if (_balanceHere > _amount) {
            _balanceHere = _amount;
        }
        uint256 _withdrawFee = (_balanceHere * securityFee) / PERCENT_DIVISOR;
        IERC20(want).safeTransfer(vault, _balanceHere - _withdrawFee);
    }

    function pause() external virtual onlyOwner {
        _pause();
        _removeAllowances();
    }

    function unpause() external virtual onlyOwner {
        _unpause();
        _giveAllowances();
        _deposit();
    }

    function beforeDeposit() external virtual onlyVault {}

    function retireStrat() external onlyVault {
        _beforeRetireStrat();
        uint256 _wantBalance = IERC20(want).balanceOf(address(this));
        IERC20(want).safeTransfer(vault, _wantBalance);
    }

    /// @notice pauses deposits and withdraws all funds from third party systems.
    function panic() external onlyOwner {
        _pause();
        _beforePanic();
    }

    /// @notice compounds earnings and charges performance fee
    function harvest() external whenNotPaused {
        require(!Address.isContract(msg.sender), "!contract");

        uint256 _totalValueBefore = totalValue();
        (uint256 _wantHarvested, uint256 _wrappedFeesAccrued) = _harvest();

        _chargeFees(_wrappedFeesAccrued);

        uint256 _totalValueAfter = totalValue();
        _deposit();

        emit Harvested(
            msg.sender,
            _wantHarvested,
            _totalValueBefore,
            _totalValueAfter
        );
    }

    /// @notice "want" Funds held in strategy + funds deployed elsewhere
    function totalValue() public virtual view returns (uint256) {
        return IERC20(want).balanceOf(address(this));
    }

    /// @notice For vault interface retro-compatibility
    function balanceOf() public virtual view returns (uint256) {
        return totalValue();
    }
 
    function _chargeFees(uint256 _wrappedFeesAccrued) internal virtual {
        uint256 _callFeeToUser = (_wrappedFeesAccrued * callFee) /
            PERCENT_DIVISOR;

        uint256 _feeToPartner = (_wrappedFeesAccrued * partnerFee) /
            PERCENT_DIVISOR;

        IERC20(wrapped).safeTransfer(msg.sender, _callFeeToUser);
        IERC20(wrapped).safeTransfer(
            treasury,
            _wrappedFeesAccrued - _callFeeToUser - _feeToPartner
        );

        if(partner != address(0)) {
            IERC20(wrapped).safeTransfer(
                partner, 
                _feeToPartner
            );
        }
    }

    /// @notice Hooks to customize strategies behavior
    function _deposit() internal virtual {}

    function _beforeWithdraw(uint256 _amount) internal virtual {}

    function _harvest()
        internal
        virtual
        returns (uint256 _wantHarvested, uint256 _wrappedFeesAccrued)
    {}

    function _giveAllowances() internal virtual {}
    function _removeAllowances() internal virtual {}
    function _beforeRetireStrat() internal virtual {}
    function _beforePanic() internal virtual {}
}

File 16 of 17 : MatrixSwapHelper.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "../interfaces/IUniswapV2Pair.sol";

import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";


/// @title Swap Helper to perform swaps and setting routes in matrix strategies
contract MatrixSwapHelper {
    using SafeERC20 for IERC20;
    using EnumerableSet for EnumerableSet.AddressSet;

    address public unirouter;

    /// @dev Enumerable set of external tokens and routers
    /// strategy can interact with
    EnumerableSet.AddressSet internal whitelistedAddresses;

    struct SwapPath {
        address unirouter;
        address[] path;
    }

    mapping(bytes32 => SwapPath) internal swapPaths;

    constructor(address _uniRouter) {
        unirouter = _uniRouter;
    }

    function getWhitelistedAddresses()
        public
        virtual
        returns (address[] memory)
    {
        return whitelistedAddresses.values();
    }

    function getSwapPath(address _fromToken, address _toToken)
        public
        view
        virtual
        returns (SwapPath memory _swapPath)
    {
        bytes32 _swapKey = keccak256(abi.encodePacked(_fromToken, _toToken));
        require(swapPaths[_swapKey].unirouter != address(0), "path-not-found");
        return swapPaths[_swapKey];
    }

    function _setSwapPath(
        address _fromToken,
        address _toToken,
        address _unirouter,
        address[] memory _path
    ) internal virtual {
        require(_path[0] == _fromToken, "invalid-path");
        require(_path[_path.length - 1] == _toToken, "invalid-path");
        _checkPath(_path);

        bytes32 _swapKey = keccak256(abi.encodePacked(_fromToken, _toToken));
        address _router = _unirouter == address(0) ? unirouter : _unirouter;

        _checkRouter(_router);

        swapPaths[_swapKey] = SwapPath(_router, _path);
    }

    /// @dev Checks that tokens in path are whitelisted
    /// @notice Override this to skip checks
    function _checkPath(address[] memory _path) internal virtual {
        return;
        /*
        for (uint256 i; i < _path.length; i++)
        {
            require(
                whitelistedAddresses.contains(_path[i]),
                "token-not-whitelisted"
            );
        }
        */
    }

    /// @dev Checks that router for swap is whitelisted
    /// @notice Override this to skip checks
    function _checkRouter(address _router) internal virtual {
        require(
            whitelistedAddresses.contains(_router),
            "router-not-whitelisted"
        );
    }

    function _swap(
        address _fromToken,
        address _toToken,
        uint256 _amount
    ) internal virtual returns (uint256 _toTokenAmount) {
        if (_fromToken == _toToken) return _amount;
        SwapPath memory _swapPath = getSwapPath(_fromToken, _toToken);

        IERC20(_fromToken).safeApprove(_swapPath.unirouter, 0);
        IERC20(_fromToken).safeApprove(_swapPath.unirouter, type(uint256).max);
        
        // debugging: uncomment this block
        
        // console.log("_fromToken:", IERC20Metadata(_fromToken).symbol());
        // console.log("_toToken", IERC20Metadata(_toToken).symbol());
        // console.log("_path:");
        // for (uint i; i < _swapPath.path.length; i++) {
        //     console.log(IERC20Metadata(_swapPath.path[i]).symbol());
        // }

        uint256 _toTokenBefore = IERC20(_toToken).balanceOf(address(this));
        IUniswapV2Router02(_swapPath.unirouter).swapExactTokensForTokens(
            _amount,
            0,
            _swapPath.path,
            address(this),
            block.timestamp
        );
        _toTokenAmount =
            IERC20(_toToken).balanceOf(address(this)) -
            _toTokenBefore;
    }
}

File 17 of 17 : SpookyV2MatrixLpAutoCompound.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

import "../MatrixLpAutoCompound.sol";

/// @title MatrixLpAutoCompound adapted to SpookyV2 DEUS routing
contract SpookyV2MatrixLpAutoCompound is MatrixLpAutoCompound {
    using EnumerableSet for EnumerableSet.AddressSet;
    using SafeERC20 for IERC20;

    address internal constant SPOOKYSWAP_ROUTER =
        0xF491e7B69E4244ad4002BC14e878a34207E38c29;

    address internal constant WFTM = 0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83;
    address internal constant BTC = 0x321162Cd933E2Be498Cd2267a90534A804051b11;
    address internal constant BOO = 0x841FAD6EAe12c286d1Fd18d1d525DFfA75C7EFFE;
    address public output2;

    constructor(
        address _want,
        uint256 _poolId,
        address _masterchef,
        address _output,
        address _output2,
        address _uniRouter,
        address _vault,
        address _treasury
    )
        MatrixLpAutoCompound(
            _want,
            _poolId,
            _masterchef,
            _output,
            _uniRouter,
            _vault,
            _treasury
        )
    {
        // It can be address(0), for single rewards pools
        output2 = _output2;
        if (output2 != address(0)) {
            whitelistedAddresses.add(output2);
        }

        whitelistedAddresses.add(BTC);
        whitelistedAddresses.add(BOO);
        _setDefaultSwapPaths();
    }

    function _setDefaultSwapPaths() internal virtual override {
        super._setDefaultSwapPaths();

        if (output2 != address(0)) {

            address _oldOutput = output;
            output = output2;

            super._setDefaultSwapPaths();

            output = _oldOutput;

            // BTC -> WFTM
            address[] memory _btcWFTM = new address[](2);
            _btcWFTM[0] = BTC;
            _btcWFTM[1] = WFTM;
            _setSwapPath(BTC, WFTM, SPOOKYSWAP_ROUTER, _btcWFTM);

            // WFTM -> BTC
            address[] memory _wftmBtc = new address[](2);
            _wftmBtc[0] = WFTM;
            _wftmBtc[1] = BTC;
            _setSwapPath(WFTM, BTC, SPOOKYSWAP_ROUTER, _wftmBtc);

            // BOO -> BTC
            address[] memory _booBtc = new address[](3);
            _booBtc[0] = BOO;
            _booBtc[1] = WFTM;
            _booBtc[2] = BTC;
            _setSwapPath(BOO, BTC, SPOOKYSWAP_ROUTER, _booBtc);
        }
    }

    function _setWhitelistedAddresses() internal virtual override {
        super._setWhitelistedAddresses();
        whitelistedAddresses.add(SPOOKYSWAP_ROUTER);
    }

    function _harvest()
        internal
        virtual
        override
        returns (uint256 _wantHarvested, uint256 _wrappedFeesAccrued)
    {
        (_wantHarvested, _wrappedFeesAccrued) = super._harvest();
        if (output2 != address(0)) {
            address _oldOutput = output;
            output = output2;

            (
                uint256 _wantHarvestedFromOutput2,
                uint256 _wrappedFeesAccruedFromOutput2
            ) = super._harvest();

            output = _oldOutput;

            _wantHarvested += _wantHarvestedFromOutput2;

            if (lpToken0 == wrapped || lpToken1 == wrapped) {
                // Anything left here in wrapped after adding liquidity
                // Are fees accrued
                _wrappedFeesAccrued = IERC20(wrapped).balanceOf(address(this));
            } else {
                _wrappedFeesAccrued += _wrappedFeesAccruedFromOutput2;
            }
        }
    }

    function _beforePanic() internal override {
        IMasterChef(masterchef).emergencyWithdraw(poolId, address(this));
    }
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_want","type":"address"},{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"address","name":"_masterchef","type":"address"},{"internalType":"address","name":"_output","type":"address"},{"internalType":"address","name":"_output2","type":"address"},{"internalType":"address","name":"_uniRouter","type":"address"},{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newCallFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTreasuryFee","type":"uint256"}],"name":"CallFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"harvester","type":"address"},{"indexed":false,"internalType":"uint256","name":"_wantHarvested","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_totalValueBefore","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_totalValueAfter","type":"uint256"}],"name":"Harvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPartnerFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTreasuryFee","type":"uint256"}],"name":"PartnerFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newSecurityFee","type":"uint256"}],"name":"SecurityFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"TotalFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_oldTreasury","type":"address"},{"indexed":true,"internalType":"address","name":"_newTreasury","type":"address"}],"name":"TreasuryUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENT_DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beforeDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"callFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fromToken","type":"address"},{"internalType":"address","name":"_toToken","type":"address"}],"name":"getSwapPath","outputs":[{"components":[{"internalType":"address","name":"unirouter","type":"address"},{"internalType":"address[]","name":"path","type":"address[]"}],"internalType":"struct MatrixSwapHelper.SwapPath","name":"_swapPath","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistedAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lpToken0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpToken1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterchef","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"output","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"output2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"panic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"partner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"partnerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retireStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"securityFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_fromToken","type":"address"},{"internalType":"address","name":"_toToken","type":"address"},{"internalType":"address","name":"_unirouter","type":"address"},{"internalType":"address[]","name":"_path","type":"address[]"}],"name":"setSwapPath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unirouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_callFee","type":"uint256"}],"name":"updateCallFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newPartner","type":"address"}],"name":"updatePartner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_partnerFee","type":"uint256"}],"name":"updatePartnerFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_securityFee","type":"uint256"}],"name":"updateSecurityFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_totalFee","type":"uint256"}],"name":"updateTotalFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newTreasury","type":"address"}],"name":"updateTreasury","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrapped","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c0604052600380546001600160a01b031990811660008051602062005286833981519152179091556103e86004556000600555612328600655600a6007556101c2600855601280549091167304068da6c83afcfa0e13ba15a6696662335d5b751790553480156200007057600080fd5b50604051620052a6380380620052a683398101604081905262000093916200161f565b8787878786868682878383620000a933620002a5565b6000805460ff60a01b191690556001600160a01b038216620001025760405162461bcd60e51b815260206004820152600d60248201526c7661756c742d69732d7a65726f60981b60448201526064015b60405180910390fd5b6001600160a01b0381166200014d5760405162461bcd60e51b815260206004820152601060248201526f74726561737572792d69732d7a65726f60801b6044820152606401620000f9565b6001600160a01b038316620001945760405162461bcd60e51b815260206004820152600c60248201526b77616e742d69732d7a65726f60a01b6044820152606401620000f9565b6001600160a01b03918216608052600180549183166001600160a01b031992831617905591811660a052600980549390911692909116919091179055620001dd858588620002f5565b5050601380546001600160a01b0319166001600160a01b038b16908117909155159450620002329350505050576013546200023090600a906001600160a01b031662000481602090811b6200159817901c565b505b6200025c60008051602062005266833981519152600a6200048160201b620015981790919060201c565b506200028c73841fad6eae12c286d1fd18d1d525dffa75c7effe600a6200048160201b620015981790919060201c565b5062000297620004a1565b5050505050505050620017d8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600e80546001600160a01b038086166001600160a01b031992831617909255600f8054858416921691909117905560a05160408051630dfe168160e01b815290519190921691630dfe1681916004808301926020929190829003018186803b1580156200036157600080fd5b505afa15801562000376573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200039c9190620016be565b601060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a0516001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015620003fe57600080fd5b505afa15801562000413573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004399190620016be565b601180546001600160a01b0319166001600160a01b0392909216919091179055600d8190556200046862000823565b62000472620004a1565b6200047c6200086a565b505050565b600062000498836001600160a01b038416620009ce565b90505b92915050565b620004b662000a2060201b620015b41760201c565b6013546001600160a01b0316156200082157600f80546013546001600160a01b039081166001600160a01b0319831617909255166200050062000a20602090811b620015b417901c565b600f80546001600160a01b0319166001600160a01b0383161790556040805160028082526060820183526000926020830190803683370190505090506000805160206200526683398151915281600081518110620005625762000562620016dc565b60200260200101906001600160a01b031690816001600160a01b0316815250506000805160206200528683398151915281600181518110620005a857620005a8620016dc565b6001600160a01b039092166020928302919091019091015262000600600080516020620052668339815191526000805160206200528683398151915273f491e7b69e4244ad4002bc14e878a34207e38c298462000e5b565b6040805160028082526060820183526000926020830190803683370190505090506000805160206200528683398151915281600081518110620006475762000647620016dc565b60200260200101906001600160a01b031690816001600160a01b03168152505060008051602062005266833981519152816001815181106200068d576200068d620016dc565b6001600160a01b0390921660209283029190910190910152620006e5600080516020620052868339815191526000805160206200526683398151915273f491e7b69e4244ad4002bc14e878a34207e38c298462000e5b565b604080516003808252608082019092526000916020820160608036833701905050905073841fad6eae12c286d1fd18d1d525dffa75c7effe81600081518110620007335762000733620016dc565b60200260200101906001600160a01b031690816001600160a01b0316815250506000805160206200528683398151915281600181518110620007795762000779620016dc565b60200260200101906001600160a01b031690816001600160a01b0316815250506000805160206200526683398151915281600281518110620007bf57620007bf620016dc565b6001600160a01b03909216602092830291909101909101526200081c73841fad6eae12c286d1fd18d1d525dffa75c7effe6000805160206200526683398151915273f491e7b69e4244ad4002bc14e878a34207e38c298462000e5b565b505050505b565b620008386200102160201b620019bf1760201c565b6200086773f491e7b69e4244ad4002bc14e878a34207e38c29600a6200048160201b620015981790919060201c565b50565b600e5460a05162000896916001600160a01b039182169116600062001128602090811b62001a8017901c565b600e5460a051620008c3916001600160a01b03918216911660001962001128602090811b62001a8017901c565b600954600f54620008ef916001600160a01b039182169116600062001128602090811b62001a8017901c565b600954600f546200091c916001600160a01b03918216911660001962001128602090811b62001a8017901c565b60095460105462000948916001600160a01b039182169116600062001128602090811b62001a8017901c565b60095460105462000975916001600160a01b03918216911660001962001128602090811b62001a8017901c565b600954601154620009a1916001600160a01b039182169116600062001128602090811b62001a8017901c565b60095460115462000821916001600160a01b03918216911660001962001128602090811b62001a8017901c565b600081815260018301602052604081205462000a17575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200049b565b5060006200049b565b6003546010546001600160a01b039081169116141562000ae8576040805160028082526060820183526000926020830190803683375050600f5482519293506001600160a01b03169183915060009062000a7e5762000a7e620016dc565b6001600160a01b03928316602091820292909201015260035482519116908290600190811062000ab25762000ab2620016dc565b6001600160a01b039283166020918202929092010152600f5460105462000ae192918216911660008462000e5b565b5062000be0565b600f546010546001600160a01b0390811691161462000be05760408051600380825260808201909252600091602082016060803683375050600f5482519293506001600160a01b03169183915060009062000b475762000b47620016dc565b6001600160a01b03928316602091820292909201015260035482519116908290600190811062000b7b5762000b7b620016dc565b6001600160a01b03928316602091820292909201015260105482519116908290600290811062000baf5762000baf620016dc565b6001600160a01b039283166020918202929092010152600f5460105462000bde92918216911660008462000e5b565b505b6003546011546001600160a01b039081169116141562000ca8576040805160028082526060820183526000926020830190803683375050600f5482519293506001600160a01b03169183915060009062000c3e5762000c3e620016dc565b6001600160a01b03928316602091820292909201015260035482519116908290600190811062000c725762000c72620016dc565b6001600160a01b039283166020918202929092010152600f5460115462000ca192918216911660008462000e5b565b5062000da0565b600f546011546001600160a01b0390811691161462000da05760408051600380825260808201909252600091602082016060803683375050600f5482519293506001600160a01b03169183915060009062000d075762000d07620016dc565b6001600160a01b03928316602091820292909201015260035482519116908290600190811062000d3b5762000d3b620016dc565b6001600160a01b03928316602091820292909201015260115482519116908290600290811062000d6f5762000d6f620016dc565b6001600160a01b039283166020918202929092010152600f5460115462000d9e92918216911660008462000e5b565b505b600354600f546001600160a01b0390811691161462000821576040805160028082526060820183526000926020830190803683375050600f5482519293506001600160a01b03169183915060009062000dfd5762000dfd620016dc565b6001600160a01b03928316602091820292909201015260035482519116908290600190811062000e315762000e31620016dc565b6001600160a01b039283166020918202929092010152600f54600354620008679291821691166000845b836001600160a01b03168160008151811062000e7b5762000e7b620016dc565b60200260200101516001600160a01b03161462000eca5760405162461bcd60e51b815260206004820152600c60248201526b0d2dcecc2d8d2c85ae0c2e8d60a31b6044820152606401620000f9565b826001600160a01b0316816001835162000ee59190620016f2565b8151811062000ef85762000ef8620016dc565b60200260200101516001600160a01b03161462000f475760405162461bcd60e51b815260206004820152600c60248201526b0d2dcecc2d8d2c85ae0c2e8d60a31b6044820152606401620000f9565b6040516001600160601b0319606086811b8216602084015285901b16603482015260009060480160408051601f198184030181529190528051602090910120905060006001600160a01b0384161562000fa1578362000fae565b6009546001600160a01b03165b905062000fbb8162001282565b6040805180820182526001600160a01b03838116825260208083018781526000878152600c835294909420835181546001600160a01b0319169316929092178255925180519293919262001016926001850192019062001581565b505050505050505050565b6009546200104790600a906001600160a01b031662000481602090811b6200159817901c565b506012546200106e90600a906001600160a01b031662000481602090811b6200159817901c565b506200108c60a051600a6200048160201b620015981790919060201c565b50600f54620010b390600a906001600160a01b031662000481602090811b6200159817901c565b50600354620010da90600a906001600160a01b031662000481602090811b6200159817901c565b506010546200110190600a906001600160a01b031662000481602090811b6200159817901c565b506011546200086790600a906001600160a01b031662000481602090811b6200159817901c565b801580620011b65750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b1580156200117957600080fd5b505afa1580156200118e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620011b4919062001718565b155b6200122a5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401620000f9565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b179091526200047c918591620012eb16565b6200129d81600a620013c960201b62001c3d1790919060201c565b620008675760405162461bcd60e51b815260206004820152601660248201527f726f757465722d6e6f742d77686974656c6973746564000000000000000000006044820152606401620000f9565b600062001347826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316620013ec60201b62001c5f179092919060201c565b8051909150156200047c578080602001905181019062001368919062001732565b6200047c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401620000f9565b6001600160a01b0381166000908152600183016020526040812054151562000498565b6060620013fd848460008562001407565b90505b9392505050565b6060824710156200146a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401620000f9565b6001600160a01b0385163b620014c35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620000f9565b600080866001600160a01b03168587604051620014e1919062001785565b60006040518083038185875af1925050503d806000811462001520576040519150601f19603f3d011682016040523d82523d6000602084013e62001525565b606091505b5090925090506200153882828662001543565b979650505050505050565b606083156200155457508162001400565b825115620015655782518084602001fd5b8160405162461bcd60e51b8152600401620000f99190620017a3565b828054828255906000526020600020908101928215620015d9579160200282015b82811115620015d957825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620015a2565b50620015e7929150620015eb565b5090565b5b80821115620015e75760008155600101620015ec565b80516001600160a01b03811681146200161a57600080fd5b919050565b600080600080600080600080610100898b0312156200163d57600080fd5b620016488962001602565b9750602089015196506200165f60408a0162001602565b95506200166f60608a0162001602565b94506200167f60808a0162001602565b93506200168f60a08a0162001602565b92506200169f60c08a0162001602565b9150620016af60e08a0162001602565b90509295985092959890939650565b600060208284031215620016d157600080fd5b620004988262001602565b634e487b7160e01b600052603260045260246000fd5b6000828210156200171357634e487b7160e01b600052601160045260246000fd5b500390565b6000602082840312156200172b57600080fd5b5051919050565b6000602082840312156200174557600080fd5b815180151581146200140057600080fd5b60005b838110156200177357818101518382015260200162001759565b838111156200081c5750506000910152565b600082516200179981846020870162001756565b9190910192915050565b6020815260008251806020840152620017c481604085016020870162001756565b601f01601f19169190910160400192915050565b60805160a0516139e3620018836000396000818161030f0152818161065001528181610703015281816107ea015281816111e6015281816114c001528181611551015281816119f801528181611e0001528181611e3b01528181611f350152818161236a01528181612dd401526133a901526000818161059d015281816105dd015281816107b701528181610abb0152818161100b0152818161144a015261157301526139e36000f3fe608060405234801561001057600080fd5b50600436106102e95760003560e01c80637f51bb1f11610191578063d32b9604116100e3578063f4392fb311610097578063fb61778711610071578063fb61778714610590578063fbfa77cf14610598578063fcec0dfa146105bf57600080fd5b8063f4392fb314610557578063f88fb6891461056a578063fb1db2781461057d57600080fd5b8063d68e1302116100c8578063d68e130214610528578063f20eaeb814610531578063f2fde38b1461054457600080fd5b8063d32b96041461050d578063d4c3eea01461052057600080fd5b806390321e1a11610145578063be9e09d61161011f578063be9e09d6146104dc578063cc32d176146104fc578063d0e30db01461050557600080fd5b806390321e1a146104b7578063bc063e1a146104c0578063be10862b146104c957600080fd5b8063877562b611610176578063877562b61461048057806389a30271146104935780638da5cb5b146104a657600080fd5b80637f51bb1f146104655780638456cb591461047857600080fd5b806350e70d481161024a57806360cc2c76116101fe5780636d028027116101d85780636d02802714610440578063715018a614610455578063722713f71461045d57600080fd5b806360cc2c7614610407578063615911491461041a57806361d027b31461042d57600080fd5b80635b99176c1161022f5780635b99176c146103d95780635c975abb146103e25780635ee167c0146103f457600080fd5b806350e70d48146103be578063573fef0a146103d157600080fd5b80633f4ba83a116102a15780634641257d116102865780634641257d146103a55780634700d305146103ad5780634870dd9a146103b557600080fd5b80633f4ba83a1461037a578063401f46631461038257600080fd5b8063257ae0de116102d2578063257ae0de146103495780632e1a7d4d1461035c5780633e0dc34e1461037157600080fd5b80631df4ccfc146102ee5780631f1fcd511461030a575b600080fd5b6102f760085481565b6040519081526020015b60405180910390f35b6103317f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610301565b600954610331906001600160a01b031681565b61036f61036a3660046134af565b6105d2565b005b6102f7600d5481565b61036f610816565b6103956103903660046134df565b610878565b6040519015158152602001610301565b61036f61093b565b61036f610a58565b6102f761271081565b600354610331906001600160a01b031681565b61036f610ab0565b6102f760055481565b600054600160a01b900460ff16610395565b601054610331906001600160a01b031681565b6103956104153660046134af565b610b11565b6103956104283660046134af565b610c1e565b600154610331906001600160a01b031681565b610448610cdd565b604051610301919061353e565b61036f610cee565b6102f7610d40565b6103956104733660046134df565b610d4a565b61036f610e0c565b601154610331906001600160a01b031681565b601254610331906001600160a01b031681565b6000546001600160a01b0316610331565b6102f760045481565b6102f76101f481565b600254610331906001600160a01b031681565b6104ef6104ea366004613551565b610e64565b6040516103019190613584565b6102f760065481565b61036f610fb3565b61039561051b3660046134af565b611061565b6102f7611120565b6102f760075481565b600f54610331906001600160a01b031681565b61036f6105523660046134df565b611270565b61036f610565366004613658565b611340565b6103956105783660046134af565b61139a565b600e54610331906001600160a01b031681565b61036f61143f565b6103317f000000000000000000000000000000000000000000000000000000000000000081565b601354610331906001600160a01b031681565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106385760405162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b60448201526064015b60405180910390fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561069a57600080fd5b505afa1580156106ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d29190613727565b905081811015610788576106ee6106e98284613756565b611c76565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561074d57600080fd5b505afa158015610761573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107859190613727565b90505b818111156107935750805b6000612710600754836107a6919061376d565b6107b0919061378c565b90506108117f00000000000000000000000000000000000000000000000000000000000000006107e08385613756565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190611d00565b505050565b6000546001600160a01b0316331461085e5760405162461bcd60e51b8152602060048201819052602482015260008051602061398e833981519152604482015260640161062f565b610866611d49565b61086e611def565b610876611f1d565b565b600080546001600160a01b031633146108c15760405162461bcd60e51b8152602060048201819052602482015260008051602061398e833981519152604482015260640161062f565b6001600160a01b0382166109175760405162461bcd60e51b815260206004820152600f60248201527f706172746e65722d69732d7a65726f0000000000000000000000000000000000604482015260640161062f565b50600280546001600160a01b0319166001600160a01b03831617905560015b919050565b600054600160a01b900460ff16156109885760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161062f565b333b156109d75760405162461bcd60e51b815260206004820152600960248201527f21636f6e74726163740000000000000000000000000000000000000000000000604482015260640161062f565b60006109e1611120565b90506000806109ee611ff4565b915091506109fb8161213a565b6000610a05611120565b9050610a0f611f1d565b604080518481526020810186905290810182905233907fe48bba143e2a0b557fa6f3234bd6ffc704518cc98c7de6a2385549fae27d1b759060600160405180910390a250505050565b6000546001600160a01b03163314610aa05760405162461bcd60e51b8152602060048201819052602482015260008051602061398e833981519152604482015260640161062f565b610aa86121f6565b61087661227e565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108765760405162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b604482015260640161062f565b600080546001600160a01b03163314610b5a5760405162461bcd60e51b8152602060048201819052602482015260008051602061398e833981519152604482015260640161062f565b6002546001600160a01b0316610bb25760405162461bcd60e51b815260206004820152600f60248201527f706172746e65722d6e6f742d7365740000000000000000000000000000000000604482015260640161062f565b6005829055600454610bc683612710613756565b610bd09190613756565b60068190556005546040517f71c11923856ca550fecf6bbe0185473dfb80d8513d8d5c6ad588f17daa176c2a92610c0e928252602082015260400190565b60405180910390a1506001919050565b600080546001600160a01b03163314610c675760405162461bcd60e51b8152602060048201819052602482015260008051602061398e833981519152604482015260640161062f565b6101f4821115610ca85760405162461bcd60e51b815260206004820152600c60248201526b0cccaca5ae8dede5ad0d2ced60a31b604482015260640161062f565b60078290556040518281527f3790aeee57809af98fad1b89b9266c7934e03ed46702b541f2fef6f1e89d682790602001610c0e565b6060610ce9600a6122fc565b905090565b6000546001600160a01b03163314610d365760405162461bcd60e51b8152602060048201819052602482015260008051602061398e833981519152604482015260640161062f565b6108766000612309565b6000610ce9611120565b600080546001600160a01b03163314610d935760405162461bcd60e51b8152602060048201819052602482015260008051602061398e833981519152604482015260640161062f565b6001600160a01b038216610de95760405162461bcd60e51b815260206004820152601060248201527f74726561737572792d69732d7a65726f00000000000000000000000000000000604482015260640161062f565b50600180546001600160a01b0383166001600160a01b0319909116178155919050565b6000546001600160a01b03163314610e545760405162461bcd60e51b8152602060048201819052602482015260008051602061398e833981519152604482015260640161062f565b610e5c6121f6565b610876612359565b6040805180820190915260008152606060208201526040516bffffffffffffffffffffffff19606085811b8216602084015284901b16603482015260009060480160408051601f1981840301815291815281516020928301206000818152600c9093529120549091506001600160a01b0316610f225760405162461bcd60e51b815260206004820152600e60248201527f706174682d6e6f742d666f756e64000000000000000000000000000000000000604482015260640161062f565b6000818152600c60209081526040918290208251808401845281546001600160a01b0316815260018201805485518186028101860190965280865291949293858101939290830182828015610fa057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610f82575b5050505050815250509150505b92915050565b600054600160a01b900460ff16156110005760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161062f565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461086e5760405162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b604482015260640161062f565b600080546001600160a01b031633146110aa5760405162461bcd60e51b8152602060048201819052602482015260008051602061398e833981519152604482015260640161062f565b6101f48211156110eb5760405162461bcd60e51b815260206004820152600c60248201526b0cccaca5ae8dede5ad0d2ced60a31b604482015260640161062f565b60088290556040518281527f2e59d502792bca3d730c472cd3acfbc16d0f9fe6ce0cddbdf0f80830251dfaca90602001610c0e565b600e54600d546040517f93f1a40b000000000000000000000000000000000000000000000000000000008152600481019190915230602482015260009182916001600160a01b03909116906393f1a40b90604401604080518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c391906137ae565b506040516370a0823160e01b815230600482015290915081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561122857600080fd5b505afa15801561123c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112609190613727565b61126a91906137d2565b91505090565b6000546001600160a01b031633146112b85760405162461bcd60e51b8152602060048201819052602482015260008051602061398e833981519152604482015260640161062f565b6001600160a01b0381166113345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161062f565b61133d81612309565b50565b6000546001600160a01b031633146113885760405162461bcd60e51b8152602060048201819052602482015260008051602061398e833981519152604482015260640161062f565b611394848484846123ee565b50505050565b600080546001600160a01b031633146113e35760405162461bcd60e51b8152602060048201819052602482015260008051602061398e833981519152604482015260640161062f565b60048290556005546113f783612710613756565b6114019190613756565b60068190556004546040517f06a730aa61ec47f8cc95582be032daaf0ec4cb816c24b9c07b574ea41821048b92610c0e928252602082015260400190565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114a05760405162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b604482015260640161062f565b6114a8610aa8565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561150a57600080fd5b505afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190613727565b905061133d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083611d00565b60006115ad836001600160a01b0384166125a7565b9392505050565b6003546010546001600160a01b0390811691161415611672576040805160028082526060820183526000926020830190803683375050600f5482519293506001600160a01b03169183915060009061160e5761160e6137ea565b6001600160a01b03928316602091820292909201015260035482519116908290600190811061163f5761163f6137ea565b6001600160a01b039283166020918202929092010152600f5460105461166c9291821691166000846123ee565b5061175e565b600f546010546001600160a01b0390811691161461175e5760408051600380825260808201909252600091602082016060803683375050600f5482519293506001600160a01b0316918391506000906116cd576116cd6137ea565b6001600160a01b0392831660209182029290920101526003548251911690829060019081106116fe576116fe6137ea565b6001600160a01b03928316602091820292909201015260105482519116908290600290811061172f5761172f6137ea565b6001600160a01b039283166020918202929092010152600f5460105461175c9291821691166000846123ee565b505b6003546011546001600160a01b039081169116141561181c576040805160028082526060820183526000926020830190803683375050600f5482519293506001600160a01b0316918391506000906117b8576117b86137ea565b6001600160a01b0392831660209182029290920101526003548251911690829060019081106117e9576117e96137ea565b6001600160a01b039283166020918202929092010152600f546011546118169291821691166000846123ee565b50611908565b600f546011546001600160a01b039081169116146119085760408051600380825260808201909252600091602082016060803683375050600f5482519293506001600160a01b031691839150600090611877576118776137ea565b6001600160a01b0392831660209182029290920101526003548251911690829060019081106118a8576118a86137ea565b6001600160a01b0392831660209182029290920101526011548251911690829060029081106118d9576118d96137ea565b6001600160a01b039283166020918202929092010152600f546011546119069291821691166000846123ee565b505b600354600f546001600160a01b03908116911614610876576040805160028082526060820183526000926020830190803683375050600f5482519293506001600160a01b031691839150600090611961576119616137ea565b6001600160a01b039283166020918202929092010152600354825191169082906001908110611992576119926137ea565b6001600160a01b039283166020918202929092010152600f5460035461133d9291821691166000846123ee565b6009546119d790600a906001600160a01b0316611598565b506012546119f090600a906001600160a01b0316611598565b50611a1c600a7f0000000000000000000000000000000000000000000000000000000000000000611598565b50600f54611a3590600a906001600160a01b0316611598565b50600354611a4e90600a906001600160a01b0316611598565b50601054611a6790600a906001600160a01b0316611598565b5060115461133d90600a906001600160a01b0316611598565b801580611b2257506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015611ae857600080fd5b505afa158015611afc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b209190613727565b155b611b945760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606482015260840161062f565b6040516001600160a01b0383166024820152604481018290526108119084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526125f6565b6001600160a01b038116600090815260018301602052604081205415156115ad565b6060611c6e84846000856126db565b949350505050565b600e54600d546040517f441a3e700000000000000000000000000000000000000000000000000000000081526001600160a01b039092169163441a3e7091611ccb918590600401918252602082015260400190565b600060405180830381600087803b158015611ce557600080fd5b505af1158015611cf9573d6000803e3d6000fd5b5050505050565b6040516001600160a01b0383166024820152604481018290526108119084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611bd9565b600054600160a01b900460ff16611da25760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161062f565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600e54611e2a906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691166000611a80565b600e54611e66906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116600019611a80565b600954600f54611e84916001600160a01b0391821691166000611a80565b600954600f54611ea3916001600160a01b039182169116600019611a80565b600954601054611ec1916001600160a01b0391821691166000611a80565b600954601054611ee0916001600160a01b039182169116600019611a80565b600954601154611efe916001600160a01b0391821691166000611a80565b600954601154610876916001600160a01b039182169116600019611a80565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015611f7f57600080fd5b505afa158015611f93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb79190613727565b600e54600d54604051631c57762b60e31b81526004810191909152602481018390529192506001600160a01b03169063e2bbb15890604401611ccb565b600080611fff612823565b60135491935091506001600160a01b03161561213657600f80546013546001600160a01b031982166001600160a01b039182161790925516600080612042612823565b600f80546001600160a01b0319166001600160a01b038716179055909250905061206c82866137d2565b6003546010549196506001600160a01b039182169116148061209e57506003546011546001600160a01b039081169116145b15612125576003546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156120e657600080fd5b505afa1580156120fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061211e9190613727565b9350612132565b61212f81856137d2565b93505b5050505b9091565b60006127106004548361214d919061376d565b612157919061378c565b905060006127106005548461216c919061376d565b612176919061378c565b600354909150612190906001600160a01b03163384611d00565b6001546121c8906001600160a01b0316826121ab8587613756565b6121b59190613756565b6003546001600160a01b03169190611d00565b6002546001600160a01b03161561081157600254600354610811916001600160a01b03918216911683611d00565b600054600160a01b900460ff16156122435760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161062f565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611dd23390565b600e54600d546040517f2f940c7000000000000000000000000000000000000000000000000000000000815260048101919091523060248201526001600160a01b0390911690632f940c70906044015b600060405180830381600087803b1580156122e857600080fd5b505af1158015611394573d6000803e3d6000fd5b606060006115ad83612a72565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600e54612394906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691166000611a80565b600954600f546123b2916001600160a01b0391821691166000611a80565b6009546010546123d0916001600160a01b0391821691166000611a80565b600954601154610876916001600160a01b0391821691166000611a80565b836001600160a01b03168160008151811061240b5761240b6137ea565b60200260200101516001600160a01b0316146124585760405162461bcd60e51b815260206004820152600c60248201526b0d2dcecc2d8d2c85ae0c2e8d60a31b604482015260640161062f565b826001600160a01b031681600183516124719190613756565b81518110612481576124816137ea565b60200260200101516001600160a01b0316146124ce5760405162461bcd60e51b815260206004820152600c60248201526b0d2dcecc2d8d2c85ae0c2e8d60a31b604482015260640161062f565b6040516bffffffffffffffffffffffff19606086811b8216602084015285901b16603482015260009060480160408051601f198184030181529190528051602090910120905060006001600160a01b0384161561252b5783612538565b6009546001600160a01b03165b905061254381612ace565b6040805180820182526001600160a01b03838116825260208083018781526000878152600c835294909420835181546001600160a01b0319169316929092178255925180519293919261259c9260018501920190613435565b505050505050505050565b60008181526001830160205260408120546125ee57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610fad565b506000610fad565b600061264b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611c5f9092919063ffffffff16565b80519091501561081157808060200190518101906126699190613800565b6108115760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161062f565b6060824710156127535760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161062f565b6001600160a01b0385163b6127aa5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161062f565b600080866001600160a01b031685876040516127c6919061384e565b60006040518083038185875af1925050503d8060008114612803576040519150601f19603f3d011682016040523d82523d6000602084013e612808565b606091505b5091509150612818828286612b25565b979650505050505050565b60008061282e612b5e565b600f546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561287257600080fd5b505afa158015612886573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128aa9190613727565b90508015612a6d57600354600f546001600160a01b0390811691161461298557600f54600354600854612902926001600160a01b03908116921690612710906128f3908661376d565b6128fd919061378c565b612b9a565b600f546040516370a0823160e01b81523060048201529193506001600160a01b0316906370a082319060240160206040518083038186803b15801561294657600080fd5b505afa15801561295a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061297e9190613727565b90506129af565b61271060085482612996919061376d565b6129a0919061378c565b91506129ac8282613756565b90505b6129b881612db2565b6003546010549194506001600160a01b03918216911614806129ea57506003546011546001600160a01b039081169116145b15612a6d576003546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015612a3257600080fd5b505afa158015612a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a6a9190613727565b91505b509091565b606081600001805480602002602001604051908101604052809291908181526020018280548015612ac257602002820191906000526020600020905b815481526020019060010190808311612aae575b50505050509050919050565b612ad9600a82611c3d565b61133d5760405162461bcd60e51b815260206004820152601660248201527f726f757465722d6e6f742d77686974656c697374656400000000000000000000604482015260640161062f565b60608315612b345750816115ad565b825115612b445782518084602001fd5b8160405162461bcd60e51b815260040161062f919061386a565b600e54600d54604051631c57762b60e31b81526004810191909152600060248201526001600160a01b039091169063e2bbb158906044016122ce565b6000826001600160a01b0316846001600160a01b03161415612bbd5750806115ad565b6000612bc98585610e64565b8051909150612be4906001600160a01b038716906000611a80565b8051612bfd906001600160a01b03871690600019611a80565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a082319060240160206040518083038186803b158015612c3f57600080fd5b505afa158015612c53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c779190613727565b825160208401516040517f38ed17390000000000000000000000000000000000000000000000000000000081529293506001600160a01b03909116916338ed173991612cce9188916000913090429060040161389d565b600060405180830381600087803b158015612ce857600080fd5b505af1158015612cfc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612d2491908101906138d9565b506040516370a0823160e01b815230600482015281906001600160a01b038716906370a082319060240160206040518083038186803b158015612d6657600080fd5b505afa158015612d7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d9e9190613727565b612da89190613756565b9695505050505050565b6040516370a0823160e01b815230600482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b158015612e1657600080fd5b505afa158015612e2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e4e9190613727565b6010546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a082319060240160206040518083038186803b158015612e9757600080fd5b505afa158015612eab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ecf9190613727565b6011546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a082319060240160206040518083038186803b158015612f1857600080fd5b505afa158015612f2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f509190613727565b601054600f549192506001600160a01b0391821691161415612f9457600f54601154612f8e916001600160a01b0390811691166128fd60028961378c565b5061307a565b601154600f546001600160a01b0390811691161415612fcf57600f54601054612f8e916001600160a01b0390811691166128fd60028961378c565b600f54601054612ff1916001600160a01b0390811691166128fd60028961378c565b50600f546011546040516370a0823160e01b8152306004820152613078926001600160a01b0390811692169082906370a082319060240160206040518083038186803b15801561304057600080fd5b505afa158015613054573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128fd9190613727565b505b6003546010546000916001600160a01b0391821691161415613120576010546040516370a0823160e01b815230600482015284916001600160a01b0316906370a082319060240160206040518083038186803b1580156130d957600080fd5b505afa1580156130ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131119190613727565b61311b9190613756565b61319b565b6010546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561316357600080fd5b505afa158015613177573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061319b9190613727565b6003546011549192506000916001600160a01b0390811691161415613244576011546040516370a0823160e01b815230600482015284916001600160a01b0316906370a082319060240160206040518083038186803b1580156131fd57600080fd5b505afa158015613211573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132359190613727565b61323f9190613756565b6132bf565b6011546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561328757600080fd5b505afa15801561329b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132bf9190613727565b6009546010546011546040517fe8e337000000000000000000000000000000000000000000000000000000000081526001600160a01b0392831660048201529082166024820152604481018690526064810184905260016084820181905260a48201523060c48201524260e4820152929350169063e8e337009061010401606060405180830381600087803b15801561335757600080fd5b505af115801561336b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061338f919061395f565b50506040516370a0823160e01b81523060048201528691507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156133f357600080fd5b505afa158015613407573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061342b9190613727565b6128189190613756565b82805482825590600052602060002090810192821561348a579160200282015b8281111561348a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613455565b5061349692915061349a565b5090565b5b80821115613496576000815560010161349b565b6000602082840312156134c157600080fd5b5035919050565b80356001600160a01b038116811461093657600080fd5b6000602082840312156134f157600080fd5b6115ad826134c8565b600081518084526020808501945080840160005b838110156135335781516001600160a01b03168752958201959082019060010161350e565b509495945050505050565b6020815260006115ad60208301846134fa565b6000806040838503121561356457600080fd5b61356d836134c8565b915061357b602084016134c8565b90509250929050565b60006020808352606083016001600160a01b038086511683860152828601516040808701528281518085526080880191508583019450600092505b808310156135e1578451841682529385019360019290920191908501906135bf565b50979650505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561362c5761362c6135ed565b604052919050565b600067ffffffffffffffff82111561364e5761364e6135ed565b5060051b60200190565b6000806000806080858703121561366e57600080fd5b613677856134c8565b935060206136868187016134c8565b9350613694604087016134c8565b9250606086013567ffffffffffffffff8111156136b057600080fd5b8601601f810188136136c157600080fd5b80356136d46136cf82613634565b613603565b81815260059190911b8201830190838101908a8311156136f357600080fd5b928401925b8284101561371857613709846134c8565b825292840192908401906136f8565b979a9699509497505050505050565b60006020828403121561373957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561376857613768613740565b500390565b600081600019048311821515161561378757613787613740565b500290565b6000826137a957634e487b7160e01b600052601260045260246000fd5b500490565b600080604083850312156137c157600080fd5b505080516020909101519092909150565b600082198211156137e5576137e5613740565b500190565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561381257600080fd5b815180151581146115ad57600080fd5b60005b8381101561383d578181015183820152602001613825565b838111156113945750506000910152565b60008251613860818460208701613822565b9190910192915050565b6020815260008251806020840152613889816040850160208701613822565b601f01601f19169190910160400192915050565b85815284602082015260a0604082015260006138bc60a08301866134fa565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156138ec57600080fd5b825167ffffffffffffffff81111561390357600080fd5b8301601f8101851361391457600080fd5b80516139226136cf82613634565b81815260059190911b8201830190838101908783111561394157600080fd5b928401925b8284101561281857835182529284019290840190613946565b60008060006060848603121561397457600080fd5b835192506020840151915060408401519050925092509256fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220c0470748c600e7d021b679bb549698bf824e76569de14538dbfdc33cb55f012c64736f6c63430008090033000000000000000000000000321162cd933e2be498cd2267a90534a804051b1100000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83000000000000000000000000ec7178f4c41f346b2721907f5cf7628e388a7a58000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018b4f774fdc7bf685daeef66c2990b1ddd9ea6ad000000000000000000000000841fad6eae12c286d1fd18d1d525dffa75c7effe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f491e7b69e4244ad4002bc14e878a34207e38c29000000000000000000000000150f31c4a49bb5c59582a79c9e2ec6f2395cb6160000000000000000000000008317b428082802c8aa84d670e495a0003d11368a

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

000000000000000000000000ec7178f4c41f346b2721907f5cf7628e388a7a58000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018b4f774fdc7bf685daeef66c2990b1ddd9ea6ad000000000000000000000000841fad6eae12c286d1fd18d1d525dffa75c7effe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f491e7b69e4244ad4002bc14e878a34207e38c29000000000000000000000000150f31c4a49bb5c59582a79c9e2ec6f2395cb6160000000000000000000000008317b428082802c8aa84d670e495a0003d11368a

-----Decoded View---------------
Arg [0] : _want (address): 0xec7178f4c41f346b2721907f5cf7628e388a7a58
Arg [1] : _poolId (uint256): 0
Arg [2] : _masterchef (address): 0x18b4f774fdc7bf685daeef66c2990b1ddd9ea6ad
Arg [3] : _output (address): 0x841fad6eae12c286d1fd18d1d525dffa75c7effe
Arg [4] : _output2 (address): 0x0000000000000000000000000000000000000000
Arg [5] : _uniRouter (address): 0xf491e7b69e4244ad4002bc14e878a34207e38c29
Arg [6] : _vault (address): 0x150f31c4a49bb5c59582a79c9e2ec6f2395cb616
Arg [7] : _treasury (address): 0x8317b428082802c8aa84d670e495a0003d11368a

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000ec7178f4c41f346b2721907f5cf7628e388a7a58
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 00000000000000000000000018b4f774fdc7bf685daeef66c2990b1ddd9ea6ad
Arg [3] : 000000000000000000000000841fad6eae12c286d1fd18d1d525dffa75c7effe
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 000000000000000000000000f491e7b69e4244ad4002bc14e878a34207e38c29
Arg [6] : 000000000000000000000000150f31c4a49bb5c59582a79c9e2ec6f2395cb616
Arg [7] : 0000000000000000000000008317b428082802c8aa84d670e495a0003d11368a


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.