creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/connectors/UniswapV3PoolRegistry.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport \"../ConnectorRegistry.sol\";\nimport \"./UniswapV3Connector.sol\";\n\nimport \"../interfaces/external/uniswap/IUniswapV3Pool.sol\";\nimport \"../interfaces/external/uniswap/IUniswapV3Factory.sol\";\n\ncontract UniswapV3PoolRegistry is ICustomConnectorRegistry {\n    IUniswapV3Factory public immutable factory;\n    UniswapV3Connector public immutable connector;\n\n    constructor(IUniswapV3Factory factory_, UniswapV3Connector connector_) {\n        factory = factory_;\n        connector = connector_;\n    }\n\n    function connectorOf(address target)\n        external\n        view\n        override\n        returns (address)\n    {\n        IUniswapV3Pool pool = IUniswapV3Pool(target);\n\n        try pool.token0() returns (address token0) {\n            try pool.token1() returns (address token1) {\n                try pool.fee() returns (uint24 fee) {\n                    if (factory.getPool(token0, token1, fee) == target) {\n                        return address(connector);\n                    }\n                } catch {\n                    return address(0);\n                }\n            } catch {\n                return address(0);\n            }\n        } catch {\n            return address(0);\n        }\n\n        return address(0);\n    }\n}\n"
      },
      "contracts/ConnectorRegistry.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport \"./base/Admin.sol\";\n\nerror ConnectorNotRegistered(address target);\n\ninterface ICustomConnectorRegistry {\n    function connectorOf(address target) external view returns (address);\n}\n\ncontract ConnectorRegistry is Admin {\n    event ConnectorChanged(address target, address connector);\n    event CustomRegistryAdded(address registry);\n    event CustomRegistryRemoved(address registry);\n\n    ICustomConnectorRegistry[] public customRegistries;\n\n    mapping(address target => address connector) private connectors_;\n\n    constructor(address admin_) Admin(admin_) { }\n\n    function setConnectors(\n        address[] calldata targets,\n        address[] calldata connectors\n    ) external onlyAdmin {\n        for (uint256 i; i != targets.length;) {\n            connectors_[targets[i]] = connectors[i];\n            emit ConnectorChanged(targets[i], connectors[i]);\n\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    function isCustomRegistry(address target) external view returns (bool) {\n        for (uint256 i; i != customRegistries.length;) {\n            if (address(customRegistries[i]) == target) {\n                return true;\n            }\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        return false;\n    }\n\n    function addCustomRegistry(ICustomConnectorRegistry registry)\n        external\n        onlyAdmin\n    {\n        customRegistries.push(registry);\n        emit CustomRegistryAdded(address(registry));\n    }\n\n    function removeCustomRegistry(uint256 index) external onlyAdmin {\n        address registry = address(customRegistries[index]);\n        delete customRegistries[index];\n        emit CustomRegistryRemoved(registry);\n    }\n\n    function connectorOf(address target) external view returns (address) {\n        address connector = connectors_[target];\n        if (connector != address(0)) {\n            return connector;\n        }\n\n        for (uint256 i; i != customRegistries.length;) {\n            try customRegistries[i].connectorOf(target) returns (\n                address _connector\n            ) {\n                if (_connector != address(0)) {\n                    return _connector;\n                }\n            } catch {\n                // Ignore\n            }\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        revert ConnectorNotRegistered(target);\n    }\n\n    function hasConnector(address target) external view returns (bool) {\n        if (connectors_[target] != address(0)) {\n            return true;\n        }\n\n        for (uint256 i; i != customRegistries.length;) {\n            try customRegistries[i].connectorOf(target) returns (\n                address _connector\n            ) {\n                if (_connector != address(0)) {\n                    return true;\n                }\n            } catch {\n                // Ignore\n            }\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        return false;\n    }\n}\n"
      },
      "contracts/connectors/UniswapV3Connector.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"../interfaces/ILiquidityConnector.sol\";\nimport \"../interfaces/external/uniswap/INonfungiblePositionManager.sol\";\nimport \"../interfaces/external/uniswap/ISwapRouter.sol\";\n\nstruct UniswapV3AddLiquidityExtraData {\n    int24 tickLower;\n    int24 tickUpper;\n    uint24 fee;\n}\n\nstruct UniswapV3RemoveLiquidityExtraData {\n    uint256 tokenId;\n    uint128 amount0Max;\n    uint128 amount1Max;\n}\n\nstruct UniswapV3SwapExtraData {\n    address pool;\n    bytes path;\n}\n\ncontract UniswapV3Connector is ILiquidityConnector {\n    constructor() { }\n\n    function addLiquidity(AddLiquidityData memory addLiquidityData)\n        external\n        payable\n        override\n    {\n        UniswapV3AddLiquidityExtraData memory extra = abi.decode(\n            addLiquidityData.extraData, (UniswapV3AddLiquidityExtraData)\n        );\n\n        IERC20(addLiquidityData.tokens[0]).approve(\n            address(addLiquidityData.router), addLiquidityData.desiredAmounts[0]\n        );\n\n        IERC20(addLiquidityData.tokens[1]).approve(\n            address(addLiquidityData.router), addLiquidityData.desiredAmounts[1]\n        );\n\n        INonfungiblePositionManager.MintParams memory params =\n        INonfungiblePositionManager.MintParams({\n            token0: addLiquidityData.tokens[0],\n            token1: addLiquidityData.tokens[1],\n            fee: extra.fee,\n            tickLower: extra.tickLower,\n            tickUpper: extra.tickUpper,\n            amount0Desired: addLiquidityData.desiredAmounts[0],\n            amount1Desired: addLiquidityData.desiredAmounts[1],\n            amount0Min: addLiquidityData.minAmounts[0],\n            amount1Min: addLiquidityData.minAmounts[1],\n            recipient: address(this),\n            deadline: block.timestamp + 1\n        });\n\n        //(uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1)\n        // =\n        INonfungiblePositionManager(addLiquidityData.router).mint(params);\n    }\n\n    function removeLiquidity(RemoveLiquidityData memory removeLiquidityData)\n        external\n        override\n    {\n        UniswapV3RemoveLiquidityExtraData memory extra = abi.decode(\n            removeLiquidityData.extraData, (UniswapV3RemoveLiquidityExtraData)\n        );\n\n        (,,,,,,, uint128 liquidity,,,,) = INonfungiblePositionManager(\n            removeLiquidityData.router\n        ).positions(extra.tokenId);\n        INonfungiblePositionManager.DecreaseLiquidityParams memory params =\n        INonfungiblePositionManager.DecreaseLiquidityParams({\n            tokenId: extra.tokenId,\n            liquidity: liquidity,\n            amount0Min: removeLiquidityData.minAmountsOut[0],\n            amount1Min: removeLiquidityData.minAmountsOut[1],\n            deadline: block.timestamp + 1\n        });\n\n        INonfungiblePositionManager(removeLiquidityData.router)\n            .decreaseLiquidity(params);\n\n        INonfungiblePositionManager(removeLiquidityData.router).collect(\n            INonfungiblePositionManager.CollectParams({\n                tokenId: extra.tokenId,\n                recipient: address(this),\n                amount0Max: extra.amount0Max,\n                amount1Max: extra.amount1Max\n            })\n        );\n\n        INonfungiblePositionManager(removeLiquidityData.router).burn(\n            extra.tokenId\n        );\n    }\n\n    function swapExactTokensForTokens(SwapData memory swapData)\n        external\n        payable\n        override\n    {\n        UniswapV3SwapExtraData memory extraData =\n            abi.decode(swapData.extraData, (UniswapV3SwapExtraData));\n\n        IERC20(swapData.tokenIn).approve(\n            address(extraData.pool), swapData.amountIn\n        );\n\n        ISwapRouter.ExactInputParams memory params = ISwapRouter\n            .ExactInputParams({\n            path: extraData.path,\n            recipient: address(this),\n            deadline: block.timestamp + 1,\n            amountIn: swapData.amountIn,\n            amountOutMinimum: swapData.minAmountOut\n        });\n\n        ISwapRouter(swapData.router).exactInput(params);\n    }\n}\n"
      },
      "contracts/interfaces/external/uniswap/IUniswapV3Pool.sol": {
        "content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title Pool state that never changes\n/// @notice These parameters are fixed for a pool forever, i.e., the methods\n/// will always return the same values\ninterface IUniswapV3PoolImmutables {\n    /// @notice The contract that deployed the pool, which must adhere to the\n    /// IUniswapV3Factory interface\n    /// @return The contract address\n    function factory() external view returns (address);\n\n    /// @notice The first of the two tokens of the pool, sorted by address\n    /// @return The token contract address\n    function token0() external view returns (address);\n\n    /// @notice The second of the two tokens of the pool, sorted by address\n    /// @return The token contract address\n    function token1() external view returns (address);\n\n    /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6\n    /// @return The fee\n    function fee() external view returns (uint24);\n\n    /// @notice The pool tick spacing\n    /// @dev Ticks can only be used at multiples of this value, minimum of 1 and\n    /// always positive\n    /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick,\n    /// i.e., ..., -6, -3, 0, 3, 6, ...\n    /// This value is an int24 to avoid casting even though it is always\n    /// positive.\n    /// @return The tick spacing\n    function tickSpacing() external view returns (int24);\n\n    /// @notice The maximum amount of position liquidity that can use any tick\n    /// in the range\n    /// @dev This parameter is enforced per tick to prevent liquidity from\n    /// overflowing a uint128 at any point, and\n    /// also prevents out-of-range liquidity from being used to prevent adding\n    /// in-range liquidity to a pool\n    /// @return The max amount of liquidity per tick\n    function maxLiquidityPerTick() external view returns (uint128);\n}\n\n/// @title Pool state that can change\n/// @notice These methods compose the pool's state, and can change with any\n/// frequency including multiple times\n/// per transaction\ninterface IUniswapV3PoolState {\n    /// @notice The 0th storage slot in the pool stores many values, and is\n    /// exposed as a single method to save gas\n    /// when accessed externally.\n    /// @return sqrtPriceX96 The current price of the pool as a\n    /// sqrt(token1/token0) Q64.96 value\n    /// @return tick The current tick of the pool, i.e. according to the last\n    /// tick transition that was run.\n    /// This value may not always be equal to\n    /// SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick\n    /// boundary.\n    /// @return observationIndex The index of the last oracle observation that\n    /// was written,\n    /// @return observationCardinality The current maximum number of\n    /// observations stored in the pool,\n    /// @return observationCardinalityNext The next maximum number of\n    /// observations, to be updated when the observation.\n    /// @return feeProtocol The protocol fee for both tokens of the pool.\n    /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted\n    /// 4 bits and the protocol fee of token0\n    /// is the lower 4 bits. Used as the denominator of a fraction of the swap\n    /// fee, e.g. 4 means 1/4th of the swap fee.\n    /// unlocked Whether the pool is currently locked to reentrancy\n    function slot0()\n        external\n        view\n        returns (\n            uint160 sqrtPriceX96,\n            int24 tick,\n            uint16 observationIndex,\n            uint16 observationCardinality,\n            uint16 observationCardinalityNext,\n            uint8 feeProtocol,\n            bool unlocked\n        );\n\n    /// @notice The fee growth as a Q128.128 fees of token0 collected per unit\n    /// of liquidity for the entire life of the pool\n    /// @dev This value can overflow the uint256\n    function feeGrowthGlobal0X128() external view returns (uint256);\n\n    /// @notice The fee growth as a Q128.128 fees of token1 collected per unit\n    /// of liquidity for the entire life of the pool\n    /// @dev This value can overflow the uint256\n    function feeGrowthGlobal1X128() external view returns (uint256);\n\n    /// @notice The amounts of token0 and token1 that are owed to the protocol\n    /// @dev Protocol fees will never exceed uint128 max in either token\n    function protocolFees()\n        external\n        view\n        returns (uint128 token0, uint128 token1);\n\n    /// @notice The currently in range liquidity available to the pool\n    /// @dev This value has no relationship to the total liquidity across all\n    /// ticks\n    /// @return The liquidity at the current price of the pool\n    function liquidity() external view returns (uint128);\n\n    /// @notice Look up information about a specific tick in the pool\n    /// @param tick The tick to look up\n    /// @return liquidityGross the total amount of position liquidity that uses\n    /// the pool either as tick lower or\n    /// tick upper\n    /// @return liquidityNet how much liquidity changes when the pool price\n    /// crosses the tick,\n    /// @return feeGrowthOutside0X128 the fee growth on the other side of the\n    /// tick from the current tick in token0,\n    /// @return feeGrowthOutside1X128 the fee growth on the other side of the\n    /// tick from the current tick in token1,\n    /// @return tickCumulativeOutside the cumulative tick value on the other\n    /// side of the tick from the current tick\n    /// @return secondsPerLiquidityOutsideX128 the seconds spent per liquidity\n    /// on the other side of the tick from the current tick,\n    /// @return secondsOutside the seconds spent on the other side of the tick\n    /// from the current tick,\n    /// @return initialized Set to true if the tick is initialized, i.e.\n    /// liquidityGross is greater than 0, otherwise equal to false.\n    /// Outside values can only be used if the tick is initialized, i.e. if\n    /// liquidityGross is greater than 0.\n    /// In addition, these values are only relative and must be used only in\n    /// comparison to previous snapshots for\n    /// a specific position.\n    function ticks(int24 tick)\n        external\n        view\n        returns (\n            uint128 liquidityGross,\n            int128 liquidityNet,\n            uint256 feeGrowthOutside0X128,\n            uint256 feeGrowthOutside1X128,\n            int56 tickCumulativeOutside,\n            uint160 secondsPerLiquidityOutsideX128,\n            uint32 secondsOutside,\n            bool initialized\n        );\n\n    /// @notice Returns 256 packed tick initialized boolean values. See\n    /// TickBitmap for more information\n    function tickBitmap(int16 wordPosition) external view returns (uint256);\n\n    /// @notice Returns the information about a position by the position's key\n    /// @param key The position's key is a hash of a preimage composed by the\n    /// owner, tickLower and tickUpper\n    /// @return liquidity The amount of liquidity in the position,\n    /// @return feeGrowthInside0LastX128 fee growth of token0 inside the tick\n    /// range as of the last mint/burn/poke,\n    /// @return feeGrowthInside1LastX128 fee growth of token1 inside the tick\n    /// range as of the last mint/burn/poke,\n    /// @return tokensOwed0 the computed amount of token0 owed to the position\n    /// as of the last mint/burn/poke,\n    /// @return tokensOwed1 the computed amount of token1 owed to the position\n    /// as of the last mint/burn/poke\n    function positions(bytes32 key)\n        external\n        view\n        returns (\n            uint128 liquidity,\n            uint256 feeGrowthInside0LastX128,\n            uint256 feeGrowthInside1LastX128,\n            uint128 tokensOwed0,\n            uint128 tokensOwed1\n        );\n\n    /// @notice Returns data about a specific observation index\n    /// @param index The element of the observations array to fetch\n    /// @dev You most likely want to use #observe() instead of this method to\n    /// get an observation as of some amount of time\n    /// ago, rather than at a specific index in the array.\n    /// @return blockTimestamp The timestamp of the observation,\n    /// @return tickCumulative the tick multiplied by seconds elapsed for the\n    /// life of the pool as of the observation timestamp,\n    /// @return secondsPerLiquidityCumulativeX128 the seconds per in range\n    /// liquidity for the life of the pool as of the observation timestamp,\n    /// @return initialized whether the observation has been initialized and the\n    /// values are safe to use\n    function observations(uint256 index)\n        external\n        view\n        returns (\n            uint32 blockTimestamp,\n            int56 tickCumulative,\n            uint160 secondsPerLiquidityCumulativeX128,\n            bool initialized\n        );\n}\n\ninterface IUniswapV3Pool is IUniswapV3PoolImmutables, IUniswapV3PoolState {\n    function flash(\n        address recipient,\n        uint256 amount0,\n        uint256 amount1,\n        bytes calldata data\n    ) external;\n}\n"
      },
      "contracts/interfaces/external/uniswap/IUniswapV3Factory.sol": {
        "content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title The interface for the Uniswap V3 Factory\n/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and\n/// control over the protocol fees\ninterface IUniswapV3Factory {\n    /// @notice Emitted when the owner of the factory is changed\n    /// @param oldOwner The owner before the owner was changed\n    /// @param newOwner The owner after the owner was changed\n    event OwnerChanged(address indexed oldOwner, address indexed newOwner);\n\n    /// @notice Emitted when a pool is created\n    /// @param token0 The first token of the pool by address sort order\n    /// @param token1 The second token of the pool by address sort order\n    /// @param fee The fee collected upon every swap in the pool, denominated in\n    /// hundredths of a bip\n    /// @param tickSpacing The minimum number of ticks between initialized ticks\n    /// @param pool The address of the created pool\n    event PoolCreated(\n        address indexed token0,\n        address indexed token1,\n        uint24 indexed fee,\n        int24 tickSpacing,\n        address pool\n    );\n\n    /// @notice Emitted when a new fee amount is enabled for pool creation via\n    /// the factory\n    /// @param fee The enabled fee, denominated in hundredths of a bip\n    /// @param tickSpacing The minimum number of ticks between initialized ticks\n    /// for pools created with the given fee\n    event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);\n\n    /// @notice Returns the current owner of the factory\n    /// @dev Can be changed by the current owner via setOwner\n    /// @return The address of the factory owner\n    function owner() external view returns (address);\n\n    /// @notice Returns the tick spacing for a given fee amount, if enabled, or\n    /// 0 if not enabled\n    /// @dev A fee amount can never be removed, so this value should be hard\n    /// coded or cached in the calling context\n    /// @param fee The enabled fee, denominated in hundredths of a bip. Returns\n    /// 0 in case of unenabled fee\n    /// @return The tick spacing\n    function feeAmountTickSpacing(uint24 fee) external view returns (int24);\n\n    /// @notice Returns the pool address for a given pair of tokens and a fee,\n    /// or address 0 if it does not exist\n    /// @dev tokenA and tokenB may be passed in either token0/token1 or\n    /// token1/token0 order\n    /// @param tokenA The contract address of either token0 or token1\n    /// @param tokenB The contract address of the other token\n    /// @param fee The fee collected upon every swap in the pool, denominated in\n    /// hundredths of a bip\n    /// @return pool The pool address\n    function getPool(\n        address tokenA,\n        address tokenB,\n        uint24 fee\n    ) external view returns (address pool);\n\n    /// @notice Creates a pool for the given two tokens and fee\n    /// @param tokenA One of the two tokens in the desired pool\n    /// @param tokenB The other of the two tokens in the desired pool\n    /// @param fee The desired fee for the pool\n    /// @dev tokenA and tokenB may be passed in either order: token0/token1 or\n    /// token1/token0. tickSpacing is retrieved\n    /// from the fee. The call will revert if the pool already exists, the fee\n    /// is invalid, or the token arguments\n    /// are invalid.\n    /// @return pool The address of the newly created pool\n    function createPool(\n        address tokenA,\n        address tokenB,\n        uint24 fee\n    ) external returns (address pool);\n\n    /// @notice Updates the owner of the factory\n    /// @dev Must be called by the current owner\n    /// @param _owner The new owner of the factory\n    function setOwner(address _owner) external;\n\n    /// @notice Enables a fee amount with the given tickSpacing\n    /// @dev Fee amounts may never be removed once enabled\n    /// @param fee The fee amount to enable, denominated in hundredths of a bip\n    /// (i.e. 1e-6)\n    /// @param tickSpacing The spacing between ticks to be enforced for all\n    /// pools created with the given fee amount\n    function enableFeeAmount(uint24 fee, int24 tickSpacing) external;\n}\n"
      },
      "contracts/base/Admin.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\n/// @title Admin contract\n/// @author vfat.tools\n/// @notice Provides an administration mechanism allowing restricted functions\nabstract contract Admin {\n    /// ERRORS ///\n\n    /// @notice Thrown when the caller is not the admin\n    error NotAdminError(); //0xb5c42b3b\n\n    /// EVENTS ///\n\n    /// @notice Emitted when a new admin is set\n    /// @param oldAdmin Address of the old admin\n    /// @param newAdmin Address of the new admin\n    event AdminSet(address oldAdmin, address newAdmin);\n\n    /// STORAGE ///\n\n    /// @notice Address of the current admin\n    address public admin;\n\n    /// MODIFIERS ///\n\n    /// @dev Restricts a function to the admin\n    modifier onlyAdmin() {\n        if (msg.sender != admin) revert NotAdminError();\n        _;\n    }\n\n    /// WRITE FUNCTIONS ///\n\n    /// @param admin_ Address of the admin\n    constructor(address admin_) {\n        emit AdminSet(admin, admin_);\n        admin = admin_;\n    }\n\n    /// @notice Sets a new admin\n    /// @dev Can only be called by the current admin\n    /// @param newAdmin Address of the new admin\n    function setAdmin(address newAdmin) external onlyAdmin {\n        emit AdminSet(admin, newAdmin);\n        admin = newAdmin;\n    }\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `from` to `to` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) external returns (bool);\n}\n"
      },
      "contracts/interfaces/ILiquidityConnector.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nstruct AddLiquidityData {\n    address router;\n    address lpToken;\n    address[] tokens;\n    uint256[] desiredAmounts;\n    uint256[] minAmounts;\n    bytes extraData;\n}\n\nstruct RemoveLiquidityData {\n    address router;\n    address lpToken;\n    address[] tokens;\n    uint256 lpAmountIn;\n    uint256[] minAmountsOut;\n    bytes extraData;\n}\n\nstruct SwapData {\n    address router;\n    uint256 amountIn;\n    uint256 minAmountOut;\n    address tokenIn;\n    bytes extraData;\n}\n\ninterface ILiquidityConnector {\n    function addLiquidity(AddLiquidityData memory addLiquidityData)\n        external\n        payable;\n\n    function removeLiquidity(RemoveLiquidityData memory removeLiquidityData)\n        external;\n\n    function swapExactTokensForTokens(SwapData memory swapData)\n        external\n        payable;\n}\n"
      },
      "contracts/interfaces/external/uniswap/INonfungiblePositionManager.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface INonfungiblePositionManager {\n    struct IncreaseLiquidityParams {\n        uint256 tokenId;\n        uint256 amount0Desired;\n        uint256 amount1Desired;\n        uint256 amount0Min;\n        uint256 amount1Min;\n        uint256 deadline;\n    }\n\n    struct MintParams {\n        address token0;\n        address token1;\n        uint24 fee;\n        int24 tickLower;\n        int24 tickUpper;\n        uint256 amount0Desired;\n        uint256 amount1Desired;\n        uint256 amount0Min;\n        uint256 amount1Min;\n        address recipient;\n        uint256 deadline;\n    }\n\n    struct DecreaseLiquidityParams {\n        uint256 tokenId;\n        uint128 liquidity;\n        uint256 amount0Min;\n        uint256 amount1Min;\n        uint256 deadline;\n    }\n\n    struct CollectParams {\n        uint256 tokenId;\n        address recipient;\n        uint128 amount0Max;\n        uint128 amount1Max;\n    }\n\n    function increaseLiquidity(IncreaseLiquidityParams memory params)\n        external\n        payable\n        returns (uint256 amount0, uint256 amount1, uint256 liquidity);\n\n    function decreaseLiquidity(DecreaseLiquidityParams calldata params)\n        external\n        payable\n        returns (uint256 amount0, uint256 amount1);\n\n    function mint(MintParams memory params)\n        external\n        payable\n        returns (uint256 tokenId, uint256 amount0, uint256 amount1);\n\n    function collect(CollectParams calldata params)\n        external\n        payable\n        returns (uint256 amount0, uint256 amount1);\n\n    function burn(uint256 tokenId) external payable;\n\n    function positions(uint256 tokenId)\n        external\n        view\n        returns (\n            uint96 nonce,\n            address operator,\n            address token0,\n            address token1,\n            uint24 fee,\n            int24 tickLower,\n            int24 tickUpper,\n            uint128 liquidity,\n            uint256 feeGrowthInside0LastX128,\n            uint256 feeGrowthInside1LastX128,\n            uint128 tokensOwed0,\n            uint128 tokensOwed1\n        );\n}\n"
      },
      "contracts/interfaces/external/uniswap/ISwapRouter.sol": {
        "content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.7.5;\n\n/// @title Router token swapping functionality\n/// @notice Functions for swapping tokens via Uniswap V3\ninterface ISwapRouter {\n    struct ExactInputSingleParams {\n        address tokenIn;\n        address tokenOut;\n        uint24 fee;\n        address recipient;\n        uint256 deadline;\n        uint256 amountIn;\n        uint256 amountOutMinimum;\n        uint160 sqrtPriceLimitX96;\n    }\n\n    /// @notice Swaps `amountIn` of one token for as much as possible of another\n    /// token\n    /// @param params The parameters necessary for the swap, encoded as\n    /// `ExactInputSingleParams` in calldata\n    /// @return amountOut The amount of the received token\n    function exactInputSingle(ExactInputSingleParams calldata params)\n        external\n        payable\n        returns (uint256 amountOut);\n\n    struct ExactInputParams {\n        bytes path;\n        address recipient;\n        uint256 deadline;\n        uint256 amountIn;\n        uint256 amountOutMinimum;\n    }\n\n    /// @notice Swaps `amountIn` of one token for as much as possible of another\n    /// along the specified path\n    /// @param params The parameters necessary for the multi-hop swap, encoded\n    /// as `ExactInputParams` in calldata\n    /// @return amountOut The amount of the received token\n    function exactInput(ExactInputParams calldata params)\n        external\n        payable\n        returns (uint256 amountOut);\n\n    struct ExactOutputSingleParams {\n        address tokenIn;\n        address tokenOut;\n        uint24 fee;\n        address recipient;\n        uint256 deadline;\n        uint256 amountOut;\n        uint256 amountInMaximum;\n        uint160 sqrtPriceLimitX96;\n    }\n\n    /// @notice Swaps as little as possible of one token for `amountOut` of\n    /// another token\n    /// @param params The parameters necessary for the swap, encoded as\n    /// `ExactOutputSingleParams` in calldata\n    /// @return amountIn The amount of the input token\n    function exactOutputSingle(ExactOutputSingleParams calldata params)\n        external\n        payable\n        returns (uint256 amountIn);\n\n    struct ExactOutputParams {\n        bytes path;\n        address recipient;\n        uint256 deadline;\n        uint256 amountOut;\n        uint256 amountInMaximum;\n    }\n\n    /// @notice Swaps as little as possible of one token for `amountOut` of\n    /// another along the specified path (reversed)\n    /// @param params The parameters necessary for the multi-hop swap, encoded\n    /// as `ExactOutputParams` in calldata\n    /// @return amountIn The amount of the input token\n    function exactOutput(ExactOutputParams calldata params)\n        external\n        payable\n        returns (uint256 amountIn);\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "solmate/=lib/solmate/src/",
        "@openzeppelin/=lib/openzeppelin-contracts/",
        "@uniswap/v3-periphery/=lib/v3-periphery/",
        "@uniswap/v3-core/=lib/v3-core/",
        "ds-test/=lib/forge-std/lib/ds-test/src/",
        "forge-std/=lib/forge-std/src/",
        "openzeppelin-contracts/=lib/openzeppelin-contracts/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs",
        "appendCBOR": true
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "paris",
      "viaIR": false,
      "libraries": {}
    }
  }}