{
    "Function": "validateCallback",
    "File": "contracts/libraries/CallbackLib.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "abi.encode()",
        "keccak256(bytes)",
        "revert InvalidUniswapCallback()",
        "abi.encodePacked()",
        "keccak256(bytes)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function validateCallback(\n        address sender,\n        address factory,\n        PoolFeatures memory features\n    ) internal pure {\n        // compute deployed address of pool from claimed features and canonical factory address\n        // then, check against the actual address and verify that the callback came from the real, correct pool\n        if (\n            address(\n                uint160(\n                    uint256(\n                        keccak256(\n                            abi.encodePacked(\n                                bytes1(0xff),\n                                factory,\n                                keccak256(abi.encode(features)),\n                                Constants.V3POOL_INIT_CODE_HASH\n                            )\n                        )\n                    )\n                )\n            ) != sender\n        ) revert Errors.InvalidUniswapCallback();\n    }"
}