1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372 |
- {
- "contractName": "Migrations",
- "abi": [
- {
- "constant": true,
- "inputs": [],
- "name": "last_completed_migration",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "stateMutability": "view",
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "payable": false,
- "stateMutability": "nonpayable",
- "type": "constructor"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "completed",
- "type": "uint256"
- }
- ],
- "name": "setCompleted",
- "outputs": [],
- "payable": false,
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "new_address",
- "type": "address"
- }
- ],
- "name": "upgrade",
- "outputs": [],
- "payable": false,
- "stateMutability": "nonpayable",
- "type": "function"
- }
- ],
- "bytecode": "0x6060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102db8061005e6000396000f300606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610224565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f600480803590602001909190505061024f565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610220578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561020b57600080fd5b6102c65a03f1151561021c57600080fd5b5050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102ac57806001819055505b505600a165627a7a72305820b86ccfd05f83b4734b32a5fef648b3b3c0f894cf729b8401f7f48da7f862d04f0029",
- "deployedBytecode": "0x606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610224565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f600480803590602001909190505061024f565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610220578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561020b57600080fd5b6102c65a03f1151561021c57600080fd5b5050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102ac57806001819055505b505600a165627a7a72305820b86ccfd05f83b4734b32a5fef648b3b3c0f894cf729b8401f7f48da7f862d04f0029",
- "sourceMap": "25:488:0:-;;;177:58;;;;;;;;220:10;212:5;;:18;;;;;;;;;;;;;;;;;;25:488;;;;;;",
- "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",
- "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",
- "sourcePath": "/Users/ted/Github/Team-H/Lesson-7/assignment/contracts/Migrations.sol",
- "ast": {
- "absolutePath": "/Users/ted/Github/Team-H/Lesson-7/assignment/contracts/Migrations.sol",
- "exportedSymbols": {
- "Migrations": [
- 56
- ]
- },
- "id": 57,
- "nodeType": "SourceUnit",
- "nodes": [
- {
- "id": 1,
- "literals": [
- "solidity",
- "^",
- "0.4",
- ".2"
- ],
- "nodeType": "PragmaDirective",
- "src": "0:23:0"
- },
- {
- "baseContracts": [],
- "contractDependencies": [],
- "contractKind": "contract",
- "documentation": null,
- "fullyImplemented": true,
- "id": 56,
- "linearizedBaseContracts": [
- 56
- ],
- "name": "Migrations",
- "nodeType": "ContractDefinition",
- "nodes": [
- {
- "constant": false,
- "id": 3,
- "name": "owner",
- "nodeType": "VariableDeclaration",
- "scope": 56,
- "src": "49:20:0",
- "stateVariable": true,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 2,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "49:7:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "public"
- },
- {
- "constant": false,
- "id": 5,
- "name": "last_completed_migration",
- "nodeType": "VariableDeclaration",
- "scope": 56,
- "src": "73:36:0",
- "stateVariable": true,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 4,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "73:4:0",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "public"
- },
- {
- "body": {
- "id": 13,
- "nodeType": "Block",
- "src": "136:37:0",
- "statements": [
- {
- "condition": {
- "argumentTypes": null,
- "commonType": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "id": 10,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftExpression": {
- "argumentTypes": null,
- "expression": {
- "argumentTypes": null,
- "id": 7,
- "name": "msg",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 820,
- "src": "146:3:0",
- "typeDescriptions": {
- "typeIdentifier": "t_magic_message",
- "typeString": "msg"
- }
- },
- "id": 8,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "sender",
- "nodeType": "MemberAccess",
- "referencedDeclaration": null,
- "src": "146:10:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "nodeType": "BinaryOperation",
- "operator": "==",
- "rightExpression": {
- "argumentTypes": null,
- "id": 9,
- "name": "owner",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 3,
- "src": "160:5:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "src": "146:19:0",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "falseBody": null,
- "id": 12,
- "nodeType": "IfStatement",
- "src": "142:26:0",
- "trueBody": {
- "id": 11,
- "nodeType": "PlaceholderStatement",
- "src": "167:1:0"
- }
- }
- ]
- },
- "id": 14,
- "name": "restricted",
- "nodeType": "ModifierDefinition",
- "parameters": {
- "id": 6,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "133:2:0"
- },
- "src": "114:59:0",
- "visibility": "internal"
- },
- {
- "body": {
- "id": 22,
- "nodeType": "Block",
- "src": "206:29:0",
- "statements": [
- {
- "expression": {
- "argumentTypes": null,
- "id": 20,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftHandSide": {
- "argumentTypes": null,
- "id": 17,
- "name": "owner",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 3,
- "src": "212:5:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "nodeType": "Assignment",
- "operator": "=",
- "rightHandSide": {
- "argumentTypes": null,
- "expression": {
- "argumentTypes": null,
- "id": 18,
- "name": "msg",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 820,
- "src": "220:3:0",
- "typeDescriptions": {
- "typeIdentifier": "t_magic_message",
- "typeString": "msg"
- }
- },
- "id": 19,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "sender",
- "nodeType": "MemberAccess",
- "referencedDeclaration": null,
- "src": "220:10:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "src": "212:18:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "id": 21,
- "nodeType": "ExpressionStatement",
- "src": "212:18:0"
- }
- ]
- },
- "id": 23,
- "implemented": true,
- "isConstructor": true,
- "isDeclaredConst": false,
- "modifiers": [],
- "name": "Migrations",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 15,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "196:2:0"
- },
- "payable": false,
- "returnParameters": {
- "id": 16,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "206:0:0"
- },
- "scope": 56,
- "src": "177:58:0",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- {
- "body": {
- "id": 34,
- "nodeType": "Block",
- "src": "295:47:0",
- "statements": [
- {
- "expression": {
- "argumentTypes": null,
- "id": 32,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftHandSide": {
- "argumentTypes": null,
- "id": 30,
- "name": "last_completed_migration",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 5,
- "src": "301:24:0",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "Assignment",
- "operator": "=",
- "rightHandSide": {
- "argumentTypes": null,
- "id": 31,
- "name": "completed",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 25,
- "src": "328:9:0",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "src": "301:36:0",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "id": 33,
- "nodeType": "ExpressionStatement",
- "src": "301:36:0"
- }
- ]
- },
- "id": 35,
- "implemented": true,
- "isConstructor": false,
- "isDeclaredConst": false,
- "modifiers": [
- {
- "arguments": [],
- "id": 28,
- "modifierName": {
- "argumentTypes": null,
- "id": 27,
- "name": "restricted",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 14,
- "src": "284:10:0",
- "typeDescriptions": {
- "typeIdentifier": "t_modifier$__$",
- "typeString": "modifier ()"
- }
- },
- "nodeType": "ModifierInvocation",
- "src": "284:10:0"
- }
- ],
- "name": "setCompleted",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 26,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 25,
- "name": "completed",
- "nodeType": "VariableDeclaration",
- "scope": 35,
- "src": "261:14:0",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 24,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "261:4:0",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "260:16:0"
- },
- "payable": false,
- "returnParameters": {
- "id": 29,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "295:0:0"
- },
- "scope": 56,
- "src": "239:103:0",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- {
- "body": {
- "id": 54,
- "nodeType": "Block",
- "src": "402:109:0",
- "statements": [
- {
- "assignments": [
- 43
- ],
- "declarations": [
- {
- "constant": false,
- "id": 43,
- "name": "upgraded",
- "nodeType": "VariableDeclaration",
- "scope": 55,
- "src": "408:19:0",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Migrations_$56",
- "typeString": "contract Migrations"
- },
- "typeName": {
- "contractScope": null,
- "id": 42,
- "name": "Migrations",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 56,
- "src": "408:10:0",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Migrations_$56",
- "typeString": "contract Migrations"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "id": 47,
- "initialValue": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 45,
- "name": "new_address",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 37,
- "src": "441:11:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 44,
- "name": "Migrations",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 56,
- "src": "430:10:0",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_Migrations_$56_$",
- "typeString": "type(contract Migrations)"
- }
- },
- "id": 46,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "430:23:0",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Migrations_$56",
- "typeString": "contract Migrations"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "408:45:0"
- },
- {
- "expression": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 51,
- "name": "last_completed_migration",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 5,
- "src": "481:24:0",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "argumentTypes": null,
- "id": 48,
- "name": "upgraded",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 43,
- "src": "459:8:0",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Migrations_$56",
- "typeString": "contract Migrations"
- }
- },
- "id": 50,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "setCompleted",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 35,
- "src": "459:21:0",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
- "typeString": "function (uint256) external"
- }
- },
- "id": 52,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "459:47:0",
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 53,
- "nodeType": "ExpressionStatement",
- "src": "459:47:0"
- }
- ]
- },
- "id": 55,
- "implemented": true,
- "isConstructor": false,
- "isDeclaredConst": false,
- "modifiers": [
- {
- "arguments": [],
- "id": 40,
- "modifierName": {
- "argumentTypes": null,
- "id": 39,
- "name": "restricted",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 14,
- "src": "391:10:0",
- "typeDescriptions": {
- "typeIdentifier": "t_modifier$__$",
- "typeString": "modifier ()"
- }
- },
- "nodeType": "ModifierInvocation",
- "src": "391:10:0"
- }
- ],
- "name": "upgrade",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 38,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 37,
- "name": "new_address",
- "nodeType": "VariableDeclaration",
- "scope": 55,
- "src": "363:19:0",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 36,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "363:7:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "362:21:0"
- },
- "payable": false,
- "returnParameters": {
- "id": 41,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "402:0:0"
- },
- "scope": 56,
- "src": "346:165:0",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- }
- ],
- "scope": 57,
- "src": "25:488:0"
- }
- ],
- "src": "0:514:0"
- },
- "legacyAST": {
- "absolutePath": "/Users/ted/Github/Team-H/Lesson-7/assignment/contracts/Migrations.sol",
- "exportedSymbols": {
- "Migrations": [
- 56
- ]
- },
- "id": 57,
- "nodeType": "SourceUnit",
- "nodes": [
- {
- "id": 1,
- "literals": [
- "solidity",
- "^",
- "0.4",
- ".2"
- ],
- "nodeType": "PragmaDirective",
- "src": "0:23:0"
- },
- {
- "baseContracts": [],
- "contractDependencies": [],
- "contractKind": "contract",
- "documentation": null,
- "fullyImplemented": true,
- "id": 56,
- "linearizedBaseContracts": [
- 56
- ],
- "name": "Migrations",
- "nodeType": "ContractDefinition",
- "nodes": [
- {
- "constant": false,
- "id": 3,
- "name": "owner",
- "nodeType": "VariableDeclaration",
- "scope": 56,
- "src": "49:20:0",
- "stateVariable": true,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 2,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "49:7:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "public"
- },
- {
- "constant": false,
- "id": 5,
- "name": "last_completed_migration",
- "nodeType": "VariableDeclaration",
- "scope": 56,
- "src": "73:36:0",
- "stateVariable": true,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 4,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "73:4:0",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "public"
- },
- {
- "body": {
- "id": 13,
- "nodeType": "Block",
- "src": "136:37:0",
- "statements": [
- {
- "condition": {
- "argumentTypes": null,
- "commonType": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "id": 10,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftExpression": {
- "argumentTypes": null,
- "expression": {
- "argumentTypes": null,
- "id": 7,
- "name": "msg",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 820,
- "src": "146:3:0",
- "typeDescriptions": {
- "typeIdentifier": "t_magic_message",
- "typeString": "msg"
- }
- },
- "id": 8,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "sender",
- "nodeType": "MemberAccess",
- "referencedDeclaration": null,
- "src": "146:10:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "nodeType": "BinaryOperation",
- "operator": "==",
- "rightExpression": {
- "argumentTypes": null,
- "id": 9,
- "name": "owner",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 3,
- "src": "160:5:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "src": "146:19:0",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "falseBody": null,
- "id": 12,
- "nodeType": "IfStatement",
- "src": "142:26:0",
- "trueBody": {
- "id": 11,
- "nodeType": "PlaceholderStatement",
- "src": "167:1:0"
- }
- }
- ]
- },
- "id": 14,
- "name": "restricted",
- "nodeType": "ModifierDefinition",
- "parameters": {
- "id": 6,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "133:2:0"
- },
- "src": "114:59:0",
- "visibility": "internal"
- },
- {
- "body": {
- "id": 22,
- "nodeType": "Block",
- "src": "206:29:0",
- "statements": [
- {
- "expression": {
- "argumentTypes": null,
- "id": 20,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftHandSide": {
- "argumentTypes": null,
- "id": 17,
- "name": "owner",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 3,
- "src": "212:5:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "nodeType": "Assignment",
- "operator": "=",
- "rightHandSide": {
- "argumentTypes": null,
- "expression": {
- "argumentTypes": null,
- "id": 18,
- "name": "msg",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 820,
- "src": "220:3:0",
- "typeDescriptions": {
- "typeIdentifier": "t_magic_message",
- "typeString": "msg"
- }
- },
- "id": 19,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "sender",
- "nodeType": "MemberAccess",
- "referencedDeclaration": null,
- "src": "220:10:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "src": "212:18:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "id": 21,
- "nodeType": "ExpressionStatement",
- "src": "212:18:0"
- }
- ]
- },
- "id": 23,
- "implemented": true,
- "isConstructor": true,
- "isDeclaredConst": false,
- "modifiers": [],
- "name": "Migrations",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 15,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "196:2:0"
- },
- "payable": false,
- "returnParameters": {
- "id": 16,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "206:0:0"
- },
- "scope": 56,
- "src": "177:58:0",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- {
- "body": {
- "id": 34,
- "nodeType": "Block",
- "src": "295:47:0",
- "statements": [
- {
- "expression": {
- "argumentTypes": null,
- "id": 32,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftHandSide": {
- "argumentTypes": null,
- "id": 30,
- "name": "last_completed_migration",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 5,
- "src": "301:24:0",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "Assignment",
- "operator": "=",
- "rightHandSide": {
- "argumentTypes": null,
- "id": 31,
- "name": "completed",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 25,
- "src": "328:9:0",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "src": "301:36:0",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "id": 33,
- "nodeType": "ExpressionStatement",
- "src": "301:36:0"
- }
- ]
- },
- "id": 35,
- "implemented": true,
- "isConstructor": false,
- "isDeclaredConst": false,
- "modifiers": [
- {
- "arguments": [],
- "id": 28,
- "modifierName": {
- "argumentTypes": null,
- "id": 27,
- "name": "restricted",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 14,
- "src": "284:10:0",
- "typeDescriptions": {
- "typeIdentifier": "t_modifier$__$",
- "typeString": "modifier ()"
- }
- },
- "nodeType": "ModifierInvocation",
- "src": "284:10:0"
- }
- ],
- "name": "setCompleted",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 26,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 25,
- "name": "completed",
- "nodeType": "VariableDeclaration",
- "scope": 35,
- "src": "261:14:0",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 24,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "261:4:0",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "260:16:0"
- },
- "payable": false,
- "returnParameters": {
- "id": 29,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "295:0:0"
- },
- "scope": 56,
- "src": "239:103:0",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- {
- "body": {
- "id": 54,
- "nodeType": "Block",
- "src": "402:109:0",
- "statements": [
- {
- "assignments": [
- 43
- ],
- "declarations": [
- {
- "constant": false,
- "id": 43,
- "name": "upgraded",
- "nodeType": "VariableDeclaration",
- "scope": 55,
- "src": "408:19:0",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Migrations_$56",
- "typeString": "contract Migrations"
- },
- "typeName": {
- "contractScope": null,
- "id": 42,
- "name": "Migrations",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 56,
- "src": "408:10:0",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Migrations_$56",
- "typeString": "contract Migrations"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "id": 47,
- "initialValue": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 45,
- "name": "new_address",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 37,
- "src": "441:11:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 44,
- "name": "Migrations",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 56,
- "src": "430:10:0",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_Migrations_$56_$",
- "typeString": "type(contract Migrations)"
- }
- },
- "id": 46,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "430:23:0",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Migrations_$56",
- "typeString": "contract Migrations"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "408:45:0"
- },
- {
- "expression": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 51,
- "name": "last_completed_migration",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 5,
- "src": "481:24:0",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "argumentTypes": null,
- "id": 48,
- "name": "upgraded",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 43,
- "src": "459:8:0",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_Migrations_$56",
- "typeString": "contract Migrations"
- }
- },
- "id": 50,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "setCompleted",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 35,
- "src": "459:21:0",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
- "typeString": "function (uint256) external"
- }
- },
- "id": 52,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "459:47:0",
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 53,
- "nodeType": "ExpressionStatement",
- "src": "459:47:0"
- }
- ]
- },
- "id": 55,
- "implemented": true,
- "isConstructor": false,
- "isDeclaredConst": false,
- "modifiers": [
- {
- "arguments": [],
- "id": 40,
- "modifierName": {
- "argumentTypes": null,
- "id": 39,
- "name": "restricted",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 14,
- "src": "391:10:0",
- "typeDescriptions": {
- "typeIdentifier": "t_modifier$__$",
- "typeString": "modifier ()"
- }
- },
- "nodeType": "ModifierInvocation",
- "src": "391:10:0"
- }
- ],
- "name": "upgrade",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 38,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 37,
- "name": "new_address",
- "nodeType": "VariableDeclaration",
- "scope": 55,
- "src": "363:19:0",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 36,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "363:7:0",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "362:21:0"
- },
- "payable": false,
- "returnParameters": {
- "id": 41,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "402:0:0"
- },
- "scope": 56,
- "src": "346:165:0",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- }
- ],
- "scope": 57,
- "src": "25:488:0"
- }
- ],
- "src": "0:514:0"
- },
- "compiler": {
- "name": "solc",
- "version": "0.4.19+commit.c4cbbb05.Emscripten.clang"
- },
- "networks": {},
- "schemaVersion": "2.0.0",
- "updatedAt": "2018-04-02T07:10:49.183Z"
- }
|