{
    "Function": "safeTransferFrom",
    "File": "contracts/libraries/SafeTransferLib.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "revert TransferFailed()",
        "mstore(uint256,uint256)",
        "mload(uint256)",
        "mstore(uint256,uint256)",
        "call(uint256,uint256,uint256,uint256,uint256,uint256,uint256)",
        "returndatasize()",
        "returndatasize()",
        "mload(uint256)",
        "gas()",
        "mstore(uint256,uint256)",
        "mstore(uint256,uint256)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function safeTransferFrom(address token, address from, address to, uint256 amount) internal {\n        bool success;\n\n        assembly (\"memory-safe\") {\n            // Get free memory pointer - we will store our calldata in scratch space starting at the offset specified here.\n            let p := mload(0x40)\n\n            // Write the abi-encoded calldata into memory, beginning with the function selector.\n            mstore(p, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\n            mstore(add(4, p), from) // Append the \"from\" argument.\n            mstore(add(36, p), to) // Append the \"to\" argument.\n            mstore(add(68, p), amount) // Append the \"amount\" argument.\n\n            success := and(\n                // Set success to whether the call reverted, if not we check it either\n                // returned exactly 1 (can't just be non-zero data), or had no return data.\n                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\n                // We use 100 because that's the total length of our calldata (4 + 32 * 3)\n                // Counterintuitively, this call() must be positioned after the or() in the\n                // surrounding and() because and() evaluates its arguments from right to left.\n                call(gas(), token, 0, p, 100, 0, 32)\n            )\n        }\n\n        if (!success) revert Errors.TransferFailed();\n    }"
}