{
    "Function": "precompute",
    "File": "contracts/escrow/NFTEscrow.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "keccak256(bytes)",
        "abi.encodePacked()",
        "abi.encodePacked()",
        "_encodeFlashEscrow",
        "sha256(bytes)",
        "keccak256(bytes)",
        "require(bool,string)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function precompute(address _owner, uint256 _idx)\n        public\n        view\n        returns (bytes32 salt, address predictedAddress)\n    {\n        require(\n            _owner != address(this) && _owner != address(0),\n            \"NFTEscrow: invalid_owner\"\n        );\n\n        salt = sha256(abi.encodePacked(_owner));\n\n        bytes memory bytecode = _encodeFlashEscrow(_idx);\n\n        //hash from which the contract address can be derived\n        bytes32 hash = keccak256(\n            abi.encodePacked(\n                bytes1(0xff),\n                address(this),\n                salt,\n                keccak256(bytecode)\n            )\n        );\n\n        predictedAddress = address(uint160(uint256(hash)));\n        return (salt, predictedAddress);\n    }"
}