{
    "Function": "_checkpointsLookup",
    "File": "contracts/AuraLocker.sol",
    "Parent Contracts": [
        "contracts/Interfaces.sol",
        "node_modules/@openzeppelin/contracts-0.8/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts-0.8/utils/Context.sol",
        "node_modules/@openzeppelin/contracts-0.8/security/ReentrancyGuard.sol"
    ],
    "High-Level Calls": [
        "AuraMath"
    ],
    "Internal Calls": [],
    "Library Calls": [
        "average"
    ],
    "Low-Level Calls": [],
    "Code": "function _checkpointsLookup(DelegateeCheckpoint[] storage ckpts, uint256 epochStart)\n        private\n        view\n        returns (DelegateeCheckpoint memory)\n    {\n        uint256 high = ckpts.length;\n        uint256 low = 0;\n        while (low < high) {\n            uint256 mid = AuraMath.average(low, high);\n            if (ckpts[mid].epochStart > epochStart) {\n                high = mid;\n            } else {\n                low = mid + 1;\n            }\n        }\n\n        return high == 0 ? DelegateeCheckpoint(0, 0) : ckpts[high - 1];\n    }"
}