{
    "Function": "_sendFees",
    "File": "contracts/FeeSplitter.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/security/ReentrancyGuard.sol",
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol"
    ],
    "High-Level Calls": [
        "SafeERC20"
    ],
    "Internal Calls": [
        "_msgSender",
        "_msgSender",
        "_addShares",
        "_computeShareCount"
    ],
    "Library Calls": [
        "safeTransferFrom"
    ],
    "Low-Level Calls": [],
    "Code": "function _sendFees(\n        IERC20 _token,\n        uint256 _amount,\n        uint256 _totalWeights\n    ) private {\n        IERC20(_token).safeTransferFrom(_msgSender(), address(this), _amount);\n\n        for (uint256 i = 0; i < shareholders.length; i++) {\n            _addShares(\n                shareholders[i].account,\n                _computeShareCount(_amount, shareholders[i].weight, _totalWeights),\n                address(_token)\n            );\n        }\n        emit PaymentReceived(_msgSender(), address(_token), _amount);\n    }"
}