{
    "Function": "getIdFromPrice",
    "File": "src/libraries/BinHelper.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "Math128x128",
        "Math128x128"
    ],
    "Internal Calls": [
        "revert BinHelper__IdOverflows(int256)",
        "_getBPValue"
    ],
    "Library Calls": [
        "log2",
        "log2"
    ],
    "Low-Level Calls": [],
    "Code": "function getIdFromPrice(uint256 _price, uint256 _binStep) internal pure returns (uint24) {\n        unchecked {\n            uint256 _binStepValue = _getBPValue(_binStep);\n\n            // can't overflow as `2**23 + log2(price) < 2**23 + 2**128 < max(uint256)`\n            int256 _id = REAL_ID_SHIFT + _price.log2() / _binStepValue.log2();\n\n            if (_id < 0 || uint256(_id) > type(uint24).max) revert BinHelper__IdOverflows(_id);\n            return uint24(uint256(_id));\n        }\n    }"
}