{
    "Function": "slitherConstructorConstantVariables",
    "File": "src/libraries/ProtocolLib.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "library ProtocolLib {\n    using AddressLib for Address;\n\n    enum Protocol {\n        UniswapV2,\n        UniswapV3,\n        Curve\n    }\n\n    uint256 private constant _PROTOCOL_OFFSET = 253;\n    uint256 private constant _WETH_UNWRAP_FLAG = 1 << 252;\n    uint256 private constant _WETH_NOT_WRAP_FLAG = 1 << 251;\n    uint256 private constant _USE_PERMIT2_FLAG = 1 << 250;\n\n    function protocol(Address self) internal pure returns (Protocol) {\n        // there is no need to mask because protocol is stored in the highest 3 bits\n        return Protocol((Address.unwrap(self) >> _PROTOCOL_OFFSET));\n    }\n\n    function shouldUnwrapWeth(Address self) internal pure returns (bool) {\n        return self.getFlag(_WETH_UNWRAP_FLAG);\n    }\n\n    function shouldWrapWeth(Address self) internal pure returns (bool) {\n        return !self.getFlag(_WETH_NOT_WRAP_FLAG);\n    }\n\n    function usePermit2(Address self) internal pure returns (bool) {\n        return self.getFlag(_USE_PERMIT2_FLAG);\n    }\n\n    function addressForPreTransfer(Address self) internal view returns (address) {\n        if (protocol(self) == Protocol.UniswapV2) {\n            return self.get();\n        }\n        return address(this);\n    }\n}"
}