{
    "Function": "createRecoverySpell",
    "File": "src/RecoverySpellFactory.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "code(address)",
        "require(bool,string)",
        "tload(uint256)",
        "tstore(uint256,uint256)",
        "_paramChecks",
        "require(bool,string)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function createRecoverySpell(\n        bytes32 salt,\n        address[] memory owners,\n        address safe,\n        uint256 threshold,\n        uint256 recoveryThreshold,\n        uint256 delay\n    ) external returns (RecoverySpell recovery) {\n        _paramChecks(owners, threshold, recoveryThreshold, delay);\n        /// no checks on parameters as all valid recovery spells are\n        /// deployed from the factory which will not allow a recovery\n        /// spell to be created that does not have valid parameters\n        require(safe.code.length != 0, \"RecoverySpell: safe non-existent\");\n\n        /// duplicate owner check\n        for (uint256 i = 0; i < owners.length; i++) {\n            /// not touching memory, we only use the stack and transient storage\n            /// so we can use memory-safe for the assembly block\n            address owner = owners[i];\n            bool found;\n            assembly (\"memory-safe\") {\n                found := tload(owner)\n                /// save a write to transient storage if the owner is found\n                if eq(found, 0) { tstore(owner, 1) }\n            }\n\n            require(!found, \"RecoverySpell: Duplicate owner\");\n        }\n\n        recovery = new RecoverySpell{salt: salt}(\n            owners, safe, threshold, recoveryThreshold, delay\n        );\n\n        emit RecoverySpellCreated(address(recovery), address(safe));\n    }"
}