UNPKG

jcc-solidity-utils

Version:
1,236 lines (1,235 loc) 119 kB
{ "contractName": "SafeMath", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x239546071316c89d3bbc9e61b2ccae270a4493bbd2f7c240052f533807d50ab7\",\"urls\":[\"bzzr://267bf48e0a30f7b671aa3c98a6b27ffe7bc64efd6533f49e54188b520baa94c5\"]}},\"version\":1}", "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058202e5256c951b094285dca076a71c9941643116a6ecb40e10ecd84bfaeb9ecf4b40029", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058202e5256c951b094285dca076a71c9941643116a6ecb40e10ecd84bfaeb9ecf4b40029", "sourceMap": "170:1420:20:-;;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": "170:1420:20:-;;;;;;;;", "source": "pragma solidity >=0.4.24;\n\n/**\n * @dev Math operations with safety checks that throw on error. This contract is based\n * on the source code at https://goo.gl/iyQsmU.\n */\nlibrary SafeMath {\n /**\n * @dev Multiplies two numbers, throws on overflow.\n * @param _a Factor number.\n * @param _b Factor number.\n */\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 /**\n * @dev Integer division of two numbers, truncating the quotient.\n * @param _a Dividend number.\n * @param _b Divisor number.\n */\n function div(uint256 _a, uint256 _b) internal pure returns (uint256) {\n uint256 c = _a / _b;\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n * @param _a Minuend number.\n * @param _b Subtrahend number.\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 * @param _a Number.\n * @param _b Number.\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 function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b != 0, \"can not mod zero\");\n return a % b;\n }\n}\n", "sourcePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol", "ast": { "absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol", "exportedSymbols": { "SafeMath": [ 5657 ] }, "id": 5658, "nodeType": "SourceUnit", "nodes": [ { "id": 5540, "literals": [ "solidity", ">=", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:25:20" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "@dev Math operations with safety checks that throw on error. This contract is based\non the source code at https://goo.gl/iyQsmU.", "fullyImplemented": true, "id": 5657, "linearizedBaseContracts": [ 5657 ], "name": "SafeMath", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 5572, "nodeType": "Block", "src": "386:111:20", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5551, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5549, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5542, "src": "396:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 5550, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "402:1:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "396:7:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5555, "nodeType": "IfStatement", "src": "392:36:20", "trueBody": { "id": 5554, "nodeType": "Block", "src": "405:23:20", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", "id": 5552, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "420:1:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 5548, "id": 5553, "nodeType": "Return", "src": "413:8:20" } ] } }, { "assignments": [ 5557 ], "declarations": [ { "constant": false, "id": 5557, "name": "c", "nodeType": "VariableDeclaration", "scope": 5573, "src": "433:9:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5556, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "433:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 5561, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5560, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5558, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5542, "src": "445:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "argumentTypes": null, "id": 5559, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5544, "src": "450:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "445:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "433:19:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5567, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5565, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5563, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5557, "src": "465:1:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "argumentTypes": null, "id": 5564, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5542, "src": "469:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "465:6:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 5566, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5544, "src": "475:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "465:12:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 5562, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9030, "src": "458:6:20", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 5568, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "458:20:20", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5569, "nodeType": "ExpressionStatement", "src": "458:20:20" }, { "expression": { "argumentTypes": null, "id": 5570, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5557, "src": "491:1:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 5548, "id": 5571, "nodeType": "Return", "src": "484:8:20" } ] }, "documentation": "@dev Multiplies two numbers, throws on overflow.\n@param _a Factor number.\n@param _b Factor number.", "id": 5573, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "mul", "nodeType": "FunctionDefinition", "parameters": { "id": 5545, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5542, "name": "_a", "nodeType": "VariableDeclaration", "scope": 5573, "src": "330:10:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5541, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "330:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5544, "name": "_b", "nodeType": "VariableDeclaration", "scope": 5573, "src": "342:10:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5543, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "342:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "329:24:20" }, "payable": false, "returnParameters": { "id": 5548, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5547, "name": "", "nodeType": "VariableDeclaration", "scope": 5573, "src": "377:7:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5546, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "377:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "376:9:20" }, "scope": 5657, "src": "317:180:20", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 5590, "nodeType": "Block", "src": "713:200:20", "statements": [ { "assignments": [ 5583 ], "declarations": [ { "constant": false, "id": 5583, "name": "c", "nodeType": "VariableDeclaration", "scope": 5591, "src": "719:9:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5582, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "719:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 5587, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5586, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5584, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5575, "src": "731:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "argumentTypes": null, "id": 5585, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5577, "src": "736:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "731:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "719:19:20" }, { "expression": { "argumentTypes": null, "id": 5588, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5583, "src": "907:1:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 5581, "id": 5589, "nodeType": "Return", "src": "900:8:20" } ] }, "documentation": "@dev Integer division of two numbers, truncating the quotient.\n@param _a Dividend number.\n@param _b Divisor number.", "id": 5591, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "div", "nodeType": "FunctionDefinition", "parameters": { "id": 5578, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5575, "name": "_a", "nodeType": "VariableDeclaration", "scope": 5591, "src": "657:10:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5574, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "657:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5577, "name": "_b", "nodeType": "VariableDeclaration", "scope": 5591, "src": "669:10:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5576, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "669:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "656:24:20" }, "payable": false, "returnParameters": { "id": 5581, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5580, "name": "", "nodeType": "VariableDeclaration", "scope": 5591, "src": "704:7:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5579, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "704:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "703:9:20" }, "scope": 5657, "src": "644:269:20", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 5610, "nodeType": "Block", "src": "1162:47:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5603, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5601, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5595, "src": "1175:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 5602, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5593, "src": "1181:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1175:8:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 5600, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9030, "src": "1168:6:20", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 5604, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1168:16:20", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5605, "nodeType": "ExpressionStatement", "src": "1168:16:20" }, { "expression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5608, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5606, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5593, "src": "1197:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "argumentTypes": null, "id": 5607, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5595, "src": "1202:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1197:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 5599, "id": 5609, "nodeType": "Return", "src": "1190:14:20" } ] }, "documentation": "@dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n@param _a Minuend number.\n@param _b Subtrahend number.", "id": 5611, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "sub", "nodeType": "FunctionDefinition", "parameters": { "id": 5596, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5593, "name": "_a", "nodeType": "VariableDeclaration", "scope": 5611, "src": "1106:10:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5592, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1106:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5595, "name": "_b", "nodeType": "VariableDeclaration", "scope": 5611, "src": "1118:10:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5594, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1118:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1105:24:20" }, "payable": false, "returnParameters": { "id": 5599, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5598, "name": "", "nodeType": "VariableDeclaration", "scope": 5611, "src": "1153:7:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5597, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1153:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1152:9:20" }, "scope": 5657, "src": "1093:116:20", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 5634, "nodeType": "Block", "src": "1388:65:20", "statements": [ { "assignments": [ 5621 ], "declarations": [ { "constant": false, "id": 5621, "name": "c", "nodeType": "VariableDeclaration", "scope": 5635, "src": "1394:9:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5620, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1394:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 5625, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5624, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5622, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5613, "src": "1406:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "argumentTypes": null, "id": 5623, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5615, "src": "1411:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1406:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "1394:19:20" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5629, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5627, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5621, "src": "1426:1:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "id": 5628, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5613, "src": "1431:2:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1426:7:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 5626, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9030, "src": "1419:6:20", "typeDescriptions": { "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 5630, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1419:15:20", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5631, "nodeType": "ExpressionStatement", "src": "1419:15:20" }, { "expression": { "argumentTypes": null, "id": 5632, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5621, "src": "1447:1:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 5619, "id": 5633, "nodeType": "Return", "src": "1440:8:20" } ] }, "documentation": "@dev Adds two numbers, throws on overflow.\n@param _a Number.\n@param _b Number.", "id": 5635, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "add", "nodeType": "FunctionDefinition", "parameters": { "id": 5616, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5613, "name": "_a", "nodeType": "VariableDeclaration", "scope": 5635, "src": "1332:10:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5612, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1332:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5615, "name": "_b", "nodeType": "VariableDeclaration", "scope": 5635, "src": "1344:10:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5614, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1344:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1331:24:20" }, "payable": false, "returnParameters": { "id": 5619, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5618, "name": "", "nodeType": "VariableDeclaration", "scope": 5635, "src": "1379:7:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5617, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1379:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1378:9:20" }, "scope": 5657, "src": "1319:134:20", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 5655,