[
  {
    "type": "constructor",
    "inputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "UPGRADE_INTERFACE_VERSION",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string",
        "internalType": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "calculatePositionIL",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "user",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "binIds",
        "type": "uint24[]",
        "internalType": "uint24[]"
      },
      {
        "name": "entryBinId",
        "type": "uint24",
        "internalType": "uint24"
      }
    ],
    "outputs": [
      {
        "name": "totalILPercentage",
        "type": "int256",
        "internalType": "int256"
      },
      {
        "name": "inRangePercentage",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "healthScore",
        "type": "uint8",
        "internalType": "uint8"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "getActiveBins",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "activeBinIds",
        "type": "uint24[]",
        "internalType": "uint24[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getActiveBinsWithReserves",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "binIds",
        "type": "uint24[]",
        "internalType": "uint24[]"
      },
      {
        "name": "reservesX",
        "type": "uint128[]",
        "internalType": "uint128[]"
      },
      {
        "name": "reservesY",
        "type": "uint128[]",
        "internalType": "uint128[]"
      },
      {
        "name": "totalShares",
        "type": "uint256[]",
        "internalType": "uint256[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getBinsInRange",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "startId",
        "type": "uint24",
        "internalType": "uint24"
      },
      {
        "name": "endId",
        "type": "uint24",
        "internalType": "uint24"
      }
    ],
    "outputs": [
      {
        "name": "binIds",
        "type": "uint24[]",
        "internalType": "uint24[]"
      },
      {
        "name": "reservesX",
        "type": "uint128[]",
        "internalType": "uint128[]"
      },
      {
        "name": "reservesY",
        "type": "uint128[]",
        "internalType": "uint128[]"
      },
      {
        "name": "totalShares",
        "type": "uint256[]",
        "internalType": "uint256[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getClaimableFeesForBins",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "user",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "binIds",
        "type": "uint24[]",
        "internalType": "uint24[]"
      }
    ],
    "outputs": [
      {
        "name": "claimableX",
        "type": "uint256[]",
        "internalType": "uint256[]"
      },
      {
        "name": "claimableY",
        "type": "uint256[]",
        "internalType": "uint256[]"
      },
      {
        "name": "totalX",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "totalY",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getCurrentFeeRate",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "totalFeeBps",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getDetailedSwapQuote",
    "inputs": [
      {
        "name": "factory",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "amountIn",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "path",
        "type": "address[]",
        "internalType": "address[]"
      },
      {
        "name": "binSteps",
        "type": "uint16[]",
        "internalType": "uint16[]"
      },
      {
        "name": "pools",
        "type": "address[]",
        "internalType": "address[]"
      }
    ],
    "outputs": [
      {
        "name": "amountOut",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "consumedAmountIn",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "feesPerHop",
        "type": "uint256[]",
        "internalType": "uint256[]"
      },
      {
        "name": "priceImpact",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "amountsPerHop",
        "type": "uint256[]",
        "internalType": "uint256[]"
      },
      {
        "name": "activeBinsPerPair",
        "type": "uint24[]",
        "internalType": "uint24[]"
      },
      {
        "name": "liquidityExhausted",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getLatestPrice",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "price",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getPairStatistics",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "activeId",
        "type": "uint24",
        "internalType": "uint24"
      },
      {
        "name": "totalReservesX",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "totalReservesY",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "protocolFeesX",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "protocolFeesY",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "volatility",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "lastUpdate",
        "type": "uint40",
        "internalType": "uint40"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getUserPositionSummary",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "user",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "binIds",
        "type": "uint24[]",
        "internalType": "uint24[]"
      }
    ],
    "outputs": [
      {
        "name": "totalValueX",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "totalValueY",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "totalLPTokens",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "binsWithLiquidity",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "hasActivePosition",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "initialize",
    "inputs": [
      {
        "name": "owner_",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "owner",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "proxiableUUID",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "quoteSwap",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "swapForY",
        "type": "bool",
        "internalType": "bool"
      },
      {
        "name": "amountIn",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "amountOut",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "consumedAmountIn",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "finalBinId",
        "type": "uint24",
        "internalType": "uint24"
      },
      {
        "name": "binsTraversed",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "totalFee",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "quoteSwapDetailed",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "swapForY",
        "type": "bool",
        "internalType": "bool"
      },
      {
        "name": "amountIn",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "amountOut",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "consumedAmountIn",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "finalBinId",
        "type": "uint24",
        "internalType": "uint24"
      },
      {
        "name": "binsTraversed",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "totalFee",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "capped",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "quoteSwapIn",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "swapForY",
        "type": "bool",
        "internalType": "bool"
      },
      {
        "name": "amountOut",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "amountIn",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "finalBinId",
        "type": "uint24",
        "internalType": "uint24"
      },
      {
        "name": "binsTraversed",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "totalFee",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "quoteSwapInDetailed",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "swapForY",
        "type": "bool",
        "internalType": "bool"
      },
      {
        "name": "amountOut",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "amountIn",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "finalBinId",
        "type": "uint24",
        "internalType": "uint24"
      },
      {
        "name": "binsTraversed",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "totalFee",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "capped",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "renounceOwnership",
    "inputs": [],
    "outputs": [],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "resolvePoolsExactIn",
    "inputs": [
      {
        "name": "factory",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "amountIn",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "path",
        "type": "address[]",
        "internalType": "address[]"
      },
      {
        "name": "binSteps",
        "type": "uint16[]",
        "internalType": "uint16[]"
      },
      {
        "name": "pools",
        "type": "address[]",
        "internalType": "address[]"
      }
    ],
    "outputs": [
      {
        "name": "resolvedPools",
        "type": "address[]",
        "internalType": "address[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "resolvePoolsExactOut",
    "inputs": [
      {
        "name": "factory",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "amountOut",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "path",
        "type": "address[]",
        "internalType": "address[]"
      },
      {
        "name": "binSteps",
        "type": "uint16[]",
        "internalType": "uint16[]"
      },
      {
        "name": "pools",
        "type": "address[]",
        "internalType": "address[]"
      }
    ],
    "outputs": [
      {
        "name": "resolvedPools",
        "type": "address[]",
        "internalType": "address[]"
      },
      {
        "name": "amountIn",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "transferOwnership",
    "inputs": [
      {
        "name": "newOwner",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "upgradeToAndCall",
    "inputs": [
      {
        "name": "newImplementation",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "data",
        "type": "bytes",
        "internalType": "bytes"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "event",
    "name": "Initialized",
    "inputs": [
      {
        "name": "version",
        "type": "uint64",
        "indexed": false,
        "internalType": "uint64"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "OwnershipTransferred",
    "inputs": [
      {
        "name": "previousOwner",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "newOwner",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Upgraded",
    "inputs": [
      {
        "name": "implementation",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "AddressEmptyCode",
    "inputs": [
      {
        "name": "target",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "BitMath__ZeroInput",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ERC1967InvalidImplementation",
    "inputs": [
      {
        "name": "implementation",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "ERC1967NonPayable",
    "inputs": []
  },
  {
    "type": "error",
    "name": "FailedCall",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidInitialization",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidRange",
    "inputs": []
  },
  {
    "type": "error",
    "name": "LBRouter__InvalidPath",
    "inputs": []
  },
  {
    "type": "error",
    "name": "LBRouter__InvalidPath",
    "inputs": []
  },
  {
    "type": "error",
    "name": "LBRouter__InvalidPool",
    "inputs": []
  },
  {
    "type": "error",
    "name": "LBRouter__NoQuotablePool",
    "inputs": []
  },
  {
    "type": "error",
    "name": "LBRouter__PairNotFound",
    "inputs": []
  },
  {
    "type": "error",
    "name": "LBRouter__PairNotFound",
    "inputs": []
  },
  {
    "type": "error",
    "name": "NotInitializing",
    "inputs": []
  },
  {
    "type": "error",
    "name": "OwnableInvalidOwner",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "OwnableUnauthorizedAccount",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "PositionHistoryUnavailable",
    "inputs": [
      {
        "name": "pair",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "user",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "binCount",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "entryBinId",
        "type": "uint24",
        "internalType": "uint24"
      }
    ]
  },
  {
    "type": "error",
    "name": "RenounceOwnershipDisabled",
    "inputs": []
  },
  {
    "type": "error",
    "name": "SwapCalculator__PriceNotRepresentable",
    "inputs": []
  },
  {
    "type": "error",
    "name": "UUPSUnauthorizedCallContext",
    "inputs": []
  },
  {
    "type": "error",
    "name": "UUPSUnsupportedProxiableUUID",
    "inputs": [
      {
        "name": "slot",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  }
]