{
    "Function": "addActiveReward",
    "File": "contracts/RewardFactory.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "require(bool,string)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function addActiveReward(address _reward, uint256 _pid) external returns (bool) {\n        require(rewardAccess[msg.sender] == true, \"!auth\");\n        if (_reward == address(0)) {\n            return true;\n        }\n\n        uint256[] storage activeList = rewardActiveList[_reward];\n        uint256 pid = _pid + 1; //offset by 1 so that we can use 0 as empty\n\n        uint256 length = activeList.length;\n        for (uint256 i = 0; i < length; i++) {\n            if (activeList[i] == pid) return true;\n        }\n        activeList.push(pid);\n        return true;\n    }"
}