{
    "Function": "dealERC721",
    "File": "contracts/src/vendor/forge-std/src/StdCheats.sol",
    "Parent Contracts": [
        "contracts/src/vendor/forge-std/src/StdCheats.sol"
    ],
    "High-Level Calls": [
        "stdStorage",
        "stdStorage",
        "stdStorage",
        "stdStorage",
        "stdStorage",
        "stdStorage",
        "stdStorage",
        "stdStorage",
        "stdStorage",
        "stdStorage",
        "stdStorage",
        "stdStorage"
    ],
    "Internal Calls": [
        "abi.decode()",
        "abi.encodeWithSelector()",
        "abi.decode()",
        "abi.encodeWithSelector()",
        "abi.encodeWithSelector()",
        "abi.decode()",
        "require(bool,string)",
        "abi.decode()"
    ],
    "Library Calls": [
        "target",
        "target",
        "sig",
        "sig",
        "with_key",
        "with_key",
        "checked_write",
        "target",
        "checked_write",
        "sig",
        "with_key",
        "checked_write"
    ],
    "Low-Level Calls": [
        "staticcall",
        "staticcall",
        "staticcall"
    ],
    "Code": "function dealERC721(address token, address to, uint256 id) internal virtual {\n        // check if token id is already minted and the actual owner.\n        (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id));\n        require(successMinted, \"StdCheats deal(address,address,uint,bool): id not minted.\");\n\n        // get owner current balance\n        (, bytes memory fromBalData) =\n            token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address))));\n        uint256 fromPrevBal = abi.decode(fromBalData, (uint256));\n\n        // get new user current balance\n        (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to));\n        uint256 toPrevBal = abi.decode(toBalData, (uint256));\n\n        // update balances\n        stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal);\n        stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal);\n\n        // update owner\n        stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to);\n    }"
}