{
    "Function": "addRewardToEpoch",
    "File": "contracts/ExtraRewardsDistributor.sol",
    "Parent Contracts": [
        "contracts/Interfaces.sol",
        "node_modules/@openzeppelin/contracts-0.8/security/ReentrancyGuard.sol"
    ],
    "High-Level Calls": [
        "IAuraLocker",
        "IAuraLocker"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "require(bool,string)",
        "_addReward",
        "_addReward"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function addRewardToEpoch(\n        address _token,\n        uint256 _amount,\n        uint256 _epoch\n    ) external {\n        auraLocker.checkpointEpoch();\n\n        uint256 latestEpoch = auraLocker.epochCount() - 1;\n        require(_epoch <= latestEpoch, \"Cannot assign to the future\");\n\n        if (_epoch == latestEpoch) {\n            _addReward(_token, _amount, latestEpoch);\n        } else {\n            uint256 len = rewardEpochs[_token].length;\n            require(len == 0 || rewardEpochs[_token][len - 1] < _epoch, \"Cannot backdate to this epoch\");\n\n            _addReward(_token, _amount, _epoch);\n        }\n    }"
}