{
    "Function": "notifyRewardAmount",
    "File": "contracts/BaseRewardPool.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "SafeMath",
        "SafeMath",
        "SafeMath",
        "SafeMath",
        "SafeMath",
        "SafeMath",
        "SafeMath"
    ],
    "Internal Calls": [
        "updateReward"
    ],
    "Library Calls": [
        "div",
        "add",
        "sub",
        "mul",
        "add",
        "add",
        "div"
    ],
    "Low-Level Calls": [],
    "Code": "function notifyRewardAmount(uint256 reward) internal updateReward(address(0)) {\n        historicalRewards = historicalRewards.add(reward);\n        if (block.timestamp >= periodFinish) {\n            rewardRate = reward.div(duration);\n        } else {\n            uint256 remaining = periodFinish.sub(block.timestamp);\n            uint256 leftover = remaining.mul(rewardRate);\n            reward = reward.add(leftover);\n            rewardRate = reward.div(duration);\n        }\n        currentRewards = reward;\n        lastUpdateTime = block.timestamp;\n        periodFinish = block.timestamp.add(duration);\n        emit RewardAdded(reward);\n    }"
}