SafeMath.json 91 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467
  1. {
  2. "contractName": "SafeMath",
  3. "abi": [],
  4. "bytecode": "0x60606040523415600e57600080fd5b603580601b6000396000f3006060604052600080fd00a165627a7a72305820c0bfb3cbee4dda6c9ad5d0a060222964e40f6d38d2560af507f78ceb43bf4c860029",
  5. "deployedBytecode": "0x6060604052600080fd00a165627a7a72305820c0bfb3cbee4dda6c9ad5d0a060222964e40f6d38d2560af507f78ceb43bf4c860029",
  6. "sourceMap": "117:1021:3:-;;;;;;;;;;;;;;;;;",
  7. "deployedSourceMap": "117:1021:3:-;;;;;",
  8. "source": "pragma solidity ^0.4.18;\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) {\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 */\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 c;\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) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}",
  9. "sourcePath": "/Users/ted/Github/Team-H/Lesson-7/assignment/contracts/SafeMath.sol",
  10. "ast": {
  11. "absolutePath": "/Users/ted/Github/Team-H/Lesson-7/assignment/contracts/SafeMath.sol",
  12. "exportedSymbols": {
  13. "SafeMath": [
  14. 785
  15. ]
  16. },
  17. "id": 786,
  18. "nodeType": "SourceUnit",
  19. "nodes": [
  20. {
  21. "id": 689,
  22. "literals": [
  23. "solidity",
  24. "^",
  25. "0.4",
  26. ".18"
  27. ],
  28. "nodeType": "PragmaDirective",
  29. "src": "0:24:3"
  30. },
  31. {
  32. "baseContracts": [],
  33. "contractDependencies": [],
  34. "contractKind": "library",
  35. "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error",
  36. "fullyImplemented": true,
  37. "id": 785,
  38. "linearizedBaseContracts": [
  39. 785
  40. ],
  41. "name": "SafeMath",
  42. "nodeType": "ContractDefinition",
  43. "nodes": [
  44. {
  45. "body": {
  46. "id": 721,
  47. "nodeType": "Block",
  48. "src": "270:106:3",
  49. "statements": [
  50. {
  51. "condition": {
  52. "argumentTypes": null,
  53. "commonType": {
  54. "typeIdentifier": "t_uint256",
  55. "typeString": "uint256"
  56. },
  57. "id": 700,
  58. "isConstant": false,
  59. "isLValue": false,
  60. "isPure": false,
  61. "lValueRequested": false,
  62. "leftExpression": {
  63. "argumentTypes": null,
  64. "id": 698,
  65. "name": "a",
  66. "nodeType": "Identifier",
  67. "overloadedDeclarations": [],
  68. "referencedDeclaration": 691,
  69. "src": "280:1:3",
  70. "typeDescriptions": {
  71. "typeIdentifier": "t_uint256",
  72. "typeString": "uint256"
  73. }
  74. },
  75. "nodeType": "BinaryOperation",
  76. "operator": "==",
  77. "rightExpression": {
  78. "argumentTypes": null,
  79. "hexValue": "30",
  80. "id": 699,
  81. "isConstant": false,
  82. "isLValue": false,
  83. "isPure": true,
  84. "kind": "number",
  85. "lValueRequested": false,
  86. "nodeType": "Literal",
  87. "src": "285:1:3",
  88. "subdenomination": null,
  89. "typeDescriptions": {
  90. "typeIdentifier": "t_rational_0_by_1",
  91. "typeString": "int_const 0"
  92. },
  93. "value": "0"
  94. },
  95. "src": "280:6:3",
  96. "typeDescriptions": {
  97. "typeIdentifier": "t_bool",
  98. "typeString": "bool"
  99. }
  100. },
  101. "falseBody": null,
  102. "id": 704,
  103. "nodeType": "IfStatement",
  104. "src": "276:35:3",
  105. "trueBody": {
  106. "id": 703,
  107. "nodeType": "Block",
  108. "src": "288:23:3",
  109. "statements": [
  110. {
  111. "expression": {
  112. "argumentTypes": null,
  113. "hexValue": "30",
  114. "id": 701,
  115. "isConstant": false,
  116. "isLValue": false,
  117. "isPure": true,
  118. "kind": "number",
  119. "lValueRequested": false,
  120. "nodeType": "Literal",
  121. "src": "303:1:3",
  122. "subdenomination": null,
  123. "typeDescriptions": {
  124. "typeIdentifier": "t_rational_0_by_1",
  125. "typeString": "int_const 0"
  126. },
  127. "value": "0"
  128. },
  129. "functionReturnParameters": 697,
  130. "id": 702,
  131. "nodeType": "Return",
  132. "src": "296:8:3"
  133. }
  134. ]
  135. }
  136. },
  137. {
  138. "assignments": [
  139. 706
  140. ],
  141. "declarations": [
  142. {
  143. "constant": false,
  144. "id": 706,
  145. "name": "c",
  146. "nodeType": "VariableDeclaration",
  147. "scope": 722,
  148. "src": "316:9:3",
  149. "stateVariable": false,
  150. "storageLocation": "default",
  151. "typeDescriptions": {
  152. "typeIdentifier": "t_uint256",
  153. "typeString": "uint256"
  154. },
  155. "typeName": {
  156. "id": 705,
  157. "name": "uint256",
  158. "nodeType": "ElementaryTypeName",
  159. "src": "316:7:3",
  160. "typeDescriptions": {
  161. "typeIdentifier": "t_uint256",
  162. "typeString": "uint256"
  163. }
  164. },
  165. "value": null,
  166. "visibility": "internal"
  167. }
  168. ],
  169. "id": 710,
  170. "initialValue": {
  171. "argumentTypes": null,
  172. "commonType": {
  173. "typeIdentifier": "t_uint256",
  174. "typeString": "uint256"
  175. },
  176. "id": 709,
  177. "isConstant": false,
  178. "isLValue": false,
  179. "isPure": false,
  180. "lValueRequested": false,
  181. "leftExpression": {
  182. "argumentTypes": null,
  183. "id": 707,
  184. "name": "a",
  185. "nodeType": "Identifier",
  186. "overloadedDeclarations": [],
  187. "referencedDeclaration": 691,
  188. "src": "328:1:3",
  189. "typeDescriptions": {
  190. "typeIdentifier": "t_uint256",
  191. "typeString": "uint256"
  192. }
  193. },
  194. "nodeType": "BinaryOperation",
  195. "operator": "*",
  196. "rightExpression": {
  197. "argumentTypes": null,
  198. "id": 708,
  199. "name": "b",
  200. "nodeType": "Identifier",
  201. "overloadedDeclarations": [],
  202. "referencedDeclaration": 693,
  203. "src": "332:1:3",
  204. "typeDescriptions": {
  205. "typeIdentifier": "t_uint256",
  206. "typeString": "uint256"
  207. }
  208. },
  209. "src": "328:5:3",
  210. "typeDescriptions": {
  211. "typeIdentifier": "t_uint256",
  212. "typeString": "uint256"
  213. }
  214. },
  215. "nodeType": "VariableDeclarationStatement",
  216. "src": "316:17:3"
  217. },
  218. {
  219. "expression": {
  220. "argumentTypes": null,
  221. "arguments": [
  222. {
  223. "argumentTypes": null,
  224. "commonType": {
  225. "typeIdentifier": "t_uint256",
  226. "typeString": "uint256"
  227. },
  228. "id": 716,
  229. "isConstant": false,
  230. "isLValue": false,
  231. "isPure": false,
  232. "lValueRequested": false,
  233. "leftExpression": {
  234. "argumentTypes": null,
  235. "commonType": {
  236. "typeIdentifier": "t_uint256",
  237. "typeString": "uint256"
  238. },
  239. "id": 714,
  240. "isConstant": false,
  241. "isLValue": false,
  242. "isPure": false,
  243. "lValueRequested": false,
  244. "leftExpression": {
  245. "argumentTypes": null,
  246. "id": 712,
  247. "name": "c",
  248. "nodeType": "Identifier",
  249. "overloadedDeclarations": [],
  250. "referencedDeclaration": 706,
  251. "src": "346:1:3",
  252. "typeDescriptions": {
  253. "typeIdentifier": "t_uint256",
  254. "typeString": "uint256"
  255. }
  256. },
  257. "nodeType": "BinaryOperation",
  258. "operator": "/",
  259. "rightExpression": {
  260. "argumentTypes": null,
  261. "id": 713,
  262. "name": "a",
  263. "nodeType": "Identifier",
  264. "overloadedDeclarations": [],
  265. "referencedDeclaration": 691,
  266. "src": "350:1:3",
  267. "typeDescriptions": {
  268. "typeIdentifier": "t_uint256",
  269. "typeString": "uint256"
  270. }
  271. },
  272. "src": "346:5:3",
  273. "typeDescriptions": {
  274. "typeIdentifier": "t_uint256",
  275. "typeString": "uint256"
  276. }
  277. },
  278. "nodeType": "BinaryOperation",
  279. "operator": "==",
  280. "rightExpression": {
  281. "argumentTypes": null,
  282. "id": 715,
  283. "name": "b",
  284. "nodeType": "Identifier",
  285. "overloadedDeclarations": [],
  286. "referencedDeclaration": 693,
  287. "src": "355:1:3",
  288. "typeDescriptions": {
  289. "typeIdentifier": "t_uint256",
  290. "typeString": "uint256"
  291. }
  292. },
  293. "src": "346:10:3",
  294. "typeDescriptions": {
  295. "typeIdentifier": "t_bool",
  296. "typeString": "bool"
  297. }
  298. }
  299. ],
  300. "expression": {
  301. "argumentTypes": [
  302. {
  303. "typeIdentifier": "t_bool",
  304. "typeString": "bool"
  305. }
  306. ],
  307. "id": 711,
  308. "name": "assert",
  309. "nodeType": "Identifier",
  310. "overloadedDeclarations": [],
  311. "referencedDeclaration": 811,
  312. "src": "339:6:3",
  313. "typeDescriptions": {
  314. "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
  315. "typeString": "function (bool) pure"
  316. }
  317. },
  318. "id": 717,
  319. "isConstant": false,
  320. "isLValue": false,
  321. "isPure": false,
  322. "kind": "functionCall",
  323. "lValueRequested": false,
  324. "names": [],
  325. "nodeType": "FunctionCall",
  326. "src": "339:18:3",
  327. "typeDescriptions": {
  328. "typeIdentifier": "t_tuple$__$",
  329. "typeString": "tuple()"
  330. }
  331. },
  332. "id": 718,
  333. "nodeType": "ExpressionStatement",
  334. "src": "339:18:3"
  335. },
  336. {
  337. "expression": {
  338. "argumentTypes": null,
  339. "id": 719,
  340. "name": "c",
  341. "nodeType": "Identifier",
  342. "overloadedDeclarations": [],
  343. "referencedDeclaration": 706,
  344. "src": "370:1:3",
  345. "typeDescriptions": {
  346. "typeIdentifier": "t_uint256",
  347. "typeString": "uint256"
  348. }
  349. },
  350. "functionReturnParameters": 697,
  351. "id": 720,
  352. "nodeType": "Return",
  353. "src": "363:8:3"
  354. }
  355. ]
  356. },
  357. "id": 722,
  358. "implemented": true,
  359. "isConstructor": false,
  360. "isDeclaredConst": true,
  361. "modifiers": [],
  362. "name": "mul",
  363. "nodeType": "FunctionDefinition",
  364. "parameters": {
  365. "id": 694,
  366. "nodeType": "ParameterList",
  367. "parameters": [
  368. {
  369. "constant": false,
  370. "id": 691,
  371. "name": "a",
  372. "nodeType": "VariableDeclaration",
  373. "scope": 722,
  374. "src": "216:9:3",
  375. "stateVariable": false,
  376. "storageLocation": "default",
  377. "typeDescriptions": {
  378. "typeIdentifier": "t_uint256",
  379. "typeString": "uint256"
  380. },
  381. "typeName": {
  382. "id": 690,
  383. "name": "uint256",
  384. "nodeType": "ElementaryTypeName",
  385. "src": "216:7:3",
  386. "typeDescriptions": {
  387. "typeIdentifier": "t_uint256",
  388. "typeString": "uint256"
  389. }
  390. },
  391. "value": null,
  392. "visibility": "internal"
  393. },
  394. {
  395. "constant": false,
  396. "id": 693,
  397. "name": "b",
  398. "nodeType": "VariableDeclaration",
  399. "scope": 722,
  400. "src": "227:9:3",
  401. "stateVariable": false,
  402. "storageLocation": "default",
  403. "typeDescriptions": {
  404. "typeIdentifier": "t_uint256",
  405. "typeString": "uint256"
  406. },
  407. "typeName": {
  408. "id": 692,
  409. "name": "uint256",
  410. "nodeType": "ElementaryTypeName",
  411. "src": "227:7:3",
  412. "typeDescriptions": {
  413. "typeIdentifier": "t_uint256",
  414. "typeString": "uint256"
  415. }
  416. },
  417. "value": null,
  418. "visibility": "internal"
  419. }
  420. ],
  421. "src": "215:22:3"
  422. },
  423. "payable": false,
  424. "returnParameters": {
  425. "id": 697,
  426. "nodeType": "ParameterList",
  427. "parameters": [
  428. {
  429. "constant": false,
  430. "id": 696,
  431. "name": "",
  432. "nodeType": "VariableDeclaration",
  433. "scope": 722,
  434. "src": "261:7:3",
  435. "stateVariable": false,
  436. "storageLocation": "default",
  437. "typeDescriptions": {
  438. "typeIdentifier": "t_uint256",
  439. "typeString": "uint256"
  440. },
  441. "typeName": {
  442. "id": 695,
  443. "name": "uint256",
  444. "nodeType": "ElementaryTypeName",
  445. "src": "261:7:3",
  446. "typeDescriptions": {
  447. "typeIdentifier": "t_uint256",
  448. "typeString": "uint256"
  449. }
  450. },
  451. "value": null,
  452. "visibility": "internal"
  453. }
  454. ],
  455. "src": "260:9:3"
  456. },
  457. "scope": 785,
  458. "src": "203:173:3",
  459. "stateMutability": "pure",
  460. "superFunction": null,
  461. "visibility": "internal"
  462. },
  463. {
  464. "body": {
  465. "id": 739,
  466. "nodeType": "Block",
  467. "src": "525:198:3",
  468. "statements": [
  469. {
  470. "assignments": [
  471. 732
  472. ],
  473. "declarations": [
  474. {
  475. "constant": false,
  476. "id": 732,
  477. "name": "c",
  478. "nodeType": "VariableDeclaration",
  479. "scope": 740,
  480. "src": "605:9:3",
  481. "stateVariable": false,
  482. "storageLocation": "default",
  483. "typeDescriptions": {
  484. "typeIdentifier": "t_uint256",
  485. "typeString": "uint256"
  486. },
  487. "typeName": {
  488. "id": 731,
  489. "name": "uint256",
  490. "nodeType": "ElementaryTypeName",
  491. "src": "605:7:3",
  492. "typeDescriptions": {
  493. "typeIdentifier": "t_uint256",
  494. "typeString": "uint256"
  495. }
  496. },
  497. "value": null,
  498. "visibility": "internal"
  499. }
  500. ],
  501. "id": 736,
  502. "initialValue": {
  503. "argumentTypes": null,
  504. "commonType": {
  505. "typeIdentifier": "t_uint256",
  506. "typeString": "uint256"
  507. },
  508. "id": 735,
  509. "isConstant": false,
  510. "isLValue": false,
  511. "isPure": false,
  512. "lValueRequested": false,
  513. "leftExpression": {
  514. "argumentTypes": null,
  515. "id": 733,
  516. "name": "a",
  517. "nodeType": "Identifier",
  518. "overloadedDeclarations": [],
  519. "referencedDeclaration": 724,
  520. "src": "617:1:3",
  521. "typeDescriptions": {
  522. "typeIdentifier": "t_uint256",
  523. "typeString": "uint256"
  524. }
  525. },
  526. "nodeType": "BinaryOperation",
  527. "operator": "/",
  528. "rightExpression": {
  529. "argumentTypes": null,
  530. "id": 734,
  531. "name": "b",
  532. "nodeType": "Identifier",
  533. "overloadedDeclarations": [],
  534. "referencedDeclaration": 726,
  535. "src": "621:1:3",
  536. "typeDescriptions": {
  537. "typeIdentifier": "t_uint256",
  538. "typeString": "uint256"
  539. }
  540. },
  541. "src": "617:5:3",
  542. "typeDescriptions": {
  543. "typeIdentifier": "t_uint256",
  544. "typeString": "uint256"
  545. }
  546. },
  547. "nodeType": "VariableDeclarationStatement",
  548. "src": "605:17:3"
  549. },
  550. {
  551. "expression": {
  552. "argumentTypes": null,
  553. "id": 737,
  554. "name": "c",
  555. "nodeType": "Identifier",
  556. "overloadedDeclarations": [],
  557. "referencedDeclaration": 732,
  558. "src": "717:1:3",
  559. "typeDescriptions": {
  560. "typeIdentifier": "t_uint256",
  561. "typeString": "uint256"
  562. }
  563. },
  564. "functionReturnParameters": 730,
  565. "id": 738,
  566. "nodeType": "Return",
  567. "src": "710:8:3"
  568. }
  569. ]
  570. },
  571. "id": 740,
  572. "implemented": true,
  573. "isConstructor": false,
  574. "isDeclaredConst": true,
  575. "modifiers": [],
  576. "name": "div",
  577. "nodeType": "FunctionDefinition",
  578. "parameters": {
  579. "id": 727,
  580. "nodeType": "ParameterList",
  581. "parameters": [
  582. {
  583. "constant": false,
  584. "id": 724,
  585. "name": "a",
  586. "nodeType": "VariableDeclaration",
  587. "scope": 740,
  588. "src": "471:9:3",
  589. "stateVariable": false,
  590. "storageLocation": "default",
  591. "typeDescriptions": {
  592. "typeIdentifier": "t_uint256",
  593. "typeString": "uint256"
  594. },
  595. "typeName": {
  596. "id": 723,
  597. "name": "uint256",
  598. "nodeType": "ElementaryTypeName",
  599. "src": "471:7:3",
  600. "typeDescriptions": {
  601. "typeIdentifier": "t_uint256",
  602. "typeString": "uint256"
  603. }
  604. },
  605. "value": null,
  606. "visibility": "internal"
  607. },
  608. {
  609. "constant": false,
  610. "id": 726,
  611. "name": "b",
  612. "nodeType": "VariableDeclaration",
  613. "scope": 740,
  614. "src": "482:9:3",
  615. "stateVariable": false,
  616. "storageLocation": "default",
  617. "typeDescriptions": {
  618. "typeIdentifier": "t_uint256",
  619. "typeString": "uint256"
  620. },
  621. "typeName": {
  622. "id": 725,
  623. "name": "uint256",
  624. "nodeType": "ElementaryTypeName",
  625. "src": "482:7:3",
  626. "typeDescriptions": {
  627. "typeIdentifier": "t_uint256",
  628. "typeString": "uint256"
  629. }
  630. },
  631. "value": null,
  632. "visibility": "internal"
  633. }
  634. ],
  635. "src": "470:22:3"
  636. },
  637. "payable": false,
  638. "returnParameters": {
  639. "id": 730,
  640. "nodeType": "ParameterList",
  641. "parameters": [
  642. {
  643. "constant": false,
  644. "id": 729,
  645. "name": "",
  646. "nodeType": "VariableDeclaration",
  647. "scope": 740,
  648. "src": "516:7:3",
  649. "stateVariable": false,
  650. "storageLocation": "default",
  651. "typeDescriptions": {
  652. "typeIdentifier": "t_uint256",
  653. "typeString": "uint256"
  654. },
  655. "typeName": {
  656. "id": 728,
  657. "name": "uint256",
  658. "nodeType": "ElementaryTypeName",
  659. "src": "516:7:3",
  660. "typeDescriptions": {
  661. "typeIdentifier": "t_uint256",
  662. "typeString": "uint256"
  663. }
  664. },
  665. "value": null,
  666. "visibility": "internal"
  667. }
  668. ],
  669. "src": "515:9:3"
  670. },
  671. "scope": 785,
  672. "src": "458:265:3",
  673. "stateMutability": "pure",
  674. "superFunction": null,
  675. "visibility": "internal"
  676. },
  677. {
  678. "body": {
  679. "id": 759,
  680. "nodeType": "Block",
  681. "src": "902:43:3",
  682. "statements": [
  683. {
  684. "expression": {
  685. "argumentTypes": null,
  686. "arguments": [
  687. {
  688. "argumentTypes": null,
  689. "commonType": {
  690. "typeIdentifier": "t_uint256",
  691. "typeString": "uint256"
  692. },
  693. "id": 752,
  694. "isConstant": false,
  695. "isLValue": false,
  696. "isPure": false,
  697. "lValueRequested": false,
  698. "leftExpression": {
  699. "argumentTypes": null,
  700. "id": 750,
  701. "name": "b",
  702. "nodeType": "Identifier",
  703. "overloadedDeclarations": [],
  704. "referencedDeclaration": 744,
  705. "src": "915:1:3",
  706. "typeDescriptions": {
  707. "typeIdentifier": "t_uint256",
  708. "typeString": "uint256"
  709. }
  710. },
  711. "nodeType": "BinaryOperation",
  712. "operator": "<=",
  713. "rightExpression": {
  714. "argumentTypes": null,
  715. "id": 751,
  716. "name": "a",
  717. "nodeType": "Identifier",
  718. "overloadedDeclarations": [],
  719. "referencedDeclaration": 742,
  720. "src": "920:1:3",
  721. "typeDescriptions": {
  722. "typeIdentifier": "t_uint256",
  723. "typeString": "uint256"
  724. }
  725. },
  726. "src": "915:6:3",
  727. "typeDescriptions": {
  728. "typeIdentifier": "t_bool",
  729. "typeString": "bool"
  730. }
  731. }
  732. ],
  733. "expression": {
  734. "argumentTypes": [
  735. {
  736. "typeIdentifier": "t_bool",
  737. "typeString": "bool"
  738. }
  739. ],
  740. "id": 749,
  741. "name": "assert",
  742. "nodeType": "Identifier",
  743. "overloadedDeclarations": [],
  744. "referencedDeclaration": 811,
  745. "src": "908:6:3",
  746. "typeDescriptions": {
  747. "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
  748. "typeString": "function (bool) pure"
  749. }
  750. },
  751. "id": 753,
  752. "isConstant": false,
  753. "isLValue": false,
  754. "isPure": false,
  755. "kind": "functionCall",
  756. "lValueRequested": false,
  757. "names": [],
  758. "nodeType": "FunctionCall",
  759. "src": "908:14:3",
  760. "typeDescriptions": {
  761. "typeIdentifier": "t_tuple$__$",
  762. "typeString": "tuple()"
  763. }
  764. },
  765. "id": 754,
  766. "nodeType": "ExpressionStatement",
  767. "src": "908:14:3"
  768. },
  769. {
  770. "expression": {
  771. "argumentTypes": null,
  772. "commonType": {
  773. "typeIdentifier": "t_uint256",
  774. "typeString": "uint256"
  775. },
  776. "id": 757,
  777. "isConstant": false,
  778. "isLValue": false,
  779. "isPure": false,
  780. "lValueRequested": false,
  781. "leftExpression": {
  782. "argumentTypes": null,
  783. "id": 755,
  784. "name": "a",
  785. "nodeType": "Identifier",
  786. "overloadedDeclarations": [],
  787. "referencedDeclaration": 742,
  788. "src": "935:1:3",
  789. "typeDescriptions": {
  790. "typeIdentifier": "t_uint256",
  791. "typeString": "uint256"
  792. }
  793. },
  794. "nodeType": "BinaryOperation",
  795. "operator": "-",
  796. "rightExpression": {
  797. "argumentTypes": null,
  798. "id": 756,
  799. "name": "b",
  800. "nodeType": "Identifier",
  801. "overloadedDeclarations": [],
  802. "referencedDeclaration": 744,
  803. "src": "939:1:3",
  804. "typeDescriptions": {
  805. "typeIdentifier": "t_uint256",
  806. "typeString": "uint256"
  807. }
  808. },
  809. "src": "935:5:3",
  810. "typeDescriptions": {
  811. "typeIdentifier": "t_uint256",
  812. "typeString": "uint256"
  813. }
  814. },
  815. "functionReturnParameters": 748,
  816. "id": 758,
  817. "nodeType": "Return",
  818. "src": "928:12:3"
  819. }
  820. ]
  821. },
  822. "id": 760,
  823. "implemented": true,
  824. "isConstructor": false,
  825. "isDeclaredConst": true,
  826. "modifiers": [],
  827. "name": "sub",
  828. "nodeType": "FunctionDefinition",
  829. "parameters": {
  830. "id": 745,
  831. "nodeType": "ParameterList",
  832. "parameters": [
  833. {
  834. "constant": false,
  835. "id": 742,
  836. "name": "a",
  837. "nodeType": "VariableDeclaration",
  838. "scope": 760,
  839. "src": "848:9:3",
  840. "stateVariable": false,
  841. "storageLocation": "default",
  842. "typeDescriptions": {
  843. "typeIdentifier": "t_uint256",
  844. "typeString": "uint256"
  845. },
  846. "typeName": {
  847. "id": 741,
  848. "name": "uint256",
  849. "nodeType": "ElementaryTypeName",
  850. "src": "848:7:3",
  851. "typeDescriptions": {
  852. "typeIdentifier": "t_uint256",
  853. "typeString": "uint256"
  854. }
  855. },
  856. "value": null,
  857. "visibility": "internal"
  858. },
  859. {
  860. "constant": false,
  861. "id": 744,
  862. "name": "b",
  863. "nodeType": "VariableDeclaration",
  864. "scope": 760,
  865. "src": "859:9:3",
  866. "stateVariable": false,
  867. "storageLocation": "default",
  868. "typeDescriptions": {
  869. "typeIdentifier": "t_uint256",
  870. "typeString": "uint256"
  871. },
  872. "typeName": {
  873. "id": 743,
  874. "name": "uint256",
  875. "nodeType": "ElementaryTypeName",
  876. "src": "859:7:3",
  877. "typeDescriptions": {
  878. "typeIdentifier": "t_uint256",
  879. "typeString": "uint256"
  880. }
  881. },
  882. "value": null,
  883. "visibility": "internal"
  884. }
  885. ],
  886. "src": "847:22:3"
  887. },
  888. "payable": false,
  889. "returnParameters": {
  890. "id": 748,
  891. "nodeType": "ParameterList",
  892. "parameters": [
  893. {
  894. "constant": false,
  895. "id": 747,
  896. "name": "",
  897. "nodeType": "VariableDeclaration",
  898. "scope": 760,
  899. "src": "893:7:3",
  900. "stateVariable": false,
  901. "storageLocation": "default",
  902. "typeDescriptions": {
  903. "typeIdentifier": "t_uint256",
  904. "typeString": "uint256"
  905. },
  906. "typeName": {
  907. "id": 746,
  908. "name": "uint256",
  909. "nodeType": "ElementaryTypeName",
  910. "src": "893:7:3",
  911. "typeDescriptions": {
  912. "typeIdentifier": "t_uint256",
  913. "typeString": "uint256"
  914. }
  915. },
  916. "value": null,
  917. "visibility": "internal"
  918. }
  919. ],
  920. "src": "892:9:3"
  921. },
  922. "scope": 785,
  923. "src": "835:110:3",
  924. "stateMutability": "pure",
  925. "superFunction": null,
  926. "visibility": "internal"
  927. },
  928. {
  929. "body": {
  930. "id": 783,
  931. "nodeType": "Block",
  932. "src": "1074:62:3",
  933. "statements": [
  934. {
  935. "assignments": [
  936. 770
  937. ],
  938. "declarations": [
  939. {
  940. "constant": false,
  941. "id": 770,
  942. "name": "c",
  943. "nodeType": "VariableDeclaration",
  944. "scope": 784,
  945. "src": "1080:9:3",
  946. "stateVariable": false,
  947. "storageLocation": "default",
  948. "typeDescriptions": {
  949. "typeIdentifier": "t_uint256",
  950. "typeString": "uint256"
  951. },
  952. "typeName": {
  953. "id": 769,
  954. "name": "uint256",
  955. "nodeType": "ElementaryTypeName",
  956. "src": "1080:7:3",
  957. "typeDescriptions": {
  958. "typeIdentifier": "t_uint256",
  959. "typeString": "uint256"
  960. }
  961. },
  962. "value": null,
  963. "visibility": "internal"
  964. }
  965. ],
  966. "id": 774,
  967. "initialValue": {
  968. "argumentTypes": null,
  969. "commonType": {
  970. "typeIdentifier": "t_uint256",
  971. "typeString": "uint256"
  972. },
  973. "id": 773,
  974. "isConstant": false,
  975. "isLValue": false,
  976. "isPure": false,
  977. "lValueRequested": false,
  978. "leftExpression": {
  979. "argumentTypes": null,
  980. "id": 771,
  981. "name": "a",
  982. "nodeType": "Identifier",
  983. "overloadedDeclarations": [],
  984. "referencedDeclaration": 762,
  985. "src": "1092:1:3",
  986. "typeDescriptions": {
  987. "typeIdentifier": "t_uint256",
  988. "typeString": "uint256"
  989. }
  990. },
  991. "nodeType": "BinaryOperation",
  992. "operator": "+",
  993. "rightExpression": {
  994. "argumentTypes": null,
  995. "id": 772,
  996. "name": "b",
  997. "nodeType": "Identifier",
  998. "overloadedDeclarations": [],
  999. "referencedDeclaration": 764,
  1000. "src": "1096:1:3",
  1001. "typeDescriptions": {
  1002. "typeIdentifier": "t_uint256",
  1003. "typeString": "uint256"
  1004. }
  1005. },
  1006. "src": "1092:5:3",
  1007. "typeDescriptions": {
  1008. "typeIdentifier": "t_uint256",
  1009. "typeString": "uint256"
  1010. }
  1011. },
  1012. "nodeType": "VariableDeclarationStatement",
  1013. "src": "1080:17:3"
  1014. },
  1015. {
  1016. "expression": {
  1017. "argumentTypes": null,
  1018. "arguments": [
  1019. {
  1020. "argumentTypes": null,
  1021. "commonType": {
  1022. "typeIdentifier": "t_uint256",
  1023. "typeString": "uint256"
  1024. },
  1025. "id": 778,
  1026. "isConstant": false,
  1027. "isLValue": false,
  1028. "isPure": false,
  1029. "lValueRequested": false,
  1030. "leftExpression": {
  1031. "argumentTypes": null,
  1032. "id": 776,
  1033. "name": "c",
  1034. "nodeType": "Identifier",
  1035. "overloadedDeclarations": [],
  1036. "referencedDeclaration": 770,
  1037. "src": "1110:1:3",
  1038. "typeDescriptions": {
  1039. "typeIdentifier": "t_uint256",
  1040. "typeString": "uint256"
  1041. }
  1042. },
  1043. "nodeType": "BinaryOperation",
  1044. "operator": ">=",
  1045. "rightExpression": {
  1046. "argumentTypes": null,
  1047. "id": 777,
  1048. "name": "a",
  1049. "nodeType": "Identifier",
  1050. "overloadedDeclarations": [],
  1051. "referencedDeclaration": 762,
  1052. "src": "1115:1:3",
  1053. "typeDescriptions": {
  1054. "typeIdentifier": "t_uint256",
  1055. "typeString": "uint256"
  1056. }
  1057. },
  1058. "src": "1110:6:3",
  1059. "typeDescriptions": {
  1060. "typeIdentifier": "t_bool",
  1061. "typeString": "bool"
  1062. }
  1063. }
  1064. ],
  1065. "expression": {
  1066. "argumentTypes": [
  1067. {
  1068. "typeIdentifier": "t_bool",
  1069. "typeString": "bool"
  1070. }
  1071. ],
  1072. "id": 775,
  1073. "name": "assert",
  1074. "nodeType": "Identifier",
  1075. "overloadedDeclarations": [],
  1076. "referencedDeclaration": 811,
  1077. "src": "1103:6:3",
  1078. "typeDescriptions": {
  1079. "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
  1080. "typeString": "function (bool) pure"
  1081. }
  1082. },
  1083. "id": 779,
  1084. "isConstant": false,
  1085. "isLValue": false,
  1086. "isPure": false,
  1087. "kind": "functionCall",
  1088. "lValueRequested": false,
  1089. "names": [],
  1090. "nodeType": "FunctionCall",
  1091. "src": "1103:14:3",
  1092. "typeDescriptions": {
  1093. "typeIdentifier": "t_tuple$__$",
  1094. "typeString": "tuple()"
  1095. }
  1096. },
  1097. "id": 780,
  1098. "nodeType": "ExpressionStatement",
  1099. "src": "1103:14:3"
  1100. },
  1101. {
  1102. "expression": {
  1103. "argumentTypes": null,
  1104. "id": 781,
  1105. "name": "c",
  1106. "nodeType": "Identifier",
  1107. "overloadedDeclarations": [],
  1108. "referencedDeclaration": 770,
  1109. "src": "1130:1:3",
  1110. "typeDescriptions": {
  1111. "typeIdentifier": "t_uint256",
  1112. "typeString": "uint256"
  1113. }
  1114. },
  1115. "functionReturnParameters": 768,
  1116. "id": 782,
  1117. "nodeType": "Return",
  1118. "src": "1123:8:3"
  1119. }
  1120. ]
  1121. },
  1122. "id": 784,
  1123. "implemented": true,
  1124. "isConstructor": false,
  1125. "isDeclaredConst": true,
  1126. "modifiers": [],
  1127. "name": "add",
  1128. "nodeType": "FunctionDefinition",
  1129. "parameters": {
  1130. "id": 765,
  1131. "nodeType": "ParameterList",
  1132. "parameters": [
  1133. {
  1134. "constant": false,
  1135. "id": 762,
  1136. "name": "a",
  1137. "nodeType": "VariableDeclaration",
  1138. "scope": 784,
  1139. "src": "1020:9:3",
  1140. "stateVariable": false,
  1141. "storageLocation": "default",
  1142. "typeDescriptions": {
  1143. "typeIdentifier": "t_uint256",
  1144. "typeString": "uint256"
  1145. },
  1146. "typeName": {
  1147. "id": 761,
  1148. "name": "uint256",
  1149. "nodeType": "ElementaryTypeName",
  1150. "src": "1020:7:3",
  1151. "typeDescriptions": {
  1152. "typeIdentifier": "t_uint256",
  1153. "typeString": "uint256"
  1154. }
  1155. },
  1156. "value": null,
  1157. "visibility": "internal"
  1158. },
  1159. {
  1160. "constant": false,
  1161. "id": 764,
  1162. "name": "b",
  1163. "nodeType": "VariableDeclaration",
  1164. "scope": 784,
  1165. "src": "1031:9:3",
  1166. "stateVariable": false,
  1167. "storageLocation": "default",
  1168. "typeDescriptions": {
  1169. "typeIdentifier": "t_uint256",
  1170. "typeString": "uint256"
  1171. },
  1172. "typeName": {
  1173. "id": 763,
  1174. "name": "uint256",
  1175. "nodeType": "ElementaryTypeName",
  1176. "src": "1031:7:3",
  1177. "typeDescriptions": {
  1178. "typeIdentifier": "t_uint256",
  1179. "typeString": "uint256"
  1180. }
  1181. },
  1182. "value": null,
  1183. "visibility": "internal"
  1184. }
  1185. ],
  1186. "src": "1019:22:3"
  1187. },
  1188. "payable": false,
  1189. "returnParameters": {
  1190. "id": 768,
  1191. "nodeType": "ParameterList",
  1192. "parameters": [
  1193. {
  1194. "constant": false,
  1195. "id": 767,
  1196. "name": "",
  1197. "nodeType": "VariableDeclaration",
  1198. "scope": 784,
  1199. "src": "1065:7:3",
  1200. "stateVariable": false,
  1201. "storageLocation": "default",
  1202. "typeDescriptions": {
  1203. "typeIdentifier": "t_uint256",
  1204. "typeString": "uint256"
  1205. },
  1206. "typeName": {
  1207. "id": 766,
  1208. "name": "uint256",
  1209. "nodeType": "ElementaryTypeName",
  1210. "src": "1065:7:3",
  1211. "typeDescriptions": {
  1212. "typeIdentifier": "t_uint256",
  1213. "typeString": "uint256"
  1214. }
  1215. },
  1216. "value": null,
  1217. "visibility": "internal"
  1218. }
  1219. ],
  1220. "src": "1064:9:3"
  1221. },
  1222. "scope": 785,
  1223. "src": "1007:129:3",
  1224. "stateMutability": "pure",
  1225. "superFunction": null,
  1226. "visibility": "internal"
  1227. }
  1228. ],
  1229. "scope": 786,
  1230. "src": "117:1021:3"
  1231. }
  1232. ],
  1233. "src": "0:1138:3"
  1234. },
  1235. "legacyAST": {
  1236. "absolutePath": "/Users/ted/Github/Team-H/Lesson-7/assignment/contracts/SafeMath.sol",
  1237. "exportedSymbols": {
  1238. "SafeMath": [
  1239. 785
  1240. ]
  1241. },
  1242. "id": 786,
  1243. "nodeType": "SourceUnit",
  1244. "nodes": [
  1245. {
  1246. "id": 689,
  1247. "literals": [
  1248. "solidity",
  1249. "^",
  1250. "0.4",
  1251. ".18"
  1252. ],
  1253. "nodeType": "PragmaDirective",
  1254. "src": "0:24:3"
  1255. },
  1256. {
  1257. "baseContracts": [],
  1258. "contractDependencies": [],
  1259. "contractKind": "library",
  1260. "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error",
  1261. "fullyImplemented": true,
  1262. "id": 785,
  1263. "linearizedBaseContracts": [
  1264. 785
  1265. ],
  1266. "name": "SafeMath",
  1267. "nodeType": "ContractDefinition",
  1268. "nodes": [
  1269. {
  1270. "body": {
  1271. "id": 721,
  1272. "nodeType": "Block",
  1273. "src": "270:106:3",
  1274. "statements": [
  1275. {
  1276. "condition": {
  1277. "argumentTypes": null,
  1278. "commonType": {
  1279. "typeIdentifier": "t_uint256",
  1280. "typeString": "uint256"
  1281. },
  1282. "id": 700,
  1283. "isConstant": false,
  1284. "isLValue": false,
  1285. "isPure": false,
  1286. "lValueRequested": false,
  1287. "leftExpression": {
  1288. "argumentTypes": null,
  1289. "id": 698,
  1290. "name": "a",
  1291. "nodeType": "Identifier",
  1292. "overloadedDeclarations": [],
  1293. "referencedDeclaration": 691,
  1294. "src": "280:1:3",
  1295. "typeDescriptions": {
  1296. "typeIdentifier": "t_uint256",
  1297. "typeString": "uint256"
  1298. }
  1299. },
  1300. "nodeType": "BinaryOperation",
  1301. "operator": "==",
  1302. "rightExpression": {
  1303. "argumentTypes": null,
  1304. "hexValue": "30",
  1305. "id": 699,
  1306. "isConstant": false,
  1307. "isLValue": false,
  1308. "isPure": true,
  1309. "kind": "number",
  1310. "lValueRequested": false,
  1311. "nodeType": "Literal",
  1312. "src": "285:1:3",
  1313. "subdenomination": null,
  1314. "typeDescriptions": {
  1315. "typeIdentifier": "t_rational_0_by_1",
  1316. "typeString": "int_const 0"
  1317. },
  1318. "value": "0"
  1319. },
  1320. "src": "280:6:3",
  1321. "typeDescriptions": {
  1322. "typeIdentifier": "t_bool",
  1323. "typeString": "bool"
  1324. }
  1325. },
  1326. "falseBody": null,
  1327. "id": 704,
  1328. "nodeType": "IfStatement",
  1329. "src": "276:35:3",
  1330. "trueBody": {
  1331. "id": 703,
  1332. "nodeType": "Block",
  1333. "src": "288:23:3",
  1334. "statements": [
  1335. {
  1336. "expression": {
  1337. "argumentTypes": null,
  1338. "hexValue": "30",
  1339. "id": 701,
  1340. "isConstant": false,
  1341. "isLValue": false,
  1342. "isPure": true,
  1343. "kind": "number",
  1344. "lValueRequested": false,
  1345. "nodeType": "Literal",
  1346. "src": "303:1:3",
  1347. "subdenomination": null,
  1348. "typeDescriptions": {
  1349. "typeIdentifier": "t_rational_0_by_1",
  1350. "typeString": "int_const 0"
  1351. },
  1352. "value": "0"
  1353. },
  1354. "functionReturnParameters": 697,
  1355. "id": 702,
  1356. "nodeType": "Return",
  1357. "src": "296:8:3"
  1358. }
  1359. ]
  1360. }
  1361. },
  1362. {
  1363. "assignments": [
  1364. 706
  1365. ],
  1366. "declarations": [
  1367. {
  1368. "constant": false,
  1369. "id": 706,
  1370. "name": "c",
  1371. "nodeType": "VariableDeclaration",
  1372. "scope": 722,
  1373. "src": "316:9:3",
  1374. "stateVariable": false,
  1375. "storageLocation": "default",
  1376. "typeDescriptions": {
  1377. "typeIdentifier": "t_uint256",
  1378. "typeString": "uint256"
  1379. },
  1380. "typeName": {
  1381. "id": 705,
  1382. "name": "uint256",
  1383. "nodeType": "ElementaryTypeName",
  1384. "src": "316:7:3",
  1385. "typeDescriptions": {
  1386. "typeIdentifier": "t_uint256",
  1387. "typeString": "uint256"
  1388. }
  1389. },
  1390. "value": null,
  1391. "visibility": "internal"
  1392. }
  1393. ],
  1394. "id": 710,
  1395. "initialValue": {
  1396. "argumentTypes": null,
  1397. "commonType": {
  1398. "typeIdentifier": "t_uint256",
  1399. "typeString": "uint256"
  1400. },
  1401. "id": 709,
  1402. "isConstant": false,
  1403. "isLValue": false,
  1404. "isPure": false,
  1405. "lValueRequested": false,
  1406. "leftExpression": {
  1407. "argumentTypes": null,
  1408. "id": 707,
  1409. "name": "a",
  1410. "nodeType": "Identifier",
  1411. "overloadedDeclarations": [],
  1412. "referencedDeclaration": 691,
  1413. "src": "328:1:3",
  1414. "typeDescriptions": {
  1415. "typeIdentifier": "t_uint256",
  1416. "typeString": "uint256"
  1417. }
  1418. },
  1419. "nodeType": "BinaryOperation",
  1420. "operator": "*",
  1421. "rightExpression": {
  1422. "argumentTypes": null,
  1423. "id": 708,
  1424. "name": "b",
  1425. "nodeType": "Identifier",
  1426. "overloadedDeclarations": [],
  1427. "referencedDeclaration": 693,
  1428. "src": "332:1:3",
  1429. "typeDescriptions": {
  1430. "typeIdentifier": "t_uint256",
  1431. "typeString": "uint256"
  1432. }
  1433. },
  1434. "src": "328:5:3",
  1435. "typeDescriptions": {
  1436. "typeIdentifier": "t_uint256",
  1437. "typeString": "uint256"
  1438. }
  1439. },
  1440. "nodeType": "VariableDeclarationStatement",
  1441. "src": "316:17:3"
  1442. },
  1443. {
  1444. "expression": {
  1445. "argumentTypes": null,
  1446. "arguments": [
  1447. {
  1448. "argumentTypes": null,
  1449. "commonType": {
  1450. "typeIdentifier": "t_uint256",
  1451. "typeString": "uint256"
  1452. },
  1453. "id": 716,
  1454. "isConstant": false,
  1455. "isLValue": false,
  1456. "isPure": false,
  1457. "lValueRequested": false,
  1458. "leftExpression": {
  1459. "argumentTypes": null,
  1460. "commonType": {
  1461. "typeIdentifier": "t_uint256",
  1462. "typeString": "uint256"
  1463. },
  1464. "id": 714,
  1465. "isConstant": false,
  1466. "isLValue": false,
  1467. "isPure": false,
  1468. "lValueRequested": false,
  1469. "leftExpression": {
  1470. "argumentTypes": null,
  1471. "id": 712,
  1472. "name": "c",
  1473. "nodeType": "Identifier",
  1474. "overloadedDeclarations": [],
  1475. "referencedDeclaration": 706,
  1476. "src": "346:1:3",
  1477. "typeDescriptions": {
  1478. "typeIdentifier": "t_uint256",
  1479. "typeString": "uint256"
  1480. }
  1481. },
  1482. "nodeType": "BinaryOperation",
  1483. "operator": "/",
  1484. "rightExpression": {
  1485. "argumentTypes": null,
  1486. "id": 713,
  1487. "name": "a",
  1488. "nodeType": "Identifier",
  1489. "overloadedDeclarations": [],
  1490. "referencedDeclaration": 691,
  1491. "src": "350:1:3",
  1492. "typeDescriptions": {
  1493. "typeIdentifier": "t_uint256",
  1494. "typeString": "uint256"
  1495. }
  1496. },
  1497. "src": "346:5:3",
  1498. "typeDescriptions": {
  1499. "typeIdentifier": "t_uint256",
  1500. "typeString": "uint256"
  1501. }
  1502. },
  1503. "nodeType": "BinaryOperation",
  1504. "operator": "==",
  1505. "rightExpression": {
  1506. "argumentTypes": null,
  1507. "id": 715,
  1508. "name": "b",
  1509. "nodeType": "Identifier",
  1510. "overloadedDeclarations": [],
  1511. "referencedDeclaration": 693,
  1512. "src": "355:1:3",
  1513. "typeDescriptions": {
  1514. "typeIdentifier": "t_uint256",
  1515. "typeString": "uint256"
  1516. }
  1517. },
  1518. "src": "346:10:3",
  1519. "typeDescriptions": {
  1520. "typeIdentifier": "t_bool",
  1521. "typeString": "bool"
  1522. }
  1523. }
  1524. ],
  1525. "expression": {
  1526. "argumentTypes": [
  1527. {
  1528. "typeIdentifier": "t_bool",
  1529. "typeString": "bool"
  1530. }
  1531. ],
  1532. "id": 711,
  1533. "name": "assert",
  1534. "nodeType": "Identifier",
  1535. "overloadedDeclarations": [],
  1536. "referencedDeclaration": 811,
  1537. "src": "339:6:3",
  1538. "typeDescriptions": {
  1539. "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
  1540. "typeString": "function (bool) pure"
  1541. }
  1542. },
  1543. "id": 717,
  1544. "isConstant": false,
  1545. "isLValue": false,
  1546. "isPure": false,
  1547. "kind": "functionCall",
  1548. "lValueRequested": false,
  1549. "names": [],
  1550. "nodeType": "FunctionCall",
  1551. "src": "339:18:3",
  1552. "typeDescriptions": {
  1553. "typeIdentifier": "t_tuple$__$",
  1554. "typeString": "tuple()"
  1555. }
  1556. },
  1557. "id": 718,
  1558. "nodeType": "ExpressionStatement",
  1559. "src": "339:18:3"
  1560. },
  1561. {
  1562. "expression": {
  1563. "argumentTypes": null,
  1564. "id": 719,
  1565. "name": "c",
  1566. "nodeType": "Identifier",
  1567. "overloadedDeclarations": [],
  1568. "referencedDeclaration": 706,
  1569. "src": "370:1:3",
  1570. "typeDescriptions": {
  1571. "typeIdentifier": "t_uint256",
  1572. "typeString": "uint256"
  1573. }
  1574. },
  1575. "functionReturnParameters": 697,
  1576. "id": 720,
  1577. "nodeType": "Return",
  1578. "src": "363:8:3"
  1579. }
  1580. ]
  1581. },
  1582. "id": 722,
  1583. "implemented": true,
  1584. "isConstructor": false,
  1585. "isDeclaredConst": true,
  1586. "modifiers": [],
  1587. "name": "mul",
  1588. "nodeType": "FunctionDefinition",
  1589. "parameters": {
  1590. "id": 694,
  1591. "nodeType": "ParameterList",
  1592. "parameters": [
  1593. {
  1594. "constant": false,
  1595. "id": 691,
  1596. "name": "a",
  1597. "nodeType": "VariableDeclaration",
  1598. "scope": 722,
  1599. "src": "216:9:3",
  1600. "stateVariable": false,
  1601. "storageLocation": "default",
  1602. "typeDescriptions": {
  1603. "typeIdentifier": "t_uint256",
  1604. "typeString": "uint256"
  1605. },
  1606. "typeName": {
  1607. "id": 690,
  1608. "name": "uint256",
  1609. "nodeType": "ElementaryTypeName",
  1610. "src": "216:7:3",
  1611. "typeDescriptions": {
  1612. "typeIdentifier": "t_uint256",
  1613. "typeString": "uint256"
  1614. }
  1615. },
  1616. "value": null,
  1617. "visibility": "internal"
  1618. },
  1619. {
  1620. "constant": false,
  1621. "id": 693,
  1622. "name": "b",
  1623. "nodeType": "VariableDeclaration",
  1624. "scope": 722,
  1625. "src": "227:9:3",
  1626. "stateVariable": false,
  1627. "storageLocation": "default",
  1628. "typeDescriptions": {
  1629. "typeIdentifier": "t_uint256",
  1630. "typeString": "uint256"
  1631. },
  1632. "typeName": {
  1633. "id": 692,
  1634. "name": "uint256",
  1635. "nodeType": "ElementaryTypeName",
  1636. "src": "227:7:3",
  1637. "typeDescriptions": {
  1638. "typeIdentifier": "t_uint256",
  1639. "typeString": "uint256"
  1640. }
  1641. },
  1642. "value": null,
  1643. "visibility": "internal"
  1644. }
  1645. ],
  1646. "src": "215:22:3"
  1647. },
  1648. "payable": false,
  1649. "returnParameters": {
  1650. "id": 697,
  1651. "nodeType": "ParameterList",
  1652. "parameters": [
  1653. {
  1654. "constant": false,
  1655. "id": 696,
  1656. "name": "",
  1657. "nodeType": "VariableDeclaration",
  1658. "scope": 722,
  1659. "src": "261:7:3",
  1660. "stateVariable": false,
  1661. "storageLocation": "default",
  1662. "typeDescriptions": {
  1663. "typeIdentifier": "t_uint256",
  1664. "typeString": "uint256"
  1665. },
  1666. "typeName": {
  1667. "id": 695,
  1668. "name": "uint256",
  1669. "nodeType": "ElementaryTypeName",
  1670. "src": "261:7:3",
  1671. "typeDescriptions": {
  1672. "typeIdentifier": "t_uint256",
  1673. "typeString": "uint256"
  1674. }
  1675. },
  1676. "value": null,
  1677. "visibility": "internal"
  1678. }
  1679. ],
  1680. "src": "260:9:3"
  1681. },
  1682. "scope": 785,
  1683. "src": "203:173:3",
  1684. "stateMutability": "pure",
  1685. "superFunction": null,
  1686. "visibility": "internal"
  1687. },
  1688. {
  1689. "body": {
  1690. "id": 739,
  1691. "nodeType": "Block",
  1692. "src": "525:198:3",
  1693. "statements": [
  1694. {
  1695. "assignments": [
  1696. 732
  1697. ],
  1698. "declarations": [
  1699. {
  1700. "constant": false,
  1701. "id": 732,
  1702. "name": "c",
  1703. "nodeType": "VariableDeclaration",
  1704. "scope": 740,
  1705. "src": "605:9:3",
  1706. "stateVariable": false,
  1707. "storageLocation": "default",
  1708. "typeDescriptions": {
  1709. "typeIdentifier": "t_uint256",
  1710. "typeString": "uint256"
  1711. },
  1712. "typeName": {
  1713. "id": 731,
  1714. "name": "uint256",
  1715. "nodeType": "ElementaryTypeName",
  1716. "src": "605:7:3",
  1717. "typeDescriptions": {
  1718. "typeIdentifier": "t_uint256",
  1719. "typeString": "uint256"
  1720. }
  1721. },
  1722. "value": null,
  1723. "visibility": "internal"
  1724. }
  1725. ],
  1726. "id": 736,
  1727. "initialValue": {
  1728. "argumentTypes": null,
  1729. "commonType": {
  1730. "typeIdentifier": "t_uint256",
  1731. "typeString": "uint256"
  1732. },
  1733. "id": 735,
  1734. "isConstant": false,
  1735. "isLValue": false,
  1736. "isPure": false,
  1737. "lValueRequested": false,
  1738. "leftExpression": {
  1739. "argumentTypes": null,
  1740. "id": 733,
  1741. "name": "a",
  1742. "nodeType": "Identifier",
  1743. "overloadedDeclarations": [],
  1744. "referencedDeclaration": 724,
  1745. "src": "617:1:3",
  1746. "typeDescriptions": {
  1747. "typeIdentifier": "t_uint256",
  1748. "typeString": "uint256"
  1749. }
  1750. },
  1751. "nodeType": "BinaryOperation",
  1752. "operator": "/",
  1753. "rightExpression": {
  1754. "argumentTypes": null,
  1755. "id": 734,
  1756. "name": "b",
  1757. "nodeType": "Identifier",
  1758. "overloadedDeclarations": [],
  1759. "referencedDeclaration": 726,
  1760. "src": "621:1:3",
  1761. "typeDescriptions": {
  1762. "typeIdentifier": "t_uint256",
  1763. "typeString": "uint256"
  1764. }
  1765. },
  1766. "src": "617:5:3",
  1767. "typeDescriptions": {
  1768. "typeIdentifier": "t_uint256",
  1769. "typeString": "uint256"
  1770. }
  1771. },
  1772. "nodeType": "VariableDeclarationStatement",
  1773. "src": "605:17:3"
  1774. },
  1775. {
  1776. "expression": {
  1777. "argumentTypes": null,
  1778. "id": 737,
  1779. "name": "c",
  1780. "nodeType": "Identifier",
  1781. "overloadedDeclarations": [],
  1782. "referencedDeclaration": 732,
  1783. "src": "717:1:3",
  1784. "typeDescriptions": {
  1785. "typeIdentifier": "t_uint256",
  1786. "typeString": "uint256"
  1787. }
  1788. },
  1789. "functionReturnParameters": 730,
  1790. "id": 738,
  1791. "nodeType": "Return",
  1792. "src": "710:8:3"
  1793. }
  1794. ]
  1795. },
  1796. "id": 740,
  1797. "implemented": true,
  1798. "isConstructor": false,
  1799. "isDeclaredConst": true,
  1800. "modifiers": [],
  1801. "name": "div",
  1802. "nodeType": "FunctionDefinition",
  1803. "parameters": {
  1804. "id": 727,
  1805. "nodeType": "ParameterList",
  1806. "parameters": [
  1807. {
  1808. "constant": false,
  1809. "id": 724,
  1810. "name": "a",
  1811. "nodeType": "VariableDeclaration",
  1812. "scope": 740,
  1813. "src": "471:9:3",
  1814. "stateVariable": false,
  1815. "storageLocation": "default",
  1816. "typeDescriptions": {
  1817. "typeIdentifier": "t_uint256",
  1818. "typeString": "uint256"
  1819. },
  1820. "typeName": {
  1821. "id": 723,
  1822. "name": "uint256",
  1823. "nodeType": "ElementaryTypeName",
  1824. "src": "471:7:3",
  1825. "typeDescriptions": {
  1826. "typeIdentifier": "t_uint256",
  1827. "typeString": "uint256"
  1828. }
  1829. },
  1830. "value": null,
  1831. "visibility": "internal"
  1832. },
  1833. {
  1834. "constant": false,
  1835. "id": 726,
  1836. "name": "b",
  1837. "nodeType": "VariableDeclaration",
  1838. "scope": 740,
  1839. "src": "482:9:3",
  1840. "stateVariable": false,
  1841. "storageLocation": "default",
  1842. "typeDescriptions": {
  1843. "typeIdentifier": "t_uint256",
  1844. "typeString": "uint256"
  1845. },
  1846. "typeName": {
  1847. "id": 725,
  1848. "name": "uint256",
  1849. "nodeType": "ElementaryTypeName",
  1850. "src": "482:7:3",
  1851. "typeDescriptions": {
  1852. "typeIdentifier": "t_uint256",
  1853. "typeString": "uint256"
  1854. }
  1855. },
  1856. "value": null,
  1857. "visibility": "internal"
  1858. }
  1859. ],
  1860. "src": "470:22:3"
  1861. },
  1862. "payable": false,
  1863. "returnParameters": {
  1864. "id": 730,
  1865. "nodeType": "ParameterList",
  1866. "parameters": [
  1867. {
  1868. "constant": false,
  1869. "id": 729,
  1870. "name": "",
  1871. "nodeType": "VariableDeclaration",
  1872. "scope": 740,
  1873. "src": "516:7:3",
  1874. "stateVariable": false,
  1875. "storageLocation": "default",
  1876. "typeDescriptions": {
  1877. "typeIdentifier": "t_uint256",
  1878. "typeString": "uint256"
  1879. },
  1880. "typeName": {
  1881. "id": 728,
  1882. "name": "uint256",
  1883. "nodeType": "ElementaryTypeName",
  1884. "src": "516:7:3",
  1885. "typeDescriptions": {
  1886. "typeIdentifier": "t_uint256",
  1887. "typeString": "uint256"
  1888. }
  1889. },
  1890. "value": null,
  1891. "visibility": "internal"
  1892. }
  1893. ],
  1894. "src": "515:9:3"
  1895. },
  1896. "scope": 785,
  1897. "src": "458:265:3",
  1898. "stateMutability": "pure",
  1899. "superFunction": null,
  1900. "visibility": "internal"
  1901. },
  1902. {
  1903. "body": {
  1904. "id": 759,
  1905. "nodeType": "Block",
  1906. "src": "902:43:3",
  1907. "statements": [
  1908. {
  1909. "expression": {
  1910. "argumentTypes": null,
  1911. "arguments": [
  1912. {
  1913. "argumentTypes": null,
  1914. "commonType": {
  1915. "typeIdentifier": "t_uint256",
  1916. "typeString": "uint256"
  1917. },
  1918. "id": 752,
  1919. "isConstant": false,
  1920. "isLValue": false,
  1921. "isPure": false,
  1922. "lValueRequested": false,
  1923. "leftExpression": {
  1924. "argumentTypes": null,
  1925. "id": 750,
  1926. "name": "b",
  1927. "nodeType": "Identifier",
  1928. "overloadedDeclarations": [],
  1929. "referencedDeclaration": 744,
  1930. "src": "915:1:3",
  1931. "typeDescriptions": {
  1932. "typeIdentifier": "t_uint256",
  1933. "typeString": "uint256"
  1934. }
  1935. },
  1936. "nodeType": "BinaryOperation",
  1937. "operator": "<=",
  1938. "rightExpression": {
  1939. "argumentTypes": null,
  1940. "id": 751,
  1941. "name": "a",
  1942. "nodeType": "Identifier",
  1943. "overloadedDeclarations": [],
  1944. "referencedDeclaration": 742,
  1945. "src": "920:1:3",
  1946. "typeDescriptions": {
  1947. "typeIdentifier": "t_uint256",
  1948. "typeString": "uint256"
  1949. }
  1950. },
  1951. "src": "915:6:3",
  1952. "typeDescriptions": {
  1953. "typeIdentifier": "t_bool",
  1954. "typeString": "bool"
  1955. }
  1956. }
  1957. ],
  1958. "expression": {
  1959. "argumentTypes": [
  1960. {
  1961. "typeIdentifier": "t_bool",
  1962. "typeString": "bool"
  1963. }
  1964. ],
  1965. "id": 749,
  1966. "name": "assert",
  1967. "nodeType": "Identifier",
  1968. "overloadedDeclarations": [],
  1969. "referencedDeclaration": 811,
  1970. "src": "908:6:3",
  1971. "typeDescriptions": {
  1972. "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
  1973. "typeString": "function (bool) pure"
  1974. }
  1975. },
  1976. "id": 753,
  1977. "isConstant": false,
  1978. "isLValue": false,
  1979. "isPure": false,
  1980. "kind": "functionCall",
  1981. "lValueRequested": false,
  1982. "names": [],
  1983. "nodeType": "FunctionCall",
  1984. "src": "908:14:3",
  1985. "typeDescriptions": {
  1986. "typeIdentifier": "t_tuple$__$",
  1987. "typeString": "tuple()"
  1988. }
  1989. },
  1990. "id": 754,
  1991. "nodeType": "ExpressionStatement",
  1992. "src": "908:14:3"
  1993. },
  1994. {
  1995. "expression": {
  1996. "argumentTypes": null,
  1997. "commonType": {
  1998. "typeIdentifier": "t_uint256",
  1999. "typeString": "uint256"
  2000. },
  2001. "id": 757,
  2002. "isConstant": false,
  2003. "isLValue": false,
  2004. "isPure": false,
  2005. "lValueRequested": false,
  2006. "leftExpression": {
  2007. "argumentTypes": null,
  2008. "id": 755,
  2009. "name": "a",
  2010. "nodeType": "Identifier",
  2011. "overloadedDeclarations": [],
  2012. "referencedDeclaration": 742,
  2013. "src": "935:1:3",
  2014. "typeDescriptions": {
  2015. "typeIdentifier": "t_uint256",
  2016. "typeString": "uint256"
  2017. }
  2018. },
  2019. "nodeType": "BinaryOperation",
  2020. "operator": "-",
  2021. "rightExpression": {
  2022. "argumentTypes": null,
  2023. "id": 756,
  2024. "name": "b",
  2025. "nodeType": "Identifier",
  2026. "overloadedDeclarations": [],
  2027. "referencedDeclaration": 744,
  2028. "src": "939:1:3",
  2029. "typeDescriptions": {
  2030. "typeIdentifier": "t_uint256",
  2031. "typeString": "uint256"
  2032. }
  2033. },
  2034. "src": "935:5:3",
  2035. "typeDescriptions": {
  2036. "typeIdentifier": "t_uint256",
  2037. "typeString": "uint256"
  2038. }
  2039. },
  2040. "functionReturnParameters": 748,
  2041. "id": 758,
  2042. "nodeType": "Return",
  2043. "src": "928:12:3"
  2044. }
  2045. ]
  2046. },
  2047. "id": 760,
  2048. "implemented": true,
  2049. "isConstructor": false,
  2050. "isDeclaredConst": true,
  2051. "modifiers": [],
  2052. "name": "sub",
  2053. "nodeType": "FunctionDefinition",
  2054. "parameters": {
  2055. "id": 745,
  2056. "nodeType": "ParameterList",
  2057. "parameters": [
  2058. {
  2059. "constant": false,
  2060. "id": 742,
  2061. "name": "a",
  2062. "nodeType": "VariableDeclaration",
  2063. "scope": 760,
  2064. "src": "848:9:3",
  2065. "stateVariable": false,
  2066. "storageLocation": "default",
  2067. "typeDescriptions": {
  2068. "typeIdentifier": "t_uint256",
  2069. "typeString": "uint256"
  2070. },
  2071. "typeName": {
  2072. "id": 741,
  2073. "name": "uint256",
  2074. "nodeType": "ElementaryTypeName",
  2075. "src": "848:7:3",
  2076. "typeDescriptions": {
  2077. "typeIdentifier": "t_uint256",
  2078. "typeString": "uint256"
  2079. }
  2080. },
  2081. "value": null,
  2082. "visibility": "internal"
  2083. },
  2084. {
  2085. "constant": false,
  2086. "id": 744,
  2087. "name": "b",
  2088. "nodeType": "VariableDeclaration",
  2089. "scope": 760,
  2090. "src": "859:9:3",
  2091. "stateVariable": false,
  2092. "storageLocation": "default",
  2093. "typeDescriptions": {
  2094. "typeIdentifier": "t_uint256",
  2095. "typeString": "uint256"
  2096. },
  2097. "typeName": {
  2098. "id": 743,
  2099. "name": "uint256",
  2100. "nodeType": "ElementaryTypeName",
  2101. "src": "859:7:3",
  2102. "typeDescriptions": {
  2103. "typeIdentifier": "t_uint256",
  2104. "typeString": "uint256"
  2105. }
  2106. },
  2107. "value": null,
  2108. "visibility": "internal"
  2109. }
  2110. ],
  2111. "src": "847:22:3"
  2112. },
  2113. "payable": false,
  2114. "returnParameters": {
  2115. "id": 748,
  2116. "nodeType": "ParameterList",
  2117. "parameters": [
  2118. {
  2119. "constant": false,
  2120. "id": 747,
  2121. "name": "",
  2122. "nodeType": "VariableDeclaration",
  2123. "scope": 760,
  2124. "src": "893:7:3",
  2125. "stateVariable": false,
  2126. "storageLocation": "default",
  2127. "typeDescriptions": {
  2128. "typeIdentifier": "t_uint256",
  2129. "typeString": "uint256"
  2130. },
  2131. "typeName": {
  2132. "id": 746,
  2133. "name": "uint256",
  2134. "nodeType": "ElementaryTypeName",
  2135. "src": "893:7:3",
  2136. "typeDescriptions": {
  2137. "typeIdentifier": "t_uint256",
  2138. "typeString": "uint256"
  2139. }
  2140. },
  2141. "value": null,
  2142. "visibility": "internal"
  2143. }
  2144. ],
  2145. "src": "892:9:3"
  2146. },
  2147. "scope": 785,
  2148. "src": "835:110:3",
  2149. "stateMutability": "pure",
  2150. "superFunction": null,
  2151. "visibility": "internal"
  2152. },
  2153. {
  2154. "body": {
  2155. "id": 783,
  2156. "nodeType": "Block",
  2157. "src": "1074:62:3",
  2158. "statements": [
  2159. {
  2160. "assignments": [
  2161. 770
  2162. ],
  2163. "declarations": [
  2164. {
  2165. "constant": false,
  2166. "id": 770,
  2167. "name": "c",
  2168. "nodeType": "VariableDeclaration",
  2169. "scope": 784,
  2170. "src": "1080:9:3",
  2171. "stateVariable": false,
  2172. "storageLocation": "default",
  2173. "typeDescriptions": {
  2174. "typeIdentifier": "t_uint256",
  2175. "typeString": "uint256"
  2176. },
  2177. "typeName": {
  2178. "id": 769,
  2179. "name": "uint256",
  2180. "nodeType": "ElementaryTypeName",
  2181. "src": "1080:7:3",
  2182. "typeDescriptions": {
  2183. "typeIdentifier": "t_uint256",
  2184. "typeString": "uint256"
  2185. }
  2186. },
  2187. "value": null,
  2188. "visibility": "internal"
  2189. }
  2190. ],
  2191. "id": 774,
  2192. "initialValue": {
  2193. "argumentTypes": null,
  2194. "commonType": {
  2195. "typeIdentifier": "t_uint256",
  2196. "typeString": "uint256"
  2197. },
  2198. "id": 773,
  2199. "isConstant": false,
  2200. "isLValue": false,
  2201. "isPure": false,
  2202. "lValueRequested": false,
  2203. "leftExpression": {
  2204. "argumentTypes": null,
  2205. "id": 771,
  2206. "name": "a",
  2207. "nodeType": "Identifier",
  2208. "overloadedDeclarations": [],
  2209. "referencedDeclaration": 762,
  2210. "src": "1092:1:3",
  2211. "typeDescriptions": {
  2212. "typeIdentifier": "t_uint256",
  2213. "typeString": "uint256"
  2214. }
  2215. },
  2216. "nodeType": "BinaryOperation",
  2217. "operator": "+",
  2218. "rightExpression": {
  2219. "argumentTypes": null,
  2220. "id": 772,
  2221. "name": "b",
  2222. "nodeType": "Identifier",
  2223. "overloadedDeclarations": [],
  2224. "referencedDeclaration": 764,
  2225. "src": "1096:1:3",
  2226. "typeDescriptions": {
  2227. "typeIdentifier": "t_uint256",
  2228. "typeString": "uint256"
  2229. }
  2230. },
  2231. "src": "1092:5:3",
  2232. "typeDescriptions": {
  2233. "typeIdentifier": "t_uint256",
  2234. "typeString": "uint256"
  2235. }
  2236. },
  2237. "nodeType": "VariableDeclarationStatement",
  2238. "src": "1080:17:3"
  2239. },
  2240. {
  2241. "expression": {
  2242. "argumentTypes": null,
  2243. "arguments": [
  2244. {
  2245. "argumentTypes": null,
  2246. "commonType": {
  2247. "typeIdentifier": "t_uint256",
  2248. "typeString": "uint256"
  2249. },
  2250. "id": 778,
  2251. "isConstant": false,
  2252. "isLValue": false,
  2253. "isPure": false,
  2254. "lValueRequested": false,
  2255. "leftExpression": {
  2256. "argumentTypes": null,
  2257. "id": 776,
  2258. "name": "c",
  2259. "nodeType": "Identifier",
  2260. "overloadedDeclarations": [],
  2261. "referencedDeclaration": 770,
  2262. "src": "1110:1:3",
  2263. "typeDescriptions": {
  2264. "typeIdentifier": "t_uint256",
  2265. "typeString": "uint256"
  2266. }
  2267. },
  2268. "nodeType": "BinaryOperation",
  2269. "operator": ">=",
  2270. "rightExpression": {
  2271. "argumentTypes": null,
  2272. "id": 777,
  2273. "name": "a",
  2274. "nodeType": "Identifier",
  2275. "overloadedDeclarations": [],
  2276. "referencedDeclaration": 762,
  2277. "src": "1115:1:3",
  2278. "typeDescriptions": {
  2279. "typeIdentifier": "t_uint256",
  2280. "typeString": "uint256"
  2281. }
  2282. },
  2283. "src": "1110:6:3",
  2284. "typeDescriptions": {
  2285. "typeIdentifier": "t_bool",
  2286. "typeString": "bool"
  2287. }
  2288. }
  2289. ],
  2290. "expression": {
  2291. "argumentTypes": [
  2292. {
  2293. "typeIdentifier": "t_bool",
  2294. "typeString": "bool"
  2295. }
  2296. ],
  2297. "id": 775,
  2298. "name": "assert",
  2299. "nodeType": "Identifier",
  2300. "overloadedDeclarations": [],
  2301. "referencedDeclaration": 811,
  2302. "src": "1103:6:3",
  2303. "typeDescriptions": {
  2304. "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
  2305. "typeString": "function (bool) pure"
  2306. }
  2307. },
  2308. "id": 779,
  2309. "isConstant": false,
  2310. "isLValue": false,
  2311. "isPure": false,
  2312. "kind": "functionCall",
  2313. "lValueRequested": false,
  2314. "names": [],
  2315. "nodeType": "FunctionCall",
  2316. "src": "1103:14:3",
  2317. "typeDescriptions": {
  2318. "typeIdentifier": "t_tuple$__$",
  2319. "typeString": "tuple()"
  2320. }
  2321. },
  2322. "id": 780,
  2323. "nodeType": "ExpressionStatement",
  2324. "src": "1103:14:3"
  2325. },
  2326. {
  2327. "expression": {
  2328. "argumentTypes": null,
  2329. "id": 781,
  2330. "name": "c",
  2331. "nodeType": "Identifier",
  2332. "overloadedDeclarations": [],
  2333. "referencedDeclaration": 770,
  2334. "src": "1130:1:3",
  2335. "typeDescriptions": {
  2336. "typeIdentifier": "t_uint256",
  2337. "typeString": "uint256"
  2338. }
  2339. },
  2340. "functionReturnParameters": 768,
  2341. "id": 782,
  2342. "nodeType": "Return",
  2343. "src": "1123:8:3"
  2344. }
  2345. ]
  2346. },
  2347. "id": 784,
  2348. "implemented": true,
  2349. "isConstructor": false,
  2350. "isDeclaredConst": true,
  2351. "modifiers": [],
  2352. "name": "add",
  2353. "nodeType": "FunctionDefinition",
  2354. "parameters": {
  2355. "id": 765,
  2356. "nodeType": "ParameterList",
  2357. "parameters": [
  2358. {
  2359. "constant": false,
  2360. "id": 762,
  2361. "name": "a",
  2362. "nodeType": "VariableDeclaration",
  2363. "scope": 784,
  2364. "src": "1020:9:3",
  2365. "stateVariable": false,
  2366. "storageLocation": "default",
  2367. "typeDescriptions": {
  2368. "typeIdentifier": "t_uint256",
  2369. "typeString": "uint256"
  2370. },
  2371. "typeName": {
  2372. "id": 761,
  2373. "name": "uint256",
  2374. "nodeType": "ElementaryTypeName",
  2375. "src": "1020:7:3",
  2376. "typeDescriptions": {
  2377. "typeIdentifier": "t_uint256",
  2378. "typeString": "uint256"
  2379. }
  2380. },
  2381. "value": null,
  2382. "visibility": "internal"
  2383. },
  2384. {
  2385. "constant": false,
  2386. "id": 764,
  2387. "name": "b",
  2388. "nodeType": "VariableDeclaration",
  2389. "scope": 784,
  2390. "src": "1031:9:3",
  2391. "stateVariable": false,
  2392. "storageLocation": "default",
  2393. "typeDescriptions": {
  2394. "typeIdentifier": "t_uint256",
  2395. "typeString": "uint256"
  2396. },
  2397. "typeName": {
  2398. "id": 763,
  2399. "name": "uint256",
  2400. "nodeType": "ElementaryTypeName",
  2401. "src": "1031:7:3",
  2402. "typeDescriptions": {
  2403. "typeIdentifier": "t_uint256",
  2404. "typeString": "uint256"
  2405. }
  2406. },
  2407. "value": null,
  2408. "visibility": "internal"
  2409. }
  2410. ],
  2411. "src": "1019:22:3"
  2412. },
  2413. "payable": false,
  2414. "returnParameters": {
  2415. "id": 768,
  2416. "nodeType": "ParameterList",
  2417. "parameters": [
  2418. {
  2419. "constant": false,
  2420. "id": 767,
  2421. "name": "",
  2422. "nodeType": "VariableDeclaration",
  2423. "scope": 784,
  2424. "src": "1065:7:3",
  2425. "stateVariable": false,
  2426. "storageLocation": "default",
  2427. "typeDescriptions": {
  2428. "typeIdentifier": "t_uint256",
  2429. "typeString": "uint256"
  2430. },
  2431. "typeName": {
  2432. "id": 766,
  2433. "name": "uint256",
  2434. "nodeType": "ElementaryTypeName",
  2435. "src": "1065:7:3",
  2436. "typeDescriptions": {
  2437. "typeIdentifier": "t_uint256",
  2438. "typeString": "uint256"
  2439. }
  2440. },
  2441. "value": null,
  2442. "visibility": "internal"
  2443. }
  2444. ],
  2445. "src": "1064:9:3"
  2446. },
  2447. "scope": 785,
  2448. "src": "1007:129:3",
  2449. "stateMutability": "pure",
  2450. "superFunction": null,
  2451. "visibility": "internal"
  2452. }
  2453. ],
  2454. "scope": 786,
  2455. "src": "117:1021:3"
  2456. }
  2457. ],
  2458. "src": "0:1138:3"
  2459. },
  2460. "compiler": {
  2461. "name": "solc",
  2462. "version": "0.4.19+commit.c4cbbb05.Emscripten.clang"
  2463. },
  2464. "networks": {},
  2465. "schemaVersion": "2.0.0",
  2466. "updatedAt": "2018-04-02T07:08:50.943Z"
  2467. }