{
    "Function": "_initPubReferenceModule",
    "File": "contracts/libraries/PublishingLogic.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "IReferenceModule"
    ],
    "Internal Calls": [
        "revert ReferenceModuleNotWhitelisted()"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _initPubReferenceModule(\n        uint256 profileId,\n        uint256 pubId,\n        address referenceModule,\n        bytes memory referenceModuleData,\n        mapping(uint256 => mapping(uint256 => DataTypes.PublicationStruct))\n            storage _pubByIdByProfile,\n        mapping(address => bool) storage _referenceModuleWhitelisted\n    ) private returns (bytes memory) {\n        if (referenceModule != address(0)) {\n            if (!_referenceModuleWhitelisted[referenceModule])\n                revert Errors.ReferenceModuleNotWhitelisted();\n            _pubByIdByProfile[profileId][pubId].referenceModule = referenceModule;\n            return\n                IReferenceModule(referenceModule).initializeReferenceModule(\n                    profileId,\n                    pubId,\n                    referenceModuleData\n                );\n        } else {\n            return new bytes(0);\n        }\n    }"
}