{
    "Function": "_initPubCollectModule",
    "File": "contracts/libraries/PublishingLogic.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "ICollectModule"
    ],
    "Internal Calls": [
        "revert CollectModuleNotWhitelisted()"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _initPubCollectModule(\n        uint256 profileId,\n        uint256 pubId,\n        address collectModule,\n        bytes memory collectModuleData,\n        mapping(uint256 => mapping(uint256 => DataTypes.PublicationStruct))\n            storage _pubByIdByProfile,\n        mapping(address => bool) storage _collectModuleWhitelisted\n    ) private returns (bytes memory) {\n        if (!_collectModuleWhitelisted[collectModule]) revert Errors.CollectModuleNotWhitelisted();\n        _pubByIdByProfile[profileId][pubId].collectModule = collectModule;\n        return\n            ICollectModule(collectModule).initializePublicationCollectModule(\n                profileId,\n                pubId,\n                collectModuleData\n            );\n    }"
}