{
    "Function": "pullReward",
    "File": "contracts/managers/SherDistributionManager.sol",
    "Parent Contracts": [
        "contracts/managers/Manager.sol",
        "node_modules/@openzeppelin/contracts/security/Pausable.sol",
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol",
        "contracts/interfaces/managers/ISherDistributionManager.sol",
        "contracts/interfaces/managers/IManager.sol"
    ],
    "High-Level Calls": [
        "ISherlock",
        "SafeERC20"
    ],
    "Internal Calls": [
        "calcReward",
        "onlySherlockCore"
    ],
    "Library Calls": [
        "safeTransfer"
    ],
    "Low-Level Calls": [],
    "Code": "function pullReward(\n    uint256 _amount,\n    uint256 _period,\n    uint256 _id,\n    address _receiver\n  ) external override onlySherlockCore returns (uint256 _sher) {\n    // Uses calcReward() to get the SHER tokens owed to this stake\n    // Subtracts the amount from the total token balance to get the pre-stake USDC TVL\n    _sher = calcReward(sherlockCore.totalTokenBalanceStakers() - _amount, _amount, _period);\n    // Sends the SHER tokens to the core Sherlock contract where they are held until the unlock period for the stake expires\n    if (_sher != 0) sher.safeTransfer(msg.sender, _sher);\n  }"
}