{
    "Function": "_upgradeToAndCallUUPS",
    "File": "contracts/upgradeability/ERC1967Upgrade.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "IERC1822Proxiable",
        "StorageSlot"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "_upgradeToAndCall",
        "revert(string)",
        "_setImplementation"
    ],
    "Library Calls": [
        "getBooleanSlot"
    ],
    "Low-Level Calls": [],
    "Code": "function _upgradeToAndCallUUPS(\n        address newImplementation,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        // Upgrades from old implementations will perform a rollback test. This test requires the new\n        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n        // this special case will break upgrade paths from old UUPS implementation to new ones.\n        if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n            _setImplementation(newImplementation);\n        } else {\n            try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n                require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n            } catch {\n                revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n            }\n            _upgradeToAndCall(newImplementation, data, forceCall);\n        }\n    }"
}