UNPKG

@josojo/realitytoken-contracts

Version:
1,277 lines 91.6 kB
{ "contractName": "SafeMath", "abi": [], "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820a7682b907fe2653998f8a00e5c08803cbc4350476bffa4ae6d68d12b072b52660029", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820a7682b907fe2653998f8a00e5c08803cbc4350476bffa4ae6d68d12b072b52660029", "sourceMap": "117:1251:24:-;;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": "117:1251:24:-;;;;;;;;", "source": "pragma solidity ^0.4.24;\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\n // Gas optimization: this is cheaper than asserting 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (_a == 0) {\n return 0;\n }\n\n c = _a * _b;\n assert(c / _a == _b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\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 _a / _b;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {\n assert(_b <= _a);\n return _a - _b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\n c = _a + _b;\n assert(c >= _a);\n return c;\n }\n}\n", "sourcePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", "ast": { "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", "exportedSymbols": { "SafeMath": [ 9165 ] }, "id": 9166, "nodeType": "SourceUnit", "nodes": [ { "id": 9073, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:24" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", "fullyImplemented": true, "id": 9165, "linearizedBaseContracts": [ 9165 ], "name": "SafeMath", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 9105, "nodeType": "Block", "src": "274:309:24", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9084, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9082, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9075, "src": "489:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 9083, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "495:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "489:7:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 9088, "nodeType": "IfStatement", "src": "485:36:24", "trueBody": { "id": 9087, "nodeType": "Block", "src": "498:23:24", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", "id": 9085, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "513:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 9081, "id": 9086, "nodeType": "Return", "src": "506:8:24" } ] } }, { "expression": { "argumentTypes": null, "id": 9093, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9089, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9080, "src": "527:1:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9092, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9090, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9075, "src": "531:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "argumentTypes": null, "id": 9091, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9077, "src": "536:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "531:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "527:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9094, "nodeType": "ExpressionStatement", "src": "527:11:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9100, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9098, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9096, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9080, "src": "551:1:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "argumentTypes": null, "id": 9097, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9075, "src": "555:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "551:6:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 9099, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9077, "src": "561:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "551:12:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 9095, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9169, "src": "544:6:24", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 9101, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "544:20:24", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9102, "nodeType": "ExpressionStatement", "src": "544:20:24" }, { "expression": { "argumentTypes": null, "id": 9103, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9080, "src": "577:1:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 9081, "id": 9104, "nodeType": "Return", "src": "570:8:24" } ] }, "documentation": "@dev Multiplies two numbers, throws on overflow.", "id": 9106, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "mul", "nodeType": "FunctionDefinition", "parameters": { "id": 9078, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9075, "name": "_a", "nodeType": "VariableDeclaration", "scope": 9106, "src": "216:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9074, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "216:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 9077, "name": "_b", "nodeType": "VariableDeclaration", "scope": 9106, "src": "228:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9076, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "228:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "215:24:24" }, "payable": false, "returnParameters": { "id": 9081, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9080, "name": "c", "nodeType": "VariableDeclaration", "scope": 9106, "src": "263:9:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9079, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "263:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "262:11:24" }, "scope": 9165, "src": "203:380:24", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 9119, "nodeType": "Block", "src": "734:214:24", "statements": [ { "expression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9117, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9115, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9108, "src": "936:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "argumentTypes": null, "id": 9116, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9110, "src": "941:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "936:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 9114, "id": 9118, "nodeType": "Return", "src": "929:14:24" } ] }, "documentation": "@dev Integer division of two numbers, truncating the quotient.", "id": 9120, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "div", "nodeType": "FunctionDefinition", "parameters": { "id": 9111, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9108, "name": "_a", "nodeType": "VariableDeclaration", "scope": 9120, "src": "678:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9107, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "678:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 9110, "name": "_b", "nodeType": "VariableDeclaration", "scope": 9120, "src": "690:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9109, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "690:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "677:24:24" }, "payable": false, "returnParameters": { "id": 9114, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9113, "name": "", "nodeType": "VariableDeclaration", "scope": 9120, "src": "725:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9112, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "725:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "724:9:24" }, "scope": 9165, "src": "665:283:24", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 9139, "nodeType": "Block", "src": "1129:47:24", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9132, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9130, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9124, "src": "1142:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 9131, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9122, "src": "1148:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1142:8:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 9129, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9169, "src": "1135:6:24", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 9133, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1135:16:24", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9134, "nodeType": "ExpressionStatement", "src": "1135:16:24" }, { "expression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9137, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9135, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9122, "src": "1164:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "argumentTypes": null, "id": 9136, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9124, "src": "1169:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1164:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 9128, "id": 9138, "nodeType": "Return", "src": "1157:14:24" } ] }, "documentation": "@dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).", "id": 9140, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "sub", "nodeType": "FunctionDefinition", "parameters": { "id": 9125, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9122, "name": "_a", "nodeType": "VariableDeclaration", "scope": 9140, "src": "1073:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9121, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1073:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 9124, "name": "_b", "nodeType": "VariableDeclaration", "scope": 9140, "src": "1085:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9123, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1085:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1072:24:24" }, "payable": false, "returnParameters": { "id": 9128, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9127, "name": "", "nodeType": "VariableDeclaration", "scope": 9140, "src": "1120:7:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9126, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1120:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1119:9:24" }, "scope": 9165, "src": "1060:116:24", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 9163, "nodeType": "Block", "src": "1309:57:24", "statements": [ { "expression": { "argumentTypes": null, "id": 9153, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9149, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9147, "src": "1315:1:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9152, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9150, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9142, "src": "1319:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "argumentTypes": null, "id": 9151, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9144, "src": "1324:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1319:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1315:11:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9154, "nodeType": "ExpressionStatement", "src": "1315:11:24" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9158, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9156, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9147, "src": "1339:1:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "id": 9157, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9142, "src": "1344:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1339:7:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 9155, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9169, "src": "1332:6:24", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 9159, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1332:15:24", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9160, "nodeType": "ExpressionStatement", "src": "1332:15:24" }, { "expression": { "argumentTypes": null, "id": 9161, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9147, "src": "1360:1:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 9148, "id": 9162, "nodeType": "Return", "src": "1353:8:24" } ] }, "documentation": "@dev Adds two numbers, throws on overflow.", "id": 9164, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "add", "nodeType": "FunctionDefinition", "parameters": { "id": 9145, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9142, "name": "_a", "nodeType": "VariableDeclaration", "scope": 9164, "src": "1251:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9141, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1251:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 9144, "name": "_b", "nodeType": "VariableDeclaration", "scope": 9164, "src": "1263:10:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9143, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1263:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1250:24:24" }, "payable": false, "returnParameters": { "id": 9148, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9147, "name": "c", "nodeType": "VariableDeclaration", "scope": 9164, "src": "1298:9:24", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9146, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1298:7:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1297:11:24" }, "scope": 9165, "src": "1238:128:24", "stateMutability": "pure", "superFunction": null, "visibility": "internal" } ], "scope": 9166, "src": "117:1251:24" } ], "src": "0:1369:24" }, "legacyAST": { "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", "exportedSymbols": { "SafeMath": [ 9165 ] }, "id": 9166, "nodeType": "SourceUnit", "nodes": [ { "id": 9073, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:24" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", "fullyImplemented": true, "id": 9165, "linearizedBaseContracts": [ 9165 ], "name": "SafeMath", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 9105, "nodeType": "Block", "src": "274:309:24", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 9084, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 9082, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9075, "src": "489:2:24", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 9083, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "495:1:24", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "489:7:24", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 9088, "nodeType": "IfStatemen