@josojo/forkonomics-contracts
Version:
realitytoken basic contracts
1,304 lines • 94.1 kB
JSON
{
"contractName": "RealitioSafeMath256",
"abi": [],
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820d82eccc1dc6ec8c5eb7c024c7f45290af00389169822014c2c8d9a85a42c7e1f0029",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820d82eccc1dc6ec8c5eb7c024c7f45290af00389169822014c2c8d9a85a42c7e1f0029",
"sourceMap": "126:723:8:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24",
"deployedSourceMap": "126:723:8:-;;;;;;;;",
"source": "pragma solidity 0.4.25;\n\n/**\n * @title ReailtioSafeMath256\n * @dev Math operations with safety checks that throw on error\n */\nlibrary RealitioSafeMath256 {\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n",
"sourcePath": "@realitio/realitio-contracts/truffle/contracts/RealitioSafeMath256.sol",
"ast": {
"absolutePath": "@realitio/realitio-contracts/truffle/contracts/RealitioSafeMath256.sol",
"exportedSymbols": {
"RealitioSafeMath256": [
4839
]
},
"id": 4840,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4743,
"literals": [
"solidity",
"0.4",
".25"
],
"nodeType": "PragmaDirective",
"src": "0:23:8"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@title ReailtioSafeMath256\n@dev Math operations with safety checks that throw on error",
"fullyImplemented": true,
"id": 4839,
"linearizedBaseContracts": [
4839
],
"name": "RealitioSafeMath256",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 4775,
"nodeType": "Block",
"src": "225:106:8",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4754,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4752,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4745,
"src": "235:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 4753,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "240:1:8",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "235:6:8",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 4758,
"nodeType": "IfStatement",
"src": "231:35:8",
"trueBody": {
"id": 4757,
"nodeType": "Block",
"src": "243:23:8",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "30",
"id": 4755,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "258:1:8",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"functionReturnParameters": 4751,
"id": 4756,
"nodeType": "Return",
"src": "251:8:8"
}
]
}
},
{
"assignments": [
4760
],
"declarations": [
{
"constant": false,
"id": 4760,
"name": "c",
"nodeType": "VariableDeclaration",
"scope": 4776,
"src": "271:9:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4759,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "271:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 4764,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4763,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4761,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4745,
"src": "283:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"id": 4762,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4747,
"src": "287:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "283:5:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "271:17:8"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4770,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4768,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4766,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4760,
"src": "301:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 4767,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4745,
"src": "305:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "301:5:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 4769,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4747,
"src": "310:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "301:10:8",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 4765,
"name": "assert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5382,
"src": "294:6:8",
"typeDescriptions": {
"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 4771,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "294:18:8",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4772,
"nodeType": "ExpressionStatement",
"src": "294:18:8"
},
{
"expression": {
"argumentTypes": null,
"id": 4773,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4760,
"src": "325:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4751,
"id": 4774,
"nodeType": "Return",
"src": "318:8:8"
}
]
},
"documentation": null,
"id": 4776,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "mul",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4748,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4745,
"name": "a",
"nodeType": "VariableDeclaration",
"scope": 4776,
"src": "171:9:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4744,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "171:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4747,
"name": "b",
"nodeType": "VariableDeclaration",
"scope": 4776,
"src": "182:9:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4746,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "182:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "170:22:8"
},
"payable": false,
"returnParameters": {
"id": 4751,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4750,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 4776,
"src": "216:7:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4749,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "216:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "215:9:8"
},
"scope": 4839,
"src": "158:173:8",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 4793,
"nodeType": "Block",
"src": "402:198:8",
"statements": [
{
"assignments": [
4786
],
"declarations": [
{
"constant": false,
"id": 4786,
"name": "c",
"nodeType": "VariableDeclaration",
"scope": 4794,
"src": "482:9:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4785,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "482:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 4790,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4789,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4787,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4778,
"src": "494:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 4788,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4780,
"src": "498:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "494:5:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "482:17:8"
},
{
"expression": {
"argumentTypes": null,
"id": 4791,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4786,
"src": "594:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4784,
"id": 4792,
"nodeType": "Return",
"src": "587:8:8"
}
]
},
"documentation": null,
"id": 4794,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "div",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4781,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4778,
"name": "a",
"nodeType": "VariableDeclaration",
"scope": 4794,
"src": "348:9:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4777,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "348:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4780,
"name": "b",
"nodeType": "VariableDeclaration",
"scope": 4794,
"src": "359:9:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4779,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "359:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "347:22:8"
},
"payable": false,
"returnParameters": {
"id": 4784,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4783,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 4794,
"src": "393:7:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4782,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "393:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "392:9:8"
},
"scope": 4839,
"src": "335:265:8",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 4813,
"nodeType": "Block",
"src": "671:43:8",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4806,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4804,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4798,
"src": "684:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 4805,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4796,
"src": "689:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "684:6:8",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 4803,
"name": "assert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5382,
"src": "677:6:8",
"typeDescriptions": {
"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 4807,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "677:14:8",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4808,
"nodeType": "ExpressionStatement",
"src": "677:14:8"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4811,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4809,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4796,
"src": "704:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 4810,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4798,
"src": "708:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "704:5:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4802,
"id": 4812,
"nodeType": "Return",
"src": "697:12:8"
}
]
},
"documentation": null,
"id": 4814,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "sub",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4799,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4796,
"name": "a",
"nodeType": "VariableDeclaration",
"scope": 4814,
"src": "617:9:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4795,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "617:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4798,
"name": "b",
"nodeType": "VariableDeclaration",
"scope": 4814,
"src": "628:9:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4797,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "628:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "616:22:8"
},
"payable": false,
"returnParameters": {
"id": 4802,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4801,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 4814,
"src": "662:7:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4800,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "662:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "661:9:8"
},
"scope": 4839,
"src": "604:110:8",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 4837,
"nodeType": "Block",
"src": "785:62:8",
"statements": [
{
"assignments": [
4824
],
"declarations": [
{
"constant": false,
"id": 4824,
"name": "c",
"nodeType": "VariableDeclaration",
"scope": 4838,
"src": "791:9:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4823,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "791:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 4828,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4827,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4825,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4816,
"src": "803:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 4826,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4818,
"src": "807:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "803:5:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "791:17:8"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4832,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4830,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4824,
"src": "821:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 4831,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4816,
"src": "826:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "821:6:8",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 4829,
"name": "assert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5382,
"src": "814:6:8",
"typeDescriptions": {
"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 4833,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "814:14:8",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4834,
"nodeType": "ExpressionStatement",
"src": "814:14:8"
},
{
"expression": {
"argumentTypes": null,
"id": 4835,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4824,
"src": "841:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4822,
"id": 4836,
"nodeType": "Return",
"src": "834:8:8"
}
]
},
"documentation": null,
"id": 4838,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "add",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4819,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4816,
"name": "a",
"nodeType": "VariableDeclaration",
"scope": 4838,
"src": "731:9:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4815,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "731:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4818,
"name": "b",
"nodeType": "VariableDeclaration",
"scope": 4838,
"src": "742:9:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4817,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "742:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "730:22:8"
},
"payable": false,
"returnParameters": {
"id": 4822,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4821,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 4838,
"src": "776:7:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4820,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "776:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "775:9:8"
},
"scope": 4839,
"src": "718:129:8",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 4840,
"src": "126:723:8"
}
],
"src": "0:850:8"
},
"legacyAST": {
"absolutePath": "@realitio/realitio-contracts/truffle/contracts/RealitioSafeMath256.sol",
"exportedSymbols": {
"RealitioSafeMath256": [
4839
]
},
"id": 4840,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4743,
"literals": [
"solidity",
"0.4",
".25"
],
"nodeType": "PragmaDirective",
"src": "0:23:8"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@title ReailtioSafeMath256\n@dev Math operations with safety checks that throw on error",
"fullyImplemented": true,
"id": 4839,
"linearizedBaseContracts": [
4839
],
"name": "RealitioSafeMath256",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 4775,
"nodeType": "Block",
"src": "225:106:8",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4754,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4752,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4745,
"src": "235:1:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression":