UNPKG

secretstore-contracts

Version:

Secret Store permissioning and service contracts collection and toolkit.

1,323 lines 51.9 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": "0x608060405234801561001057600080fd5b5060008054600160a060020a0319163317905561023c806100326000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a72305820f091b61a333551168628f6999cf2443ff80e0691d3c01d9ae0af041f88b774ff0029", "deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a72305820f091b61a333551168628f6999cf2443ff80e0691d3c01d9ae0af041f88b774ff0029", "sourceMap": "26:520:1:-;;;121:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;152:5:1;:18;;-1:-1:-1;;;;;;152:18:1;160:10;152:18;;;26:520;;;;;;", "deployedSourceMap": "26:520:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;369:175;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;369:175:1;;;;;;;;;78:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;78:36:1;;;;;;;;;;;;;;;;;;;;52:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;52:20:1;;;;;;;;;;;;;;;;;;;;;;;254:109;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;254:109:1;;;;;369:175;435:19;233:5;;;;219:10;:19;215:26;;;468:11;435:45;;490:8;:21;;;512:24;;490:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;490:47:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;490:47:1;;;;215:26;369:175;;:::o;78:36::-;;;;:::o;52:20::-;;;;;;:::o;254:109::-;233:5;;;;219:10;:19;215:26;;;320:24;:36;;;215:26;254:109;:::o", "source": "pragma solidity ^0.4.24;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n function setCompleted(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": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/Migrations.sol", "ast": { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 92 ] }, "id": 93, "nodeType": "SourceUnit", "nodes": [ { "id": 37, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:1" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 92, "linearizedBaseContracts": [ 92 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 39, "name": "owner", "nodeType": "VariableDeclaration", "scope": 92, "src": "52:20:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 38, "name": "address", "nodeType": "ElementaryTypeName", "src": "52:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 41, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 92, "src": "78:36:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 40, "name": "uint", "nodeType": "ElementaryTypeName", "src": "78:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 49, "nodeType": "Block", "src": "142:35:1", "statements": [ { "expression": { "argumentTypes": null, "id": 47, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 44, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 39, "src": "152:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 45, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2619, "src": "160:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 46, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "160:10:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "152:18:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 48, "nodeType": "ExpressionStatement", "src": "152:18:1" } ] }, "documentation": null, "id": 50, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 42, "nodeType": "ParameterList", "parameters": [], "src": "132:2:1" }, "payable": false, "returnParameters": { "id": 43, "nodeType": "ParameterList", "parameters": [], "src": "142:0:1" }, "scope": 92, "src": "121:56:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 58, "nodeType": "Block", "src": "205:43:1", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 55, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 52, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2619, "src": "219:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 53, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "219:10:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 54, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 39, "src": "233:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "219:19:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 57, "nodeType": "IfStatement", "src": "215:26:1", "trueBody": { "id": 56, "nodeType": "PlaceholderStatement", "src": "240:1:1" } } ] }, "documentation": null, "id": 59, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 51, "nodeType": "ParameterList", "parameters": [], "src": "202:2:1" }, "src": "183:65:1", "visibility": "internal" }, { "body": { "id": 70, "nodeType": "Block", "src": "310:53:1", "statements": [ { "expression": { "argumentTypes": null, "id": 68, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 66, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 41, "src": "320:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 67, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 61, "src": "347:9:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "320:36:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 69, "nodeType": "ExpressionStatement", "src": "320:36:1" } ] }, "documentation": null, "id": 71, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 64, "modifierName": { "argumentTypes": null, "id": 63, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 59, "src": "299:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "299:10:1" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 62, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 61, "name": "completed", "nodeType": "VariableDeclaration", "scope": 71, "src": "276:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 60, "name": "uint", "nodeType": "ElementaryTypeName", "src": "276:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "275:16:1" }, "payable": false, "returnParameters": { "id": 65, "nodeType": "ParameterList", "parameters": [], "src": "310:0:1" }, "scope": 92, "src": "254:109:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 90, "nodeType": "Block", "src": "425:119:1", "statements": [ { "assignments": [ 79 ], "declarations": [ { "constant": false, "id": 79, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 91, "src": "435:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$92", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 78, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 92, "src": "435:10:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$92", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 83, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 81, "name": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 73, "src": "468:11:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 80, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 92, "src": "457:10:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$92_$", "typeString": "type(contract Migrations)" } }, "id": 82, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "457:23:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$92", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "435:45:1" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 87, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 41, "src": "512:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 84, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 79, "src": "490:8:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$92", "typeString": "contract Migrations" } }, "id": 86, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 71, "src": "490:21:1", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 88, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "490:47:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 89, "nodeType": "ExpressionStatement", "src": "490:47:1" } ] }, "documentation": null, "id": 91, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 76, "modifierName": { "argumentTypes": null, "id": 75, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 59, "src": "414:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "414:10:1" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 74, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 73, "name": "new_address", "nodeType": "VariableDeclaration", "scope": 91, "src": "386:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 72, "name": "address", "nodeType": "ElementaryTypeName", "src": "386:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "385:21:1" }, "payable": false, "returnParameters": { "id": 77, "nodeType": "ParameterList", "parameters": [], "src": "425:0:1" }, "scope": 92, "src": "369:175:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 93, "src": "26:520:1" } ], "src": "0:547:1" }, "legacyAST": { "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 92 ] }, "id": 93, "nodeType": "SourceUnit", "nodes": [ { "id": 37, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:1" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 92, "linearizedBaseContracts": [ 92 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 39, "name": "owner", "nodeType": "VariableDeclaration", "scope": 92, "src": "52:20:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 38, "name": "address", "nodeType": "ElementaryTypeName", "src": "52:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 41, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 92, "src": "78:36:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 40, "name": "uint", "nodeType": "ElementaryTypeName", "src": "78:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 49, "nodeType": "Block", "src": "142:35:1", "statements": [ { "expression": { "argumentTypes": null, "id": 47, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 44, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 39, "src": "152:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 45, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2619, "src": "160:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 46, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "160:10:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "152:18:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 48, "nodeType": "ExpressionStatement", "src": "152:18:1" } ] }, "documentation": null, "id": 50, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 42, "nodeType": "ParameterList", "parameters": [], "src": "132:2:1" }, "payable": false, "returnParameters": { "id": 43, "nodeType": "ParameterList", "parameters": [], "src": "142:0:1" }, "scope": 92, "src": "121:56:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 58, "nodeType": "Block", "src": "205:43:1", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 55, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 52, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2619, "src": "219:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 53, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "219:10:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 54, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 39, "src": "233:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "219:19:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 57, "nodeType": "IfStatement", "src": "215:26:1", "trueBody": { "id": 56, "nodeType": "PlaceholderStatement", "src": "240:1:1" } } ] }, "documentation": null, "id": 59, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 51, "nodeType": "ParameterList", "parameters": [], "src": "202:2:1" }, "src": "183:65:1", "visibility": "internal" }, { "body": { "id": 70, "nodeType": "Block", "src": "310:53:1", "statements": [ { "expression": { "argumentTypes": null, "id": 68, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 66, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 41, "src": "320:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 67, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 61, "src": "347:9:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "320:36:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 69, "nodeType": "ExpressionStatement", "src": "320:36:1" } ] }, "documentation": null, "id": 71, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 64, "modifierName": { "argumentTypes": null, "id": 63, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 59, "src": "299:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "299:10:1" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 62, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 61, "name": "completed", "nodeType": "VariableDeclaration", "scope": 71, "src": "276:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 60, "name": "uint", "nodeType": "ElementaryTypeName", "src": "276:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "275:16:1" }, "payable": false, "returnParameters": { "id": 65, "nodeType": "ParameterList", "parameters": [], "src": "310:0:1" }, "scope": 92, "src": "254:109:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 90, "nodeType": "Block", "src": "425:119:1", "statements": [ { "assignments": [ 79 ], "declarations": [ { "constant": false, "id": 79, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 91, "src": "435:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$92", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 78, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 92, "src": "435:10:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$92", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 83, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 81, "name": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 73, "src": "468:11:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 80, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 92, "src": "457:10:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$92_$", "typeString": "type(contract Migrations)" } }, "id": 82, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "457:23:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$92", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "435:45:1" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 87, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 41, "src": "512:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 84, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 79, "src": "490:8:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$92", "typeString": "contract Migrations" } }, "id": 86, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 71, "src": "490:21:1", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 88, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "490:47:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 89, "nodeType": "ExpressionStatement", "src": "490:47:1" } ] }, "documentation": null, "id": 91, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 76, "modifierName": { "argumentTypes": null, "id": 75, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 59, "src": "414:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "414:10:1" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 74, "nodeType": "ParameterList", "paramet