{
    "Function": "getAtBlock",
    "File": "contracts/openzeppelin-solidity/contracts/utils/Checkpoints.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "Math"
    ],
    "Internal Calls": [
        "require(bool,string)"
    ],
    "Library Calls": [
        "average"
    ],
    "Low-Level Calls": [],
    "Code": "function getAtBlock(History storage self, uint256 blockNumber) internal view returns (uint256) {\n        require(blockNumber < block.number, \"Checkpoints: block not yet mined\");\n\n        uint256 high = self._checkpoints.length;\n        uint256 low = 0;\n        while (low < high) {\n            uint256 mid = Math.average(low, high);\n            if (self._checkpoints[mid]._blockNumber > blockNumber) {\n                high = mid;\n            } else {\n                low = mid + 1;\n            }\n        }\n        return high == 0 ? 0 : self._checkpoints[high - 1]._value;\n    }"
}