{
    "Function": "getPastVotes",
    "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",
        "AuraMath"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "_checkpointsLookup"
    ],
    "Library Calls": [
        "mul",
        "div"
    ],
    "Low-Level Calls": [],
    "Code": "function getPastVotes(address account, uint256 timestamp) public view returns (uint256 votes) {\n        require(timestamp <= block.timestamp, \"ERC20Votes: block not yet mined\");\n        uint256 epoch = timestamp.div(rewardsDuration).mul(rewardsDuration);\n        DelegateeCheckpoint memory ckpt = _checkpointsLookup(_checkpointedVotes[account], epoch);\n        votes = ckpt.votes;\n        if (votes == 0 || ckpt.epochStart + lockDuration <= epoch) {\n            return 0;\n        }\n        while (epoch > ckpt.epochStart) {\n            votes -= delegateeUnlocks[account][epoch];\n            epoch -= rewardsDuration;\n        }\n    }"
}