Contract 0x0A46556f77aC592eAca70C62750216A111c38374

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x8b9d4fb5346001cd92d6a557b7e4d4b9bd702edbc4f8fc9c43ec953d05cf7875Harvest438555912022-07-30 10:57:2868 days 6 hrs ago0x9d7593003c0d48014a38be07ca8c312e6d32f17d IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.001022080135
0x583bf80a4a8521bc152dd1d0c56e93518bd9a5f71d45607743183d77b0a36947Harvest403415522022-06-12 8:17:15116 days 9 hrs ago0x9029ed3f753125a0ac46b0a1ff78fef67213e57e IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.058395688383
0x5893ad849f94e24f09ef8b14f4591ba22b8899a416bc8330107b1f92632b2524Harvest403065162022-06-11 20:42:56116 days 21 hrs ago0xe4a7d73bccbae0e7398f8d437ff16b4623a5ac3a IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.014879106
0x5aeb6d529add726448281f3d045bd3f5e09554e2c714b89aa384770229670cc0Harvest402852282022-06-11 13:35:29117 days 4 hrs ago0x657439ed989b0ec28a09b592fda8c61ebd434b6a IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.017923278789
0x981bb48b45e5a539e9421ffd5afc0717c6545ea4ccb42294d2c5d8d8d7dcdca0Harvest402629992022-06-11 6:05:47117 days 11 hrs ago0x9029ed3f753125a0ac46b0a1ff78fef67213e57e IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.002878667837
0x8289ab00200f5492ceb9d8e6db6f5111265b730f415a0fe1b753e3600eeafdbdHarvest402467652022-06-11 1:01:27117 days 16 hrs ago0xd968665350a0bb7d487aadba94d920d8890ee06f IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.009073302
0x024a8b70472116e5dd3d01383ec4126ac50070c98fbdccb9eaad51199c07c1d3Harvest402286212022-06-10 19:00:40117 days 22 hrs ago0xe4a7d73bccbae0e7398f8d437ff16b4623a5ac3a IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.019486910105
0xe964cf8db4a866e42ccba63625eda37e3f07bf22c8681d30db68365c6cc6846bHarvest402073062022-06-10 11:34:20118 days 6 hrs ago0x1db12950b956c9acbf083612812ec5a7a1b64b2b IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.014314613261
0x77a0855f67fc81f9bcb97cc7e709fbf60e8604420b267f540b02a5f1dc86d796Harvest401925032022-06-10 6:49:09118 days 11 hrs ago0x6868ac68dd1b4b2b400f388346d019a606aded7e IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.00342919
0xd4ad3e48500dbc7a8370ba42e5353238616b04ed3c9c941f61cbd74ee1afa3edHarvest401742022022-06-10 1:09:33118 days 16 hrs ago0xe4a7d73bccbae0e7398f8d437ff16b4623a5ac3a IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.01371694
0x61b479f78e4108583327f48349a33455945841082e23325fa2a813265a90d5b9Harvest401668702022-06-09 22:40:17118 days 19 hrs ago0x3a5963bb3b60b457bee54fe387ba7d6b8b2e9ae5 IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.007528932199
0x45569d81c4f1231a2287e9e56e83f995de3941424eec87597d5f016fcbd8e4e4Harvest401529682022-06-09 18:06:09118 days 23 hrs ago0x40c5cf51be4b6e0ad376d598e1615c156d6fc8fc IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.01028322
0x3e3881bacfe0ee7529ea74fa015ee276635b549d67efa410570554e796873341Harvest401322182022-06-09 11:03:45119 days 6 hrs ago0x40c5cf51be4b6e0ad376d598e1615c156d6fc8fc IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.003429235
0xf788fa002a1ab1b631d8337daed300a808ac88bf7e95ea224a0be00fb56711feHarvest401125582022-06-09 4:37:37119 days 13 hrs ago0xf0ab1a62b3ca931619d3108159f0c4010873702b IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.005486704
0xeb97888b411135cc220ffc93de46c90306bd3ddcfb7b0b172219fef45ebf61d9Harvest400927442022-06-08 22:17:31119 days 19 hrs ago0x657439ed989b0ec28a09b592fda8c61ebd434b6a IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.0131680896
0x5b66c727316c620c8a51c3796b6b0b6cf1995baa9cb1326c841e47f88d8aecf6Harvest400920172022-06-08 22:03:25119 days 19 hrs ago0xe912c6992ffdf5eea0de2360c9eba427d7cf3426 IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.029350723002
0x37bdb49667a3a55b653fb1ed0b024b0869f4f4a753a81862bc3269e8c7ca76beHarvest400708842022-06-08 14:50:08120 days 3 hrs ago0x657439ed989b0ec28a09b592fda8c61ebd434b6a IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.005166408
0xa2f1ce02b5998d045bcfa8a450030b8651dc237796974ad0cc0759d3c243148bHarvest400524242022-06-08 8:50:24120 days 9 hrs ago0x9029ed3f753125a0ac46b0a1ff78fef67213e57e IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.004115028
0xb29c302ef3c87917a3f5f732651180ccd3106fe5ea2fab2506c50c6884f5436aHarvest400338092022-06-08 3:02:20120 days 14 hrs ago0x40c5cf51be4b6e0ad376d598e1615c156d6fc8fc IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.007777116
0x446e2665e1d28eb44dc321a3a0491565d0cdf2b5130d433a98f3121865b1f378Harvest400150312022-06-07 20:45:42120 days 21 hrs ago0x657439ed989b0ec28a09b592fda8c61ebd434b6a IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.004727138415
0x16d52fc3b5b95f8e311fbd5c0aec298036fbd2c4a807ce450da63684f73995c4Harvest399972822022-06-07 15:03:15121 days 2 hrs ago0x6868ac68dd1b4b2b400f388346d019a606aded7e IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.00540803667
0xbe6e169f8bc1621f71814b81a29f00340645ff9c990c4eafa391a0218ce2b6faHarvest399856262022-06-07 11:15:07121 days 6 hrs ago0xd93bab51cd83881ce1228650b9798ee8fc3e746c IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.005296402355
0x4c51dd6e72a7413e793bf78340883362dc60338882a9fedba6cce0f5e179ce88Harvest399787422022-06-07 9:07:00121 days 8 hrs ago0xe4a7d73bccbae0e7398f8d437ff16b4623a5ac3a IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.004338102063
0xf69bd84084a7644256136d28b775d53ce8640cd08c4a1f5cee88a05ea279a523Harvest399613192022-06-07 3:28:19121 days 14 hrs ago0x9d7593003c0d48014a38be07ca8c312e6d32f17d IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.009753841695
0x45fde83584925a52f6518e721b1c248a86878ebbecfaa28ffc9389c435277298Harvest399418872022-06-06 21:19:14121 days 20 hrs ago0xd93bab51cd83881ce1228650b9798ee8fc3e746c IN  0x0a46556f77ac592eaca70c62750216a111c383740 FTM0.012597958677
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x9406fd70e731bb1089c1ebe8e0eca02fb701d4bb6f30756cc6c7dc7db3ffdaa6360688782022-04-14 21:51:10174 days 20 hrs ago 0x4b6b6a3af8c882b53c2cc99f016c89b231ce441d  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TombMatrixLpAutoCompound

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 16 : 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 16 : 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 16 : 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 16 : 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 5 of 16 : 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 6 of 16 : 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 7 of 16 : 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 8 of 16 : 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 9 of 16 : 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 10 of 16 : 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 withdraw(uint256 _pid, uint256 _amount) external;

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

    function emergencyWithdraw(uint256 _pid) external;
}

File 11 of 16 : 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 12 of 16 : 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;
}

File 13 of 16 : 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 immutable poolId;
    address public immutable masterchef;
    address public immutable output;
    address public immutable lpToken0;
    address public immutable lpToken1;
    address public constant usdc = 0x04068DA6C83AFCFA0e13ba15A6696662335D5B75;
    address public constant mai = 0xfB98B335551a418cD0737375a2ea0ded62Ea213b;

    constructor(
        address _want,
        uint256 _poolId,
        address _masterchef,
        address _output,
        address _uniRouter,
        address _vault,
        address _treasury
    )
        MatrixStrategyBase(_want, _vault, _treasury)
        MatrixSwapHelper(_uniRouter)
    {
        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);
        whitelistedAddresses.add(mai);
    }

    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, type(uint256).max);
        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 override returns (uint256) {
        (uint256 _totalStaked, ) = IMasterChef(masterchef).userInfo(
            poolId,
            address(this)
        );
        return IERC20(want).balanceOf(address(this)) + _totalStaked;
    }

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

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

    function _harvest()
        internal
        override
        returns (uint256 _wantHarvested, uint256 _wrappedFeesAccrued)
    {
        IMasterChef(masterchef).deposit(poolId, 0);
        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);
        }
    }

    function _addLiquidity(uint256 _outputAmount)
        internal
        virtual
        returns (uint256 _wantHarvested)
    {
        uint256 _wantBalanceBefore = IERC20(want).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 = IERC20(lpToken0).balanceOf(address(this));
        uint256 _lp1Balance = IERC20(lpToken1).balanceOf(address(this));
        IUniswapV2Router02(unirouter).addLiquidity(
            lpToken0,
            lpToken1,
            _lp0Balance,
            _lp1Balance,
            1,
            1,
            address(this),
            block.timestamp
        );
        return IERC20(want).balanceOf(address(this)) - _wantBalanceBefore;
    }

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

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

File 14 of 16 : 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 constant 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 15 of 16 : 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";

/// @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 {
        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 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);
        
        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 16 of 16 : TombMatrixLpAutoCompound.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

import "../MatrixLpAutoCompound.sol";

/// @title MatrixLpAutoCompound adapted to claim BSHARE rewards from the correct routes
contract TombMatrixLpAutoCompound is MatrixLpAutoCompound {
    using EnumerableSet for EnumerableSet.AddressSet;

    address internal constant SPOOKYSWAP_ROUTER =
        0xF491e7B69E4244ad4002BC14e878a34207E38c29;

    address internal constant TOMBSWAP_ROUTER = 0x6D0176C5ea1e44b08D3dd001b0784cE42F47a3A7;
    address internal constant WFTM = 0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83;
    address internal constant TOMB = 0x6c021Ae822BEa943b2E66552bDe1D2696a53fbB7;
    address internal constant MAI = 0xfB98B335551a418cD0737375a2ea0ded62Ea213b;
    address internal constant TSHARE = 0x4cdF39285D7Ca8eB3f090fDA0C069ba5F4145B37;

    constructor(
        address _want,
        uint256 _poolId,
        address _masterchef,
        address _output,
        address _uniRouter,
        address _vault,
        address _treasury
    )
        MatrixLpAutoCompound(
            _want,
            _poolId,
            _masterchef,
            _output,
            _uniRouter,
            _vault,
            _treasury
        )
    {}

    function _setWhitelistedAddresses() internal override {
        super._setWhitelistedAddresses();
        whitelistedAddresses.add(SPOOKYSWAP_ROUTER);
        whitelistedAddresses.add(TOMBSWAP_ROUTER);
        whitelistedAddresses.add(TOMB);
        whitelistedAddresses.add(MAI);
        whitelistedAddresses.add(TSHARE);
    }

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

        // TSHARE -> MAI
        address[] memory _tshareMai = new address[](2);
        _tshareMai[0] = TSHARE;
        _tshareMai[1] = MAI;
        _setSwapPath(TSHARE, MAI, TOMBSWAP_ROUTER, _tshareMai);

        // TSHARE -> TOMB
        address[] memory _tshareTomb = new address[](3);
        _tshareTomb[0] = TSHARE;
        _tshareTomb[1] = MAI;
        _tshareTomb[2] = TOMB;
        _setSwapPath(TSHARE, TOMB, TOMBSWAP_ROUTER, _tshareTomb);

        // TSHARE -> FTM
        address[] memory _tshareWftm = new address[](2);
        _tshareWftm[0] = TSHARE;
        _tshareWftm[1] = WFTM;
        _setSwapPath(TSHARE, WFTM, SPOOKYSWAP_ROUTER, _tshareWftm);
    }
}

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":"_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":"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":"mai","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":"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":"usdc","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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"}]

6101606040526103e86003556000600455612328600555600a6006556101c26007553480156200002e57600080fd5b5060405162005a1a38038062005a1a833981016040819052620000519162001643565b86868686868686828783836200006733620002e3565b6000805460ff60a01b191690556001600160a01b038216620000c05760405162461bcd60e51b815260206004820152600d60248201526c7661756c742d69732d7a65726f60981b60448201526064015b60405180910390fd5b6001600160a01b0381166200010b5760405162461bcd60e51b815260206004820152601060248201526f74726561737572792d69732d7a65726f60801b6044820152606401620000b7565b6001600160a01b038316620001525760405162461bcd60e51b815260206004820152600c60248201526b77616e742d69732d7a65726f60a01b6044820152606401620000b7565b6001600160a01b03918216608052600180549183166001600160a01b031992831617905591811660a081905260088054948316949093169390931790915586811660e05285166101005260408051630dfe168160e01b81529051630dfe168191600480820192602092909190829003018186803b158015620001d357600080fd5b505afa158015620001e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020e9190620016cf565b6001600160a01b0316610120816001600160a01b03168152505060a0516001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156200026457600080fd5b505afa15801562000279573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029f9190620016cf565b6001600160a01b03166101405260c0869052620002bb62000333565b620002c562000430565b620002cf6200074b565b505050505050505050505050505062001815565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620003486200085c60201b620016551760201c565b6200037773f491e7b69e4244ad4002bc14e878a34207e38c2960096200098360201b620017791790919060201c565b50620003a7736d0176c5ea1e44b08d3dd001b0784ce42f47a3a760096200098360201b620017791790919060201c565b50620003d7736c021ae822bea943b2e66552bde1d2696a53fbb760096200098360201b620017791790919060201c565b5062000402600080516020620059ba83398151915260096200098360201b620017791790919060201c565b506200042d600080516020620059da83398151915260096200098360201b620017791790919060201c565b50565b62000445620009a360201b620017951760201c565b604080516002808252606082018352600092602083019080368337019050509050600080516020620059da833981519152816000815181106200048c576200048c620016ed565b60200260200101906001600160a01b031690816001600160a01b031681525050600080516020620059ba83398151915281600181518110620004d257620004d2620016ed565b6001600160a01b03909216602092830291909101909101526200052a600080516020620059da833981519152600080516020620059ba833981519152736d0176c5ea1e44b08d3dd001b0784ce42f47a3a78462000e7e565b6040805160038082526080820190925260009160208201606080368337019050509050600080516020620059da83398151915281600081518110620005735762000573620016ed565b60200260200101906001600160a01b031690816001600160a01b031681525050600080516020620059ba83398151915281600181518110620005b957620005b9620016ed565b60200260200101906001600160a01b031690816001600160a01b031681525050736c021ae822bea943b2e66552bde1d2696a53fbb781600281518110620006045762000604620016ed565b6001600160a01b039092166020928302919091019091015262000661600080516020620059da833981519152736c021ae822bea943b2e66552bde1d2696a53fbb7736d0176c5ea1e44b08d3dd001b0784ce42f47a3a78462000e7e565b604080516002808252606082018352600092602083019080368337019050509050600080516020620059da83398151915281600081518110620006a857620006a8620016ed565b60200260200101906001600160a01b031690816001600160a01b031681525050600080516020620059fa83398151915281600181518110620006ee57620006ee620016ed565b6001600160a01b039092166020928302919091019091015262000746600080516020620059da833981519152600080516020620059fa83398151915273f491e7b69e4244ad4002bc14e878a34207e38c298462000e7e565b505050565b6200077660e05160001960a0516001600160a01b03166200104f60201b62001ef7179092919060201c565b60085461010051620007a4916001600160a01b0391821691166000196200104f602090811b62001ef717901c565b60085461012051620007d1916001600160a01b03918216911660006200104f602090811b62001ef717901c565b60085461012051620007ff916001600160a01b0391821691166000196200104f602090811b62001ef717901c565b600854610140516200082c916001600160a01b03918216911660006200104f602090811b62001ef717901c565b600854610140516200085a916001600160a01b0391821691166000196200104f602090811b62001ef717901c565b565b60085462000882906009906001600160a01b031662000983602090811b6200177917901c565b50620008b27304068da6c83afcfa0e13ba15a6696662335d5b7560096200098360201b620017791790919060201c565b50620008d060a05160096200098360201b620017791790919060201c565b50620008ef6101005160096200098360201b620017791790919060201c565b506200091a600080516020620059fa83398151915260096200098360201b620017791790919060201c565b50620009396101205160096200098360201b620017791790919060201c565b50620009586101405160096200098360201b620017791790919060201c565b506200042d600080516020620059ba83398151915260096200098360201b620017791790919060201c565b60006200099a836001600160a01b038416620011a9565b90505b92915050565b610120516001600160a01b0316600080516020620059fa833981519152141562000a8a57604080516002808252606082018352600092602083019080368337019050509050610100518160008151811062000a025762000a02620016ed565b60200260200101906001600160a01b031690816001600160a01b031681525050600080516020620059fa8339815191528160018151811062000a485762000a48620016ed565b60200260200101906001600160a01b031690816001600160a01b03168152505062000a83610100516101205160008462000e7e60201b60201c565b5062000ba4565b610100516001600160a01b0316610120516001600160a01b03161462000ba4576040805160038082526080820190925260009160208201606080368337019050509050610100518160008151811062000ae75762000ae7620016ed565b60200260200101906001600160a01b031690816001600160a01b031681525050600080516020620059fa8339815191528160018151811062000b2d5762000b2d620016ed565b60200260200101906001600160a01b031690816001600160a01b031681525050610120518160028151811062000b675762000b67620016ed565b60200260200101906001600160a01b031690816001600160a01b03168152505062000ba2610100516101205160008462000e7e60201b60201c565b505b610140516001600160a01b0316600080516020620059fa833981519152141562000c8b57604080516002808252606082018352600092602083019080368337019050509050610100518160008151811062000c035762000c03620016ed565b60200260200101906001600160a01b031690816001600160a01b031681525050600080516020620059fa8339815191528160018151811062000c495762000c49620016ed565b60200260200101906001600160a01b031690816001600160a01b03168152505062000c84610100516101405160008462000e7e60201b60201c565b5062000da5565b610100516001600160a01b0316610140516001600160a01b03161462000da5576040805160038082526080820190925260009160208201606080368337019050509050610100518160008151811062000ce85762000ce8620016ed565b60200260200101906001600160a01b031690816001600160a01b031681525050600080516020620059fa8339815191528160018151811062000d2e5762000d2e620016ed565b60200260200101906001600160a01b031690816001600160a01b031681525050610140518160028151811062000d685762000d68620016ed565b60200260200101906001600160a01b031690816001600160a01b03168152505062000da3610100516101405160008462000e7e60201b60201c565b505b610100516001600160a01b0316600080516020620059fa833981519152146200085a57604080516002808252606082018352600092602083019080368337019050509050610100518160008151811062000e035762000e03620016ed565b60200260200101906001600160a01b031690816001600160a01b031681525050600080516020620059fa8339815191528160018151811062000e495762000e49620016ed565b6001600160a01b0390921660209283029190910190910152610100516200042d90600080516020620059fa8339815191526000845b836001600160a01b03168160008151811062000e9e5762000e9e620016ed565b60200260200101516001600160a01b03161462000eed5760405162461bcd60e51b815260206004820152600c60248201526b0d2dcecc2d8d2c85ae0c2e8d60a31b6044820152606401620000b7565b826001600160a01b0316816001835162000f08919062001719565b8151811062000f1b5762000f1b620016ed565b60200260200101516001600160a01b03161462000f6a5760405162461bcd60e51b815260206004820152600c60248201526b0d2dcecc2d8d2c85ae0c2e8d60a31b6044820152606401620000b7565b62000f7581620011fb565b6040516001600160601b0319606086811b8216602084015285901b16603482015260009060480160408051601f198184030181529190528051602090910120905060006001600160a01b0384161562000fcf578362000fdc565b6008546001600160a01b03165b905062000fe981620012a6565b6040805180820182526001600160a01b03838116825260208083018781526000878152600b835294909420835181546001600160a01b03191693169290921782559251805192939192620010449260018501920190620015a5565b505050505050505050565b801580620010dd5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015620010a057600080fd5b505afa158015620010b5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010db919062001733565b155b620011515760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401620000b7565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620007469185916200130f16565b6000818152600183016020526040812054620011f2575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200099d565b5060006200099d565b60005b8151811015620012a2576200123f828281518110620012215762001221620016ed565b60200260200101516009620013ed60201b620020b41790919060201c565b6200128d5760405162461bcd60e51b815260206004820152601560248201527f746f6b656e2d6e6f742d77686974656c697374656400000000000000000000006044820152606401620000b7565b8062001299816200174d565b915050620011fe565b5050565b620012c1816009620013ed60201b620020b41790919060201c565b6200042d5760405162461bcd60e51b815260206004820152601660248201527f726f757465722d6e6f742d77686974656c6973746564000000000000000000006044820152606401620000b7565b60006200136b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200141060201b620020d6179092919060201c565b8051909150156200074657808060200190518101906200138c91906200176b565b620007465760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401620000b7565b6001600160a01b038116600090815260018301602052604081205415156200099a565b60606200142184846000856200142b565b90505b9392505050565b6060824710156200148e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401620000b7565b6001600160a01b0385163b620014e75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620000b7565b600080866001600160a01b03168587604051620015059190620017c2565b60006040518083038185875af1925050503d806000811462001544576040519150601f19603f3d011682016040523d82523d6000602084013e62001549565b606091505b5090925090506200155c82828662001567565b979650505050505050565b606083156200157857508162001424565b825115620015895782518084602001fd5b8160405162461bcd60e51b8152600401620000b79190620017e0565b828054828255906000526020600020908101928215620015fd579160200282015b82811115620015fd57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620015c6565b506200160b9291506200160f565b5090565b5b808211156200160b576000815560010162001610565b80516001600160a01b03811681146200163e57600080fd5b919050565b600080600080600080600060e0888a0312156200165f57600080fd5b6200166a8862001626565b965060208801519550620016816040890162001626565b9450620016916060890162001626565b9350620016a16080890162001626565b9250620016b160a0890162001626565b9150620016c160c0890162001626565b905092959891949750929550565b600060208284031215620016e257600080fd5b6200099a8262001626565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000828210156200172e576200172e62001703565b500390565b6000602082840312156200174657600080fd5b5051919050565b600060001982141562001764576200176462001703565b5060010190565b6000602082840312156200177e57600080fd5b815180151581146200142457600080fd5b60005b83811015620017ac57818101518382015260200162001792565b83811115620017bc576000848401525b50505050565b60008251620017d68184602087016200178f565b9190910192915050565b6020815260008251806020840152620018018160408501602087016200178f565b601f01601f19169190910160400192915050565b60805160a05160c05160e051610100516101205161014051613efe62001abc600039600081816104f50152818161173901528181611aa701528181611bcd01528181611c2601528181611d1401528181611d8c015281816123b3015281816123ee01528181612b33015281816132d101528181613303015281816134370152818161357a015261364f0152600081816104550152818161170d01528181611797015281816118bd0152818161191601528181611a0401528181611a7c0152818161233c0152818161237701528181612af80152818161325301528181613381015281816133d1015281816134d501526136270152600081816105a7015281816116c1015281816117fd0152818161189c015281816118ec0152818161196801528181611a5b01528181611b0d01528181611bac01528181611bfc01528181611c7801528181611d6b01528181611db701528181611e1c01528181611ebb01528181612300015281816125e501528181612672015281816126b90152818161272501528181612abd0152818161327d015281816132b00152818161332d01528181613360015281816133b001526134150152600081816106070152818161120701528181612142015281816122c8015281816124f2015281816125720152818161299a0152612a86015260008181610376015281816111ce01528181612115015281816124c201528181612538015261297401526000818161030f015281816106d60152818161078901528181610870015281816112a30152818161157d0152818161160e01528181611695015281816122a60152818161243101528181612a64015281816131d50152613719015260008181610636015281816106630152818161083d01528181610b41015281816110910152818161150701526116300152613efe6000f3fe608060405234801561001057600080fd5b50600436106102e95760003560e01c8063715018a611610191578063d0e30db0116100e3578063f2fde38b11610097578063fb1db27811610071578063fb1db27814610602578063fb61778714610629578063fbfa77cf1461063157600080fd5b8063f2fde38b146105c9578063f4392fb3146105dc578063f88fb689146105ef57600080fd5b8063d4c3eea0116100c8578063d4c3eea014610591578063d68e130214610599578063f20eaeb8146105a257600080fd5b8063d0e30db014610576578063d32b96041461057e57600080fd5b80638da5cb5b11610145578063be10862b1161011f578063be10862b1461053a578063be9e09d61461054d578063cc32d1761461056d57600080fd5b80638da5cb5b1461051757806390321e1a14610528578063bc063e1a1461053157600080fd5b80637f51bb1f116101765780637f51bb1f146104d55780638456cb59146104e8578063877562b6146104f057600080fd5b8063715018a6146104c5578063722713f7146104cd57600080fd5b80634870dd9a1161024a5780635c975abb116101fe57806361591149116101d8578063615911491461048a57806361d027b31461049d5780636d028027146104b057600080fd5b80635c975abb1461043e5780635ee167c01461045057806360cc2c761461047757600080fd5b8063570b2b841161022f578063570b2b8414610412578063573fef0a1461042d5780635b99176c1461043557600080fd5b80634870dd9a146103ee57806350e70d48146103f757600080fd5b80633e413bee116102a1578063401f466311610286578063401f4663146103bb5780634641257d146103de5780634700d305146103e657600080fd5b80633e413bee146103985780633f4ba83a146103b357600080fd5b8063257ae0de116102d2578063257ae0de146103495780632e1a7d4d1461035c5780633e0dc34e1461037157600080fd5b80631df4ccfc146102ee5780631f1fcd511461030a575b600080fd5b6102f760075481565b6040519081526020015b60405180910390f35b6103317f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610301565b600854610331906001600160a01b031681565b61036f61036a3660046139af565b610658565b005b6102f77f000000000000000000000000000000000000000000000000000000000000000081565b6103317304068da6c83afcfa0e13ba15a6696662335d5b7581565b61036f61089c565b6103ce6103c93660046139df565b6108fe565b6040519015158152602001610301565b61036f6109c1565b61036f610ade565b6102f761271081565b6103317321be370d5312f44cb42ce377bc9b8a0cef1a4c8381565b61033173fb98b335551a418cd0737375a2ea0ded62ea213b81565b61036f610b36565b6102f760045481565b600054600160a01b900460ff166103ce565b6103317f000000000000000000000000000000000000000000000000000000000000000081565b6103ce6104853660046139af565b610b97565b6103ce6104983660046139af565b610ca4565b600154610331906001600160a01b031681565b6104b8610d63565b6040516103019190613a3e565b61036f610d74565b6102f7610dc6565b6103ce6104e33660046139df565b610dd0565b61036f610e92565b6103317f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b0316610331565b6102f760035481565b6102f76101f481565b600254610331906001600160a01b031681565b61056061055b366004613a51565b610eea565b6040516103019190613a84565b6102f760055481565b61036f611039565b6103ce61058c3660046139af565b6110e7565b6102f76111a6565b6102f760065481565b6103317f000000000000000000000000000000000000000000000000000000000000000081565b61036f6105d73660046139df565b61132d565b61036f6105ea366004613b58565b6113fd565b6103ce6105fd3660046139af565b611457565b6103317f000000000000000000000000000000000000000000000000000000000000000081565b61036f6114fc565b6103317f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106be5760405162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b60448201526064015b60405180910390fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561072057600080fd5b505afa158015610734573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107589190613c27565b90508181101561080e5761077461076f8284613c56565b6120ed565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156107d357600080fd5b505afa1580156107e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080b9190613c27565b90505b818111156108195750805b60006127106006548361082c9190613c6d565b6108369190613c8c565b90506108977f00000000000000000000000000000000000000000000000000000000000000006108668385613c56565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691906121aa565b505050565b6000546001600160a01b031633146108e45760405162461bcd60e51b81526020600482018190526024820152600080516020613ea983398151915260448201526064016106b5565b6108ec6121f3565b6108f4612299565b6108fc612419565b565b600080546001600160a01b031633146109475760405162461bcd60e51b81526020600482018190526024820152600080516020613ea983398151915260448201526064016106b5565b6001600160a01b03821661099d5760405162461bcd60e51b815260206004820152600f60248201527f706172746e65722d69732d7a65726f000000000000000000000000000000000060448201526064016106b5565b50600280546001600160a01b0319166001600160a01b03831617905560015b919050565b600054600160a01b900460ff1615610a0e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106b5565b333b15610a5d5760405162461bcd60e51b815260206004820152600960248201527f21636f6e7472616374000000000000000000000000000000000000000000000060448201526064016106b5565b6000610a676111a6565b9050600080610a74612529565b91509150610a81816127e9565b6000610a8b6111a6565b9050610a95612419565b604080518481526020810186905290810182905233907fe48bba143e2a0b557fa6f3234bd6ffc704518cc98c7de6a2385549fae27d1b759060600160405180910390a250505050565b6000546001600160a01b03163314610b265760405162461bcd60e51b81526020600482018190526024820152600080516020613ea983398151915260448201526064016106b5565b610b2e6128c4565b6108fc61294c565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108fc5760405162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b60448201526064016106b5565b600080546001600160a01b03163314610be05760405162461bcd60e51b81526020600482018190526024820152600080516020613ea983398151915260448201526064016106b5565b6002546001600160a01b0316610c385760405162461bcd60e51b815260206004820152600f60248201527f706172746e65722d6e6f742d736574000000000000000000000000000000000060448201526064016106b5565b6004829055600354610c4c83612710613c56565b610c569190613c56565b60058190556004546040517f71c11923856ca550fecf6bbe0185473dfb80d8513d8d5c6ad588f17daa176c2a92610c94928252602082015260400190565b60405180910390a1506001919050565b600080546001600160a01b03163314610ced5760405162461bcd60e51b81526020600482018190526024820152600080516020613ea983398151915260448201526064016106b5565b6101f4821115610d2e5760405162461bcd60e51b815260206004820152600c60248201526b0cccaca5ae8dede5ad0d2ced60a31b60448201526064016106b5565b60068290556040518281527f3790aeee57809af98fad1b89b9266c7934e03ed46702b541f2fef6f1e89d682790602001610c94565b6060610d6f60096129fa565b905090565b6000546001600160a01b03163314610dbc5760405162461bcd60e51b81526020600482018190526024820152600080516020613ea983398151915260448201526064016106b5565b6108fc6000612a07565b6000610d6f6111a6565b600080546001600160a01b03163314610e195760405162461bcd60e51b81526020600482018190526024820152600080516020613ea983398151915260448201526064016106b5565b6001600160a01b038216610e6f5760405162461bcd60e51b815260206004820152601060248201527f74726561737572792d69732d7a65726f0000000000000000000000000000000060448201526064016106b5565b50600180546001600160a01b0383166001600160a01b0319909116178155919050565b6000546001600160a01b03163314610eda5760405162461bcd60e51b81526020600482018190526024820152600080516020613ea983398151915260448201526064016106b5565b610ee26128c4565b6108fc612a57565b6040805180820190915260008152606060208201526040516bffffffffffffffffffffffff19606085811b8216602084015284901b16603482015260009060480160408051601f1981840301815291815281516020928301206000818152600b9093529120549091506001600160a01b0316610fa85760405162461bcd60e51b815260206004820152600e60248201527f706174682d6e6f742d666f756e6400000000000000000000000000000000000060448201526064016106b5565b6000818152600b60209081526040918290208251808401845281546001600160a01b031681526001820180548551818602810186019096528086529194929385810193929083018282801561102657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611008575b5050505050815250509150505b92915050565b600054600160a01b900460ff16156110865760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106b5565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108f45760405162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b60448201526064016106b5565b600080546001600160a01b031633146111305760405162461bcd60e51b81526020600482018190526024820152600080516020613ea983398151915260448201526064016106b5565b6101f48211156111715760405162461bcd60e51b815260206004820152600c60248201526b0cccaca5ae8dede5ad0d2ced60a31b60448201526064016106b5565b60078290556040518281527f2e59d502792bca3d730c472cd3acfbc16d0f9fe6ce0cddbdf0f80830251dfaca90602001610c94565b6040517f93f1a40b0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015230602482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906393f1a40b90604401604080518083038186803b15801561124857600080fd5b505afa15801561125c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112809190613cae565b506040516370a0823160e01b815230600482015290915081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b1580156112e557600080fd5b505afa1580156112f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131d9190613c27565b6113279190613cd2565b91505090565b6000546001600160a01b031633146113755760405162461bcd60e51b81526020600482018190526024820152600080516020613ea983398151915260448201526064016106b5565b6001600160a01b0381166113f15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016106b5565b6113fa81612a07565b50565b6000546001600160a01b031633146114455760405162461bcd60e51b81526020600482018190526024820152600080516020613ea983398151915260448201526064016106b5565b61145184848484612b5d565b50505050565b600080546001600160a01b031633146114a05760405162461bcd60e51b81526020600482018190526024820152600080516020613ea983398151915260448201526064016106b5565b60038290556004546114b483612710613c56565b6114be9190613c56565b60058190556003546040517f06a730aa61ec47f8cc95582be032daaf0ec4cb816c24b9c07b574ea41821048b92610c94928252602082015260400190565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461155d5760405162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b60448201526064016106b5565b611565610b2e565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156115c757600080fd5b505afa1580156115db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ff9190613c27565b90506113fa6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836121aa565b60085461166d906009906001600160a01b0316611779565b5061168d60097304068da6c83afcfa0e13ba15a6696662335d5b75611779565b506116b960097f0000000000000000000000000000000000000000000000000000000000000000611779565b506116e560097f0000000000000000000000000000000000000000000000000000000000000000611779565b5061170560097321be370d5312f44cb42ce377bc9b8a0cef1a4c83611779565b5061173160097f0000000000000000000000000000000000000000000000000000000000000000611779565b5061175d60097f0000000000000000000000000000000000000000000000000000000000000000611779565b506113fa600973fb98b335551a418cd0737375a2ea0ded62ea213b5b600061178e836001600160a01b038416612d1f565b9392505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167321be370d5312f44cb42ce377bc9b8a0cef1a4c8314156118ea576040805160028082526060820183526000926020830190803683370190505090507f00000000000000000000000000000000000000000000000000000000000000008160008151811061182f5761182f613cea565b60200260200101906001600160a01b031690816001600160a01b0316815250507321be370d5312f44cb42ce377bc9b8a0cef1a4c838160018151811061187757611877613cea565b60200260200101906001600160a01b031690816001600160a01b0316815250506118e47f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000600084612b5d565b50611aa5565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611aa55760408051600380825260808201909252600091602082016060803683370190505090507f00000000000000000000000000000000000000000000000000000000000000008160008151811061199a5761199a613cea565b60200260200101906001600160a01b031690816001600160a01b0316815250507321be370d5312f44cb42ce377bc9b8a0cef1a4c83816001815181106119e2576119e2613cea565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000000000000000000000000000000000000000000081600281518110611a3657611a36613cea565b60200260200101906001600160a01b031690816001600160a01b031681525050611aa37f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000600084612b5d565b505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167321be370d5312f44cb42ce377bc9b8a0cef1a4c831415611bfa576040805160028082526060820183526000926020830190803683370190505090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611b3f57611b3f613cea565b60200260200101906001600160a01b031690816001600160a01b0316815250507321be370d5312f44cb42ce377bc9b8a0cef1a4c8381600181518110611b8757611b87613cea565b60200260200101906001600160a01b031690816001600160a01b031681525050611bf47f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000600084612b5d565b50611db5565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611db55760408051600380825260808201909252600091602082016060803683370190505090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611caa57611caa613cea565b60200260200101906001600160a01b031690816001600160a01b0316815250507321be370d5312f44cb42ce377bc9b8a0cef1a4c8381600181518110611cf257611cf2613cea565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000000000000000000000000000000000000000000081600281518110611d4657611d46613cea565b60200260200101906001600160a01b031690816001600160a01b031681525050611db37f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000600084612b5d565b505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167321be370d5312f44cb42ce377bc9b8a0cef1a4c83146108fc576040805160028082526060820183526000926020830190803683370190505090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611e4e57611e4e613cea565b60200260200101906001600160a01b031690816001600160a01b0316815250507321be370d5312f44cb42ce377bc9b8a0cef1a4c8381600181518110611e9657611e96613cea565b60200260200101906001600160a01b031690816001600160a01b0316815250506113fa7f00000000000000000000000000000000000000000000000000000000000000007321be370d5312f44cb42ce377bc9b8a0cef1a4c83600084612b5d565b801580611f9957506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015611f5f57600080fd5b505afa158015611f73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f979190613c27565b155b61200b5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016106b5565b6040516001600160a01b0383166024820152604481018290526108979084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612d6e565b6001600160a01b0381166000908152600183016020526040812054151561178e565b60606120e58484600085612e53565b949350505050565b6040517f441a3e700000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063441a3e70906044015b600060405180830381600087803b15801561218f57600080fd5b505af11580156121a3573d6000803e3d6000fd5b5050505050565b6040516001600160a01b0383166024820152604481018290526108979084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401612050565b600054600160a01b900460ff1661224c5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016106b5565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6122ef6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000600019611ef7565b60085461232b906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116600019611ef7565b600854612366906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691166000611ef7565b6008546123a2906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116600019611ef7565b6008546123dd906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691166000611ef7565b6008546108fc906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116600019611ef7565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561247b57600080fd5b505afa15801561248f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b39190613c27565b604051631c57762b60e31b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401612175565b604051631c57762b60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201526000602482018190529081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890604401600060405180830381600087803b1580156125b657600080fd5b505af11580156125ca573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a082319060240160206040518083038186803b15801561263057600080fd5b505afa158015612644573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126689190613c27565b905080156127e4577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167321be370d5312f44cb42ce377bc9b8a0cef1a4c83146127ae5761270d7f00000000000000000000000000000000000000000000000000000000000000007321be370d5312f44cb42ce377bc9b8a0cef1a4c83612710600754856126fe9190613c6d565b6127089190613c8c565b612f9b565b6040516370a0823160e01b81523060048201529092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561276f57600080fd5b505afa158015612783573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127a79190613c27565b90506127d8565b612710600754826127bf9190613c6d565b6127c99190613c8c565b91506127d58282613c56565b90505b6127e1816131b3565b92505b509091565b6000612710600354836127fc9190613c6d565b6128069190613c8c565b905060006127106004548461281b9190613c6d565b6128259190613c8c565b90506128467321be370d5312f44cb42ce377bc9b8a0cef1a4c8333846121aa565b600154612887906001600160a01b0316826128618587613c56565b61286b9190613c56565b7321be370d5312f44cb42ce377bc9b8a0cef1a4c8391906121aa565b6002546001600160a01b03161561089757600254610897907321be370d5312f44cb42ce377bc9b8a0cef1a4c83906001600160a01b0316836121aa565b600054600160a01b900460ff16156129115760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106b5565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861227c3390565b6040517f5312ea8e0000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635312ea8e90602401600060405180830381600087803b1580156129e657600080fd5b505af1158015611451573d6000803e3d6000fd5b6060600061178e836137ae565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612aac6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006000611ef7565b600854612ae7906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691166000611ef7565b600854612b22906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691166000611ef7565b6008546108fc906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691166000611ef7565b836001600160a01b031681600081518110612b7a57612b7a613cea565b60200260200101516001600160a01b031614612bc75760405162461bcd60e51b815260206004820152600c60248201526b0d2dcecc2d8d2c85ae0c2e8d60a31b60448201526064016106b5565b826001600160a01b03168160018351612be09190613c56565b81518110612bf057612bf0613cea565b60200260200101516001600160a01b031614612c3d5760405162461bcd60e51b815260206004820152600c60248201526b0d2dcecc2d8d2c85ae0c2e8d60a31b60448201526064016106b5565b612c468161380a565b6040516bffffffffffffffffffffffff19606086811b8216602084015285901b16603482015260009060480160408051601f198184030181529190528051602090910120905060006001600160a01b03841615612ca35783612cb0565b6008546001600160a01b03165b9050612cbb816138a5565b6040805180820182526001600160a01b03838116825260208083018781526000878152600b835294909420835181546001600160a01b03191693169290921782559251805192939192612d149260018501920190613935565b505050505050505050565b6000818152600183016020526040812054612d6657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611033565b506000611033565b6000612dc3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120d69092919063ffffffff16565b8051909150156108975780806020019051810190612de19190613d00565b6108975760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106b5565b606082471015612ecb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106b5565b6001600160a01b0385163b612f225760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106b5565b600080866001600160a01b03168587604051612f3e9190613d4e565b60006040518083038185875af1925050503d8060008114612f7b576040519150601f19603f3d011682016040523d82523d6000602084013e612f80565b606091505b5091509150612f908282866138fc565b979650505050505050565b6000826001600160a01b0316846001600160a01b03161415612fbe57508061178e565b6000612fca8585610eea565b8051909150612fe5906001600160a01b038716906000611ef7565b8051612ffe906001600160a01b03871690600019611ef7565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a082319060240160206040518083038186803b15801561304057600080fd5b505afa158015613054573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130789190613c27565b825160208401516040517f38ed17390000000000000000000000000000000000000000000000000000000081529293506001600160a01b03909116916338ed1739916130cf91889160009130904290600401613d6a565b600060405180830381600087803b1580156130e957600080fd5b505af11580156130fd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131259190810190613da6565b506040516370a0823160e01b815230600482015281906001600160a01b038716906370a082319060240160206040518083038186803b15801561316757600080fd5b505afa15801561317b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061319f9190613c27565b6131a99190613c56565b9695505050505050565b6040516370a0823160e01b815230600482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561321757600080fd5b505afa15801561322b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324f9190613c27565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161415613301576132fb7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612708600287613c8c565b506134bd565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614156133ab576132fb7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612708600287613c8c565b6133fb7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612708600287613c8c565b506040516370a0823160e01b81523060048201526134bb907f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b038316906370a082319060240160206040518083038186803b15801561348357600080fd5b505afa158015613497573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127089190613c27565b505b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561351f57600080fd5b505afa158015613533573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135579190613c27565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b1580156135bc57600080fd5b505afa1580156135d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135f49190613c27565b6008546040517fe8e337000000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018690526064820184905260016084830181905260a48301523060c48301524260e483015292935091169063e8e337009061010401606060405180830381600087803b1580156136c757600080fd5b505af11580156136db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136ff9190613e2c565b50506040516370a0823160e01b81523060048201528491507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561376357600080fd5b505afa158015613777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061379b9190613c27565b6137a59190613c56565b95945050505050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156137fe57602002820191906000526020600020905b8154815260200190600101908083116137ea575b50505050509050919050565b60005b81518110156138a15761384382828151811061382b5761382b613cea565b602002602001015160096120b490919063ffffffff16565b61388f5760405162461bcd60e51b815260206004820152601560248201527f746f6b656e2d6e6f742d77686974656c6973746564000000000000000000000060448201526064016106b5565b8061389981613e5a565b91505061380d565b5050565b6138b06009826120b4565b6113fa5760405162461bcd60e51b815260206004820152601660248201527f726f757465722d6e6f742d77686974656c69737465640000000000000000000060448201526064016106b5565b6060831561390b57508161178e565b82511561391b5782518084602001fd5b8160405162461bcd60e51b81526004016106b59190613e75565b82805482825590600052602060002090810192821561398a579160200282015b8281111561398a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613955565b5061399692915061399a565b5090565b5b80821115613996576000815560010161399b565b6000602082840312156139c157600080fd5b5035919050565b80356001600160a01b03811681146109bc57600080fd5b6000602082840312156139f157600080fd5b61178e826139c8565b600081518084526020808501945080840160005b83811015613a335781516001600160a01b031687529582019590820190600101613a0e565b509495945050505050565b60208152600061178e60208301846139fa565b60008060408385031215613a6457600080fd5b613a6d836139c8565b9150613a7b602084016139c8565b90509250929050565b60006020808352606083016001600160a01b038086511683860152828601516040808701528281518085526080880191508583019450600092505b80831015613ae157845184168252938501936001929092019190850190613abf565b50979650505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613b2c57613b2c613aed565b604052919050565b600067ffffffffffffffff821115613b4e57613b4e613aed565b5060051b60200190565b60008060008060808587031215613b6e57600080fd5b613b77856139c8565b93506020613b868187016139c8565b9350613b94604087016139c8565b9250606086013567ffffffffffffffff811115613bb057600080fd5b8601601f81018813613bc157600080fd5b8035613bd4613bcf82613b34565b613b03565b81815260059190911b8201830190838101908a831115613bf357600080fd5b928401925b82841015613c1857613c09846139c8565b82529284019290840190613bf8565b979a9699509497505050505050565b600060208284031215613c3957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015613c6857613c68613c40565b500390565b6000816000190483118215151615613c8757613c87613c40565b500290565b600082613ca957634e487b7160e01b600052601260045260246000fd5b500490565b60008060408385031215613cc157600080fd5b505080516020909101519092909150565b60008219821115613ce557613ce5613c40565b500190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215613d1257600080fd5b8151801515811461178e57600080fd5b60005b83811015613d3d578181015183820152602001613d25565b838111156114515750506000910152565b60008251613d60818460208701613d22565b9190910192915050565b85815284602082015260a060408201526000613d8960a08301866139fa565b6001600160a01b0394909416606083015250608001529392505050565b60006020808385031215613db957600080fd5b825167ffffffffffffffff811115613dd057600080fd5b8301601f81018513613de157600080fd5b8051613def613bcf82613b34565b81815260059190911b82018301908381019087831115613e0e57600080fd5b928401925b82841015612f9057835182529284019290840190613e13565b600080600060608486031215613e4157600080fd5b8351925060208401519150604084015190509250925092565b6000600019821415613e6e57613e6e613c40565b5060010190565b6020815260008251806020840152613e94816040850160208701613d22565b601f01601f1916919091016040019291505056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220b7e4f88609939ab91da092587d0c5d3f4ce8783c7adbb35674f437259042d98b64736f6c63430008090033000000000000000000000000fb98b335551a418cd0737375a2ea0ded62ea213b0000000000000000000000004cdf39285d7ca8eb3f090fda0c069ba5f4145b3700000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83000000000000000000000000fca12a13ac324c09e9f43b5e5cfc9262f3ab32230000000000000000000000000000000000000000000000000000000000000003000000000000000000000000cc0a87f7e7c693042a9cc703661f5060c80acb430000000000000000000000004cdf39285d7ca8eb3f090fda0c069ba5f4145b370000000000000000000000006d0176c5ea1e44b08d3dd001b0784ce42f47a3a7000000000000000000000000103fe3f0105d355e6717ed51b69d1038c44eae130000000000000000000000008317b428082802c8aa84d670e495a0003d11368a

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

000000000000000000000000fca12a13ac324c09e9f43b5e5cfc9262f3ab32230000000000000000000000000000000000000000000000000000000000000003000000000000000000000000cc0a87f7e7c693042a9cc703661f5060c80acb430000000000000000000000004cdf39285d7ca8eb3f090fda0c069ba5f4145b370000000000000000000000006d0176c5ea1e44b08d3dd001b0784ce42f47a3a7000000000000000000000000103fe3f0105d355e6717ed51b69d1038c44eae130000000000000000000000008317b428082802c8aa84d670e495a0003d11368a

-----Decoded View---------------
Arg [0] : _want (address): 0xfca12a13ac324c09e9f43b5e5cfc9262f3ab3223
Arg [1] : _poolId (uint256): 3
Arg [2] : _masterchef (address): 0xcc0a87f7e7c693042a9cc703661f5060c80acb43
Arg [3] : _output (address): 0x4cdf39285d7ca8eb3f090fda0c069ba5f4145b37
Arg [4] : _uniRouter (address): 0x6d0176c5ea1e44b08d3dd001b0784ce42f47a3a7
Arg [5] : _vault (address): 0x103fe3f0105d355e6717ed51b69d1038c44eae13
Arg [6] : _treasury (address): 0x8317b428082802c8aa84d670e495a0003d11368a

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000fca12a13ac324c09e9f43b5e5cfc9262f3ab3223
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [2] : 000000000000000000000000cc0a87f7e7c693042a9cc703661f5060c80acb43
Arg [3] : 0000000000000000000000004cdf39285d7ca8eb3f090fda0c069ba5f4145b37
Arg [4] : 0000000000000000000000006d0176c5ea1e44b08d3dd001b0784ce42f47a3a7
Arg [5] : 000000000000000000000000103fe3f0105d355e6717ed51b69d1038c44eae13
Arg [6] : 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.