{
    "Function": "send",
    "File": "contracts/wallet/QuickAccManager.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "SignatureValidator",
        "Identity",
        "Identity",
        "SignatureValidator",
        "SignatureValidator"
    ],
    "Internal Calls": [
        "abi.encode()",
        "abi.encode()",
        "keccak256(bytes)",
        "require(bool,string)",
        "require(bool,string)",
        "require(bool,string)",
        "require(bool,string)",
        "keccak256(bytes)"
    ],
    "Library Calls": [
        "recoverAddr",
        "recoverAddr",
        "recoverAddr"
    ],
    "Low-Level Calls": [],
    "Code": "function send(Identity identity, QuickAccount calldata acc, DualSig calldata sigs, Identity.Transaction[] calldata txns) external {\n\t\tbytes32 accHash = keccak256(abi.encode(acc));\n\t\trequire(identity.privileges(address(this)) == accHash, 'WRONG_ACC_OR_NO_PRIV');\n\t\tuint initialNonce = nonces[address(identity)];\n\t\t// Security: we must also hash in the hash of the QuickAccount, otherwise the sig of one key can be reused across multiple accs\n\t\tbytes32 hash = keccak256(abi.encode(\n\t\t\taddress(this),\n\t\t\tblock.chainid,\n\t\t\taccHash,\n\t\t\tnonces[address(identity)]++,\n\t\t\ttxns,\n\t\t\tsigs.isBothSigned\n\t\t));\n\t\tif (sigs.isBothSigned) {\n\t\t\trequire(acc.one == SignatureValidator.recoverAddr(hash, sigs.one), 'SIG_ONE');\n\t\t\trequire(acc.two == SignatureValidator.recoverAddr(hash, sigs.two), 'SIG_TWO');\n\t\t\tidentity.executeBySender(txns);\n\t\t} else {\n\t\t\taddress signer = SignatureValidator.recoverAddr(hash, sigs.one);\n\t\t\trequire(acc.one == signer || acc.two == signer, 'SIG');\n\t\t\t// no need to check whether `scheduled[hash]` is already set here cause of the incrementing nonce\n\t\t\tscheduled[hash] = block.timestamp + acc.timelock;\n\t\t\temit LogScheduled(hash, accHash, signer, initialNonce, block.timestamp, txns);\n\t\t}\n\t}"
}