{
    "Function": "_checkpointEpoch",
    "File": "contracts/VE3DLocker.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol",
        "node_modules/@openzeppelin/contracts/security/ReentrancyGuard.sol"
    ],
    "High-Level Calls": [
        "BoringMath",
        "BoringMath",
        "BoringMath",
        "BoringMath"
    ],
    "Internal Calls": [],
    "Library Calls": [
        "mul",
        "div",
        "add",
        "add"
    ],
    "Low-Level Calls": [],
    "Code": "function _checkpointEpoch() internal {\n        //create new epoch in the future where new non-active locks will lock to\n        uint256 nextEpoch = block.timestamp.div(rewardsDuration).mul(rewardsDuration).add(\n            rewardsDuration\n        );\n        uint256 epochindex = epochs.length;\n\n        //first epoch add in constructor, no need to check 0 length\n\n        //check to add\n        if (epochs[epochindex - 1].date < nextEpoch) {\n            //fill any epoch gaps\n            while (epochs[epochs.length - 1].date != nextEpoch) {\n                uint256 nextEpochDate = uint256(epochs[epochs.length - 1].date).add(\n                    rewardsDuration\n                );\n                epochs.push(Epoch({supply: 0, date: uint32(nextEpochDate)}));\n            }\n        }\n    }"
}