{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/gmp-sdk/upgradable/Upgradable.sol",
    "Parent Contracts": [
        "contracts/gmp-sdk/interfaces/IUpgradable.sol",
        "contracts/gmp-sdk/util/Ownable.sol",
        "contracts/gmp-sdk/interfaces/IOwnable.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "abstract contract Upgradable is Ownable, IUpgradable {\n    // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\n    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n    address internal immutable implementationAddress;\n\n    /**\n     * @notice Constructor sets the implementation address to the address of the contract itself\n     * @dev This is used in the onlyProxy modifier to prevent certain functions from being called directly\n     * on the implementation contract itself\n     */\n    constructor() {\n        implementationAddress = address(this);\n    }\n\n    /**\n     * @notice Modifier to ensure that a function can only be called by the proxy\n     */\n    modifier onlyProxy() {\n        // Prevent setup from being called on the implementation\n        if (address(this) == implementationAddress) revert NotProxy();\n        _;\n    }\n\n    /**\n     * @notice Returns the address of the current implementation\n     * @return implementation_ Address of the current implementation\n     */\n    function implementation() public view returns (address implementation_) {\n        assembly {\n            implementation_ := sload(_IMPLEMENTATION_SLOT)\n        }\n    }\n\n    /**\n     * @notice Upgrades the contract to a new implementation\n     * @param newImplementation The address of the new implementation contract\n     * @param newImplementationCodeHash The codehash of the new implementation contract\n     * @param params Optional setup parameters for the new implementation contract\n     * @dev This function is only callable by the owner.\n     */\n    function upgrade(\n        address newImplementation,\n        bytes32 newImplementationCodeHash,\n        bytes calldata params\n    ) external override onlyOwner {\n        if (IUpgradable(newImplementation).contractId() != IUpgradable(this).contractId()) revert InvalidImplementation();\n        if (newImplementationCodeHash != newImplementation.codehash) revert InvalidCodeHash();\n\n        if (params.length > 0) {\n            (bool success, ) = newImplementation.delegatecall(abi.encodeWithSelector(this.setup.selector, params));\n\n            if (!success) revert SetupFailed();\n        }\n\n        emit Upgraded(newImplementation);\n\n        assembly {\n            sstore(_IMPLEMENTATION_SLOT, newImplementation)\n        }\n    }\n\n    /**\n     * @notice Sets up the contract with initial data\n     * @param data Initialization data for the contract\n     * @dev This function is only callable by the proxy contract.\n     */\n    function setup(bytes calldata data) external override onlyProxy {\n        _setup(data);\n    }\n\n    /**\n     * @notice Internal function to set up the contract with initial data\n     * @param data Initialization data for the contract\n     * @dev This function should be implemented in derived contracts.\n     */\n    function _setup(bytes calldata data) internal virtual {}\n}"
}