{
    "Function": "claimOwnerIncentives",
    "File": "tokenomics/contracts/Dispenser.sol",
    "Parent Contracts": [
        "tokenomics/contracts/interfaces/IErrorsTokenomics.sol"
    ],
    "High-Level Calls": [
        "ITokenomics",
        "ITreasury"
    ],
    "Internal Calls": [
        "revert ClaimIncentivesFailed(address,uint256,uint256)",
        "revert ReentrancyGuard()"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function claimOwnerIncentives(uint256[] memory unitTypes, uint256[] memory unitIds) external\n        returns (uint256 reward, uint256 topUp)\n    {\n        // Reentrancy guard\n        if (_locked > 1) {\n            revert ReentrancyGuard();\n        }\n        _locked = 2;\n\n        // Calculate incentives\n        (reward, topUp) = ITokenomics(tokenomics).accountOwnerIncentives(msg.sender, unitTypes, unitIds);\n\n        bool success;\n        // Request treasury to transfer funds to msg.sender if reward > 0 or topUp > 0\n        if ((reward + topUp) > 0) {\n            success = ITreasury(treasury).withdrawToAccount(msg.sender, reward, topUp);\n        }\n\n        // Check if the claim is successful and has at least one non-zero incentive.\n        if (!success) {\n            revert ClaimIncentivesFailed(msg.sender, reward, topUp);\n        }\n\n        emit IncentivesClaimed(msg.sender, reward, topUp);\n\n        _locked = 1;\n    }"
}