{
  "contractName": "UnsafeMath",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.6.8+commit.0bbfe453\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{},\"title\":\"Math functions that do not check inputs or outputs\"},\"userdoc\":{\"methods\":{},\"notice\":\"Contains methods that perform common math functions but do not do any overflow or underflow checks\"}},\"settings\":{\"compilationTarget\":{\"project:/contracts/interfaces/uniswap/UnsafeMath.sol\":\"UnsafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"project:/contracts/interfaces/uniswap/UnsafeMath.sol\":{\"keccak256\":\"0x5f36d7d16348d8c37fe64fda932018d6e5e8acecd054f0f97d32db62d20c6c88\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://4bd4e817ea3d2c26bb2be7e58db3eaa403119562c18d4c09cc92fb31aa231496\",\"dweb:/ipfs/QmbpjgL8Hf1mhmUyf9hpuPk4noGAggCdTqaRBFKqNF3AQw\"]}},\"version\":1}",
  "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209b71eb2ec9906c057ffe21337f9e6e0e56105172cd29a6c57df614410140d95c64736f6c63430006080033",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209b71eb2ec9906c057ffe21337f9e6e0e56105172cd29a6c57df614410140d95c64736f6c63430006080033",
  "immutableReferences": {},
  "sourceMap": "244:415:44:-: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": "244:415:44:-: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 functions that do not check inputs or outputs\n/// @notice Contains methods that perform common math functions but do not do any overflow or underflow checks\nlibrary UnsafeMath {\n    /// @notice Returns ceil(x / y)\n    /// @dev division by 0 has unspecified behavior, and must be checked externally\n    /// @param x The dividend\n    /// @param y The divisor\n    /// @return z The quotient, ceil(x / y)\n    function divRoundingUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        assembly {\n            z := add(div(x, y), gt(mod(x, y), 0))\n        }\n    }\n}\n",
  "sourcePath": "/home/thezviad_gmail_com/src/swappa/contracts/interfaces/uniswap/UnsafeMath.sol",
  "ast": {
    "absolutePath": "project:/contracts/interfaces/uniswap/UnsafeMath.sol",
    "exportedSymbols": {
      "UnsafeMath": [
        5298
      ]
    },
    "id": 5299,
    "license": "GPL-2.0-or-later",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 5284,
        "literals": [
          "solidity",
          ">=",
          "0.5",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "45:24:44"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": {
          "id": 5285,
          "nodeType": "StructuredDocumentation",
          "src": "71:173:44",
          "text": "@title Math functions that do not check inputs or outputs\n @notice Contains methods that perform common math functions but do not do any overflow or underflow checks"
        },
        "fullyImplemented": true,
        "id": 5298,
        "linearizedBaseContracts": [
          5298
        ],
        "name": "UnsafeMath",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 5296,
              "nodeType": "Block",
              "src": "571:86:44",
              "statements": [
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "590:61:44",
                    "statements": [
                      {
                        "nodeType": "YulAssignment",
                        "src": "604:37:44",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "x",
                                  "nodeType": "YulIdentifier",
                                  "src": "617:1:44"
                                },
                                {
                                  "name": "y",
                                  "nodeType": "YulIdentifier",
                                  "src": "620:1:44"
                                }
                              ],
                              "functionName": {
                                "name": "div",
                                "nodeType": "YulIdentifier",
                                "src": "613:3:44"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "613:9:44"
                            },
                            {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "name": "x",
                                      "nodeType": "YulIdentifier",
                                      "src": "631:1:44"
                                    },
                                    {
                                      "name": "y",
                                      "nodeType": "YulIdentifier",
                                      "src": "634:1:44"
                                    }
                                  ],
                                  "functionName": {
                                    "name": "mod",
                                    "nodeType": "YulIdentifier",
                                    "src": "627:3:44"
                                  },
                                  "nodeType": "YulFunctionCall",
                                  "src": "627:9:44"
                                },
                                {
                                  "kind": "number",
                                  "nodeType": "YulLiteral",
                                  "src": "638:1:44",
                                  "type": "",
                                  "value": "0"
                                }
                              ],
                              "functionName": {
                                "name": "gt",
                                "nodeType": "YulIdentifier",
                                "src": "624:2:44"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "624:16:44"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "609:3:44"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "609:32:44"
                        },
                        "variableNames": [
                          {
                            "name": "z",
                            "nodeType": "YulIdentifier",
                            "src": "604:1:44"
                          }
                        ]
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 5288,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "617:1:44",
                      "valueSize": 1
                    },
                    {
                      "declaration": 5288,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "631:1:44",
                      "valueSize": 1
                    },
                    {
                      "declaration": 5290,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "620:1:44",
                      "valueSize": 1
                    },
                    {
                      "declaration": 5290,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "634:1:44",
                      "valueSize": 1
                    },
                    {
                      "declaration": 5293,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "604:1:44",
                      "valueSize": 1
                    }
                  ],
                  "id": 5295,
                  "nodeType": "InlineAssembly",
                  "src": "581:70:44"
                }
              ]
            },
            "documentation": {
              "id": 5286,
              "nodeType": "StructuredDocumentation",
              "src": "269:218:44",
              "text": "@notice Returns ceil(x / y)\n @dev division by 0 has unspecified behavior, and must be checked externally\n @param x The dividend\n @param y The divisor\n @return z The quotient, ceil(x / y)"
            },
            "id": 5297,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "divRoundingUp",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 5291,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5288,
                  "mutability": "mutable",
                  "name": "x",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 5297,
                  "src": "515:9:44",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5287,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "515:7:44",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5290,
                  "mutability": "mutable",
                  "name": "y",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 5297,
                  "src": "526:9:44",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5289,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "526:7:44",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "514:22:44"
            },
            "returnParameters": {
              "id": 5294,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5293,
                  "mutability": "mutable",
                  "name": "z",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 5297,
                  "src": "560:9:44",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5292,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "560:7:44",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "559:11:44"
            },
            "scope": 5298,
            "src": "492:165:44",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 5299,
        "src": "244:415:44"
      }
    ],
    "src": "45:615:44"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "project:/contracts/interfaces/uniswap/UnsafeMath.sol",
      "exportedSymbols": {
        "UnsafeMath": [
          5298
        ]
      },
      "license": "GPL-2.0-or-later"
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            ">=",
            "0.5",
            ".0"
          ]
        },
        "id": 5284,
        "name": "PragmaDirective",
        "src": "45:24:44"
      },
      {
        "attributes": {
          "abstract": false,
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "library",
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            5298
          ],
          "name": "UnsafeMath",
          "scope": 5299
        },
        "children": [
          {
            "attributes": {
              "text": "@title Math functions that do not check inputs or outputs\n @notice Contains methods that perform common math functions but do not do any overflow or underflow checks"
            },
            "id": 5285,
            "name": "StructuredDocumentation",
            "src": "71:173:44"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "divRoundingUp",
              "overrides": null,
              "scope": 5298,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": "@notice Returns ceil(x / y)\n @dev division by 0 has unspecified behavior, and must be checked externally\n @param x The dividend\n @param y The divisor\n @return z The quotient, ceil(x / y)"
                },
                "id": 5286,
                "name": "StructuredDocumentation",
                "src": "269:218:44"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "x",
                      "overrides": null,
                      "scope": 5297,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5287,
                        "name": "ElementaryTypeName",
                        "src": "515:7:44"
                      }
                    ],
                    "id": 5288,
                    "name": "VariableDeclaration",
                    "src": "515:9:44"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "y",
                      "overrides": null,
                      "scope": 5297,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5289,
                        "name": "ElementaryTypeName",
                        "src": "526:7:44"
                      }
                    ],
                    "id": 5290,
                    "name": "VariableDeclaration",
                    "src": "526:9:44"
                  }
                ],
                "id": 5291,
                "name": "ParameterList",
                "src": "514:22:44"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "z",
                      "overrides": null,
                      "scope": 5297,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5292,
                        "name": "ElementaryTypeName",
                        "src": "560:7:44"
                      }
                    ],
                    "id": 5293,
                    "name": "VariableDeclaration",
                    "src": "560:9:44"
                  }
                ],
                "id": 5294,
                "name": "ParameterList",
                "src": "559:11:44"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "evmVersion": "istanbul",
                      "externalReferences": [
                        {
                          "declaration": 5288,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "617:1:44",
                          "valueSize": 1
                        },
                        {
                          "declaration": 5288,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "631:1:44",
                          "valueSize": 1
                        },
                        {
                          "declaration": 5290,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "620:1:44",
                          "valueSize": 1
                        },
                        {
                          "declaration": 5290,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "634:1:44",
                          "valueSize": 1
                        },
                        {
                          "declaration": 5293,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "604:1:44",
                          "valueSize": 1
                        }
                      ],
                      "operations": "{\n    z := add(div(x, y), gt(mod(x, y), 0))\n}"
                    },
                    "children": [],
                    "id": 5295,
                    "name": "InlineAssembly",
                    "src": "581:70:44"
                  }
                ],
                "id": 5296,
                "name": "Block",
                "src": "571:86:44"
              }
            ],
            "id": 5297,
            "name": "FunctionDefinition",
            "src": "492:165:44"
          }
        ],
        "id": 5298,
        "name": "ContractDefinition",
        "src": "244:415:44"
      }
    ],
    "id": 5299,
    "name": "SourceUnit",
    "src": "45:615:44"
  },
  "compiler": {
    "name": "solc",
    "version": "0.6.8+commit.0bbfe453.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.4.16",
  "updatedAt": "2025-02-07T17:50:42.819Z",
  "devdoc": {
    "methods": {},
    "title": "Math functions that do not check inputs or outputs"
  },
  "userdoc": {
    "methods": {},
    "notice": "Contains methods that perform common math functions but do not do any overflow or underflow checks"
  }
}