UNPKG

@fleupold/dex-contracts

Version:

Contracts for dFusion multi-token batch auction exchange

1,280 lines 53.8 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" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.10+commit.5a6ea5b1\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"new_address\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"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\"},{\"constant\":false,\"inputs\":[{\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/felixleupold/Gnosis/dex-contracts/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/felixleupold/Gnosis/dex-contracts/contracts/Migrations.sol\":{\"keccak256\":\"0xaeec20b728a7f5c296eca896e4d777881337bed4a4a481e4fea0efd22dd8b72c\",\"urls\":[\"bzzr://ffb086316ec1922428d0256387d2da119cc8c0ef433e0df3835213e2960a478c\",\"dweb:/ipfs/QmWD5sp4ez3nJAscC6FdDPUu8ZS6WBW5S7ccVCferrp217\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b031916331790556101b3806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea265627a7a72305820e576343b6e1b9d2b87ef6ce6350b7c418178a44e4278863d429d27d0efd8c5fe64736f6c634300050a0032", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea265627a7a72305820e576343b6e1b9d2b87ef6ce6350b7c418178a44e4278863d429d27d0efd8c5fe64736f6c634300050a0032", "sourceMap": "34:526:4:-;;;132:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;163:5:4;:18;;-1:-1:-1;;;;;;163:18:4;171:10;163:18;;;34:526;;;;;;", "deployedSourceMap": "34:526:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;34:526:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;383:175;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;383:175:4;-1:-1:-1;;;;;383:175:4;;:::i;:::-;;86:39;;;:::i;:::-;;;;;;;;;;;;;;;;60:20;;;:::i;:::-;;;;-1:-1:-1;;;;;60:20:4;;;;;;;;;;;;;;265:112;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;265:112:4;;:::i;383:175::-;244:5;;-1:-1:-1;;;;;244:5:4;230:10;:19;226:26;;;449:19;482:11;449:45;;504:8;-1:-1:-1;;;;;504:21:4;;526:24;;504:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;504:47:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;504:47:4;;;;251:1;226:26;383:175;:::o;86:39::-;;;;:::o;60:20::-;;;-1:-1:-1;;;;;60:20:4;;:::o;265:112::-;244:5;;-1:-1:-1;;;;;244:5:4;230:10;:19;226:26;;;334:24;:36;265:112::o", "source": "pragma solidity >=0.4.21 <0.6.0;\n\ncontract Migrations {\n address public owner;\n uint256 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(uint256 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": "/Users/felixleupold/Gnosis/dex-contracts/contracts/Migrations.sol", "ast": { "absolutePath": "/Users/felixleupold/Gnosis/dex-contracts/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 4248 ] }, "id": 4249, "nodeType": "SourceUnit", "nodes": [ { "id": 4193, "literals": [ "solidity", ">=", "0.4", ".21", "<", "0.6", ".0" ], "nodeType": "PragmaDirective", "src": "0:32:4" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 4248, "linearizedBaseContracts": [ 4248 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 4195, "name": "owner", "nodeType": "VariableDeclaration", "scope": 4248, "src": "60:20:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4194, "name": "address", "nodeType": "ElementaryTypeName", "src": "60:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 4197, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 4248, "src": "86:39:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4196, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "86:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 4205, "nodeType": "Block", "src": "153:35:4", "statements": [ { "expression": { "argumentTypes": null, "id": 4203, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4200, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4195, "src": "163:5:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4201, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9946, "src": "171:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4202, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "171:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "163:18:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4204, "nodeType": "ExpressionStatement", "src": "163:18:4" } ] }, "documentation": null, "id": 4206, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 4198, "nodeType": "ParameterList", "parameters": [], "src": "143:2:4" }, "returnParameters": { "id": 4199, "nodeType": "ParameterList", "parameters": [], "src": "153:0:4" }, "scope": 4248, "src": "132:56:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 4214, "nodeType": "Block", "src": "216:43:4", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4211, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4208, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9946, "src": "230:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4209, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "230:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4210, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4195, "src": "244:5:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "230:19:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 4213, "nodeType": "IfStatement", "src": "226:26:4", "trueBody": { "id": 4212, "nodeType": "PlaceholderStatement", "src": "251:1:4" } } ] }, "documentation": null, "id": 4215, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 4207, "nodeType": "ParameterList", "parameters": [], "src": "213:2:4" }, "src": "194:65:4", "visibility": "internal" }, { "body": { "id": 4226, "nodeType": "Block", "src": "324:53:4", "statements": [ { "expression": { "argumentTypes": null, "id": 4224, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4222, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4197, "src": "334:24:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 4223, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4217, "src": "361:9:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "334:36:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4225, "nodeType": "ExpressionStatement", "src": "334:36:4" } ] }, "documentation": null, "id": 4227, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 4220, "modifierName": { "argumentTypes": null, "id": 4219, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4215, "src": "313:10:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "313:10:4" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 4218, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4217, "name": "completed", "nodeType": "VariableDeclaration", "scope": 4227, "src": "287:17:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4216, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "287:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "286:19:4" }, "returnParameters": { "id": 4221, "nodeType": "ParameterList", "parameters": [], "src": "324:0:4" }, "scope": 4248, "src": "265:112:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 4246, "nodeType": "Block", "src": "439:119:4", "statements": [ { "assignments": [ 4235 ], "declarations": [ { "constant": false, "id": 4235, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 4246, "src": "449:19:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$4248", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 4234, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4248, "src": "449:10:4", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$4248", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 4239, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4237, "name": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4229, "src": "482:11:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4236, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4248, "src": "471:10:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$4248_$", "typeString": "type(contract Migrations)" } }, "id": 4238, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "471:23:4", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$4248", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "449:45:4" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4243, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4197, "src": "526:24:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4240, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4235, "src": "504:8:4", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$4248", "typeString": "contract Migrations" } }, "id": 4242, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 4227, "src": "504:21:4", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 4244, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "504:47:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4245, "nodeType": "ExpressionStatement", "src": "504:47:4" } ] }, "documentation": null, "id": 4247, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 4232, "modifierName": { "argumentTypes": null, "id": 4231, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4215, "src": "428:10:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "428:10:4" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 4230, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4229, "name": "new_address", "nodeType": "VariableDeclaration", "scope": 4247, "src": "400:19:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4228, "name": "address", "nodeType": "ElementaryTypeName", "src": "400:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "399:21:4" }, "returnParameters": { "id": 4233, "nodeType": "ParameterList", "parameters": [], "src": "439:0:4" }, "scope": 4248, "src": "383:175:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 4249, "src": "34:526:4" } ], "src": "0:561:4" }, "legacyAST": { "absolutePath": "/Users/felixleupold/Gnosis/dex-contracts/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 4248 ] }, "id": 4249, "nodeType": "SourceUnit", "nodes": [ { "id": 4193, "literals": [ "solidity", ">=", "0.4", ".21", "<", "0.6", ".0" ], "nodeType": "PragmaDirective", "src": "0:32:4" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 4248, "linearizedBaseContracts": [ 4248 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 4195, "name": "owner", "nodeType": "VariableDeclaration", "scope": 4248, "src": "60:20:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4194, "name": "address", "nodeType": "ElementaryTypeName", "src": "60:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 4197, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 4248, "src": "86:39:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4196, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "86:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 4205, "nodeType": "Block", "src": "153:35:4", "statements": [ { "expression": { "argumentTypes": null, "id": 4203, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4200, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4195, "src": "163:5:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4201, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9946, "src": "171:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4202, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "171:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "163:18:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4204, "nodeType": "ExpressionStatement", "src": "163:18:4" } ] }, "documentation": null, "id": 4206, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 4198, "nodeType": "ParameterList", "parameters": [], "src": "143:2:4" }, "returnParameters": { "id": 4199, "nodeType": "ParameterList", "parameters": [], "src": "153:0:4" }, "scope": 4248, "src": "132:56:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 4214, "nodeType": "Block", "src": "216:43:4", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4211, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4208, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9946, "src": "230:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4209, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "230:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4210, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4195, "src": "244:5:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "230:19:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 4213, "nodeType": "IfStatement", "src": "226:26:4", "trueBody": { "id": 4212, "nodeType": "PlaceholderStatement", "src": "251:1:4" } } ] }, "documentation": null, "id": 4215, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 4207, "nodeType": "ParameterList", "parameters": [], "src": "213:2:4" }, "src": "194:65:4", "visibility": "internal" }, { "body": { "id": 4226, "nodeType": "Block", "src": "324:53:4", "statements": [ { "expression": { "argumentTypes": null, "id": 4224, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4222, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4197, "src": "334:24:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 4223, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4217, "src": "361:9:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "334:36:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 4225, "nodeType": "ExpressionStatement", "src": "334:36:4" } ] }, "documentation": null, "id": 4227, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 4220, "modifierName": { "argumentTypes": null, "id": 4219, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4215, "src": "313:10:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "313:10:4" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 4218, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4217, "name": "completed", "nodeType": "VariableDeclaration", "scope": 4227, "src": "287:17:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4216, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "287:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "286:19:4" }, "returnParameters": { "id": 4221, "nodeType": "ParameterList", "parameters": [], "src": "324:0:4" }, "scope": 4248, "src": "265:112:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 4246, "nodeType": "Block", "src": "439:119:4", "statements": [ { "assignments": [ 4235 ], "declarations": [ { "constant": false, "id": 4235, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 4246, "src": "449:19:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$4248", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 4234, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4248, "src": "449:10:4", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$4248", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 4239, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4237, "name": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4229, "src": "482:11:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4236, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4248, "src": "471:10:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$4248_$", "typeString": "type(contract Migrations)" } }, "id": 4238, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "471:23:4", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$4248", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "449:45:4" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4243, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4197, "src": "526:24:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 4240, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4235, "src": "504:8:4", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$4248", "typeString": "contract Migrations" } }, "id": 4242, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 4227, "src": "504:21:4", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 4244, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "504:47