{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/gmp-sdk/upgradable/InitProxy.sol",
    "Parent Contracts": [
        "contracts/gmp-sdk/interfaces/IInitProxy.sol",
        "contracts/gmp-sdk/upgradable/BaseProxy.sol",
        "contracts/gmp-sdk/interfaces/IProxy.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract InitProxy is BaseProxy, IInitProxy {\n    /**\n     * @dev Initializes the contract and sets the caller as the owner of the contract.\n     */\n    constructor() {\n        assembly {\n            sstore(_OWNER_SLOT, caller())\n        }\n    }\n\n    /**\n     * @notice Initializes the proxy contract with the specified implementation, new owner, and any optional setup parameters.\n     * @param implementationAddress The address of the implementation contract\n     * @param newOwner The address of the new proxy owner\n     * @param params Optional parameters to be passed to the setup function of the implementation contract\n     * @dev This function is only callable by the owner of the proxy. If the proxy has already been initialized, it will revert.\n     * If the contract ID of the implementation is incorrect, it will also revert. It then stores the implementation address and\n     * new owner address in the designated storage slots and calls the setup function on the implementation (if setup params exist).\n     */\n    function init(\n        address implementationAddress,\n        address newOwner,\n        bytes memory params\n    ) external {\n        address owner;\n\n        assembly {\n            owner := sload(_OWNER_SLOT)\n        }\n\n        if (msg.sender != owner) revert NotOwner();\n        if (implementation() != address(0)) revert AlreadyInitialized();\n\n        bytes32 id = contractId();\n        if (id != bytes32(0) && IUpgradable(implementationAddress).contractId() != id) revert InvalidImplementation();\n\n        assembly {\n            sstore(_IMPLEMENTATION_SLOT, implementationAddress)\n            sstore(_OWNER_SLOT, newOwner)\n        }\n\n        if (params.length != 0) {\n            (bool success, ) = implementationAddress.delegatecall(abi.encodeWithSelector(IUpgradable.setup.selector, params));\n            if (!success) revert SetupFailed();\n        }\n    }\n}"
}