{ "contractName": "Migrations", "abi": [ { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": true, "inputs": [], "name": "lastCompletedMigration", "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": "newAddress", "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\":\"lastCompletedMigration\",\"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\":\"newAddress\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/travis/build/crossbario/xbr-protocol/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/travis/build/crossbario/xbr-protocol/contracts/Migrations.sol\":{\"keccak256\":\"0x052c219d9ec686294010b7f237968a62b914c8dbce68b8358519fce7a87d251b\",\"urls\":[\"bzz-raw://c6cbebefe954feb7568bbabc9f86521489aa50d82a4308228c64b0697c8b5329\",\"dweb:/ipfs/QmQLZzXXZyxwWXsyCqBa1W7AHTkMMnWqwHwnXj1k88GEXA\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b031916331790556101b3806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f010146100515780638da5cb5b14610079578063fbdbad3c1461009d578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b604080516001600160a01b039092168252519081900360200190f35b6100a5610160565b60408051918252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b6000546001600160a01b031681565b60015481565b6000546001600160a01b031633141561014e5760015556fea265627a7a72315820406103f036fb0ba3f87b41a9a92f0b4ed24adbf4cdee62dd5ed04249c6d7fd9f64736f6c63430005100032", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f010146100515780638da5cb5b14610079578063fbdbad3c1461009d578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b604080516001600160a01b039092168252519081900360200190f35b6100a5610160565b60408051918252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b6000546001600160a01b031681565b60015481565b6000546001600160a01b031633141561014e5760015556fea265627a7a72315820406103f036fb0ba3f87b41a9a92f0b4ed24adbf4cdee62dd5ed04249c6d7fd9f64736f6c63430005100032", "sourceMap": "837:516:0:-;;;1002:57;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1034:5:0;:18;;-1:-1:-1;;;;;;1034:18:0;1042:10;1034:18;;;837:516;;;;;;", "deployedSourceMap": "837:516:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;837:516:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1179:172;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1179:172:0;-1:-1:-1;;;;;1179:172:0;;:::i;:::-;;863:20;;;:::i;:::-;;;;-1:-1:-1;;;;;863:20:0;;;;;;;;;;;;;;889:34;;;:::i;:::-;;;;;;;;;;;;;;;;1065:108;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1065:108:0;;:::i;1179:172::-;981:5;;-1:-1:-1;;;;;981:5:0;967:10;:19;963:26;;;1245:19;1278:10;1245:44;;1299:8;-1:-1:-1;;;;;1299:21:0;;1321:22;;1299:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1299:45:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1299:45:0;;;;988:1;963:26;1179:172;:::o;863:20::-;;;-1:-1:-1;;;;;863:20:0;;:::o;889:34::-;;;;:::o;1065:108::-;981:5;;-1:-1:-1;;;;;981:5:0;967:10;:19;963:26;;;1132:22;:34;1065:108::o", "source": "///////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (C) 2018-2020 Crossbar.io Technologies GmbH and contributors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n///////////////////////////////////////////////////////////////////////////////\n\npragma solidity ^0.5.12;\n\n\ncontract Migrations {\n address public owner;\n uint public lastCompletedMigration;\n\n modifier restricted () {\n if (msg.sender == owner) _;\n }\n\n constructor () public {\n owner = msg.sender;\n }\n\n function setCompleted (uint completed) public restricted {\n lastCompletedMigration = completed;\n }\n\n function upgrade (address newAddress) public restricted {\n Migrations upgraded = Migrations(newAddress);\n upgraded.setCompleted(lastCompletedMigration);\n }\n}\n", "sourcePath": "/home/travis/build/crossbario/xbr-protocol/contracts/Migrations.sol", "ast": { "absolutePath": "/home/travis/build/crossbario/xbr-protocol/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 56 ] }, "id": 57, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.5", ".12" ], "nodeType": "PragmaDirective", "src": "810:24: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": "863:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2, "name": "address", "nodeType": "ElementaryTypeName", "src": "863:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 5, "name": "lastCompletedMigration", "nodeType": "VariableDeclaration", "scope": 56, "src": "889:34:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4, "name": "uint", "nodeType": "ElementaryTypeName", "src": "889:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 13, "nodeType": "Block", "src": "953:43: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": 6348, "src": "967: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": "967:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 9, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3, "src": "981:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "967:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 12, "nodeType": "IfStatement", "src": "963:26:0", "trueBody": { "id": 11, "nodeType": "PlaceholderStatement", "src": "988:1:0" } } ] }, "documentation": null, "id": 14, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 6, "nodeType": "ParameterList", "parameters": [], "src": "950:2:0" }, "src": "930:66:0", "visibility": "internal" }, { "body": { "id": 22, "nodeType": "Block", "src": "1024:35: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": "1034: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": 6348, "src": "1042: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": "1042:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "1034:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 21, "nodeType": "ExpressionStatement", "src": "1034:18:0" } ] }, "documentation": null, "id": 23, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 15, "nodeType": "ParameterList", "parameters": [], "src": "1014:2:0" }, "returnParameters": { "id": 16, "nodeType": "ParameterList", "parameters": [], "src": "1024:0:0" }, "scope": 56, "src": "1002:57:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 34, "nodeType": "Block", "src": "1122:51:0", "statements": [ { "expression": { "argumentTypes": null, "id": 32, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 30, "name": "lastCompletedMigration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "1132:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 31, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25, "src": "1157:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1132:34:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 33, "nodeType": "ExpressionStatement", "src": "1132:34:0" } ] }, "documentation": null, "id": 35, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 28, "modifierName": { "argumentTypes": null, "id": 27, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "1111:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1111:10:0" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 26, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25, "name": "completed", "nodeType": "VariableDeclaration", "scope": 35, "src": "1088:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 24, "name": "uint", "nodeType": "ElementaryTypeName", "src": "1088:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1087:16:0" }, "returnParameters": { "id": 29, "nodeType": "ParameterList", "parameters": [], "src": "1122:0:0" }, "scope": 56, "src": "1065:108:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 54, "nodeType": "Block", "src": "1235:116:0", "statements": [ { "assignments": [ 43 ], "declarations": [ { "constant": false, "id": 43, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 54, "src": "1245: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": "1245: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": "newAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 37, "src": "1278:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 44, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 56, "src": "1267: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": "1267:22:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$56", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "1245:44:0" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 51, "name": "lastCompletedMigration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "1321:22: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": "1299: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": "1299: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": "1299:45:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 53, "nodeType": "ExpressionStatement", "src": "1299:45:0" } ] }, "documentation": null, "id": 55, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 40, "modifierName": { "argumentTypes": null, "id": 39, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "1224:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1224:10:0" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 38, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 37, "name": "newAddress", "nodeType": "VariableDeclaration", "scope": 55, "src": "1197:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 36, "name": "address", "nodeType": "ElementaryTypeName", "src": "1197:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1196:20:0" }, "returnParameters": { "id": 41, "nodeType": "ParameterList", "parameters": [], "src": "1235:0:0" }, "scope": 56, "src": "1179:172:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 57, "src": "837:516:0" } ], "src": "810:544:0" }, "legacyAST": { "absolutePath": "/home/travis/build/crossbario/xbr-protocol/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 56 ] }, "id": 57, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.5", ".12" ], "nodeType": "PragmaDirective", "src": "810:24: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": "863:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2, "name": "address", "nodeType": "ElementaryTypeName", "src": "863:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 5, "name": "lastCompletedMigration", "nodeType": "VariableDeclaration", "scope": 56, "src": "889:34:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4, "name": "uint", "nodeType": "ElementaryTypeName", "src": "889:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 13, "nodeType": "Block", "src": "953:43: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": 6348, "src": "967: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": "967:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 9, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3, "src": "981:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "967:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 12, "nodeType": "IfStatement", "src": "963:26:0", "trueBody": { "id": 11, "nodeType": "PlaceholderStatement", "src": "988:1:0" } } ] }, "documentation": null, "id": 14, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 6, "nodeType": "ParameterList", "parameters": [], "src": "950:2:0" }, "src": "930:66:0", "visibility": "internal" }, { "body": { "id": 22, "nodeType": "Block", "src": "1024:35: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": "1034: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": 6348, "src": "1042: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": "1042:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "1034:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 21, "nodeType": "ExpressionStatement", "src": "1034:18:0" } ] }, "documentation": null, "id": 23, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 15, "nodeType": "ParameterList", "parameters": [], "src": "1014:2:0" }, "returnParameters": { "id": 16, "nodeType": "ParameterList", "parameters": [], "src": "1024:0:0" }, "scope": 56, "src": "1002:57:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 34, "nodeType": "Block", "src": "1122:51:0", "statements": [ { "expression": { "argumentTypes": null, "id": 32, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 30, "name": "lastCompletedMigration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "1132:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 31, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25, "src": "1157:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1132:34:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 33, "nodeType": "ExpressionStatement", "src": "1132:34:0" } ] }, "documentation": null, "id": 35, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 28, "modifierName": { "argumentTypes": null, "id": 27, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "1111:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1111:10:0" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 26, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25, "name": "completed", "nodeType": "VariableDeclaration", "scope": 35, "src": "1088:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 24, "name": "uint", "nodeType": "ElementaryTypeName", "src": "1088:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1087:16:0" }, "returnParameters": { "id": 29, "nodeType": "ParameterList", "parameters": [], "src": "1122:0:0" }, "scope": 56, "src": "1065:108:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 54, "nodeType": "Block", "src": "1235:116:0", "statements": [ { "assignments": [ 43 ], "declarations": [ { "constant": false, "id": 43, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 54, "src": "1245: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": "1245: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": "newAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 37, "src": "1278:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 44, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 56, "src": "1267: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": "1267:22:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$56", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "1245:44:0" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 51, "name": "lastCompletedMigration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "1321:22: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": "1299: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": "1299: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": "1299:45:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 53, "nodeType": "ExpressionStatement", "src": "1299:45:0" } ] }, "documentation": null, "id": 55, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 40, "modifierName": { "argumentTypes": null, "id": 39, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "1224:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1224:10:0" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 38, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 37, "name": "newAddress", "nodeType": "VariableDeclaration", "scope": 55, "src": "1197:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 36, "name": "address", "nodeType": "ElementaryTypeName", "src": "1197:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1196:20:0" }, "returnParameters": { "id": 41, "nodeType": "ParameterList", "parameters": [], "src": "1235:0:0" }, "scope": 56, "src": "1179:172:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 57, "src": "837:516:0" } ], "src": "810:544:0" }, "compiler": { "name": "solc", "version": "0.5.16+commit.9c3226ce.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.1.0", "updatedAt": "2020-04-13T15:29:57.139Z", "devdoc": { "methods": {} }, "userdoc": { "methods": {} } }