UNPKG

kleros-interaction-2

Version:
1,326 lines 51.6 kB
{ "contractName": "Migrations", "abi": [ { "constant": true, "inputs": [], "name": "last_completed_migration", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": false, "inputs": [ { "name": "completed", "type": "uint256" } ], "name": "setCompleted", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "new_address", "type": "address" } ], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a0319163317905561023c806100326000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a7230582076e8836b88629220cabd6549a7653d04a20a00da78e23e25f95ee98e222282100029", "deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a7230582076e8836b88629220cabd6549a7653d04a20a00da78e23e25f95ee98e222282100029", "sourceMap": "25:520:0:-;;;191:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;222:5:0;:18;;-1:-1:-1;;;;;;222:18:0;230:10;222:18;;;25:520;;;;;;", "deployedSourceMap": "25:520:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;368:175;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;368:175:0;;;;;;;;;77:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;77:36:0;;;;;;;;;;;;;;;;;;;;51:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;51:20:0;;;;;;;;;;;;;;;;;;;;;;;253:109;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;253:109:0;;;;;368:175;434:19;170:5;;;;156:10;:19;152:26;;;467:11;434:45;;489:8;:21;;;511:24;;489:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;489:47:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;489:47:0;;;;152:26;368:175;;:::o;77:36::-;;;;:::o;51:20::-;;;;;;:::o;253:109::-;170:5;;;;156:10;:19;152:26;;;319:24;:36;;;152:26;253:109;:::o", "source": "pragma solidity ^0.4.4;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\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 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": "/private/tmp/kleros-interaction/contracts/Migrations.sol", "ast": { "absolutePath": "/private/tmp/kleros-interaction/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 56 ] }, "id": 57, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.4", ".4" ], "nodeType": "PragmaDirective", "src": "0: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": "51:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2, "name": "address", "nodeType": "ElementaryTypeName", "src": "51:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 5, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 56, "src": "77:36:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4, "name": "uint", "nodeType": "ElementaryTypeName", "src": "77:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 13, "nodeType": "Block", "src": "142: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": 20639, "src": "156: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": "156:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 9, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3, "src": "170:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "156:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 12, "nodeType": "IfStatement", "src": "152:26:0", "trueBody": { "id": 11, "nodeType": "PlaceholderStatement", "src": "177:1:0" } } ] }, "documentation": null, "id": 14, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 6, "nodeType": "ParameterList", "parameters": [], "src": "139:2:0" }, "src": "120:65:0", "visibility": "internal" }, { "body": { "id": 22, "nodeType": "Block", "src": "212: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": "222: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": 20639, "src": "230: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": "230:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "222:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 21, "nodeType": "ExpressionStatement", "src": "222:18:0" } ] }, "documentation": null, "id": 23, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 15, "nodeType": "ParameterList", "parameters": [], "src": "202:2:0" }, "payable": false, "returnParameters": { "id": 16, "nodeType": "ParameterList", "parameters": [], "src": "212:0:0" }, "scope": 56, "src": "191:56:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 34, "nodeType": "Block", "src": "309:53:0", "statements": [ { "expression": { "argumentTypes": null, "id": 32, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 30, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "319:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 31, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25, "src": "346:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "319:36:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 33, "nodeType": "ExpressionStatement", "src": "319:36:0" } ] }, "documentation": null, "id": 35, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 28, "modifierName": { "argumentTypes": null, "id": 27, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "298:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "298:10:0" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 26, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25, "name": "completed", "nodeType": "VariableDeclaration", "scope": 35, "src": "275:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 24, "name": "uint", "nodeType": "ElementaryTypeName", "src": "275:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "274:16:0" }, "payable": false, "returnParameters": { "id": 29, "nodeType": "ParameterList", "parameters": [], "src": "309:0:0" }, "scope": 56, "src": "253:109:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 54, "nodeType": "Block", "src": "424:119:0", "statements": [ { "assignments": [ 43 ], "declarations": [ { "constant": false, "id": 43, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 55, "src": "434: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": "434: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": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 37, "src": "467:11:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 44, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 56, "src": "456: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": "456:23:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$56", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "434:45:0" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 51, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "511:24: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": "489: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": "489: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": "489:47:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 53, "nodeType": "ExpressionStatement", "src": "489:47:0" } ] }, "documentation": null, "id": 55, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 40, "modifierName": { "argumentTypes": null, "id": 39, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "413:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "413:10:0" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 38, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 37, "name": "new_address", "nodeType": "VariableDeclaration", "scope": 55, "src": "385:19:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 36, "name": "address", "nodeType": "ElementaryTypeName", "src": "385:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "384:21:0" }, "payable": false, "returnParameters": { "id": 41, "nodeType": "ParameterList", "parameters": [], "src": "424:0:0" }, "scope": 56, "src": "368:175:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 57, "src": "25:520:0" } ], "src": "0:546:0" }, "legacyAST": { "absolutePath": "/private/tmp/kleros-interaction/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 56 ] }, "id": 57, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.4", ".4" ], "nodeType": "PragmaDirective", "src": "0: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": "51:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2, "name": "address", "nodeType": "ElementaryTypeName", "src": "51:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 5, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 56, "src": "77:36:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4, "name": "uint", "nodeType": "ElementaryTypeName", "src": "77:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 13, "nodeType": "Block", "src": "142: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": 20639, "src": "156: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": "156:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 9, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3, "src": "170:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "156:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 12, "nodeType": "IfStatement", "src": "152:26:0", "trueBody": { "id": 11, "nodeType": "PlaceholderStatement", "src": "177:1:0" } } ] }, "documentation": null, "id": 14, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 6, "nodeType": "ParameterList", "parameters": [], "src": "139:2:0" }, "src": "120:65:0", "visibility": "internal" }, { "body": { "id": 22, "nodeType": "Block", "src": "212: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": "222: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": 20639, "src": "230: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": "230:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "222:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 21, "nodeType": "ExpressionStatement", "src": "222:18:0" } ] }, "documentation": null, "id": 23, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 15, "nodeType": "ParameterList", "parameters": [], "src": "202:2:0" }, "payable": false, "returnParameters": { "id": 16, "nodeType": "ParameterList", "parameters": [], "src": "212:0:0" }, "scope": 56, "src": "191:56:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 34, "nodeType": "Block", "src": "309:53:0", "statements": [ { "expression": { "argumentTypes": null, "id": 32, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 30, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "319:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 31, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 25, "src": "346:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "319:36:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 33, "nodeType": "ExpressionStatement", "src": "319:36:0" } ] }, "documentation": null, "id": 35, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 28, "modifierName": { "argumentTypes": null, "id": 27, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "298:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "298:10:0" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 26, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 25, "name": "completed", "nodeType": "VariableDeclaration", "scope": 35, "src": "275:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 24, "name": "uint", "nodeType": "ElementaryTypeName", "src": "275:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "274:16:0" }, "payable": false, "returnParameters": { "id": 29, "nodeType": "ParameterList", "parameters": [], "src": "309:0:0" }, "scope": 56, "src": "253:109:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 54, "nodeType": "Block", "src": "424:119:0", "statements": [ { "assignments": [ 43 ], "declarations": [ { "constant": false, "id": 43, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 55, "src": "434: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": "434: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": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 37, "src": "467:11:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 44, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 56, "src": "456: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": "456:23:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$56", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "434:45:0" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 51, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "511:24: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": "489: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": "489: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": "489:47:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 53, "nodeType": "ExpressionStatement", "src": "489:47:0" } ] }, "documentation": null, "id": 55, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 40, "modifierName": { "argumentTypes": null, "id": 39, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14, "src": "413:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "413:10:0" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 38, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id"