{
    "Function": "changeForeignGovernor",
    "File": "governance/contracts/bridges/HomeMediator.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "revert SelfCallOnly(address,address)",
        "revert ZeroAddress()"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function changeForeignGovernor(address newForeignGovernor) external {\n        // Check if the change is authorized by the previous governor itself\n        // This is possible only if all the checks in the message process function pass and the contract calls itself\n        if (msg.sender != address(this)) {\n            revert SelfCallOnly(msg.sender, address(this));\n        }\n\n        // Check for the zero address\n        if (newForeignGovernor == address(0)) {\n            revert ZeroAddress();\n        }\n\n        foreignGovernor = newForeignGovernor;\n        emit ForeignGovernorUpdated(newForeignGovernor);\n    }"
}