@edgefund/core
Version:
EdgeFund Core contracts and tests
1,311 lines • 52.7 kB
JSON
{
"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": "0x608060405234801561001057600080fd5b5060008054600160a060020a0319163317905561023c806100326000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a72305820f5de1bb6f7c4c6632f8726d37ce5304edf65cc92b177e6f5b2291d2a1ba633740029",
"deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a72305820f5de1bb6f7c4c6632f8726d37ce5304edf65cc92b177e6f5b2291d2a1ba633740029",
"sourceMap": "26:520:4:-;;;121:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;152:5:4;:18;;-1:-1:-1;;;;;;152:18:4;160:10;152:18;;;26:520;;;;;;",
"deployedSourceMap": "26:520:4:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;369:175;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;369:175:4;;;;;;;;;78:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;78:36:4;;;;;;;;;;;;;;;;;;;;52:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;52:20:4;;;;;;;;;;;;;;;;;;;;;;;254:109;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;254:109:4;;;;;369:175;435:19;233:5;;;;219:10;:19;215:26;;;468:11;435:45;;490:8;:21;;;512:24;;490:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;490:47:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;490:47:4;;;;215:26;369:175;;:::o;78:36::-;;;;:::o;52:20::-;;;;;;:::o;254:109::-;233:5;;;;219:10;:19;215:26;;;320:24;:36;;;215:26;254:109;:::o",
"source": "pragma solidity ^0.4.23;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier restricted() {\n if (msg.sender == owner) _;\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/garethoates/Developer/Blockchain/EdgeFund/edgefund-core/contracts/Migrations.sol",
"ast": {
"absolutePath": "/Users/garethoates/Developer/Blockchain/EdgeFund/edgefund-core/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
1183
]
},
"id": 1184,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1128,
"literals": [
"solidity",
"^",
"0.4",
".23"
],
"nodeType": "PragmaDirective",
"src": "0:24:4"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1183,
"linearizedBaseContracts": [
1183
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 1130,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 1183,
"src": "52:20:4",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1129,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "52:7:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 1132,
"name": "last_completed_migration",
"nodeType": "VariableDeclaration",
"scope": 1183,
"src": "78:36:4",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1131,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "78:4:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1140,
"nodeType": "Block",
"src": "142:35:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1138,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1135,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1130,
"src": "152:5:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1136,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1198,
"src": "160:3:4",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1137,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "160:10:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "152:18:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1139,
"nodeType": "ExpressionStatement",
"src": "152:18:4"
}
]
},
"documentation": null,
"id": 1141,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1133,
"nodeType": "ParameterList",
"parameters": [],
"src": "132:2:4"
},
"payable": false,
"returnParameters": {
"id": 1134,
"nodeType": "ParameterList",
"parameters": [],
"src": "142:0:4"
},
"scope": 1183,
"src": "121:56:4",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1149,
"nodeType": "Block",
"src": "205:43:4",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1146,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1143,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1198,
"src": "219:3:4",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1144,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "219:10:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1145,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1130,
"src": "233:5:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "219:19:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1148,
"nodeType": "IfStatement",
"src": "215:26:4",
"trueBody": {
"id": 1147,
"nodeType": "PlaceholderStatement",
"src": "240:1:4"
}
}
]
},
"documentation": null,
"id": 1150,
"name": "restricted",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1142,
"nodeType": "ParameterList",
"parameters": [],
"src": "202:2:4"
},
"src": "183:65:4",
"visibility": "internal"
},
{
"body": {
"id": 1161,
"nodeType": "Block",
"src": "310:53:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1159,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1157,
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1132,
"src": "320:24:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1158,
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1152,
"src": "347:9:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "320:36:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1160,
"nodeType": "ExpressionStatement",
"src": "320:36:4"
}
]
},
"documentation": null,
"id": 1162,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1155,
"modifierName": {
"argumentTypes": null,
"id": 1154,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1150,
"src": "299:10:4",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "299:10:4"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1153,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1152,
"name": "completed",
"nodeType": "VariableDeclaration",
"scope": 1162,
"src": "276:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1151,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "276:4:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "275:16:4"
},
"payable": false,
"returnParameters": {
"id": 1156,
"nodeType": "ParameterList",
"parameters": [],
"src": "310:0:4"
},
"scope": 1183,
"src": "254:109:4",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1181,
"nodeType": "Block",
"src": "425:119:4",
"statements": [
{
"assignments": [
1170
],
"declarations": [
{
"constant": false,
"id": 1170,
"name": "upgraded",
"nodeType": "VariableDeclaration",
"scope": 1182,
"src": "435:19:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$1183",
"typeString": "contract Migrations"
},
"typeName": {
"contractScope": null,
"id": 1169,
"name": "Migrations",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1183,
"src": "435:10:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$1183",
"typeString": "contract Migrations"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1174,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1172,
"name": "new_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1164,
"src": "468:11:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1171,
"name": "Migrations",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1183,
"src": "457:10:4",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Migrations_$1183_$",
"typeString": "type(contract Migrations)"
}
},
"id": 1173,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "457:23:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$1183",
"typeString": "contract Migrations"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "435:45:4"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1178,
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1132,
"src": "512:24:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1175,
"name": "upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1170,
"src": "490:8:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$1183",
"typeString": "contract Migrations"
}
},
"id": 1177,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCompleted",
"nodeType": "MemberAccess",
"referencedDeclaration": 1162,
"src": "490:21:4",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256) external"
}
},
"id": 1179,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "490:47:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1180,
"nodeType": "ExpressionStatement",
"src": "490:47:4"
}
]
},
"documentation": null,
"id": 1182,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1167,
"modifierName": {
"argumentTypes": null,
"id": 1166,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1150,
"src": "414:10:4",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "414:10:4"
}
],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1165,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1164,
"name": "new_address",
"nodeType": "VariableDeclaration",
"scope": 1182,
"src": "386:19:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1163,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "386:7:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "385:21:4"
},
"payable": false,
"returnParameters": {
"id": 1168,
"nodeType": "ParameterList",
"parameters": [],
"src": "425:0:4"
},
"scope": 1183,
"src": "369:175:4",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1184,
"src": "26:520:4"
}
],
"src": "0:547:4"
},
"legacyAST": {
"absolutePath": "/Users/garethoates/Developer/Blockchain/EdgeFund/edgefund-core/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
1183
]
},
"id": 1184,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1128,
"literals": [
"solidity",
"^",
"0.4",
".23"
],
"nodeType": "PragmaDirective",
"src": "0:24:4"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1183,
"linearizedBaseContracts": [
1183
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 1130,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 1183,
"src": "52:20:4",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1129,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "52:7:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 1132,
"name": "last_completed_migration",
"nodeType": "VariableDeclaration",
"scope": 1183,
"src": "78:36:4",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1131,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "78:4:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1140,
"nodeType": "Block",
"src": "142:35:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1138,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1135,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1130,
"src": "152:5:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1136,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1198,
"src": "160:3:4",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1137,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "160:10:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "152:18:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1139,
"nodeType": "ExpressionStatement",
"src": "152:18:4"
}
]
},
"documentation": null,
"id": 1141,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1133,
"nodeType": "ParameterList",
"parameters": [],
"src": "132:2:4"
},
"payable": false,
"returnParameters": {
"id": 1134,
"nodeType": "ParameterList",
"parameters": [],
"src": "142:0:4"
},
"scope": 1183,
"src": "121:56:4",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1149,
"nodeType": "Block",
"src": "205:43:4",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1146,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1143,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1198,
"src": "219:3:4",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1144,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "219:10:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1145,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1130,
"src": "233:5:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "219:19:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1148,
"nodeType": "IfStatement",
"src": "215:26:4",
"trueBody": {
"id": 1147,
"nodeType": "PlaceholderStatement",
"src": "240:1:4"
}
}
]
},
"documentation": null,
"id": 1150,
"name": "restricted",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1142,
"nodeType": "ParameterList",
"parameters": [],
"src": "202:2:4"
},
"src": "183:65:4",
"visibility": "internal"
},
{
"body": {
"id": 1161,
"nodeType": "Block",
"src": "310:53:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1159,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1157,
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1132,
"src": "320:24:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1158,
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1152,
"src": "347:9:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "320:36:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1160,
"nodeType": "ExpressionStatement",
"src": "320:36:4"
}
]
},
"documentation": null,
"id": 1162,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1155,
"modifierName": {
"argumentTypes": null,
"id": 1154,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1150,
"src": "299:10:4",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "299:10:4"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1153,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1152,
"name": "completed",
"nodeType": "VariableDeclaration",
"scope": 1162,
"src": "276:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1151,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "276:4:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "275:16:4"
},
"payable": false,
"returnParameters": {
"id": 1156,
"nodeType": "ParameterList",
"parameters": [],
"src": "310:0:4"
},
"scope": 1183,
"src": "254:109:4",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1181,
"nodeType": "Block",
"src": "425:119:4",
"statements": [
{
"assignments": [
1170
],
"declarations": [
{
"constant": false,
"id": 1170,
"name": "upgraded",
"nodeType": "VariableDeclaration",
"scope": 1182,
"src": "435:19:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$1183",
"typeString": "contract Migrations"
},
"typeName": {
"contractScope": null,
"id": 1169,
"name": "Migrations",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1183,
"src": "435:10:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$1183",
"typeString": "contract Migrations"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1174,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1172,
"name": "new_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1164,
"src": "468:11:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1171,
"name": "Migrations",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1183,
"src": "457:10:4",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Migrations_$1183_$",
"typeString": "type(contract Migrations)"
}
},
"id": 1173,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "457:23:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$1183",
"typeString": "contract Migrations"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "435:45:4"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1178,
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1132,
"src": "512:24:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1175,
"name": "upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1170,
"src": "490:8:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$1183",
"typeString": "contract Migrations"
}
},
"id": 1177,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCompleted",
"nodeType": "MemberAccess",
"referencedDeclaration": 1162,
"src": "490:21:4",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256) external"
}
},
"id": 1179,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "490:47:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1180,
"nodeType": "ExpressionStatement",
"src": "490:47:4"
}
]
},
"documentation": null,
"id": 1182,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1167,
"modifierName": {
"argumentTypes": null,
"id": 1166,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1150,
"src": "414:10:4",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "mo