@josojo/forkonomics-contracts
Version:
realitytoken basic contracts
699 lines • 26.3 kB
JSON
{
"contractName": "RealitioSafeMath32",
"abi": [],
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582018ebde31f8855e51cd6d304f97f471ad092f1f1329897ce1b6008fc452bee8550029",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582018ebde31f8855e51cd6d304f97f471ad092f1f1329897ce1b6008fc452bee8550029",
"sourceMap": "223:158:9:-;;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": "223:158:9:-;;;;;;;;",
"source": "pragma solidity 0.4.25;\n\n/**\n * @title RealitioSafeMath32\n * @dev Math operations with safety checks that throw on error\n * @dev Copy of SafeMath but for uint32 instead of uint256\n * @dev Deleted functions we don't use\n */\nlibrary RealitioSafeMath32 {\n function add(uint32 a, uint32 b) internal pure returns (uint32) {\n uint32 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n",
"sourcePath": "@realitio/realitio-contracts/truffle/contracts/RealitioSafeMath32.sol",
"ast": {
"absolutePath": "@realitio/realitio-contracts/truffle/contracts/RealitioSafeMath32.sol",
"exportedSymbols": {
"RealitioSafeMath32": [
4866
]
},
"id": 4867,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4841,
"literals": [
"solidity",
"0.4",
".25"
],
"nodeType": "PragmaDirective",
"src": "0:23:9"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@title RealitioSafeMath32\n@dev Math operations with safety checks that throw on error\n@dev Copy of SafeMath but for uint32 instead of uint256\n@dev Deleted functions we don't use",
"fullyImplemented": true,
"id": 4866,
"linearizedBaseContracts": [
4866
],
"name": "RealitioSafeMath32",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 4864,
"nodeType": "Block",
"src": "318:61:9",
"statements": [
{
"assignments": [
4851
],
"declarations": [
{
"constant": false,
"id": 4851,
"name": "c",
"nodeType": "VariableDeclaration",
"scope": 4865,
"src": "324:8:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 4850,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "324:6:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 4855,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 4854,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4852,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4843,
"src": "335:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 4853,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4845,
"src": "339:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "335:5:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "324:16:9"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 4859,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4857,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4851,
"src": "353:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 4858,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4843,
"src": "358:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "353:6:9",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 4856,
"name": "assert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5382,
"src": "346:6:9",
"typeDescriptions": {
"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 4860,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "346:14:9",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4861,
"nodeType": "ExpressionStatement",
"src": "346:14:9"
},
{
"expression": {
"argumentTypes": null,
"id": 4862,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4851,
"src": "373:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"functionReturnParameters": 4849,
"id": 4863,
"nodeType": "Return",
"src": "366:8:9"
}
]
},
"documentation": null,
"id": 4865,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "add",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4846,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4843,
"name": "a",
"nodeType": "VariableDeclaration",
"scope": 4865,
"src": "267:8:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 4842,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "267:6:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4845,
"name": "b",
"nodeType": "VariableDeclaration",
"scope": 4865,
"src": "277:8:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 4844,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "277:6:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "266:20:9"
},
"payable": false,
"returnParameters": {
"id": 4849,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4848,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 4865,
"src": "310:6:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 4847,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "310:6:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "309:8:9"
},
"scope": 4866,
"src": "254:125:9",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 4867,
"src": "223:158:9"
}
],
"src": "0:382:9"
},
"legacyAST": {
"absolutePath": "@realitio/realitio-contracts/truffle/contracts/RealitioSafeMath32.sol",
"exportedSymbols": {
"RealitioSafeMath32": [
4866
]
},
"id": 4867,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4841,
"literals": [
"solidity",
"0.4",
".25"
],
"nodeType": "PragmaDirective",
"src": "0:23:9"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@title RealitioSafeMath32\n@dev Math operations with safety checks that throw on error\n@dev Copy of SafeMath but for uint32 instead of uint256\n@dev Deleted functions we don't use",
"fullyImplemented": true,
"id": 4866,
"linearizedBaseContracts": [
4866
],
"name": "RealitioSafeMath32",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 4864,
"nodeType": "Block",
"src": "318:61:9",
"statements": [
{
"assignments": [
4851
],
"declarations": [
{
"constant": false,
"id": 4851,
"name": "c",
"nodeType": "VariableDeclaration",
"scope": 4865,
"src": "324:8:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 4850,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "324:6:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 4855,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 4854,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4852,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4843,
"src": "335:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 4853,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4845,
"src": "339:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "335:5:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "324:16:9"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 4859,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4857,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4851,
"src": "353:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 4858,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4843,
"src": "358:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "353:6:9",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 4856,
"name": "assert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5382,
"src": "346:6:9",
"typeDescriptions": {
"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 4860,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "346:14:9",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4861,
"nodeType": "ExpressionStatement",
"src": "346:14:9"
},
{
"expression": {
"argumentTypes": null,
"id": 4862,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4851,
"src": "373:1:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"functionReturnParameters": 4849,
"id": 4863,
"nodeType": "Return",
"src": "366:8:9"
}
]
},
"documentation": null,
"id": 4865,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "add",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4846,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4843,
"name": "a",
"nodeType": "VariableDeclaration",
"scope": 4865,
"src": "267:8:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 4842,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "267:6:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4845,
"name": "b",
"nodeType": "VariableDeclaration",
"scope": 4865,
"src": "277:8:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 4844,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "277:6:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "266:20:9"
},
"payable": false,
"returnParameters": {
"id": 4849,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4848,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 4865,
"src": "310:6:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 4847,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "310:6:9",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "309:8:9"
},
"scope": 4866,
"src": "254:125:9",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 4867,
"src": "223:158:9"
}
],
"src": "0:382:9"
},
"compiler": {
"name": "solc",
"version": "0.4.25+commit.59dbf8f1.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.0-beta.1",
"updatedAt": "2018-10-27T11:24:32.616Z"
}