tokenboost-solidity
Version:
Solidity contracts for TokenBoost
1,278 lines (1,277 loc) • 91.6 kB
JSON
{
"contractName": "SafeMath",
"abi": [],
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058208039be690fcb121eceb5677b72be9a3448b94fbe32d322db860abcab2a433c9c0029",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058208039be690fcb121eceb5677b72be9a3448b94fbe32d322db860abcab2a433c9c0029",
"sourceMap": "117:1251:21:-;;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:21:-;;;;;;;;",
"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": "zeppelin-solidity/contracts/math/SafeMath.sol",
"ast": {
"absolutePath": "zeppelin-solidity/contracts/math/SafeMath.sol",
"exportedSymbols": {
"SafeMath": [
4798
]
},
"id": 4799,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4706,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:21"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error",
"fullyImplemented": true,
"id": 4798,
"linearizedBaseContracts": [
4798
],
"name": "SafeMath",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 4738,
"nodeType": "Block",
"src": "274:309:21",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4717,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4715,
"name": "_a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4708,
"src": "489:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 4716,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "495:1:21",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "489:7:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 4721,
"nodeType": "IfStatement",
"src": "485:36:21",
"trueBody": {
"id": 4720,
"nodeType": "Block",
"src": "498:23:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "30",
"id": 4718,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "513:1:21",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"functionReturnParameters": 4714,
"id": 4719,
"nodeType": "Return",
"src": "506:8:21"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 4726,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4722,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4713,
"src": "527:1:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4725,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4723,
"name": "_a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4708,
"src": "531:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"argumentTypes": null,
"id": 4724,
"name": "_b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4710,
"src": "536:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "531:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "527:11:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4727,
"nodeType": "ExpressionStatement",
"src": "527:11:21"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4733,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4731,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4729,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4713,
"src": "551:1:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 4730,
"name": "_a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4708,
"src": "555:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "551:6:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 4732,
"name": "_b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4710,
"src": "561:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "551:12:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 4728,
"name": "assert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6562,
"src": "544:6:21",
"typeDescriptions": {
"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 4734,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "544:20:21",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4735,
"nodeType": "ExpressionStatement",
"src": "544:20:21"
},
{
"expression": {
"argumentTypes": null,
"id": 4736,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4713,
"src": "577:1:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4714,
"id": 4737,
"nodeType": "Return",
"src": "570:8:21"
}
]
},
"documentation": "@dev Multiplies two numbers, throws on overflow.",
"id": 4739,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "mul",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4711,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4708,
"name": "_a",
"nodeType": "VariableDeclaration",
"scope": 4739,
"src": "216:10:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4707,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "216:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4710,
"name": "_b",
"nodeType": "VariableDeclaration",
"scope": 4739,
"src": "228:10:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4709,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "228:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "215:24:21"
},
"payable": false,
"returnParameters": {
"id": 4714,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4713,
"name": "c",
"nodeType": "VariableDeclaration",
"scope": 4739,
"src": "263:9:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4712,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "263:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "262:11:21"
},
"scope": 4798,
"src": "203:380:21",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 4752,
"nodeType": "Block",
"src": "734:214:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4750,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4748,
"name": "_a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4741,
"src": "936:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"id": 4749,
"name": "_b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4743,
"src": "941:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "936:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4747,
"id": 4751,
"nodeType": "Return",
"src": "929:14:21"
}
]
},
"documentation": "@dev Integer division of two numbers, truncating the quotient.",
"id": 4753,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "div",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4744,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4741,
"name": "_a",
"nodeType": "VariableDeclaration",
"scope": 4753,
"src": "678:10:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4740,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "678:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4743,
"name": "_b",
"nodeType": "VariableDeclaration",
"scope": 4753,
"src": "690:10:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4742,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "690:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "677:24:21"
},
"payable": false,
"returnParameters": {
"id": 4747,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4746,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 4753,
"src": "725:7:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4745,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "725:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "724:9:21"
},
"scope": 4798,
"src": "665:283:21",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 4772,
"nodeType": "Block",
"src": "1129:47:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4765,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4763,
"name": "_b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4757,
"src": "1142:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 4764,
"name": "_a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4755,
"src": "1148:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1142:8:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 4762,
"name": "assert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6562,
"src": "1135:6:21",
"typeDescriptions": {
"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 4766,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1135:16:21",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4767,
"nodeType": "ExpressionStatement",
"src": "1135:16:21"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4770,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4768,
"name": "_a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4755,
"src": "1164:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"id": 4769,
"name": "_b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4757,
"src": "1169:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1164:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4761,
"id": 4771,
"nodeType": "Return",
"src": "1157:14:21"
}
]
},
"documentation": "@dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).",
"id": 4773,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "sub",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4758,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4755,
"name": "_a",
"nodeType": "VariableDeclaration",
"scope": 4773,
"src": "1073:10:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4754,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1073:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4757,
"name": "_b",
"nodeType": "VariableDeclaration",
"scope": 4773,
"src": "1085:10:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4756,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1085:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1072:24:21"
},
"payable": false,
"returnParameters": {
"id": 4761,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4760,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 4773,
"src": "1120:7:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4759,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1120:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1119:9:21"
},
"scope": 4798,
"src": "1060:116:21",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 4796,
"nodeType": "Block",
"src": "1309:57:21",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 4786,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4782,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4780,
"src": "1315:1:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4785,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4783,
"name": "_a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4775,
"src": "1319:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 4784,
"name": "_b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4777,
"src": "1324:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1319:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1315:11:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4787,
"nodeType": "ExpressionStatement",
"src": "1315:11:21"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4791,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4789,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4780,
"src": "1339:1:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 4790,
"name": "_a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4775,
"src": "1344:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1339:7:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 4788,
"name": "assert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6562,
"src": "1332:6:21",
"typeDescriptions": {
"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 4792,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1332:15:21",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4793,
"nodeType": "ExpressionStatement",
"src": "1332:15:21"
},
{
"expression": {
"argumentTypes": null,
"id": 4794,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4780,
"src": "1360:1:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 4781,
"id": 4795,
"nodeType": "Return",
"src": "1353:8:21"
}
]
},
"documentation": "@dev Adds two numbers, throws on overflow.",
"id": 4797,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "add",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4778,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4775,
"name": "_a",
"nodeType": "VariableDeclaration",
"scope": 4797,
"src": "1251:10:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4774,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1251:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4777,
"name": "_b",
"nodeType": "VariableDeclaration",
"scope": 4797,
"src": "1263:10:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4776,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1263:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1250:24:21"
},
"payable": false,
"returnParameters": {
"id": 4781,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4780,
"name": "c",
"nodeType": "VariableDeclaration",
"scope": 4797,
"src": "1298:9:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4779,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1298:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1297:11:21"
},
"scope": 4798,
"src": "1238:128:21",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 4799,
"src": "117:1251:21"
}
],
"src": "0:1369:21"
},
"legacyAST": {
"absolutePath": "zeppelin-solidity/contracts/math/SafeMath.sol",
"exportedSymbols": {
"SafeMath": [
4798
]
},
"id": 4799,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4706,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:21"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error",
"fullyImplemented": true,
"id": 4798,
"linearizedBaseContracts": [
4798
],
"name": "SafeMath",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 4738,
"nodeType": "Block",
"src": "274:309:21",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4717,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4715,
"name": "_a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4708,
"src": "489:2:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 4716,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "495:1:21",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "489:7:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 4721,
"nodeType": "IfStatement",