{
    "Function": "_callTokensReceived",
    "File": "contracts/openzeppelin-solidity/contracts/token/ERC777/ERC777.sol",
    "Parent Contracts": [
        "contracts/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol",
        "contracts/openzeppelin-solidity/contracts/token/ERC777/IERC777.sol",
        "contracts/openzeppelin-solidity/contracts/utils/Context.sol"
    ],
    "High-Level Calls": [
        "IERC1820Registry",
        "IERC777Recipient",
        "Address"
    ],
    "Internal Calls": [
        "require(bool,string)"
    ],
    "Library Calls": [
        "isContract"
    ],
    "Low-Level Calls": [],
    "Code": "function _callTokensReceived(\n        address operator,\n        address from,\n        address to,\n        uint256 amount,\n        bytes memory userData,\n        bytes memory operatorData,\n        bool requireReceptionAck\n    ) private {\n        address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(to, _TOKENS_RECIPIENT_INTERFACE_HASH);\n        if (implementer != address(0)) {\n            IERC777Recipient(implementer).tokensReceived(operator, from, to, amount, userData, operatorData);\n        } else if (requireReceptionAck) {\n            require(!to.isContract(), \"ERC777: token recipient contract has no implementer for ERC777TokensRecipient\");\n        }\n    }"
}