{
  "contractName": "SafeMathUint",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.6.11+commit.5ef660b1\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Math operations with safety checks that revert on error\",\"kind\":\"dev\",\"methods\":{},\"title\":\"SafeMathUint\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/FDT/math/SafeMathUint.sol\":\"SafeMathUint\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/FDT/math/SafeMathUint.sol\":{\"keccak256\":\"0xdba5f11842c7ef0d82b4fdccf5430ae81d677c426a8bbe1c5dd4df62ab9e43d9\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://216bba31081f8f7bae15fbd79648300a04740c472f23957963354497d82d86b2\",\"dweb:/ipfs/QmXMnSfoSKbobfQkcRExx8RC5ZSPCCiNdcb1xy3v3vGgWV\"]}},\"version\":1}",
  "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207fe205d644880e1b5fdaf4a30fe64652b38b56082413595d3578cd27ab1ef4de64736f6c634300060b0033",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207fe205d644880e1b5fdaf4a30fe64652b38b56082413595d3578cd27ab1ef4de64736f6c634300060b0033",
  "immutableReferences": {},
  "sourceMap": "163:175:56:-:0;;;;;;;;;;;;;;;;;;;;;;;;;",
  "deployedSourceMap": "163:175:56:-:0;;;;;;;;",
  "source": "// \"SPDX-License-Identifier: Apache-2.0\"\npragma solidity ^0.6.11;\n\n\n/**\n * @title SafeMathUint\n * @dev Math operations with safety checks that revert on error\n */\nlibrary SafeMathUint {\n    function toInt256Safe(uint256 a) internal pure returns (int256) {\n        int256 b = int256(a);\n\n        require(b >= 0);\n\n        return b;\n    }\n}\n",
  "sourcePath": "/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/FDT/math/SafeMathUint.sol",
  "ast": {
    "absolutePath": "/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/FDT/math/SafeMathUint.sol",
    "exportedSymbols": {
      "SafeMathUint": [
        19732
      ]
    },
    "id": 19733,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 19707,
        "literals": [
          "solidity",
          "^",
          "0.6",
          ".11"
        ],
        "nodeType": "PragmaDirective",
        "src": "41:24:56"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": {
          "id": 19708,
          "nodeType": "StructuredDocumentation",
          "src": "68:94:56",
          "text": " @title SafeMathUint\n @dev Math operations with safety checks that revert on error"
        },
        "fullyImplemented": true,
        "id": 19732,
        "linearizedBaseContracts": [
          19732
        ],
        "name": "SafeMathUint",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 19730,
              "nodeType": "Block",
              "src": "254:82:56",
              "statements": [
                {
                  "assignments": [
                    19716
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 19716,
                      "mutability": "mutable",
                      "name": "b",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 19730,
                      "src": "264:8:56",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      },
                      "typeName": {
                        "id": 19715,
                        "name": "int256",
                        "nodeType": "ElementaryTypeName",
                        "src": "264:6:56",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 19721,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 19719,
                        "name": "a",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 19710,
                        "src": "282:1:56",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 19718,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "275:6:56",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int256_$",
                        "typeString": "type(int256)"
                      },
                      "typeName": {
                        "id": 19717,
                        "name": "int256",
                        "nodeType": "ElementaryTypeName",
                        "src": "275:6:56",
                        "typeDescriptions": {
                          "typeIdentifier": null,
                          "typeString": null
                        }
                      }
                    },
                    "id": 19720,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "275:9:56",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "264:20:56"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "id": 19725,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 19723,
                          "name": "b",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 19716,
                          "src": "303:1:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 19724,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "308:1:56",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "303:6:56",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 19722,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "295:7:56",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 19726,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "295:15:56",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 19727,
                  "nodeType": "ExpressionStatement",
                  "src": "295:15:56"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 19728,
                    "name": "b",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 19716,
                    "src": "328:1:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "functionReturnParameters": 19714,
                  "id": 19729,
                  "nodeType": "Return",
                  "src": "321:8:56"
                }
              ]
            },
            "documentation": null,
            "id": 19731,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt256Safe",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 19711,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 19710,
                  "mutability": "mutable",
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19731,
                  "src": "212:9:56",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 19709,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "212:7:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "211:11:56"
            },
            "returnParameters": {
              "id": 19714,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 19713,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19731,
                  "src": "246:6:56",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 19712,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "246:6:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "245:8:56"
            },
            "scope": 19732,
            "src": "190:146:56",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 19733,
        "src": "163:175:56"
      }
    ],
    "src": "41:298:56"
  },
  "legacyAST": {
    "absolutePath": "/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/FDT/math/SafeMathUint.sol",
    "exportedSymbols": {
      "SafeMathUint": [
        19732
      ]
    },
    "id": 19733,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 19707,
        "literals": [
          "solidity",
          "^",
          "0.6",
          ".11"
        ],
        "nodeType": "PragmaDirective",
        "src": "41:24:56"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": {
          "id": 19708,
          "nodeType": "StructuredDocumentation",
          "src": "68:94:56",
          "text": " @title SafeMathUint\n @dev Math operations with safety checks that revert on error"
        },
        "fullyImplemented": true,
        "id": 19732,
        "linearizedBaseContracts": [
          19732
        ],
        "name": "SafeMathUint",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 19730,
              "nodeType": "Block",
              "src": "254:82:56",
              "statements": [
                {
                  "assignments": [
                    19716
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 19716,
                      "mutability": "mutable",
                      "name": "b",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 19730,
                      "src": "264:8:56",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      },
                      "typeName": {
                        "id": 19715,
                        "name": "int256",
                        "nodeType": "ElementaryTypeName",
                        "src": "264:6:56",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 19721,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 19719,
                        "name": "a",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 19710,
                        "src": "282:1:56",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 19718,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "275:6:56",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int256_$",
                        "typeString": "type(int256)"
                      },
                      "typeName": {
                        "id": 19717,
                        "name": "int256",
                        "nodeType": "ElementaryTypeName",
                        "src": "275:6:56",
                        "typeDescriptions": {
                          "typeIdentifier": null,
                          "typeString": null
                        }
                      }
                    },
                    "id": 19720,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "275:9:56",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "264:20:56"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "id": 19725,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 19723,
                          "name": "b",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 19716,
                          "src": "303:1:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 19724,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "308:1:56",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "303:6:56",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 19722,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "295:7:56",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 19726,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "295:15:56",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 19727,
                  "nodeType": "ExpressionStatement",
                  "src": "295:15:56"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 19728,
                    "name": "b",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 19716,
                    "src": "328:1:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "functionReturnParameters": 19714,
                  "id": 19729,
                  "nodeType": "Return",
                  "src": "321:8:56"
                }
              ]
            },
            "documentation": null,
            "id": 19731,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt256Safe",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 19711,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 19710,
                  "mutability": "mutable",
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19731,
                  "src": "212:9:56",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 19709,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "212:7:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "211:11:56"
            },
            "returnParameters": {
              "id": 19714,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 19713,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19731,
                  "src": "246:6:56",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 19712,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "246:6:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "245:8:56"
            },
            "scope": 19732,
            "src": "190:146:56",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 19733,
        "src": "163:175:56"
      }
    ],
    "src": "41:298:56"
  },
  "compiler": {
    "name": "solc",
    "version": "0.6.11+commit.5ef660b1.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.2.0",
  "updatedAt": "2020-08-12T09:47:18.173Z",
  "devdoc": {
    "details": "Math operations with safety checks that revert on error",
    "kind": "dev",
    "methods": {},
    "title": "SafeMathUint",
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  }
}