UNPKG

@gooddollar/goodcontracts

Version:
1,266 lines 53.7 kB
{ "contractName": "Migrations", "abi": [ { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": true, "inputs": [], "name": "last_completed_migration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "completed", "type": "uint256" } ], "name": "setCompleted", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "new_address", "type": "address" } ], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"new_address\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/Migrations.sol\":{\"keccak256\":\"0xd2184d194c968e161017b6733900bf892c36d05972a6a871e0204d8ce0ece257\",\"urls\":[\"bzz-raw://00e314668a85d4301069801d583cb401f5ae025434716d8adfe5a115b25adce3\",\"dweb:/ipfs/QmPL3CS9d5FFADwh13mbR2bwxfEBM63n1yUth59GJxo68e\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b031916331790556101b3806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea265627a7a72315820bf20d6cbd4e1c59837fd5e294328b6e42646ded332bbc6c85ac8eb9f64a3df5a64736f6c63430005100032", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea265627a7a72315820bf20d6cbd4e1c59837fd5e294328b6e42646ded332bbc6c85ac8eb9f64a3df5a64736f6c63430005100032", "sourceMap": "25:526:28:-;;;123:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;154:5:28;:18;;-1:-1:-1;;;;;;154:18:28;162:10;154:18;;;25:526;;;;;;", "deployedSourceMap": "25:526:28:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:526:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;374:175;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;374:175:28;-1:-1:-1;;;;;374:175:28;;:::i;:::-;;77:39;;;:::i;:::-;;;;;;;;;;;;;;;;51:20;;;:::i;:::-;;;;-1:-1:-1;;;;;51:20:28;;;;;;;;;;;;;;256:112;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;256:112:28;;:::i;374:175::-;235:5;;-1:-1:-1;;;;;235:5:28;221:10;:19;217:26;;;440:19;473:11;440:45;;495:8;-1:-1:-1;;;;;495:21:28;;517:24;;495:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;495:47:28;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;495:47:28;;;;242:1;217:26;374:175;:::o;77:39::-;;;;:::o;51:20::-;;;-1:-1:-1;;;;;51:20:28;;:::o;256:112::-;235:5;;-1:-1:-1;;;;;235:5:28;221:10;:19;217:26;;;325:24;:36;256:112::o", "source": "pragma solidity >0.5.4;\n\ncontract Migrations {\n address public owner;\n uint256 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(uint256 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/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/Migrations.sol", "ast": { "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 9110 ] }, "id": 9111, "nodeType": "SourceUnit", "nodes": [ { "id": 9055, "literals": [ "solidity", ">", "0.5", ".4" ], "nodeType": "PragmaDirective", "src": "0:23:28" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 9110, "linearizedBaseContracts": [ 9110 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 9057, "name": "owner", "nodeType": "VariableDeclaration", "scope": 9110, "src": "51:20:28", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 9056, "name": "address", "nodeType": "ElementaryTypeName", "src": "51:7:28", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 9059, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 9110, "src": "77:39:28", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9058, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "77:7:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 9067, "nodeType": "Block", "src": "144:35:28", "statements": [ { "expression": { "argumentTypes": null, "id": 9065, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9062, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9057, "src": "154:5:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9063, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 22171, "src": "162:3:28", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9064, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "162:10:28", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "154:18:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 9066, "nodeType": "ExpressionStatement", "src": "154:18:28" } ] }, "documentation": null, "id": 9068, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 9060, "nodeType": "ParameterList", "parameters": [], "src": "134:2:28" }, "returnParameters": { "id": 9061, "nodeType": "ParameterList", "parameters": [], "src": "144:0:28" }, "scope": 9110, "src": "123:56:28", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 9076, "nodeType": "Block", "src": "207:43:28", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 9073, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9070, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 22171, "src": "221:3:28", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9071, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "221:10:28", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 9072, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9057, "src": "235:5:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "221:19:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 9075, "nodeType": "IfStatement", "src": "217:26:28", "trueBody": { "id": 9074, "nodeType": "PlaceholderStatement", "src": "242:1:28" } } ] }, "documentation": null, "id": 9077, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 9069, "nodeType": "ParameterList", "parameters": [], "src": "204:2:28" }, "src": "185:65:28", "visibility": "internal" }, { "body": { "id": 9088, "nodeType": "Block", "src": "315:53:28", "statements": [ { "expression": { "argumentTypes": null, "id": 9086, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9084, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9059, "src": "325:24:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 9085, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9079, "src": "352:9:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "325:36:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9087, "nodeType": "ExpressionStatement", "src": "325:36:28" } ] }, "documentation": null, "id": 9089, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9082, "modifierName": { "argumentTypes": null, "id": 9081, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9077, "src": "304:10:28", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "304:10:28" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 9080, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9079, "name": "completed", "nodeType": "VariableDeclaration", "scope": 9089, "src": "278:17:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9078, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "278:7:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "277:19:28" }, "returnParameters": { "id": 9083, "nodeType": "ParameterList", "parameters": [], "src": "315:0:28" }, "scope": 9110, "src": "256:112:28", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 9108, "nodeType": "Block", "src": "430:119:28", "statements": [ { "assignments": [ 9097 ], "declarations": [ { "constant": false, "id": 9097, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 9108, "src": "440:19:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$9110", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 9096, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 9110, "src": "440:10:28", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$9110", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 9101, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9099, "name": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9091, "src": "473:11:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 9098, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9110, "src": "462:10:28", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$9110_$", "typeString": "type(contract Migrations)" } }, "id": 9100, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "462:23:28", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$9110", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "440:45:28" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9105, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9059, "src": "517:24:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9102, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9097, "src": "495:8:28", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$9110", "typeString": "contract Migrations" } }, "id": 9104, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 9089, "src": "495:21:28", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 9106, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "495:47:28", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 9107, "nodeType": "ExpressionStatement", "src": "495:47:28" } ] }, "documentation": null, "id": 9109, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9094, "modifierName": { "argumentTypes": null, "id": 9093, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9077, "src": "419:10:28", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "419:10:28" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 9092, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9091, "name": "new_address", "nodeType": "VariableDeclaration", "scope": 9109, "src": "391:19:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 9090, "name": "address", "nodeType": "ElementaryTypeName", "src": "391:7:28", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "390:21:28" }, "returnParameters": { "id": 9095, "nodeType": "ParameterList", "parameters": [], "src": "430:0:28" }, "scope": 9110, "src": "374:175:28", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 9111, "src": "25:526:28" } ], "src": "0:552:28" }, "legacyAST": { "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 9110 ] }, "id": 9111, "nodeType": "SourceUnit", "nodes": [ { "id": 9055, "literals": [ "solidity", ">", "0.5", ".4" ], "nodeType": "PragmaDirective", "src": "0:23:28" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 9110, "linearizedBaseContracts": [ 9110 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 9057, "name": "owner", "nodeType": "VariableDeclaration", "scope": 9110, "src": "51:20:28", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 9056, "name": "address", "nodeType": "ElementaryTypeName", "src": "51:7:28", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 9059, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 9110, "src": "77:39:28", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9058, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "77:7:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 9067, "nodeType": "Block", "src": "144:35:28", "statements": [ { "expression": { "argumentTypes": null, "id": 9065, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9062, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9057, "src": "154:5:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9063, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 22171, "src": "162:3:28", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9064, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "162:10:28", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "154:18:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 9066, "nodeType": "ExpressionStatement", "src": "154:18:28" } ] }, "documentation": null, "id": 9068, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 9060, "nodeType": "ParameterList", "parameters": [], "src": "134:2:28" }, "returnParameters": { "id": 9061, "nodeType": "ParameterList", "parameters": [], "src": "144:0:28" }, "scope": 9110, "src": "123:56:28", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 9076, "nodeType": "Block", "src": "207:43:28", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 9073, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 9070, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 22171, "src": "221:3:28", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 9071, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "221:10:28", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 9072, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9057, "src": "235:5:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "221:19:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 9075, "nodeType": "IfStatement", "src": "217:26:28", "trueBody": { "id": 9074, "nodeType": "PlaceholderStatement", "src": "242:1:28" } } ] }, "documentation": null, "id": 9077, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 9069, "nodeType": "ParameterList", "parameters": [], "src": "204:2:28" }, "src": "185:65:28", "visibility": "internal" }, { "body": { "id": 9088, "nodeType": "Block", "src": "315:53:28", "statements": [ { "expression": { "argumentTypes": null, "id": 9086, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 9084, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9059, "src": "325:24:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 9085, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9079, "src": "352:9:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "325:36:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 9087, "nodeType": "ExpressionStatement", "src": "325:36:28" } ] }, "documentation": null, "id": 9089, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 9082, "modifierName": { "argumentTypes": null, "id": 9081, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9077, "src": "304:10:28", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "304:10:28" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 9080, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9079, "name": "completed", "nodeType": "VariableDeclaration", "scope": 9089, "src": "278:17:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9078, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "278:7:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "277:19:28" }, "returnParameters": { "id": 9083, "nodeType": "ParameterList", "parameters": [], "src": "315:0:28" }, "scope": 9110, "src": "256:112:28", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 9108, "nodeType": "Block", "src": "430:119:28", "statements": [ { "assignments": [ 9097 ], "declarations": [ { "constant": false, "id": 9097, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 9108, "src": "440:19:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$9110", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 9096, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 9110, "src": "440:10:28", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$9110", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 9101, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9099, "name": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9091, "src": "473:11:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 9098, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9110, "src": "462:10:28", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$9110_$", "typeString": "type(contract Migrations)" } }, "id": 9100, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "462:23:28", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$9110", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "440:45:28" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 9105, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9059, "src": "517:24:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 9102, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9097, "src": "495:8:28", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$9110", "typeString": "contract Migrations" } }, "id": 9104, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 9089, "src": "495:21:28", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$"