UNPKG

@josojo/realitytoken-contracts

Version:
1,323 lines (1,322 loc) 55.1 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": "0x608060405234801561001057600080fd5b5060008054600160a060020a0319163317905561023c806100326000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a723058207cde3b0a2fe17fc5be32678cef8a606747053a7040dbae9850de409462d545380029", "deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a723058207cde3b0a2fe17fc5be32678cef8a606747053a7040dbae9850de409462d545380029", "sourceMap": "309:467:1:-;;;461:51;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;489:5:1;:18;;-1:-1:-1;;;;;;489:18:1;497:10;489:18;;;309:467;;;;;;", "deployedSourceMap": "309:467:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;616:158;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;616:158:1;;;;;;;;;357:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;357:36:1;;;;;;;;;;;;;;;;;;;;333:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;333:20:1;;;;;;;;;;;;;;;;;;;;;;;516:96;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;516:96:1;;;;;616:158;671:19;444:5;;;;430:10;:19;426:26;;;704:11;671:45;;722:8;:21;;;744:24;;722:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;722:47:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;722:47:1;;;;426:26;616:158;;:::o;357:36::-;;;;:::o;333:20::-;;;;;;:::o;516:96::-;444:5;;;;430:10;:19;426:26;;;571:24;:36;;;426:26;516:96;:::o", "source": "pragma solidity ^0.4.2;\nimport '@josojo/forkonomics-contracts/contracts/Distribution.sol';\nimport '@josojo/forkonomics-contracts/contracts/ForkonomicETTF.sol';\nimport '@gnosis.pm/pm-contracts/contracts/Markets/StandardMarket.sol';\nimport '@gnosis.pm/pm-contracts/contracts/MarketMakers/LMSRMarketMaker.sol';\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n function Migrations() {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n", "sourcePath": "/home/josojo/reality/tokenized-events/contracts/Migrations.sol", "ast": { "absolutePath": "/home/josojo/reality/tokenized-events/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 328 ] }, "id": 329, "nodeType": "SourceUnit", "nodes": [ { "id": 269, "literals": [ "solidity", "^", "0.4", ".2" ], "nodeType": "PragmaDirective", "src": "0:23:1" }, { "absolutePath": "@josojo/forkonomics-contracts/contracts/Distribution.sol", "file": "@josojo/forkonomics-contracts/contracts/Distribution.sol", "id": 270, "nodeType": "ImportDirective", "scope": 329, "sourceUnit": 4907, "src": "24:66:1", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@josojo/forkonomics-contracts/contracts/ForkonomicETTF.sol", "file": "@josojo/forkonomics-contracts/contracts/ForkonomicETTF.sol", "id": 271, "nodeType": "ImportDirective", "scope": 329, "sourceUnit": 5511, "src": "91:68:1", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@gnosis.pm/pm-contracts/contracts/Markets/StandardMarket.sol", "file": "@gnosis.pm/pm-contracts/contracts/Markets/StandardMarket.sol", "id": 272, "nodeType": "ImportDirective", "scope": 329, "sourceUnit": 2965, "src": "160:70:1", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@gnosis.pm/pm-contracts/contracts/MarketMakers/LMSRMarketMaker.sol", "file": "@gnosis.pm/pm-contracts/contracts/MarketMakers/LMSRMarketMaker.sol", "id": 273, "nodeType": "ImportDirective", "scope": 329, "sourceUnit": 2217, "src": "231:76:1", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 328, "linearizedBaseContracts": [ 328 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 275, "name": "owner", "nodeType": "VariableDeclaration", "scope": 328, "src": "333:20:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 274, "name": "address", "nodeType": "ElementaryTypeName", "src": "333:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 277, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 328, "src": "357:36:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 276, "name": "uint", "nodeType": "ElementaryTypeName", "src": "357:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 285, "nodeType": "Block", "src": "420:37:1", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 282, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 279, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9180, "src": "430:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 280, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "430:10:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 281, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "444:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "430:19:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 284, "nodeType": "IfStatement", "src": "426:26:1", "trueBody": { "id": 283, "nodeType": "PlaceholderStatement", "src": "451:1:1" } } ] }, "documentation": null, "id": 286, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 278, "nodeType": "ParameterList", "parameters": [], "src": "417:2:1" }, "src": "398:59:1", "visibility": "internal" }, { "body": { "id": 294, "nodeType": "Block", "src": "483:29:1", "statements": [ { "expression": { "argumentTypes": null, "id": 292, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 289, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "489:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 290, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9180, "src": "497:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 291, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "497:10:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "489:18:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 293, "nodeType": "ExpressionStatement", "src": "489:18:1" } ] }, "documentation": null, "id": 295, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "Migrations", "nodeType": "FunctionDefinition", "parameters": { "id": 287, "nodeType": "ParameterList", "parameters": [], "src": "480:2:1" }, "payable": false, "returnParameters": { "id": 288, "nodeType": "ParameterList", "parameters": [], "src": "483:0:1" }, "scope": 328, "src": "461:51:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 306, "nodeType": "Block", "src": "565:47:1", "statements": [ { "expression": { "argumentTypes": null, "id": 304, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 302, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 277, "src": "571:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 303, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 297, "src": "598:9:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "571:36:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 305, "nodeType": "ExpressionStatement", "src": "571:36:1" } ] }, "documentation": null, "id": 307, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 300, "modifierName": { "argumentTypes": null, "id": 299, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 286, "src": "554:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "554:10:1" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 298, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 297, "name": "completed", "nodeType": "VariableDeclaration", "scope": 307, "src": "538:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 296, "name": "uint", "nodeType": "ElementaryTypeName", "src": "538:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "537:16:1" }, "payable": false, "returnParameters": { "id": 301, "nodeType": "ParameterList", "parameters": [], "src": "565:0:1" }, "scope": 328, "src": "516:96:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 326, "nodeType": "Block", "src": "665:109:1", "statements": [ { "assignments": [ 315 ], "declarations": [ { "constant": false, "id": 315, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 327, "src": "671:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$328", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 314, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 328, "src": "671:10:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$328", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 319, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 317, "name": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 309, "src": "704:11:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 316, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 328, "src": "693:10:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$328_$", "typeString": "type(contract Migrations)" } }, "id": 318, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "693:23:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$328", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "671:45:1" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 323, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 277, "src": "744:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 320, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 315, "src": "722:8:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$328", "typeString": "contract Migrations" } }, "id": 322, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 307, "src": "722:21:1", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 324, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "722:47:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 325, "nodeType": "ExpressionStatement", "src": "722:47:1" } ] }, "documentation": null, "id": 327, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 312, "modifierName": { "argumentTypes": null, "id": 311, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 286, "src": "654:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "654:10:1" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "parameters": { "id": 310, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 309, "name": "new_address", "nodeType": "VariableDeclaration", "scope": 327, "src": "633:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 308, "name": "address", "nodeType": "ElementaryTypeName", "src": "633:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "632:21:1" }, "payable": false, "returnParameters": { "id": 313, "nodeType": "ParameterList", "parameters": [], "src": "665:0:1" }, "scope": 328, "src": "616:158:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 329, "src": "309:467:1" } ], "src": "0:777:1" }, "legacyAST": { "absolutePath": "/home/josojo/reality/tokenized-events/contracts/Migrations.sol", "exportedSymbols": { "Migrations": [ 328 ] }, "id": 329, "nodeType": "SourceUnit", "nodes": [ { "id": 269, "literals": [ "solidity", "^", "0.4", ".2" ], "nodeType": "PragmaDirective", "src": "0:23:1" }, { "absolutePath": "@josojo/forkonomics-contracts/contracts/Distribution.sol", "file": "@josojo/forkonomics-contracts/contracts/Distribution.sol", "id": 270, "nodeType": "ImportDirective", "scope": 329, "sourceUnit": 4907, "src": "24:66:1", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@josojo/forkonomics-contracts/contracts/ForkonomicETTF.sol", "file": "@josojo/forkonomics-contracts/contracts/ForkonomicETTF.sol", "id": 271, "nodeType": "ImportDirective", "scope": 329, "sourceUnit": 5511, "src": "91:68:1", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@gnosis.pm/pm-contracts/contracts/Markets/StandardMarket.sol", "file": "@gnosis.pm/pm-contracts/contracts/Markets/StandardMarket.sol", "id": 272, "nodeType": "ImportDirective", "scope": 329, "sourceUnit": 2965, "src": "160:70:1", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@gnosis.pm/pm-contracts/contracts/MarketMakers/LMSRMarketMaker.sol", "file": "@gnosis.pm/pm-contracts/contracts/MarketMakers/LMSRMarketMaker.sol", "id": 273, "nodeType": "ImportDirective", "scope": 329, "sourceUnit": 2217, "src": "231:76:1", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 328, "linearizedBaseContracts": [ 328 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 275, "name": "owner", "nodeType": "VariableDeclaration", "scope": 328, "src": "333:20:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 274, "name": "address", "nodeType": "ElementaryTypeName", "src": "333:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 277, "name": "last_completed_migration", "nodeType": "VariableDeclaration", "scope": 328, "src": "357:36:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 276, "name": "uint", "nodeType": "ElementaryTypeName", "src": "357:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 285, "nodeType": "Block", "src": "420:37:1", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 282, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 279, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9180, "src": "430:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 280, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "430:10:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 281, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "444:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "430:19:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 284, "nodeType": "IfStatement", "src": "426:26:1", "trueBody": { "id": 283, "nodeType": "PlaceholderStatement", "src": "451:1:1" } } ] }, "documentation": null, "id": 286, "name": "restricted", "nodeType": "ModifierDefinition", "parameters": { "id": 278, "nodeType": "ParameterList", "parameters": [], "src": "417:2:1" }, "src": "398:59:1", "visibility": "internal" }, { "body": { "id": 294, "nodeType": "Block", "src": "483:29:1", "statements": [ { "expression": { "argumentTypes": null, "id": 292, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 289, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "489:5:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 290, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 9180, "src": "497:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 291, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "497:10:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "489:18:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 293, "nodeType": "ExpressionStatement", "src": "489:18:1" } ] }, "documentation": null, "id": 295, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "Migrations", "nodeType": "FunctionDefinition", "parameters": { "id": 287, "nodeType": "ParameterList", "parameters": [], "src": "480:2:1" }, "payable": false, "returnParameters": { "id": 288, "nodeType": "ParameterList", "parameters": [], "src": "483:0:1" }, "scope": 328, "src": "461:51:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 306, "nodeType": "Block", "src": "565:47:1", "statements": [ { "expression": { "argumentTypes": null, "id": 304, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 302, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 277, "src": "571:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 303, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 297, "src": "598:9:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "571:36:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 305, "nodeType": "ExpressionStatement", "src": "571:36:1" } ] }, "documentation": null, "id": 307, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 300, "modifierName": { "argumentTypes": null, "id": 299, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 286, "src": "554:10:1", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "554:10:1" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "parameters": { "id": 298, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 297, "name": "completed", "nodeType": "VariableDeclaration", "scope": 307, "src": "538:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 296, "name": "uint", "nodeType": "ElementaryTypeName", "src": "538:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "537:16:1" }, "payable": false, "returnParameters": { "id": 301, "nodeType": "ParameterList", "parameters": [], "src": "565:0:1" }, "scope": 328, "src": "516:96:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 326, "nodeType": "Block", "src": "665:109:1", "statements": [ { "assignments": [ 315 ], "declarations": [ { "constant": false, "id": 315, "name": "upgraded", "nodeType": "VariableDeclaration", "scope": 327, "src": "671:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$328", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 314, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 328, "src": "671:10:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$328", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 319, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 317, "name": "new_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 309, "src": "704:11:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 316, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 328, "src": "693:10:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$328_$", "typeString": "type(contract Migrations)" } }, "id": 318, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "693:23:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$328", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "671:45:1" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 323, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 277, "src": "744:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256"