{ "contractName": "Migrations", "abi": [ { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": true, "inputs": [], "name": "last_completed_migration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "completed", "type": "uint256" } ], "name": "setCompleted", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "new_address", "type": "address" } ], "name": "upgrade", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.12+commit.7709ece9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"new_address\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/p1r0/dcc/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/p1r0/dcc/contracts/Migrations.sol\":{\"keccak256\":\"0x919f575f0939571a03f4870c607e9ac4f8893eb1e8ffed3ae2e1993633d9358d\",\"urls\":[\"bzz-raw://fcaff076ff00297a792470a886fe81f0bcd08b9d5849a96f1c448f4f3beae491\",\"dweb:/ipfs/QmUUnW8xpGC2QBaimEvdNU6zjrtPKuTyaConNPSfT2Dmr4\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102b7806100606000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100955780638da5cb5b146100b3578063fdacd576146100fd575b600080fd5b6100936004803603602081101561006757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061012b565b005b61009d6101f7565b6040518082815260200191505060405180910390f35b6100bb6101fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101296004803603602081101561011357600080fd5b8101908080359060200190929190505050610222565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156101f45760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156101da57600080fd5b505af11580156101ee573d6000803e3d6000fd5b50505050505b50565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561027f57806001819055505b5056fea265627a7a7231582056d395ac05fc43d4a096ee521e659deedc3114db142ce25b0b18caf59bb5567c64736f6c634300050c0032", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100955780638da5cb5b146100b3578063fdacd576146100fd575b600080fd5b6100936004803603602081101561006757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061012b565b005b61009d6101f7565b6040518082815260200191505060405180910390f35b6100bb6101fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101296004803603602081101561011357600080fd5b8101908080359060200190929190505050610222565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156101f45760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156101da57600080fd5b505af11580156101ee573d6000803e3d6000fd5b50505050505b50565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561027f57806001819055505b5056fea265627a7a7231582056d395ac05fc43d4a096ee521e659deedc3114db142ce25b0b18caf59bb5567c64736f6c634300050c0032", "sourceMap": "34:480:1:-;;;123:50;8:9:-1;5:2;;;30:1;27;20:12;5:2;123:50:1;158:10;150:5;;:18;;;;;;;;;;;;;;;;;;34:480;;;;;;", "deployedSourceMap": "34:480:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;34:480:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;347:165;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;347:165:1;;;;;;;;;;;;;;;;;;;:::i;:::-;;82:36;;;:::i;:::-;;;;;;;;;;;;;;;;;;;58:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;240:103;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;240:103:1;;;;;;;;;;;;;;;;;:::i;:::-;;347:165;223:5;;;;;;;;;;;209:19;;:10;:19;;;205:26;;;409:19;442:11;409:45;;460:8;:21;;;482:24;;460:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;460:47:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;460:47:1;;;;230:1;205:26;347:165;:::o;82:36::-;;;;:::o;58:20::-;;;;;;;;;;;;;:::o;240:103::-;223:5;;;;;;;;;;;209:19;;:10;:19;;;205:26;;;329:9;302:24;:36;;;;205:26;240:103;:::o", "source": "pragma solidity >=0.4.21 <0.7.0;\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/p1r0/dcc/contracts/Migrations.sol", "ast": { "absolutePath": "/home/p1r0/dcc/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 354 ] }, "id": 355, "nodeType": "SourceUnit", "nodes": [ { "id": 299, "literals": [ "solidity", ">=", "0.4", ".21", "<", "0.7", ".0" ], "nodeType": "PragmaDirective", "src": "0:32:1" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 354, "linearizedBaseContracts": [ 354 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 301, "name": "owner", "nodeType": "VariableDeclaration", "scope": 354, "src": "58:20:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 300, "name": "address", "nodeType": "ElementaryTypeName", "src": "58:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 303, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 354, "src": "82:36:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 302, "name": "uint", "nodeType": "ElementaryTypeName", "src": "82:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 311, "nodeType": "Block", "src": "144:29:1", "statements": [ { "expression": { "argumentTypes": null, "id": 309, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 306, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 301, "src": "150:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 307, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1057, "src": "158:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 308, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "158:10:1", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "150:18:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 310, "nodeType": "ExpressionStatement", "src": "150:18:1" } ] }, "documentation": null, "id": 312, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 304, "nodeType": "ParameterList", "parameters": [], "src": "134:2:1" }, "returnParameters": { "id": 305, "nodeType": "ParameterList", "parameters": [], "src": "144:0:1" }, "scope": 354, "src": "123:50:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 320, "nodeType": "Block", "src": "199:37:1", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 317, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 314, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1057, "src": "209:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 315, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "209:10:1", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 316, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 301, "src": "223:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "209:19:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 319, "nodeType": "IfStatement", "src": "205:26:1", "trueBody": { "id": 318, "nodeType": "PlaceholderStatement", "src": "230:1:1" } } ] }, "documentation": null, "id": 321, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 313, "nodeType": "ParameterList", "parameters": [], "src": "196:2:1" }, "src": "177:59:1", "visibility": "internal" }, { "body": { "id": 332, "nodeType": "Block", "src": "296:47:1", "statements": [ { "expression": { "argumentTypes": null, "id": 330, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 328, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 303, "src": "302:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 329, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 323, "src": "329:9:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "302:36:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 331, "nodeType": "ExpressionStatement", "src": "302:36:1" } ] }, "documentation": null, "id": 333, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 326, "modifierName": { "argumentTypes": null, "id": 325, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 321, "src": "285:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "285:10:1" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 324, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 323, "name": "completed", "nodeType": "VariableDeclaration", "scope": 333, "src": "262:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 322, "name": "uint", "nodeType": "ElementaryTypeName", "src": "262:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "261:16:1" }, "returnParameters": { "id": 327, "nodeType": "ParameterList", "parameters": [], "src": "296:0:1" }, "scope": 354, "src": "240:103:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 352, "nodeType": "Block", "src": "403:109:1", "statements": [ { "assignments": [ 341 ], "declarations": [ { "constant": false, "id": 341, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 352, "src": "409:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$354", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 340, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 354, "src": "409:10:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$354", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 345, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 343, "name": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 335, "src": "442:11:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 342, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 354, "src": "431:10:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$354_$", "typeString": "type(contract Migrations)" } }, "id": 344, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "431:23:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$354", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "409:45:1" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 349, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 303, "src": "482:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 346, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 341, "src": "460:8:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$354", "typeString": "contract Migrations" } }, "id": 348, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 333, "src": "460:21:1", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 350, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "460:47:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 351, "nodeType": "ExpressionStatement", "src": "460:47:1" } ] }, "documentation": null, "id": 353, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 338, "modifierName": { "argumentTypes": null, "id": 337, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 321, "src": "392:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "392:10:1" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 336, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 335, "name": "new_address", "nodeType": "VariableDeclaration", "scope": 353, "src": "364:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 334, "name": "address", "nodeType": "ElementaryTypeName", "src": "364:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "363:21:1" }, "returnParameters": { "id": 339, "nodeType": "ParameterList", "parameters": [], "src": "403:0:1" }, "scope": 354, "src": "347:165:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 355, "src": "34:480:1" } ], "src": "0:515:1" }, "legacyAST": { "absolutePath": "/home/p1r0/dcc/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 354 ] }, "id": 355, "nodeType": "SourceUnit", "nodes": [ { "id": 299, "literals": [ "solidity", ">=", "0.4", ".21", "<", "0.7", ".0" ], "nodeType": "PragmaDirective", "src": "0:32:1" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 354, "linearizedBaseContracts": [ 354 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 301, "name": "owner", "nodeType": "VariableDeclaration", "scope": 354, "src": "58:20:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 300, "name": "address", "nodeType": "ElementaryTypeName", "src": "58:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 303, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 354, "src": "82:36:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 302, "name": "uint", "nodeType": "ElementaryTypeName", "src": "82:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 311, "nodeType": "Block", "src": "144:29:1", "statements": [ { "expression": { "argumentTypes": null, "id": 309, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 306, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 301, "src": "150:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 307, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1057, "src": "158:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 308, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "158:10:1", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "150:18:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 310, "nodeType": "ExpressionStatement", "src": "150:18:1" } ] }, "documentation": null, "id": 312, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 304, "nodeType": "ParameterList", "parameters": [], "src": "134:2:1" }, "returnParameters": { "id": 305, "nodeType": "ParameterList", "parameters": [], "src": "144:0:1" }, "scope": 354, "src": "123:50:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 320, "nodeType": "Block", "src": "199:37:1", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 317, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 314, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1057, "src": "209:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 315, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "209:10:1", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 316, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 301, "src": "223:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "209:19:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 319, "nodeType": "IfStatement", "src": "205:26:1", "trueBody": { "id": 318, "nodeType": "PlaceholderStatement", "src": "230:1:1" } } ] }, "documentation": null, "id": 321, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 313, "nodeType": "ParameterList", "parameters": [], "src": "196:2:1" }, "src": "177:59:1", "visibility": "internal" }, { "body": { "id": 332, "nodeType": "Block", "src": "296:47:1", "statements": [ { "expression": { "argumentTypes": null, "id": 330, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 328, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 303, "src": "302:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 329, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 323, "src": "329:9:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "302:36:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 331, "nodeType": "ExpressionStatement", "src": "302:36:1" } ] }, "documentation": null, "id": 333, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 326, "modifierName": { "argumentTypes": null, "id": 325, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 321, "src": "285:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "285:10:1" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 324, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 323, "name": "completed", "nodeType": "VariableDeclaration", "scope": 333, "src": "262:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 322, "name": "uint", "nodeType": "ElementaryTypeName", "src": "262:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "261:16:1" }, "returnParameters": { "id": 327, "nodeType": "ParameterList", "parameters": [], "src": "296:0:1" }, "scope": 354, "src": "240:103:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 352, "nodeType": "Block", "src": "403:109:1", "statements": [ { "assignments": [ 341 ], "declarations": [ { "constant": false, "id": 341, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 352, "src": "409:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$354", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 340, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 354, "src": "409:10:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$354", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 345, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 343, "name": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 335, "src": "442:11:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 342, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 354, "src": "431:10:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$354_$", "typeString": "type(contract Migrations)" } }, "id": 344, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "431:23:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$354", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "409:45:1" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 349, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 303, "src": "482:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 346, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 341, "src": "460:8:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$354", "typeString": "contract Migrations" } }, "id": 348, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 333, "src": "460:21:1", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 350, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "460:47:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 351, "nodeType": "ExpressionStatement", "src": "460:47:1" } ] }, "documentation": null, "id": 353, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 338, "modifierName": { "argumentTypes": null, "id": 337, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 321, "src": "392:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "392:10:1" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 336, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 335, "name": "new_address", "nodeType": "VariableDeclaration", "scope": 353, "src": "364:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 334, "name": "address", "nodeType": "ElementaryTypeName", "src": "364:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "363:21:1" }, "returnParameters": { "id": 339, "nodeType": "ParameterList", "parameters": [], "src": "403:0:1" }, "scope": 354, "src": "347:165:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 355, "src": "34:480:1" } ], "src": "0:515:1" }, "compiler": { "name": "solc", "version": "0.5.12+commit.7709ece9.Emscripten.clang" }, "networks": { "1577403801270": { "events": {}, "links": {}, "address": "0xD3eA8b1a7abF4F5d177A741e454C645A24668573", "transactionHash": "0xc772122f22ef3ed3a1e904eb68598648e96b9c2b307714cd339c0ec03c0f65cc" }, "1577584905270": { "events": {}, "links": {}, "address": "0xF76B3bb36bc7a86a38C81d092ed24328C65CdD2e", "transactionHash": "0x56c02ee58ef4438d1969eb6d68f0f3c6dd0ec1eb9ed9d208b972eb71f046c1dc" }, "1577585216124": { "events": {}, "links": {}, "address": "0x6555FB2eD17935c21053CD8752CfeE5F728F3266", "transactionHash": "0xd58db81c958b25211c10156b9bfc17edb39f143f4e0f829c73f805534db161de" }, "1577585630921": { "events": {}, "links": {}, "address": "0x2043C48eb0cd9145d4c022d1C54C191bbad40C25", "transactionHash": "0xf802b6d0dea09e23ca8e7ef8547621a66617cb6cca0e7fec90682039d80a5d97" } }, "schemaVersion": "3.0.19", "updatedAt": "2019-12-29T02:14:57.845Z", "networkType": "ethereum", "devdoc": { "methods": {} }, "userdoc": { "methods": {} } }