UNPKG

token-price-oracles

Version:

tools for creating token price data feeds and oracles that integrate with on-chain dex's

1,248 lines 127 kB
{ "contractName": "SafeMath", "abi": [], "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820ed2e8442f9982a43e2504067fa63a2f64a13c7ffba3323ae30639e406b20e54c0029", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820ed2e8442f9982a43e2504067fa63a2f64a13c7ffba3323ae30639e406b20e54c0029", "sourceMap": "117:1531:6:-;;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:1531:6:-;;;;;;;;", "source": "pragma solidity ^0.4.24;\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that revert on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, reverts on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring '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 uint256 c = a * b;\n require(c / a == b);\n\n return c;\n }\n\n /**\n * @dev Integer division of two numbers truncating the quotient, reverts on division by zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0); // Solidity only automatically asserts 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\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Adds two numbers, reverts on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a);\n\n return c;\n }\n\n /**\n * @dev Divides two numbers and returns the remainder (unsigned integer modulo),\n * reverts when dividing by zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b != 0);\n return a % b;\n }\n}\n", "sourcePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", "ast": { "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", "exportedSymbols": { "SafeMath": [ 1083 ] }, "id": 1084, "nodeType": "SourceUnit", "nodes": [ { "id": 957, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:6" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "@title SafeMath\n@dev Math operations with safety checks that revert on error", "fullyImplemented": true, "id": 1083, "linearizedBaseContracts": [ 1083 ], "name": "SafeMath", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 989, "nodeType": "Block", "src": "271:314:6", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 968, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 966, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 959, "src": "486:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 967, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "491:1:6", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "486:6:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 972, "nodeType": "IfStatement", "src": "482:35:6", "trueBody": { "id": 971, "nodeType": "Block", "src": "494:23:6", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", "id": 969, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "509:1:6", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 965, "id": 970, "nodeType": "Return", "src": "502:8:6" } ] } }, { "assignments": [ 974 ], "declarations": [ { "constant": false, "id": 974, "name": "c", "nodeType": "VariableDeclaration", "scope": 990, "src": "523:9:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 973, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "523:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 978, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 977, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 975, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 959, "src": "535:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "argumentTypes": null, "id": 976, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 961, "src": "539:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "535:5:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "523:17:6" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 984, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 982, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 980, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 974, "src": "554:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "argumentTypes": null, "id": 981, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 959, "src": "558:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "554:5:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 983, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 961, "src": "563:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "554:10:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 979, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1507, 1508 ], "referencedDeclaration": 1507, "src": "546:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 985, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "546:19:6", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 986, "nodeType": "ExpressionStatement", "src": "546:19:6" }, { "expression": { "argumentTypes": null, "id": 987, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 974, "src": "579:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 965, "id": 988, "nodeType": "Return", "src": "572:8:6" } ] }, "documentation": "@dev Multiplies two numbers, reverts on overflow.", "id": 990, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "mul", "nodeType": "FunctionDefinition", "parameters": { "id": 962, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 959, "name": "a", "nodeType": "VariableDeclaration", "scope": 990, "src": "217:9:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 958, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "217:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 961, "name": "b", "nodeType": "VariableDeclaration", "scope": 990, "src": "228:9:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 960, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "228:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "216:22:6" }, "payable": false, "returnParameters": { "id": 965, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 964, "name": "", "nodeType": "VariableDeclaration", "scope": 990, "src": "262:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 963, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "262:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "261:9:6" }, "scope": 1083, "src": "204:381:6", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 1013, "nodeType": "Block", "src": "762:203:6", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1002, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 1000, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 994, "src": "776:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 1001, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "780:1:6", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "776:5:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 999, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1507, 1508 ], "referencedDeclaration": 1507, "src": "768:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1003, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "768:14:6", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1004, "nodeType": "ExpressionStatement", "src": "768:14:6" }, { "assignments": [ 1006 ], "declarations": [ { "constant": false, "id": 1006, "name": "c", "nodeType": "VariableDeclaration", "scope": 1014, "src": "846:9:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1005, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "846:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 1010, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1009, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 1007, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 992, "src": "858:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "argumentTypes": null, "id": 1008, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 994, "src": "862:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "858:5:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "846:17:6" }, { "expression": { "argumentTypes": null, "id": 1011, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1006, "src": "959:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 998, "id": 1012, "nodeType": "Return", "src": "952:8:6" } ] }, "documentation": "@dev Integer division of two numbers truncating the quotient, reverts on division by zero.", "id": 1014, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "div", "nodeType": "FunctionDefinition", "parameters": { "id": 995, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 992, "name": "a", "nodeType": "VariableDeclaration", "scope": 1014, "src": "708:9:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 991, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "708:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 994, "name": "b", "nodeType": "VariableDeclaration", "scope": 1014, "src": "719:9:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 993, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "719:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "707:22:6" }, "payable": false, "returnParameters": { "id": 998, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 997, "name": "", "nodeType": "VariableDeclaration", "scope": 1014, "src": "753:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 996, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "753:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "752:9:6" }, "scope": 1083, "src": "695:270:6", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 1037, "nodeType": "Block", "src": "1145:64:6", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1026, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 1024, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1018, "src": "1159:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 1025, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1016, "src": "1164:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1159:6:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1023, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1507, 1508 ], "referencedDeclaration": 1507, "src": "1151:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1027, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1151:15:6", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1028, "nodeType": "ExpressionStatement", "src": "1151:15:6" }, { "assignments": [ 1030 ], "declarations": [ { "constant": false, "id": 1030, "name": "c", "nodeType": "VariableDeclaration", "scope": 1038, "src": "1172:9:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1029, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1172:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 1034, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1033, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 1031, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1016, "src": "1184:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "argumentTypes": null, "id": 1032, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1018, "src": "1188:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1184:5:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "1172:17:6" }, { "expression": { "argumentTypes": null, "id": 1035, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1030, "src": "1203:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 1022, "id": 1036, "nodeType": "Return", "src": "1196:8:6" } ] }, "documentation": "@dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).", "id": 1038, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "sub", "nodeType": "FunctionDefinition", "parameters": { "id": 1019, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1016, "name": "a", "nodeType": "VariableDeclaration", "scope": 1038, "src": "1091:9:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1015, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1091:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1018, "name": "b", "nodeType": "VariableDeclaration", "scope": 1038, "src": "1102:9:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1017, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1102:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1090:22:6" }, "payable": false, "returnParameters": { "id": 1022, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1021, "name": "", "nodeType": "VariableDeclaration", "scope": 1038, "src": "1136:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1020, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1136:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1135:9:6" }, "scope": 1083, "src": "1078:131:6", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 1061, "nodeType": "Block", "src": "1339:64:6", "statements": [ { "assignments": [ 1048 ], "declarations": [ { "constant": false, "id": 1048, "name": "c", "nodeType": "VariableDeclaration", "scope": 1062, "src": "1345:9:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1047, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1345:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 1052, "initialValue": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1051, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 1049, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1040, "src": "1357:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "argumentTypes": null, "id": 1050, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1042, "src": "1361:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1357:5:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "1345:17:6" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1056, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 1054, "name": "c", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1048, "src": "1376:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "id": 1055, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1040, "src": "1381:1:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1376:6:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1053, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1507, 1508 ], "referencedDeclaration": 1507, "src": "1368:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1057, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1368:15:6", "typeDescriptions": { "typeIdentifier"