UNPKG

@gooddollar/goodcontracts

Version:
1,275 lines 53.3 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/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/Migrations.sol\":{\"keccak256\":\"0xd2184d194c968e161017b6733900bf892c36d05972a6a871e0204d8ce0ece257\",\"urls\":[\"bzz-raw://00e314668a85d4301069801d583cb401f5ae025434716d8adfe5a115b25adce3\",\"dweb:/ipfs/QmPL3CS9d5FFADwh13mbR2bwxfEBM63n1yUth59GJxo68e\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b031916331790556101b3806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea265627a7a723158206aff4b0953aae1e8d613001f459ea4e5667494bc3c8e4cbba08a1a635dcb066464736f6c63430005100032", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea265627a7a723158206aff4b0953aae1e8d613001f459ea4e5667494bc3c8e4cbba08a1a635dcb066464736f6c63430005100032", "sourceMap": "25:526:1:-;;;123:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;154:5:1;:18;;-1:-1:-1;;;;;;154:18:1;162:10;154:18;;;25:526;;;;;;", "deployedSourceMap": "25:526:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:526:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;374:175;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;374:175:1;-1:-1:-1;;;;;374:175:1;;:::i;:::-;;77:39;;;:::i;:::-;;;;;;;;;;;;;;;;51:20;;;:::i;:::-;;;;-1:-1:-1;;;;;51:20:1;;;;;;;;;;;;;;256:112;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;256:112:1;;:::i;374:175::-;235:5;;-1:-1:-1;;;;;235:5:1;221:10;:19;217:26;;;440:19;473:11;440:45;;495:8;-1:-1:-1;;;;;495:21:1;;517:24;;495:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;495:47:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;495:47:1;;;;242:1;217:26;374:175;:::o;77:39::-;;;;:::o;51:20::-;;;-1:-1:-1;;;;;51:20:1;;:::o;256:112::-;235:5;;-1:-1:-1;;;;;235:5:1;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/contracts/Migrations.sol", "ast": { "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 360 ] }, "id": 361, "nodeType": "SourceUnit", "nodes": [ { "id": 305, "literals": [ "solidity", ">", "0.5", ".4" ], "nodeType": "PragmaDirective", "src": "0:23:1" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 360, "linearizedBaseContracts": [ 360 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 307, "name": "owner", "nodeType": "VariableDeclaration", "scope": 360, "src": "51:20:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 306, "name": "address", "nodeType": "ElementaryTypeName", "src": "51:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 309, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 360, "src": "77:39:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 308, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "77:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 317, "nodeType": "Block", "src": "144:35:1", "statements": [ { "expression": { "argumentTypes": null, "id": 315, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 312, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 307, "src": "154:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 313, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 18007, "src": "162:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 314, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "162:10:1", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "154:18:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 316, "nodeType": "ExpressionStatement", "src": "154:18:1" } ] }, "documentation": null, "id": 318, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 310, "nodeType": "ParameterList", "parameters": [], "src": "134:2:1" }, "returnParameters": { "id": 311, "nodeType": "ParameterList", "parameters": [], "src": "144:0:1" }, "scope": 360, "src": "123:56:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 326, "nodeType": "Block", "src": "207:43:1", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 323, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 320, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 18007, "src": "221:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 321, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "221:10:1", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 322, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 307, "src": "235:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "221:19:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 325, "nodeType": "IfStatement", "src": "217:26:1", "trueBody": { "id": 324, "nodeType": "PlaceholderStatement", "src": "242:1:1" } } ] }, "documentation": null, "id": 327, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 319, "nodeType": "ParameterList", "parameters": [], "src": "204:2:1" }, "src": "185:65:1", "visibility": "internal" }, { "body": { "id": 338, "nodeType": "Block", "src": "315:53:1", "statements": [ { "expression": { "argumentTypes": null, "id": 336, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 334, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 309, "src": "325:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 335, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 329, "src": "352:9:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "325:36:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 337, "nodeType": "ExpressionStatement", "src": "325:36:1" } ] }, "documentation": null, "id": 339, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 332, "modifierName": { "argumentTypes": null, "id": 331, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 327, "src": "304:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "304:10:1" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 330, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 329, "name": "completed", "nodeType": "VariableDeclaration", "scope": 339, "src": "278:17:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 328, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "278:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "277:19:1" }, "returnParameters": { "id": 333, "nodeType": "ParameterList", "parameters": [], "src": "315:0:1" }, "scope": 360, "src": "256:112:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 358, "nodeType": "Block", "src": "430:119:1", "statements": [ { "assignments": [ 347 ], "declarations": [ { "constant": false, "id": 347, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 358, "src": "440:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$360", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 346, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 360, "src": "440:10:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$360", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 351, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 349, "name": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 341, "src": "473:11:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 348, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 360, "src": "462:10:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$360_$", "typeString": "type(contract Migrations)" } }, "id": 350, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "462:23:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$360", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "440:45:1" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 355, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 309, "src": "517:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 352, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 347, "src": "495:8:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$360", "typeString": "contract Migrations" } }, "id": 354, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 339, "src": "495:21:1", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 356, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "495:47:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 357, "nodeType": "ExpressionStatement", "src": "495:47:1" } ] }, "documentation": null, "id": 359, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 344, "modifierName": { "argumentTypes": null, "id": 343, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 327, "src": "419:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "419:10:1" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 342, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 341, "name": "new_address", "nodeType": "VariableDeclaration", "scope": 359, "src": "391:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 340, "name": "address", "nodeType": "ElementaryTypeName", "src": "391:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "390:21:1" }, "returnParameters": { "id": 345, "nodeType": "ParameterList", "parameters": [], "src": "430:0:1" }, "scope": 360, "src": "374:175:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 361, "src": "25:526:1" } ], "src": "0:552:1" }, "legacyAST": { "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 360 ] }, "id": 361, "nodeType": "SourceUnit", "nodes": [ { "id": 305, "literals": [ "solidity", ">", "0.5", ".4" ], "nodeType": "PragmaDirective", "src": "0:23:1" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 360, "linearizedBaseContracts": [ 360 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 307, "name": "owner", "nodeType": "VariableDeclaration", "scope": 360, "src": "51:20:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 306, "name": "address", "nodeType": "ElementaryTypeName", "src": "51:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 309, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 360, "src": "77:39:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 308, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "77:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 317, "nodeType": "Block", "src": "144:35:1", "statements": [ { "expression": { "argumentTypes": null, "id": 315, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 312, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 307, "src": "154:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 313, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 18007, "src": "162:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 314, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "162:10:1", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "154:18:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 316, "nodeType": "ExpressionStatement", "src": "154:18:1" } ] }, "documentation": null, "id": 318, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 310, "nodeType": "ParameterList", "parameters": [], "src": "134:2:1" }, "returnParameters": { "id": 311, "nodeType": "ParameterList", "parameters": [], "src": "144:0:1" }, "scope": 360, "src": "123:56:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 326, "nodeType": "Block", "src": "207:43:1", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 323, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 320, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 18007, "src": "221:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 321, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "221:10:1", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 322, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 307, "src": "235:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "221:19:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 325, "nodeType": "IfStatement", "src": "217:26:1", "trueBody": { "id": 324, "nodeType": "PlaceholderStatement", "src": "242:1:1" } } ] }, "documentation": null, "id": 327, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 319, "nodeType": "ParameterList", "parameters": [], "src": "204:2:1" }, "src": "185:65:1", "visibility": "internal" }, { "body": { "id": 338, "nodeType": "Block", "src": "315:53:1", "statements": [ { "expression": { "argumentTypes": null, "id": 336, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 334, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 309, "src": "325:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 335, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 329, "src": "352:9:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "325:36:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 337, "nodeType": "ExpressionStatement", "src": "325:36:1" } ] }, "documentation": null, "id": 339, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 332, "modifierName": { "argumentTypes": null, "id": 331, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 327, "src": "304:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "304:10:1" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 330, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 329, "name": "completed", "nodeType": "VariableDeclaration", "scope": 339, "src": "278:17:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 328, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "278:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "277:19:1" }, "returnParameters": { "id": 333, "nodeType": "ParameterList", "parameters": [], "src": "315:0:1" }, "scope": 360, "src": "256:112:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 358, "nodeType": "Block", "src": "430:119:1", "statements": [ { "assignments": [ 347 ], "declarations": [ { "constant": false, "id": 347, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 358, "src": "440:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$360", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 346, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 360, "src": "440:10:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$360", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 351, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 349, "name": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 341, "src": "473:11:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 348, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 360, "src": "462:10:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$360_$", "typeString": "type(contract Migrations)" } }, "id": 350, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "462:23:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$360", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "440:45:1" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 355, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 309, "src": "517:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 352, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 347, "src": "495:8:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$360", "typeString": "contract Migrations" } }, "id": 354, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 339, "src": "495:21:1", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 356, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRe