{
  "contractName": "LiquidityMath",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.6.8+commit.0bbfe453\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{},\"title\":\"Math library for liquidity\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/interfaces/uniswap/LiquidityMath.sol\":\"LiquidityMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"project:/contracts/interfaces/uniswap/LiquidityMath.sol\":{\"keccak256\":\"0xd53041349718d5bce4a89e87cd911879d41ba42ba3fab0614e5e8b742f352b88\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://ea7529b99ab4fc1d3e6c5a31990fb688f0a2d6cc302c0419e0cf5a2d6c563781\",\"dweb:/ipfs/QmVaphRSNpfChHZKzutQ9WprwCo2WE1euvThRfHcwsnHhj\"]}},\"version\":1}",
  "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fa988af2c0a3bc63060dc01f8c61adc769a3b90828a5cdfd151b21cab95908a864736f6c63430006080033",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fa988af2c0a3bc63060dc01f8c61adc769a3b90828a5cdfd151b21cab95908a864736f6c63430006080033",
  "immutableReferences": {},
  "sourceMap": "109:512:36:-:0;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24",
  "deployedSourceMap": "109:512:36:-:0;;;;;;12:1:-1;9;2:12",
  "source": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title Math library for liquidity\nlibrary LiquidityMath {\n    /// @notice Add a signed liquidity delta to liquidity and revert if it overflows or underflows\n    /// @param x The liquidity before change\n    /// @param y The delta by which liquidity should be changed\n    /// @return z The liquidity delta\n    function addDelta(uint128 x, int128 y) internal pure returns (uint128 z) {\n        if (y < 0) {\n            require((z = x - uint128(-y)) < x, 'LS');\n        } else {\n            require((z = x + uint128(y)) >= x, 'LA');\n        }\n    }\n}\n",
  "sourcePath": "/home/thezviad_gmail_com/src/swappa/contracts/interfaces/uniswap/LiquidityMath.sol",
  "ast": {
    "absolutePath": "project:/contracts/interfaces/uniswap/LiquidityMath.sol",
    "exportedSymbols": {
      "LiquidityMath": [
        3131
      ]
    },
    "id": 3132,
    "license": "GPL-2.0-or-later",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 3081,
        "literals": [
          "solidity",
          ">=",
          "0.5",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "45:24:36"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": {
          "id": 3082,
          "nodeType": "StructuredDocumentation",
          "src": "71:38:36",
          "text": "@title Math library for liquidity"
        },
        "fullyImplemented": true,
        "id": 3131,
        "linearizedBaseContracts": [
          3131
        ],
        "name": "LiquidityMath",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 3129,
              "nodeType": "Block",
              "src": "456:163:36",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_int128",
                      "typeString": "int128"
                    },
                    "id": 3094,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 3092,
                      "name": "y",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3087,
                      "src": "470:1:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int128",
                        "typeString": "int128"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 3093,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "474:1:36",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "470:5:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 3127,
                    "nodeType": "Block",
                    "src": "548:65:36",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint128",
                                "typeString": "uint128"
                              },
                              "id": 3123,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "components": [
                                  {
                                    "argumentTypes": null,
                                    "id": 3120,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "argumentTypes": null,
                                      "id": 3113,
                                      "name": "z",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3090,
                                      "src": "571:1:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint128",
                                        "typeString": "uint128"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "argumentTypes": null,
                                      "commonType": {
                                        "typeIdentifier": "t_uint128",
                                        "typeString": "uint128"
                                      },
                                      "id": 3119,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "argumentTypes": null,
                                        "id": 3114,
                                        "name": "x",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3085,
                                        "src": "575:1:36",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint128",
                                          "typeString": "uint128"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "+",
                                      "rightExpression": {
                                        "argumentTypes": null,
                                        "arguments": [
                                          {
                                            "argumentTypes": null,
                                            "id": 3117,
                                            "name": "y",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 3087,
                                            "src": "587:1:36",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_int128",
                                              "typeString": "int128"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_int128",
                                              "typeString": "int128"
                                            }
                                          ],
                                          "id": 3116,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "nodeType": "ElementaryTypeNameExpression",
                                          "src": "579:7:36",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_uint128_$",
                                            "typeString": "type(uint128)"
                                          },
                                          "typeName": {
                                            "id": 3115,
                                            "name": "uint128",
                                            "nodeType": "ElementaryTypeName",
                                            "src": "579:7:36",
                                            "typeDescriptions": {
                                              "typeIdentifier": null,
                                              "typeString": null
                                            }
                                          }
                                        },
                                        "id": 3118,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "579:10:36",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint128",
                                          "typeString": "uint128"
                                        }
                                      },
                                      "src": "575:14:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint128",
                                        "typeString": "uint128"
                                      }
                                    },
                                    "src": "571:18:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint128",
                                      "typeString": "uint128"
                                    }
                                  }
                                ],
                                "id": 3121,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "570:20:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint128",
                                  "typeString": "uint128"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 3122,
                                "name": "x",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3085,
                                "src": "594:1:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint128",
                                  "typeString": "uint128"
                                }
                              },
                              "src": "570:25:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "4c41",
                              "id": 3124,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "597:4:36",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_ce8fc98a1432efc8ba166615239eb1702fbbbd0ddab9a5952502a98483035383",
                                "typeString": "literal_string \"LA\""
                              },
                              "value": "LA"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_ce8fc98a1432efc8ba166615239eb1702fbbbd0ddab9a5952502a98483035383",
                                "typeString": "literal_string \"LA\""
                              }
                            ],
                            "id": 3112,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              -18,
                              -18
                            ],
                            "referencedDeclaration": -18,
                            "src": "562:7:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 3125,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "562:40:36",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3126,
                        "nodeType": "ExpressionStatement",
                        "src": "562:40:36"
                      }
                    ]
                  },
                  "id": 3128,
                  "nodeType": "IfStatement",
                  "src": "466:147:36",
                  "trueBody": {
                    "id": 3111,
                    "nodeType": "Block",
                    "src": "477:65:36",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint128",
                                "typeString": "uint128"
                              },
                              "id": 3107,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "components": [
                                  {
                                    "argumentTypes": null,
                                    "id": 3104,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "argumentTypes": null,
                                      "id": 3096,
                                      "name": "z",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3090,
                                      "src": "500:1:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint128",
                                        "typeString": "uint128"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "argumentTypes": null,
                                      "commonType": {
                                        "typeIdentifier": "t_uint128",
                                        "typeString": "uint128"
                                      },
                                      "id": 3103,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "argumentTypes": null,
                                        "id": 3097,
                                        "name": "x",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3085,
                                        "src": "504:1:36",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint128",
                                          "typeString": "uint128"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "-",
                                      "rightExpression": {
                                        "argumentTypes": null,
                                        "arguments": [
                                          {
                                            "argumentTypes": null,
                                            "id": 3101,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "nodeType": "UnaryOperation",
                                            "operator": "-",
                                            "prefix": true,
                                            "src": "516:2:36",
                                            "subExpression": {
                                              "argumentTypes": null,
                                              "id": 3100,
                                              "name": "y",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 3087,
                                              "src": "517:1:36",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_int128",
                                                "typeString": "int128"
                                              }
                                            },
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_int128",
                                              "typeString": "int128"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_int128",
                                              "typeString": "int128"
                                            }
                                          ],
                                          "id": 3099,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "nodeType": "ElementaryTypeNameExpression",
                                          "src": "508:7:36",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_uint128_$",
                                            "typeString": "type(uint128)"
                                          },
                                          "typeName": {
                                            "id": 3098,
                                            "name": "uint128",
                                            "nodeType": "ElementaryTypeName",
                                            "src": "508:7:36",
                                            "typeDescriptions": {
                                              "typeIdentifier": null,
                                              "typeString": null
                                            }
                                          }
                                        },
                                        "id": 3102,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "508:11:36",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint128",
                                          "typeString": "uint128"
                                        }
                                      },
                                      "src": "504:15:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint128",
                                        "typeString": "uint128"
                                      }
                                    },
                                    "src": "500:19:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint128",
                                      "typeString": "uint128"
                                    }
                                  }
                                ],
                                "id": 3105,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "499:21:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint128",
                                  "typeString": "uint128"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 3106,
                                "name": "x",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3085,
                                "src": "523:1:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint128",
                                  "typeString": "uint128"
                                }
                              },
                              "src": "499:25:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "4c53",
                              "id": 3108,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "526:4:36",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_2be2231ccd52e7fedf30c30a3dfa3d6c9d9d3400159e305398a7b6d437f56985",
                                "typeString": "literal_string \"LS\""
                              },
                              "value": "LS"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_2be2231ccd52e7fedf30c30a3dfa3d6c9d9d3400159e305398a7b6d437f56985",
                                "typeString": "literal_string \"LS\""
                              }
                            ],
                            "id": 3095,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              -18,
                              -18
                            ],
                            "referencedDeclaration": -18,
                            "src": "491:7:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 3109,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "491:40:36",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3110,
                        "nodeType": "ExpressionStatement",
                        "src": "491:40:36"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 3083,
              "nodeType": "StructuredDocumentation",
              "src": "137:241:36",
              "text": "@notice Add a signed liquidity delta to liquidity and revert if it overflows or underflows\n @param x The liquidity before change\n @param y The delta by which liquidity should be changed\n @return z The liquidity delta"
            },
            "id": 3130,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "addDelta",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 3088,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3085,
                  "mutability": "mutable",
                  "name": "x",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3130,
                  "src": "401:9:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint128",
                    "typeString": "uint128"
                  },
                  "typeName": {
                    "id": 3084,
                    "name": "uint128",
                    "nodeType": "ElementaryTypeName",
                    "src": "401:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint128",
                      "typeString": "uint128"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3087,
                  "mutability": "mutable",
                  "name": "y",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3130,
                  "src": "412:8:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int128",
                    "typeString": "int128"
                  },
                  "typeName": {
                    "id": 3086,
                    "name": "int128",
                    "nodeType": "ElementaryTypeName",
                    "src": "412:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int128",
                      "typeString": "int128"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "400:21:36"
            },
            "returnParameters": {
              "id": 3091,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3090,
                  "mutability": "mutable",
                  "name": "z",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3130,
                  "src": "445:9:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint128",
                    "typeString": "uint128"
                  },
                  "typeName": {
                    "id": 3089,
                    "name": "uint128",
                    "nodeType": "ElementaryTypeName",
                    "src": "445:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint128",
                      "typeString": "uint128"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "444:11:36"
            },
            "scope": 3131,
            "src": "383:236:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 3132,
        "src": "109:512:36"
      }
    ],
    "src": "45:577:36"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "project:/contracts/interfaces/uniswap/LiquidityMath.sol",
      "exportedSymbols": {
        "LiquidityMath": [
          3131
        ]
      },
      "license": "GPL-2.0-or-later"
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            ">=",
            "0.5",
            ".0"
          ]
        },
        "id": 3081,
        "name": "PragmaDirective",
        "src": "45:24:36"
      },
      {
        "attributes": {
          "abstract": false,
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "library",
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            3131
          ],
          "name": "LiquidityMath",
          "scope": 3132
        },
        "children": [
          {
            "attributes": {
              "text": "@title Math library for liquidity"
            },
            "id": 3082,
            "name": "StructuredDocumentation",
            "src": "71:38:36"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "addDelta",
              "overrides": null,
              "scope": 3131,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": "@notice Add a signed liquidity delta to liquidity and revert if it overflows or underflows\n @param x The liquidity before change\n @param y The delta by which liquidity should be changed\n @return z The liquidity delta"
                },
                "id": 3083,
                "name": "StructuredDocumentation",
                "src": "137:241:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "x",
                      "overrides": null,
                      "scope": 3130,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint128",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint128",
                          "type": "uint128"
                        },
                        "id": 3084,
                        "name": "ElementaryTypeName",
                        "src": "401:7:36"
                      }
                    ],
                    "id": 3085,
                    "name": "VariableDeclaration",
                    "src": "401:9:36"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "y",
                      "overrides": null,
                      "scope": 3130,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "int128",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "int128",
                          "type": "int128"
                        },
                        "id": 3086,
                        "name": "ElementaryTypeName",
                        "src": "412:6:36"
                      }
                    ],
                    "id": 3087,
                    "name": "VariableDeclaration",
                    "src": "412:8:36"
                  }
                ],
                "id": 3088,
                "name": "ParameterList",
                "src": "400:21:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "z",
                      "overrides": null,
                      "scope": 3130,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint128",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint128",
                          "type": "uint128"
                        },
                        "id": 3089,
                        "name": "ElementaryTypeName",
                        "src": "445:7:36"
                      }
                    ],
                    "id": 3090,
                    "name": "VariableDeclaration",
                    "src": "445:9:36"
                  }
                ],
                "id": 3091,
                "name": "ParameterList",
                "src": "444:11:36"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int128",
                            "typeString": "int128"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "<",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3087,
                              "type": "int128",
                              "value": "y"
                            },
                            "id": 3092,
                            "name": "Identifier",
                            "src": "470:1:36"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 3093,
                            "name": "Literal",
                            "src": "474:1:36"
                          }
                        ],
                        "id": 3094,
                        "name": "BinaryOperation",
                        "src": "470:5:36"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "tuple()",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        },
                                        {
                                          "typeIdentifier": "t_stringliteral_2be2231ccd52e7fedf30c30a3dfa3d6c9d9d3400159e305398a7b6d437f56985",
                                          "typeString": "literal_string \"LS\""
                                        }
                                      ],
                                      "overloadedDeclarations": [
                                        -18,
                                        -18
                                      ],
                                      "referencedDeclaration": -18,
                                      "type": "function (bool,string memory) pure",
                                      "value": "require"
                                    },
                                    "id": 3095,
                                    "name": "Identifier",
                                    "src": "491:7:36"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "commonType": {
                                        "typeIdentifier": "t_uint128",
                                        "typeString": "uint128"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "<",
                                      "type": "bool"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isInlineArray": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "type": "uint128"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "operator": "=",
                                              "type": "uint128"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3090,
                                                  "type": "uint128",
                                                  "value": "z"
                                                },
                                                "id": 3096,
                                                "name": "Identifier",
                                                "src": "500:1:36"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "commonType": {
                                                    "typeIdentifier": "t_uint128",
                                                    "typeString": "uint128"
                                                  },
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "operator": "-",
                                                  "type": "uint128"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "overloadedDeclarations": [
                                                        null
                                                      ],
                                                      "referencedDeclaration": 3085,
                                                      "type": "uint128",
                                                      "value": "x"
                                                    },
                                                    "id": 3097,
                                                    "name": "Identifier",
                                                    "src": "504:1:36"
                                                  },
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": false,
                                                      "isStructConstructorCall": false,
                                                      "lValueRequested": false,
                                                      "names": [
                                                        null
                                                      ],
                                                      "tryCall": false,
                                                      "type": "uint128",
                                                      "type_conversion": true
                                                    },
                                                    "children": [
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": [
                                                            {
                                                              "typeIdentifier": "t_int128",
                                                              "typeString": "int128"
                                                            }
                                                          ],
                                                          "isConstant": false,
                                                          "isLValue": false,
                                                          "isPure": true,
                                                          "lValueRequested": false,
                                                          "type": "type(uint128)"
                                                        },
                                                        "children": [
                                                          {
                                                            "attributes": {
                                                              "name": "uint128",
                                                              "type": null
                                                            },
                                                            "id": 3098,
                                                            "name": "ElementaryTypeName",
                                                            "src": "508:7:36"
                                                          }
                                                        ],
                                                        "id": 3099,
                                                        "name": "ElementaryTypeNameExpression",
                                                        "src": "508:7:36"
                                                      },
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "isConstant": false,
                                                          "isLValue": false,
                                                          "isPure": false,
                                                          "lValueRequested": false,
                                                          "operator": "-",
                                                          "prefix": true,
                                                          "type": "int128"
                                                        },
                                                        "children": [
                                                          {
                                                            "attributes": {
                                                              "argumentTypes": null,
                                                              "overloadedDeclarations": [
                                                                null
                                                              ],
                                                              "referencedDeclaration": 3087,
                                                              "type": "int128",
                                                              "value": "y"
                                                            },
                                                            "id": 3100,
                                                            "name": "Identifier",
                                                            "src": "517:1:36"
                                                          }
                                                        ],
                                                        "id": 3101,
                                                        "name": "UnaryOperation",
                                                        "src": "516:2:36"
                                                      }
                                                    ],
                                                    "id": 3102,
                                                    "name": "FunctionCall",
                                                    "src": "508:11:36"
                                                  }
                                                ],
                                                "id": 3103,
                                                "name": "BinaryOperation",
                                                "src": "504:15:36"
                                              }
                                            ],
                                            "id": 3104,
                                            "name": "Assignment",
                                            "src": "500:19:36"
                                          }
                                        ],
                                        "id": 3105,
                                        "name": "TupleExpression",
                                        "src": "499:21:36"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3085,
                                          "type": "uint128",
                                          "value": "x"
                                        },
                                        "id": 3106,
                                        "name": "Identifier",
                                        "src": "523:1:36"
                                      }
                                    ],
                                    "id": 3107,
                                    "name": "BinaryOperation",
                                    "src": "499:25:36"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "4c53",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "string",
                                      "type": "literal_string \"LS\"",
                                      "value": "LS"
                                    },
                                    "id": 3108,
                                    "name": "Literal",
                                    "src": "526:4:36"
                                  }
                                ],
                                "id": 3109,
                                "name": "FunctionCall",
                                "src": "491:40:36"
                              }
                            ],
                            "id": 3110,
                            "name": "ExpressionStatement",
                            "src": "491:40:36"
                          }
                        ],
                        "id": 3111,
                        "name": "Block",
                        "src": "477:65:36"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "tuple()",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        },
                                        {
                                          "typeIdentifier": "t_stringliteral_ce8fc98a1432efc8ba166615239eb1702fbbbd0ddab9a5952502a98483035383",
                                          "typeString": "literal_string \"LA\""
                                        }
                                      ],
                                      "overloadedDeclarations": [
                                        -18,
                                        -18
                                      ],
                                      "referencedDeclaration": -18,
                                      "type": "function (bool,string memory) pure",
                                      "value": "require"
                                    },
                                    "id": 3112,
                                    "name": "Identifier",
                                    "src": "562:7:36"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "commonType": {
                                        "typeIdentifier": "t_uint128",
                                        "typeString": "uint128"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": ">=",
                                      "type": "bool"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isInlineArray": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "type": "uint128"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "operator": "=",
                                              "type": "uint128"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3090,
                                                  "type": "uint128",
                                                  "value": "z"
                                                },
                                                "id": 3113,
                                                "name": "Identifier",
                                                "src": "571:1:36"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "commonType": {
                                                    "typeIdentifier": "t_uint128",
                                                    "typeString": "uint128"
                                                  },
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "operator": "+",
                                                  "type": "uint128"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "overloadedDeclarations": [
                                                        null
                                                      ],
                                                      "referencedDeclaration": 3085,
                                                      "type": "uint128",
                                                      "value": "x"
                                                    },
                                                    "id": 3114,
                                                    "name": "Identifier",
                                                    "src": "575:1:36"
                                                  },
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": false,
                                                      "isStructConstructorCall": false,
                                                      "lValueRequested": false,
                                                      "names": [
                                                        null
                                                      ],
                                                      "tryCall": false,
                                                      "type": "uint128",
                                                      "type_conversion": true
                                                    },
                                                    "children": [
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": [
                                                            {
                                                              "typeIdentifier": "t_int128",
                                                              "typeString": "int128"
                                                            }
                                                          ],
                                                          "isConstant": false,
                                                          "isLValue": false,
                                                          "isPure": true,
                                                          "lValueRequested": false,
                                                          "type": "type(uint128)"
                                                        },
                                                        "children": [
                                                          {
                                                            "attributes": {
                                                              "name": "uint128",
                                                              "type": null
                                                            },
                                                            "id": 3115,
                                                            "name": "ElementaryTypeName",
                                                            "src": "579:7:36"
                                                          }
                                                        ],
                                                        "id": 3116,
                                                        "name": "ElementaryTypeNameExpression",
                                                        "src": "579:7:36"
                                                      },
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "overloadedDeclarations": [
                                                            null
                                                          ],
                                                          "referencedDeclaration": 3087,
                                                          "type": "int128",
                                                          "value": "y"
                                                        },
                                                        "id": 3117,
                                                        "name": "Identifier",
                                                        "src": "587:1:36"
                                                      }
                                                    ],
                                                    "id": 3118,
                                                    "name": "FunctionCall",
                                                    "src": "579:10:36"
                                                  }
                                                ],
                                                "id": 3119,
                                                "name": "BinaryOperation",
                                                "src": "575:14:36"
                                              }
                                            ],
                                            "id": 3120,
                                            "name": "Assignment",
                                            "src": "571:18:36"
                                          }
                                        ],
                                        "id": 3121,
                                        "name": "TupleExpression",
                                        "src": "570:20:36"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3085,
                                          "type": "uint128",
                                          "value": "x"
                                        },
                                        "id": 3122,
                                        "name": "Identifier",
                                        "src": "594:1:36"
                                      }
                                    ],
                                    "id": 3123,
                                    "name": "BinaryOperation",
                                    "src": "570:25:36"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "4c41",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "string",
                                      "type": "literal_string \"LA\"",
                                      "value": "LA"
                                    },
                                    "id": 3124,
                                    "name": "Literal",
                                    "src": "597:4:36"
                                  }
                                ],
                                "id": 3125,
                                "name": "FunctionCall",
                                "src": "562:40:36"
                              }
                            ],
                            "id": 3126,
                            "name": "ExpressionStatement",
                            "src": "562:40:36"
                          }
                        ],
                        "id": 3127,
                        "name": "Block",
                        "src": "548:65:36"
                      }
                    ],
                    "id": 3128,
                    "name": "IfStatement",
                    "src": "466:147:36"
                  }
                ],
                "id": 3129,
                "name": "Block",
                "src": "456:163:36"
              }
            ],
            "id": 3130,
            "name": "FunctionDefinition",
            "src": "383:236:36"
          }
        ],
        "id": 3131,
        "name": "ContractDefinition",
        "src": "109:512:36"
      }
    ],
    "id": 3132,
    "name": "SourceUnit",
    "src": "45:577:36"
  },
  "compiler": {
    "name": "solc",
    "version": "0.6.8+commit.0bbfe453.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.4.16",
  "updatedAt": "2025-02-07T17:50:42.789Z",
  "devdoc": {
    "methods": {},
    "title": "Math library for liquidity"
  },
  "userdoc": {
    "methods": {}
  }
}