UNPKG

arc_dx

Version:

A platform for building DAOs

1,324 lines 52.1 kB
{ "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": "0x608060405234801561001057600080fd5b5060008054600160a060020a0319163317905561023c806100326000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f01081146100665780638da5cb5b14610096578063fbdbad3c146100d4578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100e057600080fd5b506100e96101e1565b60408051918252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a72305820925ef49623336e47b0e8c7c79d576a23e4d70a087ca5d84204ac2b18df2714160029", "deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f01081146100665780638da5cb5b14610096578063fbdbad3c146100d4578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100e057600080fd5b506100e96101e1565b60408051918252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a72305820925ef49623336e47b0e8c7c79d576a23e4d70a087ca5d84204ac2b18df2714160029", "sourceMap": "27:536:0:-;;;215:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;246:5:0;:18;;-1:-1:-1;;;;;;246:18:0;254:10;246:18;;;27:536;;;;;;", "deployedSourceMap": "27:536:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;390:171;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;390:171:0;;;;;;;;;53:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;53:20:0;;;;;;;;;;;;;;;;;;;;;;;79:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;79:34:0;;;;;;;;;;;;;;;;;;;;277:107;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;277:107:0;;;;;390:171;455:19;170:5;;;;156:10;:19;152:51;;;488:10;455:44;;509:8;:21;;;531:22;;509:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;509:45:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;509:45:0;;;;152:51;390:171;;:::o;53:20::-;;;;;;:::o;79:34::-;;;;:::o;277:107::-;170:5;;;;156:10;:19;152:51;;;343:22;:34;;;152:51;277:107;:::o", "source": "pragma solidity ^0.4.25;\n\n\ncontract Migrations {\n address public owner;\n uint public lastCompletedMigration;\n\n modifier restricted() {\n if (msg.sender == owner) {\n _;\n }\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": "/Users/oren/daostack/daostack2/daostack/contracts/Migrations.sol", "ast": { "absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 57 ] }, "id": 58, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.4", ".25" ], "nodeType": "PragmaDirective", "src": "0:24:0" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 57, "linearizedBaseContracts": [ 57 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 3, "name": "owner", "nodeType": "VariableDeclaration", "scope": 57, "src": "53:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2, "name": "address", "nodeType": "ElementaryTypeName", "src": "53:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 5, "name": "lastCompletedMigration", "nodeType": "VariableDeclaration", "scope": 57, "src": "79:34:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4, "name": "uint", "nodeType": "ElementaryTypeName", "src": "79:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 14, "nodeType": "Block", "src": "142:67: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": 21549, "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": 13, "nodeType": "IfStatement", "src": "152:51:0", "trueBody": { "id": 12, "nodeType": "Block", "src": "177:26:0", "statements": [ { "id": 11, "nodeType": "PlaceholderStatement", "src": "191:1:0" } ] } } ] }, "documentation": null, "id": 15, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 6, "nodeType": "ParameterList", "parameters": [], "src": "139:2:0" }, "src": "120:89:0", "visibility": "internal" }, { "body": { "id": 23, "nodeType": "Block", "src": "236:35:0", "statements": [ { "expression": { "argumentTypes": null, "id": 21, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 18, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3, "src": "246:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 19, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21549, "src": "254:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 20, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "254:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "246:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 22, "nodeType": "ExpressionStatement", "src": "246:18:0" } ] }, "documentation": null, "id": 24, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 16, "nodeType": "ParameterList", "parameters": [], "src": "226:2:0" }, "payable": false, "returnParameters": { "id": 17, "nodeType": "ParameterList", "parameters": [], "src": "236:0:0" }, "scope": 57, "src": "215:56:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 35, "nodeType": "Block", "src": "333:51:0", "statements": [ { "expression": { "argumentTypes": null, "id": 33, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 31, "name": "lastCompletedMigration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "343:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 32, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 26, "src": "368:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "343:34:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 34, "nodeType": "ExpressionStatement", "src": "343:34:0" } ] }, "documentation": null, "id": 36, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 29, "modifierName": { "argumentTypes": null, "id": 28, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15, "src": "322:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "322:10:0" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 27, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 26, "name": "completed", "nodeType": "VariableDeclaration", "scope": 36, "src": "299:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 25, "name": "uint", "nodeType": "ElementaryTypeName", "src": "299:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "298:16:0" }, "payable": false, "returnParameters": { "id": 30, "nodeType": "ParameterList", "parameters": [], "src": "333:0:0" }, "scope": 57, "src": "277:107:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 55, "nodeType": "Block", "src": "445:116:0", "statements": [ { "assignments": [ 44 ], "declarations": [ { "constant": false, "id": 44, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 56, "src": "455:19:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$57", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 43, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 57, "src": "455:10:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$57", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 48, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 46, "name": "newAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38, "src": "488:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 45, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 57, "src": "477:10:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$57_$", "typeString": "type(contract Migrations)" } }, "id": 47, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "477:22:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$57", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "455:44:0" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 52, "name": "lastCompletedMigration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "531:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 49, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44, "src": "509:8:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$57", "typeString": "contract Migrations" } }, "id": 51, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 36, "src": "509:21:0", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 53, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "509:45:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 54, "nodeType": "ExpressionStatement", "src": "509:45:0" } ] }, "documentation": null, "id": 56, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 41, "modifierName": { "argumentTypes": null, "id": 40, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15, "src": "434:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "434:10:0" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 39, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 38, "name": "newAddress", "nodeType": "VariableDeclaration", "scope": 56, "src": "407:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 37, "name": "address", "nodeType": "ElementaryTypeName", "src": "407:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "406:20:0" }, "payable": false, "returnParameters": { "id": 42, "nodeType": "ParameterList", "parameters": [], "src": "445:0:0" }, "scope": 57, "src": "390:171:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 58, "src": "27:536:0" } ], "src": "0:564:0" }, "legacyAST": { "absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 57 ] }, "id": 58, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.4", ".25" ], "nodeType": "PragmaDirective", "src": "0:24:0" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 57, "linearizedBaseContracts": [ 57 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 3, "name": "owner", "nodeType": "VariableDeclaration", "scope": 57, "src": "53:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2, "name": "address", "nodeType": "ElementaryTypeName", "src": "53:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 5, "name": "lastCompletedMigration", "nodeType": "VariableDeclaration", "scope": 57, "src": "79:34:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4, "name": "uint", "nodeType": "ElementaryTypeName", "src": "79:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 14, "nodeType": "Block", "src": "142:67: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": 21549, "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": 13, "nodeType": "IfStatement", "src": "152:51:0", "trueBody": { "id": 12, "nodeType": "Block", "src": "177:26:0", "statements": [ { "id": 11, "nodeType": "PlaceholderStatement", "src": "191:1:0" } ] } } ] }, "documentation": null, "id": 15, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 6, "nodeType": "ParameterList", "parameters": [], "src": "139:2:0" }, "src": "120:89:0", "visibility": "internal" }, { "body": { "id": 23, "nodeType": "Block", "src": "236:35:0", "statements": [ { "expression": { "argumentTypes": null, "id": 21, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 18, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3, "src": "246:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 19, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21549, "src": "254:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 20, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "254:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "246:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 22, "nodeType": "ExpressionStatement", "src": "246:18:0" } ] }, "documentation": null, "id": 24, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 16, "nodeType": "ParameterList", "parameters": [], "src": "226:2:0" }, "payable": false, "returnParameters": { "id": 17, "nodeType": "ParameterList", "parameters": [], "src": "236:0:0" }, "scope": 57, "src": "215:56:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 35, "nodeType": "Block", "src": "333:51:0", "statements": [ { "expression": { "argumentTypes": null, "id": 33, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 31, "name": "lastCompletedMigration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "343:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 32, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 26, "src": "368:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "343:34:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 34, "nodeType": "ExpressionStatement", "src": "343:34:0" } ] }, "documentation": null, "id": 36, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 29, "modifierName": { "argumentTypes": null, "id": 28, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15, "src": "322:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "322:10:0" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 27, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 26, "name": "completed", "nodeType": "VariableDeclaration", "scope": 36, "src": "299:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 25, "name": "uint", "nodeType": "ElementaryTypeName", "src": "299:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "298:16:0" }, "payable": false, "returnParameters": { "id": 30, "nodeType": "ParameterList", "parameters": [], "src": "333:0:0" }, "scope": 57, "src": "277:107:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 55, "nodeType": "Block", "src": "445:116:0", "statements": [ { "assignments": [ 44 ], "declarations": [ { "constant": false, "id": 44, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 56, "src": "455:19:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$57", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 43, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 57, "src": "455:10:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$57", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 48, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 46, "name": "newAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38, "src": "488:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 45, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 57, "src": "477:10:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$57_$", "typeString": "type(contract Migrations)" } }, "id": 47, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "477:22:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$57", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "455:44:0" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 52, "name": "lastCompletedMigration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "531:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 49, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44, "src": "509:8:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$57", "typeString": "contract Migrations" } }, "id": 51, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 36, "src": "509:21:0", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 53, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "509:45:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 54, "nodeType": "ExpressionStatement", "src": "509:45:0" } ] }, "documentation": null, "id": 56, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 41, "modifierName": { "argumentTypes": null, "id": 40, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15, "src": "434:10:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__