Migrations.json 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372
  1. {
  2. "contractName": "Migrations",
  3. "abi": [
  4. {
  5. "constant": true,
  6. "inputs": [],
  7. "name": "last_completed_migration",
  8. "outputs": [
  9. {
  10. "name": "",
  11. "type": "uint256"
  12. }
  13. ],
  14. "payable": false,
  15. "stateMutability": "view",
  16. "type": "function"
  17. },
  18. {
  19. "constant": true,
  20. "inputs": [],
  21. "name": "owner",
  22. "outputs": [
  23. {
  24. "name": "",
  25. "type": "address"
  26. }
  27. ],
  28. "payable": false,
  29. "stateMutability": "view",
  30. "type": "function"
  31. },
  32. {
  33. "inputs": [],
  34. "payable": false,
  35. "stateMutability": "nonpayable",
  36. "type": "constructor"
  37. },
  38. {
  39. "constant": false,
  40. "inputs": [
  41. {
  42. "name": "completed",
  43. "type": "uint256"
  44. }
  45. ],
  46. "name": "setCompleted",
  47. "outputs": [],
  48. "payable": false,
  49. "stateMutability": "nonpayable",
  50. "type": "function"
  51. },
  52. {
  53. "constant": false,
  54. "inputs": [
  55. {
  56. "name": "new_address",
  57. "type": "address"
  58. }
  59. ],
  60. "name": "upgrade",
  61. "outputs": [],
  62. "payable": false,
  63. "stateMutability": "nonpayable",
  64. "type": "function"
  65. }
  66. ],
  67. "bytecode": "0x6060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102db8061005e6000396000f300606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610224565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f600480803590602001909190505061024f565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610220578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561020b57600080fd5b6102c65a03f1151561021c57600080fd5b5050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102ac57806001819055505b505600a165627a7a72305820b86ccfd05f83b4734b32a5fef648b3b3c0f894cf729b8401f7f48da7f862d04f0029",
  68. "deployedBytecode": "0x606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610224565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f600480803590602001909190505061024f565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610220578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561020b57600080fd5b6102c65a03f1151561021c57600080fd5b5050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102ac57806001819055505b505600a165627a7a72305820b86ccfd05f83b4734b32a5fef648b3b3c0f894cf729b8401f7f48da7f862d04f0029",
  69. "sourceMap": "25:488:0:-;;;177:58;;;;;;;;220:10;212:5;;:18;;;;;;;;;;;;;;;;;;25:488;;;;;;",
  70. "deployedSourceMap": "25:488:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;346:165;;;;;;;;;;;;;;;;;;;;;;;;;;;;73:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;239:103;;;;;;;;;;;;;;;;;;;;;;;;;;346:165;408:19;160:5;;;;;;;;;;;146:19;;:10;:19;;;142:26;;;441:11;408:45;;459:8;:21;;;481:24;;459:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;142:26;346:165;;:::o;73:36::-;;;;:::o;49:20::-;;;;;;;;;;;;;:::o;239:103::-;160:5;;;;;;;;;;;146:19;;:10;:19;;;142:26;;;328:9;301:24;:36;;;;142:26;239:103;:::o",
  71. "source": "pragma solidity ^0.4.2;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n function Migrations() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n",
  72. "sourcePath": "/Users/ted/Github/Team-H/Lesson-7/assignment/contracts/Migrations.sol",
  73. "ast": {
  74. "absolutePath": "/Users/ted/Github/Team-H/Lesson-7/assignment/contracts/Migrations.sol",
  75. "exportedSymbols": {
  76. "Migrations": [
  77. 56
  78. ]
  79. },
  80. "id": 57,
  81. "nodeType": "SourceUnit",
  82. "nodes": [
  83. {
  84. "id": 1,
  85. "literals": [
  86. "solidity",
  87. "^",
  88. "0.4",
  89. ".2"
  90. ],
  91. "nodeType": "PragmaDirective",
  92. "src": "0:23:0"
  93. },
  94. {
  95. "baseContracts": [],
  96. "contractDependencies": [],
  97. "contractKind": "contract",
  98. "documentation": null,
  99. "fullyImplemented": true,
  100. "id": 56,
  101. "linearizedBaseContracts": [
  102. 56
  103. ],
  104. "name": "Migrations",
  105. "nodeType": "ContractDefinition",
  106. "nodes": [
  107. {
  108. "constant": false,
  109. "id": 3,
  110. "name": "owner",
  111. "nodeType": "VariableDeclaration",
  112. "scope": 56,
  113. "src": "49:20:0",
  114. "stateVariable": true,
  115. "storageLocation": "default",
  116. "typeDescriptions": {
  117. "typeIdentifier": "t_address",
  118. "typeString": "address"
  119. },
  120. "typeName": {
  121. "id": 2,
  122. "name": "address",
  123. "nodeType": "ElementaryTypeName",
  124. "src": "49:7:0",
  125. "typeDescriptions": {
  126. "typeIdentifier": "t_address",
  127. "typeString": "address"
  128. }
  129. },
  130. "value": null,
  131. "visibility": "public"
  132. },
  133. {
  134. "constant": false,
  135. "id": 5,
  136. "name": "last_completed_migration",
  137. "nodeType": "VariableDeclaration",
  138. "scope": 56,
  139. "src": "73:36:0",
  140. "stateVariable": true,
  141. "storageLocation": "default",
  142. "typeDescriptions": {
  143. "typeIdentifier": "t_uint256",
  144. "typeString": "uint256"
  145. },
  146. "typeName": {
  147. "id": 4,
  148. "name": "uint",
  149. "nodeType": "ElementaryTypeName",
  150. "src": "73:4:0",
  151. "typeDescriptions": {
  152. "typeIdentifier": "t_uint256",
  153. "typeString": "uint256"
  154. }
  155. },
  156. "value": null,
  157. "visibility": "public"
  158. },
  159. {
  160. "body": {
  161. "id": 13,
  162. "nodeType": "Block",
  163. "src": "136:37:0",
  164. "statements": [
  165. {
  166. "condition": {
  167. "argumentTypes": null,
  168. "commonType": {
  169. "typeIdentifier": "t_address",
  170. "typeString": "address"
  171. },
  172. "id": 10,
  173. "isConstant": false,
  174. "isLValue": false,
  175. "isPure": false,
  176. "lValueRequested": false,
  177. "leftExpression": {
  178. "argumentTypes": null,
  179. "expression": {
  180. "argumentTypes": null,
  181. "id": 7,
  182. "name": "msg",
  183. "nodeType": "Identifier",
  184. "overloadedDeclarations": [],
  185. "referencedDeclaration": 820,
  186. "src": "146:3:0",
  187. "typeDescriptions": {
  188. "typeIdentifier": "t_magic_message",
  189. "typeString": "msg"
  190. }
  191. },
  192. "id": 8,
  193. "isConstant": false,
  194. "isLValue": false,
  195. "isPure": false,
  196. "lValueRequested": false,
  197. "memberName": "sender",
  198. "nodeType": "MemberAccess",
  199. "referencedDeclaration": null,
  200. "src": "146:10:0",
  201. "typeDescriptions": {
  202. "typeIdentifier": "t_address",
  203. "typeString": "address"
  204. }
  205. },
  206. "nodeType": "BinaryOperation",
  207. "operator": "==",
  208. "rightExpression": {
  209. "argumentTypes": null,
  210. "id": 9,
  211. "name": "owner",
  212. "nodeType": "Identifier",
  213. "overloadedDeclarations": [],
  214. "referencedDeclaration": 3,
  215. "src": "160:5:0",
  216. "typeDescriptions": {
  217. "typeIdentifier": "t_address",
  218. "typeString": "address"
  219. }
  220. },
  221. "src": "146:19:0",
  222. "typeDescriptions": {
  223. "typeIdentifier": "t_bool",
  224. "typeString": "bool"
  225. }
  226. },
  227. "falseBody": null,
  228. "id": 12,
  229. "nodeType": "IfStatement",
  230. "src": "142:26:0",
  231. "trueBody": {
  232. "id": 11,
  233. "nodeType": "PlaceholderStatement",
  234. "src": "167:1:0"
  235. }
  236. }
  237. ]
  238. },
  239. "id": 14,
  240. "name": "restricted",
  241. "nodeType": "ModifierDefinition",
  242. "parameters": {
  243. "id": 6,
  244. "nodeType": "ParameterList",
  245. "parameters": [],
  246. "src": "133:2:0"
  247. },
  248. "src": "114:59:0",
  249. "visibility": "internal"
  250. },
  251. {
  252. "body": {
  253. "id": 22,
  254. "nodeType": "Block",
  255. "src": "206:29:0",
  256. "statements": [
  257. {
  258. "expression": {
  259. "argumentTypes": null,
  260. "id": 20,
  261. "isConstant": false,
  262. "isLValue": false,
  263. "isPure": false,
  264. "lValueRequested": false,
  265. "leftHandSide": {
  266. "argumentTypes": null,
  267. "id": 17,
  268. "name": "owner",
  269. "nodeType": "Identifier",
  270. "overloadedDeclarations": [],
  271. "referencedDeclaration": 3,
  272. "src": "212:5:0",
  273. "typeDescriptions": {
  274. "typeIdentifier": "t_address",
  275. "typeString": "address"
  276. }
  277. },
  278. "nodeType": "Assignment",
  279. "operator": "=",
  280. "rightHandSide": {
  281. "argumentTypes": null,
  282. "expression": {
  283. "argumentTypes": null,
  284. "id": 18,
  285. "name": "msg",
  286. "nodeType": "Identifier",
  287. "overloadedDeclarations": [],
  288. "referencedDeclaration": 820,
  289. "src": "220:3:0",
  290. "typeDescriptions": {
  291. "typeIdentifier": "t_magic_message",
  292. "typeString": "msg"
  293. }
  294. },
  295. "id": 19,
  296. "isConstant": false,
  297. "isLValue": false,
  298. "isPure": false,
  299. "lValueRequested": false,
  300. "memberName": "sender",
  301. "nodeType": "MemberAccess",
  302. "referencedDeclaration": null,
  303. "src": "220:10:0",
  304. "typeDescriptions": {
  305. "typeIdentifier": "t_address",
  306. "typeString": "address"
  307. }
  308. },
  309. "src": "212:18:0",
  310. "typeDescriptions": {
  311. "typeIdentifier": "t_address",
  312. "typeString": "address"
  313. }
  314. },
  315. "id": 21,
  316. "nodeType": "ExpressionStatement",
  317. "src": "212:18:0"
  318. }
  319. ]
  320. },
  321. "id": 23,
  322. "implemented": true,
  323. "isConstructor": true,
  324. "isDeclaredConst": false,
  325. "modifiers": [],
  326. "name": "Migrations",
  327. "nodeType": "FunctionDefinition",
  328. "parameters": {
  329. "id": 15,
  330. "nodeType": "ParameterList",
  331. "parameters": [],
  332. "src": "196:2:0"
  333. },
  334. "payable": false,
  335. "returnParameters": {
  336. "id": 16,
  337. "nodeType": "ParameterList",
  338. "parameters": [],
  339. "src": "206:0:0"
  340. },
  341. "scope": 56,
  342. "src": "177:58:0",
  343. "stateMutability": "nonpayable",
  344. "superFunction": null,
  345. "visibility": "public"
  346. },
  347. {
  348. "body": {
  349. "id": 34,
  350. "nodeType": "Block",
  351. "src": "295:47:0",
  352. "statements": [
  353. {
  354. "expression": {
  355. "argumentTypes": null,
  356. "id": 32,
  357. "isConstant": false,
  358. "isLValue": false,
  359. "isPure": false,
  360. "lValueRequested": false,
  361. "leftHandSide": {
  362. "argumentTypes": null,
  363. "id": 30,
  364. "name": "last_completed_migration",
  365. "nodeType": "Identifier",
  366. "overloadedDeclarations": [],
  367. "referencedDeclaration": 5,
  368. "src": "301:24:0",
  369. "typeDescriptions": {
  370. "typeIdentifier": "t_uint256",
  371. "typeString": "uint256"
  372. }
  373. },
  374. "nodeType": "Assignment",
  375. "operator": "=",
  376. "rightHandSide": {
  377. "argumentTypes": null,
  378. "id": 31,
  379. "name": "completed",
  380. "nodeType": "Identifier",
  381. "overloadedDeclarations": [],
  382. "referencedDeclaration": 25,
  383. "src": "328:9:0",
  384. "typeDescriptions": {
  385. "typeIdentifier": "t_uint256",
  386. "typeString": "uint256"
  387. }
  388. },
  389. "src": "301:36:0",
  390. "typeDescriptions": {
  391. "typeIdentifier": "t_uint256",
  392. "typeString": "uint256"
  393. }
  394. },
  395. "id": 33,
  396. "nodeType": "ExpressionStatement",
  397. "src": "301:36:0"
  398. }
  399. ]
  400. },
  401. "id": 35,
  402. "implemented": true,
  403. "isConstructor": false,
  404. "isDeclaredConst": false,
  405. "modifiers": [
  406. {
  407. "arguments": [],
  408. "id": 28,
  409. "modifierName": {
  410. "argumentTypes": null,
  411. "id": 27,
  412. "name": "restricted",
  413. "nodeType": "Identifier",
  414. "overloadedDeclarations": [],
  415. "referencedDeclaration": 14,
  416. "src": "284:10:0",
  417. "typeDescriptions": {
  418. "typeIdentifier": "t_modifier$__$",
  419. "typeString": "modifier ()"
  420. }
  421. },
  422. "nodeType": "ModifierInvocation",
  423. "src": "284:10:0"
  424. }
  425. ],
  426. "name": "setCompleted",
  427. "nodeType": "FunctionDefinition",
  428. "parameters": {
  429. "id": 26,
  430. "nodeType": "ParameterList",
  431. "parameters": [
  432. {
  433. "constant": false,
  434. "id": 25,
  435. "name": "completed",
  436. "nodeType": "VariableDeclaration",
  437. "scope": 35,
  438. "src": "261:14:0",
  439. "stateVariable": false,
  440. "storageLocation": "default",
  441. "typeDescriptions": {
  442. "typeIdentifier": "t_uint256",
  443. "typeString": "uint256"
  444. },
  445. "typeName": {
  446. "id": 24,
  447. "name": "uint",
  448. "nodeType": "ElementaryTypeName",
  449. "src": "261:4:0",
  450. "typeDescriptions": {
  451. "typeIdentifier": "t_uint256",
  452. "typeString": "uint256"
  453. }
  454. },
  455. "value": null,
  456. "visibility": "internal"
  457. }
  458. ],
  459. "src": "260:16:0"
  460. },
  461. "payable": false,
  462. "returnParameters": {
  463. "id": 29,
  464. "nodeType": "ParameterList",
  465. "parameters": [],
  466. "src": "295:0:0"
  467. },
  468. "scope": 56,
  469. "src": "239:103:0",
  470. "stateMutability": "nonpayable",
  471. "superFunction": null,
  472. "visibility": "public"
  473. },
  474. {
  475. "body": {
  476. "id": 54,
  477. "nodeType": "Block",
  478. "src": "402:109:0",
  479. "statements": [
  480. {
  481. "assignments": [
  482. 43
  483. ],
  484. "declarations": [
  485. {
  486. "constant": false,
  487. "id": 43,
  488. "name": "upgraded",
  489. "nodeType": "VariableDeclaration",
  490. "scope": 55,
  491. "src": "408:19:0",
  492. "stateVariable": false,
  493. "storageLocation": "default",
  494. "typeDescriptions": {
  495. "typeIdentifier": "t_contract$_Migrations_$56",
  496. "typeString": "contract Migrations"
  497. },
  498. "typeName": {
  499. "contractScope": null,
  500. "id": 42,
  501. "name": "Migrations",
  502. "nodeType": "UserDefinedTypeName",
  503. "referencedDeclaration": 56,
  504. "src": "408:10:0",
  505. "typeDescriptions": {
  506. "typeIdentifier": "t_contract$_Migrations_$56",
  507. "typeString": "contract Migrations"
  508. }
  509. },
  510. "value": null,
  511. "visibility": "internal"
  512. }
  513. ],
  514. "id": 47,
  515. "initialValue": {
  516. "argumentTypes": null,
  517. "arguments": [
  518. {
  519. "argumentTypes": null,
  520. "id": 45,
  521. "name": "new_address",
  522. "nodeType": "Identifier",
  523. "overloadedDeclarations": [],
  524. "referencedDeclaration": 37,
  525. "src": "441:11:0",
  526. "typeDescriptions": {
  527. "typeIdentifier": "t_address",
  528. "typeString": "address"
  529. }
  530. }
  531. ],
  532. "expression": {
  533. "argumentTypes": [
  534. {
  535. "typeIdentifier": "t_address",
  536. "typeString": "address"
  537. }
  538. ],
  539. "id": 44,
  540. "name": "Migrations",
  541. "nodeType": "Identifier",
  542. "overloadedDeclarations": [],
  543. "referencedDeclaration": 56,
  544. "src": "430:10:0",
  545. "typeDescriptions": {
  546. "typeIdentifier": "t_type$_t_contract$_Migrations_$56_$",
  547. "typeString": "type(contract Migrations)"
  548. }
  549. },
  550. "id": 46,
  551. "isConstant": false,
  552. "isLValue": false,
  553. "isPure": false,
  554. "kind": "typeConversion",
  555. "lValueRequested": false,
  556. "names": [],
  557. "nodeType": "FunctionCall",
  558. "src": "430:23:0",
  559. "typeDescriptions": {
  560. "typeIdentifier": "t_contract$_Migrations_$56",
  561. "typeString": "contract Migrations"
  562. }
  563. },
  564. "nodeType": "VariableDeclarationStatement",
  565. "src": "408:45:0"
  566. },
  567. {
  568. "expression": {
  569. "argumentTypes": null,
  570. "arguments": [
  571. {
  572. "argumentTypes": null,
  573. "id": 51,
  574. "name": "last_completed_migration",
  575. "nodeType": "Identifier",
  576. "overloadedDeclarations": [],
  577. "referencedDeclaration": 5,
  578. "src": "481:24:0",
  579. "typeDescriptions": {
  580. "typeIdentifier": "t_uint256",
  581. "typeString": "uint256"
  582. }
  583. }
  584. ],
  585. "expression": {
  586. "argumentTypes": [
  587. {
  588. "typeIdentifier": "t_uint256",
  589. "typeString": "uint256"
  590. }
  591. ],
  592. "expression": {
  593. "argumentTypes": null,
  594. "id": 48,
  595. "name": "upgraded",
  596. "nodeType": "Identifier",
  597. "overloadedDeclarations": [],
  598. "referencedDeclaration": 43,
  599. "src": "459:8:0",
  600. "typeDescriptions": {
  601. "typeIdentifier": "t_contract$_Migrations_$56",
  602. "typeString": "contract Migrations"
  603. }
  604. },
  605. "id": 50,
  606. "isConstant": false,
  607. "isLValue": false,
  608. "isPure": false,
  609. "lValueRequested": false,
  610. "memberName": "setCompleted",
  611. "nodeType": "MemberAccess",
  612. "referencedDeclaration": 35,
  613. "src": "459:21:0",
  614. "typeDescriptions": {
  615. "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
  616. "typeString": "function (uint256) external"
  617. }
  618. },
  619. "id": 52,
  620. "isConstant": false,
  621. "isLValue": false,
  622. "isPure": false,
  623. "kind": "functionCall",
  624. "lValueRequested": false,
  625. "names": [],
  626. "nodeType": "FunctionCall",
  627. "src": "459:47:0",
  628. "typeDescriptions": {
  629. "typeIdentifier": "t_tuple$__$",
  630. "typeString": "tuple()"
  631. }
  632. },
  633. "id": 53,
  634. "nodeType": "ExpressionStatement",
  635. "src": "459:47:0"
  636. }
  637. ]
  638. },
  639. "id": 55,
  640. "implemented": true,
  641. "isConstructor": false,
  642. "isDeclaredConst": false,
  643. "modifiers": [
  644. {
  645. "arguments": [],
  646. "id": 40,
  647. "modifierName": {
  648. "argumentTypes": null,
  649. "id": 39,
  650. "name": "restricted",
  651. "nodeType": "Identifier",
  652. "overloadedDeclarations": [],
  653. "referencedDeclaration": 14,
  654. "src": "391:10:0",
  655. "typeDescriptions": {
  656. "typeIdentifier": "t_modifier$__$",
  657. "typeString": "modifier ()"
  658. }
  659. },
  660. "nodeType": "ModifierInvocation",
  661. "src": "391:10:0"
  662. }
  663. ],
  664. "name": "upgrade",
  665. "nodeType": "FunctionDefinition",
  666. "parameters": {
  667. "id": 38,
  668. "nodeType": "ParameterList",
  669. "parameters": [
  670. {
  671. "constant": false,
  672. "id": 37,
  673. "name": "new_address",
  674. "nodeType": "VariableDeclaration",
  675. "scope": 55,
  676. "src": "363:19:0",
  677. "stateVariable": false,
  678. "storageLocation": "default",
  679. "typeDescriptions": {
  680. "typeIdentifier": "t_address",
  681. "typeString": "address"
  682. },
  683. "typeName": {
  684. "id": 36,
  685. "name": "address",
  686. "nodeType": "ElementaryTypeName",
  687. "src": "363:7:0",
  688. "typeDescriptions": {
  689. "typeIdentifier": "t_address",
  690. "typeString": "address"
  691. }
  692. },
  693. "value": null,
  694. "visibility": "internal"
  695. }
  696. ],
  697. "src": "362:21:0"
  698. },
  699. "payable": false,
  700. "returnParameters": {
  701. "id": 41,
  702. "nodeType": "ParameterList",
  703. "parameters": [],
  704. "src": "402:0:0"
  705. },
  706. "scope": 56,
  707. "src": "346:165:0",
  708. "stateMutability": "nonpayable",
  709. "superFunction": null,
  710. "visibility": "public"
  711. }
  712. ],
  713. "scope": 57,
  714. "src": "25:488:0"
  715. }
  716. ],
  717. "src": "0:514:0"
  718. },
  719. "legacyAST": {
  720. "absolutePath": "/Users/ted/Github/Team-H/Lesson-7/assignment/contracts/Migrations.sol",
  721. "exportedSymbols": {
  722. "Migrations": [
  723. 56
  724. ]
  725. },
  726. "id": 57,
  727. "nodeType": "SourceUnit",
  728. "nodes": [
  729. {
  730. "id": 1,
  731. "literals": [
  732. "solidity",
  733. "^",
  734. "0.4",
  735. ".2"
  736. ],
  737. "nodeType": "PragmaDirective",
  738. "src": "0:23:0"
  739. },
  740. {
  741. "baseContracts": [],
  742. "contractDependencies": [],
  743. "contractKind": "contract",
  744. "documentation": null,
  745. "fullyImplemented": true,
  746. "id": 56,
  747. "linearizedBaseContracts": [
  748. 56
  749. ],
  750. "name": "Migrations",
  751. "nodeType": "ContractDefinition",
  752. "nodes": [
  753. {
  754. "constant": false,
  755. "id": 3,
  756. "name": "owner",
  757. "nodeType": "VariableDeclaration",
  758. "scope": 56,
  759. "src": "49:20:0",
  760. "stateVariable": true,
  761. "storageLocation": "default",
  762. "typeDescriptions": {
  763. "typeIdentifier": "t_address",
  764. "typeString": "address"
  765. },
  766. "typeName": {
  767. "id": 2,
  768. "name": "address",
  769. "nodeType": "ElementaryTypeName",
  770. "src": "49:7:0",
  771. "typeDescriptions": {
  772. "typeIdentifier": "t_address",
  773. "typeString": "address"
  774. }
  775. },
  776. "value": null,
  777. "visibility": "public"
  778. },
  779. {
  780. "constant": false,
  781. "id": 5,
  782. "name": "last_completed_migration",
  783. "nodeType": "VariableDeclaration",
  784. "scope": 56,
  785. "src": "73:36:0",
  786. "stateVariable": true,
  787. "storageLocation": "default",
  788. "typeDescriptions": {
  789. "typeIdentifier": "t_uint256",
  790. "typeString": "uint256"
  791. },
  792. "typeName": {
  793. "id": 4,
  794. "name": "uint",
  795. "nodeType": "ElementaryTypeName",
  796. "src": "73:4:0",
  797. "typeDescriptions": {
  798. "typeIdentifier": "t_uint256",
  799. "typeString": "uint256"
  800. }
  801. },
  802. "value": null,
  803. "visibility": "public"
  804. },
  805. {
  806. "body": {
  807. "id": 13,
  808. "nodeType": "Block",
  809. "src": "136:37:0",
  810. "statements": [
  811. {
  812. "condition": {
  813. "argumentTypes": null,
  814. "commonType": {
  815. "typeIdentifier": "t_address",
  816. "typeString": "address"
  817. },
  818. "id": 10,
  819. "isConstant": false,
  820. "isLValue": false,
  821. "isPure": false,
  822. "lValueRequested": false,
  823. "leftExpression": {
  824. "argumentTypes": null,
  825. "expression": {
  826. "argumentTypes": null,
  827. "id": 7,
  828. "name": "msg",
  829. "nodeType": "Identifier",
  830. "overloadedDeclarations": [],
  831. "referencedDeclaration": 820,
  832. "src": "146:3:0",
  833. "typeDescriptions": {
  834. "typeIdentifier": "t_magic_message",
  835. "typeString": "msg"
  836. }
  837. },
  838. "id": 8,
  839. "isConstant": false,
  840. "isLValue": false,
  841. "isPure": false,
  842. "lValueRequested": false,
  843. "memberName": "sender",
  844. "nodeType": "MemberAccess",
  845. "referencedDeclaration": null,
  846. "src": "146:10:0",
  847. "typeDescriptions": {
  848. "typeIdentifier": "t_address",
  849. "typeString": "address"
  850. }
  851. },
  852. "nodeType": "BinaryOperation",
  853. "operator": "==",
  854. "rightExpression": {
  855. "argumentTypes": null,
  856. "id": 9,
  857. "name": "owner",
  858. "nodeType": "Identifier",
  859. "overloadedDeclarations": [],
  860. "referencedDeclaration": 3,
  861. "src": "160:5:0",
  862. "typeDescriptions": {
  863. "typeIdentifier": "t_address",
  864. "typeString": "address"
  865. }
  866. },
  867. "src": "146:19:0",
  868. "typeDescriptions": {
  869. "typeIdentifier": "t_bool",
  870. "typeString": "bool"
  871. }
  872. },
  873. "falseBody": null,
  874. "id": 12,
  875. "nodeType": "IfStatement",
  876. "src": "142:26:0",
  877. "trueBody": {
  878. "id": 11,
  879. "nodeType": "PlaceholderStatement",
  880. "src": "167:1:0"
  881. }
  882. }
  883. ]
  884. },
  885. "id": 14,
  886. "name": "restricted",
  887. "nodeType": "ModifierDefinition",
  888. "parameters": {
  889. "id": 6,
  890. "nodeType": "ParameterList",
  891. "parameters": [],
  892. "src": "133:2:0"
  893. },
  894. "src": "114:59:0",
  895. "visibility": "internal"
  896. },
  897. {
  898. "body": {
  899. "id": 22,
  900. "nodeType": "Block",
  901. "src": "206:29:0",
  902. "statements": [
  903. {
  904. "expression": {
  905. "argumentTypes": null,
  906. "id": 20,
  907. "isConstant": false,
  908. "isLValue": false,
  909. "isPure": false,
  910. "lValueRequested": false,
  911. "leftHandSide": {
  912. "argumentTypes": null,
  913. "id": 17,
  914. "name": "owner",
  915. "nodeType": "Identifier",
  916. "overloadedDeclarations": [],
  917. "referencedDeclaration": 3,
  918. "src": "212:5:0",
  919. "typeDescriptions": {
  920. "typeIdentifier": "t_address",
  921. "typeString": "address"
  922. }
  923. },
  924. "nodeType": "Assignment",
  925. "operator": "=",
  926. "rightHandSide": {
  927. "argumentTypes": null,
  928. "expression": {
  929. "argumentTypes": null,
  930. "id": 18,
  931. "name": "msg",
  932. "nodeType": "Identifier",
  933. "overloadedDeclarations": [],
  934. "referencedDeclaration": 820,
  935. "src": "220:3:0",
  936. "typeDescriptions": {
  937. "typeIdentifier": "t_magic_message",
  938. "typeString": "msg"
  939. }
  940. },
  941. "id": 19,
  942. "isConstant": false,
  943. "isLValue": false,
  944. "isPure": false,
  945. "lValueRequested": false,
  946. "memberName": "sender",
  947. "nodeType": "MemberAccess",
  948. "referencedDeclaration": null,
  949. "src": "220:10:0",
  950. "typeDescriptions": {
  951. "typeIdentifier": "t_address",
  952. "typeString": "address"
  953. }
  954. },
  955. "src": "212:18:0",
  956. "typeDescriptions": {
  957. "typeIdentifier": "t_address",
  958. "typeString": "address"
  959. }
  960. },
  961. "id": 21,
  962. "nodeType": "ExpressionStatement",
  963. "src": "212:18:0"
  964. }
  965. ]
  966. },
  967. "id": 23,
  968. "implemented": true,
  969. "isConstructor": true,
  970. "isDeclaredConst": false,
  971. "modifiers": [],
  972. "name": "Migrations",
  973. "nodeType": "FunctionDefinition",
  974. "parameters": {
  975. "id": 15,
  976. "nodeType": "ParameterList",
  977. "parameters": [],
  978. "src": "196:2:0"
  979. },
  980. "payable": false,
  981. "returnParameters": {
  982. "id": 16,
  983. "nodeType": "ParameterList",
  984. "parameters": [],
  985. "src": "206:0:0"
  986. },
  987. "scope": 56,
  988. "src": "177:58:0",
  989. "stateMutability": "nonpayable",
  990. "superFunction": null,
  991. "visibility": "public"
  992. },
  993. {
  994. "body": {
  995. "id": 34,
  996. "nodeType": "Block",
  997. "src": "295:47:0",
  998. "statements": [
  999. {
  1000. "expression": {
  1001. "argumentTypes": null,
  1002. "id": 32,
  1003. "isConstant": false,
  1004. "isLValue": false,
  1005. "isPure": false,
  1006. "lValueRequested": false,
  1007. "leftHandSide": {
  1008. "argumentTypes": null,
  1009. "id": 30,
  1010. "name": "last_completed_migration",
  1011. "nodeType": "Identifier",
  1012. "overloadedDeclarations": [],
  1013. "referencedDeclaration": 5,
  1014. "src": "301:24:0",
  1015. "typeDescriptions": {
  1016. "typeIdentifier": "t_uint256",
  1017. "typeString": "uint256"
  1018. }
  1019. },
  1020. "nodeType": "Assignment",
  1021. "operator": "=",
  1022. "rightHandSide": {
  1023. "argumentTypes": null,
  1024. "id": 31,
  1025. "name": "completed",
  1026. "nodeType": "Identifier",
  1027. "overloadedDeclarations": [],
  1028. "referencedDeclaration": 25,
  1029. "src": "328:9:0",
  1030. "typeDescriptions": {
  1031. "typeIdentifier": "t_uint256",
  1032. "typeString": "uint256"
  1033. }
  1034. },
  1035. "src": "301:36:0",
  1036. "typeDescriptions": {
  1037. "typeIdentifier": "t_uint256",
  1038. "typeString": "uint256"
  1039. }
  1040. },
  1041. "id": 33,
  1042. "nodeType": "ExpressionStatement",
  1043. "src": "301:36:0"
  1044. }
  1045. ]
  1046. },
  1047. "id": 35,
  1048. "implemented": true,
  1049. "isConstructor": false,
  1050. "isDeclaredConst": false,
  1051. "modifiers": [
  1052. {
  1053. "arguments": [],
  1054. "id": 28,
  1055. "modifierName": {
  1056. "argumentTypes": null,
  1057. "id": 27,
  1058. "name": "restricted",
  1059. "nodeType": "Identifier",
  1060. "overloadedDeclarations": [],
  1061. "referencedDeclaration": 14,
  1062. "src": "284:10:0",
  1063. "typeDescriptions": {
  1064. "typeIdentifier": "t_modifier$__$",
  1065. "typeString": "modifier ()"
  1066. }
  1067. },
  1068. "nodeType": "ModifierInvocation",
  1069. "src": "284:10:0"
  1070. }
  1071. ],
  1072. "name": "setCompleted",
  1073. "nodeType": "FunctionDefinition",
  1074. "parameters": {
  1075. "id": 26,
  1076. "nodeType": "ParameterList",
  1077. "parameters": [
  1078. {
  1079. "constant": false,
  1080. "id": 25,
  1081. "name": "completed",
  1082. "nodeType": "VariableDeclaration",
  1083. "scope": 35,
  1084. "src": "261:14:0",
  1085. "stateVariable": false,
  1086. "storageLocation": "default",
  1087. "typeDescriptions": {
  1088. "typeIdentifier": "t_uint256",
  1089. "typeString": "uint256"
  1090. },
  1091. "typeName": {
  1092. "id": 24,
  1093. "name": "uint",
  1094. "nodeType": "ElementaryTypeName",
  1095. "src": "261:4:0",
  1096. "typeDescriptions": {
  1097. "typeIdentifier": "t_uint256",
  1098. "typeString": "uint256"
  1099. }
  1100. },
  1101. "value": null,
  1102. "visibility": "internal"
  1103. }
  1104. ],
  1105. "src": "260:16:0"
  1106. },
  1107. "payable": false,
  1108. "returnParameters": {
  1109. "id": 29,
  1110. "nodeType": "ParameterList",
  1111. "parameters": [],
  1112. "src": "295:0:0"
  1113. },
  1114. "scope": 56,
  1115. "src": "239:103:0",
  1116. "stateMutability": "nonpayable",
  1117. "superFunction": null,
  1118. "visibility": "public"
  1119. },
  1120. {
  1121. "body": {
  1122. "id": 54,
  1123. "nodeType": "Block",
  1124. "src": "402:109:0",
  1125. "statements": [
  1126. {
  1127. "assignments": [
  1128. 43
  1129. ],
  1130. "declarations": [
  1131. {
  1132. "constant": false,
  1133. "id": 43,
  1134. "name": "upgraded",
  1135. "nodeType": "VariableDeclaration",
  1136. "scope": 55,
  1137. "src": "408:19:0",
  1138. "stateVariable": false,
  1139. "storageLocation": "default",
  1140. "typeDescriptions": {
  1141. "typeIdentifier": "t_contract$_Migrations_$56",
  1142. "typeString": "contract Migrations"
  1143. },
  1144. "typeName": {
  1145. "contractScope": null,
  1146. "id": 42,
  1147. "name": "Migrations",
  1148. "nodeType": "UserDefinedTypeName",
  1149. "referencedDeclaration": 56,
  1150. "src": "408:10:0",
  1151. "typeDescriptions": {
  1152. "typeIdentifier": "t_contract$_Migrations_$56",
  1153. "typeString": "contract Migrations"
  1154. }
  1155. },
  1156. "value": null,
  1157. "visibility": "internal"
  1158. }
  1159. ],
  1160. "id": 47,
  1161. "initialValue": {
  1162. "argumentTypes": null,
  1163. "arguments": [
  1164. {
  1165. "argumentTypes": null,
  1166. "id": 45,
  1167. "name": "new_address",
  1168. "nodeType": "Identifier",
  1169. "overloadedDeclarations": [],
  1170. "referencedDeclaration": 37,
  1171. "src": "441:11:0",
  1172. "typeDescriptions": {
  1173. "typeIdentifier": "t_address",
  1174. "typeString": "address"
  1175. }
  1176. }
  1177. ],
  1178. "expression": {
  1179. "argumentTypes": [
  1180. {
  1181. "typeIdentifier": "t_address",
  1182. "typeString": "address"
  1183. }
  1184. ],
  1185. "id": 44,
  1186. "name": "Migrations",
  1187. "nodeType": "Identifier",
  1188. "overloadedDeclarations": [],
  1189. "referencedDeclaration": 56,
  1190. "src": "430:10:0",
  1191. "typeDescriptions": {
  1192. "typeIdentifier": "t_type$_t_contract$_Migrations_$56_$",
  1193. "typeString": "type(contract Migrations)"
  1194. }
  1195. },
  1196. "id": 46,
  1197. "isConstant": false,
  1198. "isLValue": false,
  1199. "isPure": false,
  1200. "kind": "typeConversion",
  1201. "lValueRequested": false,
  1202. "names": [],
  1203. "nodeType": "FunctionCall",
  1204. "src": "430:23:0",
  1205. "typeDescriptions": {
  1206. "typeIdentifier": "t_contract$_Migrations_$56",
  1207. "typeString": "contract Migrations"
  1208. }
  1209. },
  1210. "nodeType": "VariableDeclarationStatement",
  1211. "src": "408:45:0"
  1212. },
  1213. {
  1214. "expression": {
  1215. "argumentTypes": null,
  1216. "arguments": [
  1217. {
  1218. "argumentTypes": null,
  1219. "id": 51,
  1220. "name": "last_completed_migration",
  1221. "nodeType": "Identifier",
  1222. "overloadedDeclarations": [],
  1223. "referencedDeclaration": 5,
  1224. "src": "481:24:0",
  1225. "typeDescriptions": {
  1226. "typeIdentifier": "t_uint256",
  1227. "typeString": "uint256"
  1228. }
  1229. }
  1230. ],
  1231. "expression": {
  1232. "argumentTypes": [
  1233. {
  1234. "typeIdentifier": "t_uint256",
  1235. "typeString": "uint256"
  1236. }
  1237. ],
  1238. "expression": {
  1239. "argumentTypes": null,
  1240. "id": 48,
  1241. "name": "upgraded",
  1242. "nodeType": "Identifier",
  1243. "overloadedDeclarations": [],
  1244. "referencedDeclaration": 43,
  1245. "src": "459:8:0",
  1246. "typeDescriptions": {
  1247. "typeIdentifier": "t_contract$_Migrations_$56",
  1248. "typeString": "contract Migrations"
  1249. }
  1250. },
  1251. "id": 50,
  1252. "isConstant": false,
  1253. "isLValue": false,
  1254. "isPure": false,
  1255. "lValueRequested": false,
  1256. "memberName": "setCompleted",
  1257. "nodeType": "MemberAccess",
  1258. "referencedDeclaration": 35,
  1259. "src": "459:21:0",
  1260. "typeDescriptions": {
  1261. "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
  1262. "typeString": "function (uint256) external"
  1263. }
  1264. },
  1265. "id": 52,
  1266. "isConstant": false,
  1267. "isLValue": false,
  1268. "isPure": false,
  1269. "kind": "functionCall",
  1270. "lValueRequested": false,
  1271. "names": [],
  1272. "nodeType": "FunctionCall",
  1273. "src": "459:47:0",
  1274. "typeDescriptions": {
  1275. "typeIdentifier": "t_tuple$__$",
  1276. "typeString": "tuple()"
  1277. }
  1278. },
  1279. "id": 53,
  1280. "nodeType": "ExpressionStatement",
  1281. "src": "459:47:0"
  1282. }
  1283. ]
  1284. },
  1285. "id": 55,
  1286. "implemented": true,
  1287. "isConstructor": false,
  1288. "isDeclaredConst": false,
  1289. "modifiers": [
  1290. {
  1291. "arguments": [],
  1292. "id": 40,
  1293. "modifierName": {
  1294. "argumentTypes": null,
  1295. "id": 39,
  1296. "name": "restricted",
  1297. "nodeType": "Identifier",
  1298. "overloadedDeclarations": [],
  1299. "referencedDeclaration": 14,
  1300. "src": "391:10:0",
  1301. "typeDescriptions": {
  1302. "typeIdentifier": "t_modifier$__$",
  1303. "typeString": "modifier ()"
  1304. }
  1305. },
  1306. "nodeType": "ModifierInvocation",
  1307. "src": "391:10:0"
  1308. }
  1309. ],
  1310. "name": "upgrade",
  1311. "nodeType": "FunctionDefinition",
  1312. "parameters": {
  1313. "id": 38,
  1314. "nodeType": "ParameterList",
  1315. "parameters": [
  1316. {
  1317. "constant": false,
  1318. "id": 37,
  1319. "name": "new_address",
  1320. "nodeType": "VariableDeclaration",
  1321. "scope": 55,
  1322. "src": "363:19:0",
  1323. "stateVariable": false,
  1324. "storageLocation": "default",
  1325. "typeDescriptions": {
  1326. "typeIdentifier": "t_address",
  1327. "typeString": "address"
  1328. },
  1329. "typeName": {
  1330. "id": 36,
  1331. "name": "address",
  1332. "nodeType": "ElementaryTypeName",
  1333. "src": "363:7:0",
  1334. "typeDescriptions": {
  1335. "typeIdentifier": "t_address",
  1336. "typeString": "address"
  1337. }
  1338. },
  1339. "value": null,
  1340. "visibility": "internal"
  1341. }
  1342. ],
  1343. "src": "362:21:0"
  1344. },
  1345. "payable": false,
  1346. "returnParameters": {
  1347. "id": 41,
  1348. "nodeType": "ParameterList",
  1349. "parameters": [],
  1350. "src": "402:0:0"
  1351. },
  1352. "scope": 56,
  1353. "src": "346:165:0",
  1354. "stateMutability": "nonpayable",
  1355. "superFunction": null,
  1356. "visibility": "public"
  1357. }
  1358. ],
  1359. "scope": 57,
  1360. "src": "25:488:0"
  1361. }
  1362. ],
  1363. "src": "0:514:0"
  1364. },
  1365. "compiler": {
  1366. "name": "solc",
  1367. "version": "0.4.19+commit.c4cbbb05.Emscripten.clang"
  1368. },
  1369. "networks": {},
  1370. "schemaVersion": "2.0.0",
  1371. "updatedAt": "2018-04-02T07:10:49.183Z"
  1372. }