{
    "Function": "deployProxyWithNonce",
    "File": "contracts/lib/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "abi.encodePacked()",
        "keccak256(bytes)",
        "keccak256(bytes)",
        "require(bool,string)",
        "abi.encodePacked()",
        "type()",
        "create2(uint256,uint256,uint256,uint256)",
        "mload(uint256)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function deployProxyWithNonce(\n        address _singleton,\n        bytes memory initializer,\n        uint256 saltNonce\n    ) internal returns (GnosisSafeProxy proxy) {\n        // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it\n        bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));\n        bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)\n        }\n        require(address(proxy) != address(0), \"Create2 call failed\");\n    }"
}