{
    "Function": "_decreaseFullLiquidityAndCollect",
    "File": "src/automators/Automator.sol",
    "Parent Contracts": [
        "lib/openzeppelin-contracts/contracts/access/Ownable.sol",
        "lib/openzeppelin-contracts/contracts/utils/Context.sol",
        "src/utils/Swapper.sol",
        "src/interfaces/IErrors.sol",
        "lib/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol"
    ],
    "High-Level Calls": [
        "INonfungiblePositionManager",
        "INonfungiblePositionManager"
    ],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _decreaseFullLiquidityAndCollect(\n        uint256 tokenId,\n        uint128 liquidity,\n        uint256 amountRemoveMin0,\n        uint256 amountRemoveMin1,\n        uint256 deadline\n    ) internal returns (uint256 amount0, uint256 amount1, uint256 feeAmount0, uint256 feeAmount1) {\n        if (liquidity > 0) {\n            // store in temporarely \"misnamed\" variables - see comment below\n            (feeAmount0, feeAmount1) = nonfungiblePositionManager.decreaseLiquidity(\n                INonfungiblePositionManager.DecreaseLiquidityParams(\n                    tokenId, liquidity, amountRemoveMin0, amountRemoveMin1, deadline\n                )\n            );\n        }\n        (amount0, amount1) = nonfungiblePositionManager.collect(\n            INonfungiblePositionManager.CollectParams(tokenId, address(this), type(uint128).max, type(uint128).max)\n        );\n\n        // fee amount is what was collected additionally to liquidity amount\n        feeAmount0 = amount0 - feeAmount0;\n        feeAmount1 = amount1 - feeAmount1;\n    }"
}