{ "contractName": "Migrations", "abi": [ { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "lastCompletedMigration", "outputs": [ { "name": "", "type": "uint256" } ], "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": "newAddress", "type": "address" } ], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a03191633179055610230806100326000396000f3fe608060405234801561001057600080fd5b5060043610610068577c010000000000000000000000000000000000000000000000000000000060003504630900f010811461006d5780638da5cb5b146100a2578063fbdbad3c146100d3578063fdacd576146100ed575b600080fd5b6100a06004803603602081101561008357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661010a565b005b6100aa6101bd565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100db6101d9565b60408051918252519081900360200190f35b6100a06004803603602081101561010357600080fd5b50356101df565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101ba5760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a057600080fd5b505af11580156101b4573d6000803e3d6000fd5b50505050505b50565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101ba5760015556fea165627a7a72305820421ef04a0a75647830e6218c4ded7d1ff60551b38d48ac9577d9a72bfb522a0e0029", "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610068577c010000000000000000000000000000000000000000000000000000000060003504630900f010811461006d5780638da5cb5b146100a2578063fbdbad3c146100d3578063fdacd576146100ed575b600080fd5b6100a06004803603602081101561008357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661010a565b005b6100aa6101bd565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100db6101d9565b60408051918252519081900360200190f35b6100a06004803603602081101561010357600080fd5b50356101df565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101ba5760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a057600080fd5b505af11580156101b4573d6000803e3d6000fd5b50505050505b50565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101ba5760015556fea165627a7a72305820421ef04a0a75647830e6218c4ded7d1ff60551b38d48ac9577d9a72bfb522a0e0029", "sourceMap": "831:516:0:-;;;996:57;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1028:5:0;:18;;-1:-1:-1;;;;;;1028:18:0;1036:10;1028:18;;;831:516;;;;;;", "deployedSourceMap": "831:516:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;831:516:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1173:172;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1173:172:0;;;;:::i;:::-;;857:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;883:34;;;:::i;:::-;;;;;;;;;;;;;;;;1059:108;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1059:108:0;;:::i;1173:172::-;975:5;;;;961:10;:19;957:26;;;1239:19;1272:10;1239:44;;1293:8;:21;;;1315:22;;1293:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1293:45:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1293:45:0;;;;982:1;957:26;1173:172;:::o;857:20::-;;;;;;:::o;883:34::-;;;;:::o;1059:108::-;975:5;;;;961:10;:19;957:26;;;1126:22;:34;1059:108::o", "source": "///////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (C) 2018 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.2;\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/oberstet/scm/xbr/xbr-protocol/contracts/Migrations.sol", "ast": { "absolutePath": "/home/oberstet/scm/xbr/xbr-protocol/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 56 ] }, "id": 57, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.5", ".2" ], "nodeType": "PragmaDirective", "src": "805:23:0" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 56, "linearizedBaseContracts": [ 56 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 3, "name": "owner", "nodeType": "VariableDeclaration", "scope": 56, "src": "857:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2, "name": "address", "nodeType": "ElementaryTypeName", "src": "857: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": "883:34:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4, "name": "uint", "nodeType": "ElementaryTypeName", "src": "883:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 13, "nodeType": "Block", "src": "947: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": 3289, "src": "961: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": "961: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": "975:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "961:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 12, "nodeType": "IfStatement", "src": "957:26:0", "trueBody": { "id": 11, "nodeType": "PlaceholderStatement", "src": "982:1:0" } } ] }, "documentation": null, "id": 14, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 6, "nodeType": "ParameterList", "parameters": [], "src": "944:2:0" }, "src": "924:66:0", "visibility": "internal" }, { "body": { "id": 22, "nodeType": "Block", "src": "1018: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": "1028: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": 3289, "src": "1036: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": "1036:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "1028:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 21, "nodeType": "ExpressionStatement", "src": "1028:18:0" } ] }, "documentation": null, "id": 23, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 15, "nodeType": "ParameterList", "parameters": [], "src": "1008:2:0" }, "returnParameters": { "id": 16, "nodeType": "ParameterList", "parameters": [], "src": "1018:0:0" }, "scope": 56, "src": "996:57:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 34, "nodeType": "Block", "src": "1116: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": "1126:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 31, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25, "src": "1151:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1126:34:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 33, "nodeType": "ExpressionStatement", "src": "1126: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": "1105:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1105:10:0" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 26, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25, "name": "completed", "nodeType": "VariableDeclaration", "scope": 35, "src": "1082:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 24, "name": "uint", "nodeType": "ElementaryTypeName", "src": "1082:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1081:16:0" }, "returnParameters": { "id": 29, "nodeType": "ParameterList", "parameters": [], "src": "1116:0:0" }, "scope": 56, "src": "1059:108:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 54, "nodeType": "Block", "src": "1229:116:0", "statements": [ { "assignments": [ 43 ], "declarations": [ { "constant": false, "id": 43, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 54, "src": "1239: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": "1239: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": "1272: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": "1261: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": "1261:22:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$56", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "1239:44:0" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 51, "name": "lastCompletedMigration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "1315: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": "1293: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": "1293: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": "1293:45:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 53, "nodeType": "ExpressionStatement", "src": "1293: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": "1218:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1218:10:0" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 38, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 37, "name": "newAddress", "nodeType": "VariableDeclaration", "scope": 55, "src": "1191:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 36, "name": "address", "nodeType": "ElementaryTypeName", "src": "1191:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1190:20:0" }, "returnParameters": { "id": 41, "nodeType": "ParameterList", "parameters": [], "src": "1229:0:0" }, "scope": 56, "src": "1173:172:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 57, "src": "831:516:0" } ], "src": "805:543:0" }, "legacyAST": { "absolutePath": "/home/oberstet/scm/xbr/xbr-protocol/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 56 ] }, "id": 57, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.5", ".2" ], "nodeType": "PragmaDirective", "src": "805:23:0" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 56, "linearizedBaseContracts": [ 56 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 3, "name": "owner", "nodeType": "VariableDeclaration", "scope": 56, "src": "857:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2, "name": "address", "nodeType": "ElementaryTypeName", "src": "857: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": "883:34:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4, "name": "uint", "nodeType": "ElementaryTypeName", "src": "883:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 13, "nodeType": "Block", "src": "947: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": 3289, "src": "961: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": "961: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": "975:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "961:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 12, "nodeType": "IfStatement", "src": "957:26:0", "trueBody": { "id": 11, "nodeType": "PlaceholderStatement", "src": "982:1:0" } } ] }, "documentation": null, "id": 14, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 6, "nodeType": "ParameterList", "parameters": [], "src": "944:2:0" }, "src": "924:66:0", "visibility": "internal" }, { "body": { "id": 22, "nodeType": "Block", "src": "1018: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": "1028: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": 3289, "src": "1036: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": "1036:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "1028:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 21, "nodeType": "ExpressionStatement", "src": "1028:18:0" } ] }, "documentation": null, "id": 23, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 15, "nodeType": "ParameterList", "parameters": [], "src": "1008:2:0" }, "returnParameters": { "id": 16, "nodeType": "ParameterList", "parameters": [], "src": "1018:0:0" }, "scope": 56, "src": "996:57:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 34, "nodeType": "Block", "src": "1116: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": "1126:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 31, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25, "src": "1151:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1126:34:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 33, "nodeType": "ExpressionStatement", "src": "1126: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": "1105:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1105:10:0" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 26, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25, "name": "completed", "nodeType": "VariableDeclaration", "scope": 35, "src": "1082:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 24, "name": "uint", "nodeType": "ElementaryTypeName", "src": "1082:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1081:16:0" }, "returnParameters": { "id": 29, "nodeType": "ParameterList", "parameters": [], "src": "1116:0:0" }, "scope": 56, "src": "1059:108:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 54, "nodeType": "Block", "src": "1229:116:0", "statements": [ { "assignments": [ 43 ], "declarations": [ { "constant": false, "id": 43, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 54, "src": "1239: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": "1239: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": "1272: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": "1261: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": "1261:22:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$56", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "1239:44:0" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 51, "name": "lastCompletedMigration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "1315: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": "1293: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": "1293: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": "1293:45:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 53, "nodeType": "ExpressionStatement", "src": "1293: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": "1218:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1218:10:0" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 38, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 37, "name": "newAddress", "nodeType": "VariableDeclaration", "scope": 55, "src": "1191:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 36, "name": "address", "nodeType": "ElementaryTypeName", "src": "1191:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1190:20:0" }, "returnParameters": { "id": 41, "nodeType": "ParameterList", "parameters": [], "src": "1229:0:0" }, "scope": 56, "src": "1173:172:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 57, "src": "831:516:0" } ], "src": "805:543:0" }, "compiler": { "name": "solc", "version": "0.5.2+commit.1df8f40c.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.0.5", "updatedAt": "2019-06-04T10:01:11.415Z", "devdoc": { "methods": {} }, "userdoc": { "methods": {} } }