{ "contractName": "Migrations", "abi": [ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "last_completed_migration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "completed", "type": "uint256" } ], "name": "setCompleted", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newAddress", "type": "address" } ], "name": "upgrade", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.6.9+commit.3e3065ac\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/Migrations.sol\":{\"keccak256\":\"0xba8c3786f986d758d86b8c9d85357820dd0abde03b49a6883c0279f15f2099a7\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://03e53fd1d8a21de10f5a680b4cac614d375b59ba5b25ce3f5e43d6a622ea8cac\",\"dweb:/ipfs/QmdoHbz7boCTg67nAfT6N178BQkYvUd8QbGpjWsJR8JPEC\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b031916331790556101eb806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100665780638da5cb5b14610084578063fdacd57614610099575b600080fd5b61006461005f366004610152565b6100ac565b005b61006e610125565b60405161007b91906101ac565b60405180910390f35b61008c61012b565b60405161007b9190610198565b6100646100a7366004610180565b61013a565b6000546001600160a01b031633141561012257600154604051637ed66abb60e11b815282916001600160a01b0383169163fdacd576916100ee916004016101ac565b600060405180830381600087803b15801561010857600080fd5b505af115801561011c573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561012257600155565b600060208284031215610163578081fd5b81356001600160a01b0381168114610179578182fd5b9392505050565b600060208284031215610191578081fd5b5035919050565b6001600160a01b0391909116815260200190565b9081526020019056fea26469706673582212205ed35f739472fd482c1681e18f61c4c409f32279fc993a19752885afc2e700c064736f6c63430006090033", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100665780638da5cb5b14610084578063fdacd57614610099575b600080fd5b61006461005f366004610152565b6100ac565b005b61006e610125565b60405161007b91906101ac565b60405180910390f35b61008c61012b565b60405161007b9190610198565b6100646100a7366004610180565b61013a565b6000546001600160a01b031633141561012257600154604051637ed66abb60e11b815282916001600160a01b0383169163fdacd576916100ee916004016101ac565b600060405180830381600087803b15801561010857600080fd5b505af115801561011c573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561012257600155565b600060208284031215610163578081fd5b81356001600160a01b0381168114610179578182fd5b9392505050565b600060208284031215610191578081fd5b5035919050565b6001600160a01b0391909116815260200190565b9081526020019056fea26469706673582212205ed35f739472fd482c1681e18f61c4c409f32279fc993a19752885afc2e700c064736f6c63430006090033", "immutableReferences": {}, "sourceMap": "137:548:14:-:0;;;330:56;;;;;;;;;-1:-1:-1;361:5:14;:18;;-1:-1:-1;;;;;;361:18:14;369:10;361:18;;;137:548;;;;;;", "deployedSourceMap": "137:548:14:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;510:173;;;;;;;;;:::i;:::-;;189:39;;;:::i;:::-;;;;;;;;;;;;;;;;163:20;;;:::i;:::-;;;;;;;;392:112;;;;;;;;;:::i;510:173::-;285:5;;-1:-1:-1;;;;;285:5:14;271:10;:19;267:51;;;651:24:::1;::::0;629:47:::1;::::0;-1:-1:-1;;;629:47:14;;608:10;;-1:-1:-1;;;;;629:21:14;::::1;::::0;::::1;::::0;:47:::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;306:1;267:51:::0;510:173;:::o;189:39::-;;;;:::o;163:20::-;;;-1:-1:-1;;;;;163:20:14;;:::o;392:112::-;285:5;;-1:-1:-1;;;;;285:5:14;271:10;:19;267:51;;;461:24:::1;:36:::0;392:112::o;279:241:-1:-;;383:2;371:9;362:7;358:23;354:32;351:2;;;-1:-1;;389:12;351:2;72:20;;-1:-1;;;;;1633:54;;1837:35;;1827:2;;-1:-1;;1876:12;1827:2;441:63;345:175;-1:-1;;;345:175;527:241;;631:2;619:9;610:7;606:23;602:32;599:2;;;-1:-1;;637:12;599:2;-1:-1;209:20;;593:175;-1:-1;593:175;1015:222;-1:-1;;;;;1633:54;;;;846:37;;1142:2;1127:18;;1113:124;1244:222;966:37;;;1371:2;1356:18;;1342:124", "source": "/*\n\n Copyright 2020 DODO ZOO.\n SPDX-License-Identifier: Apache-2.0\n\n*/\n\npragma solidity 0.6.9;\npragma experimental ABIEncoderV2;\n\n\ncontract Migrations {\n address public owner;\n uint256 public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) {\n _;\n }\n }\n\n constructor() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint256 completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address newAddress) public restricted {\n Migrations upgraded = Migrations(newAddress);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n", "sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/Migrations.sol", "ast": { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/Migrations.sol", "exportedSymbols": { "Migrations": [ 2091 ] }, "id": 2092, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 2034, "literals": [ "solidity", "0.6", ".9" ], "nodeType": "PragmaDirective", "src": "78:22:14" }, { "id": 2035, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "101:33:14" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 2091, "linearizedBaseContracts": [ 2091 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "8da5cb5b", "id": 2037, "mutability": "mutable", "name": "owner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2091, "src": "163:20:14", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2036, "name": "address", "nodeType": "ElementaryTypeName", "src": "163:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "445df0ac", "id": 2039, "mutability": "mutable", "name": "last_completed_migration", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2091, "src": "189:39:14", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2038, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "189:7:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 2048, "nodeType": "Block", "src": "257:67:14", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2044, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2041, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "271:3:14", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2042, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "271:10:14", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 2043, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2037, "src": "285:5:14", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "271:19:14", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 2047, "nodeType": "IfStatement", "src": "267:51:14", "trueBody": { "id": 2046, "nodeType": "Block", "src": "292:26:14", "statements": [ { "id": 2045, "nodeType": "PlaceholderStatement", "src": "306:1:14" } ] } } ] }, "documentation": null, "id": 2049, "name": "restricted", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 2040, "nodeType": "ParameterList", "parameters": [], "src": "254:2:14" }, "src": "235:89:14", "virtual": false, "visibility": "internal" }, { "body": { "id": 2057, "nodeType": "Block", "src": "351:35:14", "statements": [ { "expression": { "argumentTypes": null, "id": 2055, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2052, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2037, "src": "361:5:14", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2053, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "369:3:14", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2054, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "369:10:14", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "361:18:14", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2056, "nodeType": "ExpressionStatement", "src": "361:18:14" } ] }, "documentation": null, "id": 2058, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2050, "nodeType": "ParameterList", "parameters": [], "src": "341:2:14" }, "returnParameters": { "id": 2051, "nodeType": "ParameterList", "parameters": [], "src": "351:0:14" }, "scope": 2091, "src": "330:56:14", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 2069, "nodeType": "Block", "src": "451:53:14", "statements": [ { "expression": { "argumentTypes": null, "id": 2067, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2065, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2039, "src": "461:24:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2066, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2060, "src": "488:9:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "461:36:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2068, "nodeType": "ExpressionStatement", "src": "461:36:14" } ] }, "documentation": null, "functionSelector": "fdacd576", "id": 2070, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 2063, "modifierName": { "argumentTypes": null, "id": 2062, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2049, "src": "440:10:14", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "440:10:14" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2061, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2060, "mutability": "mutable", "name": "completed", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2070, "src": "414:17:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2059, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "414:7:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "413:19:14" }, "returnParameters": { "id": 2064, "nodeType": "ParameterList", "parameters": [], "src": "451:0:14" }, "scope": 2091, "src": "392:112:14", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 2089, "nodeType": "Block", "src": "565:118:14", "statements": [ { "assignments": [ 2078 ], "declarations": [ { "constant": false, "id": 2078, "mutability": "mutable", "name": "upgraded", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2089, "src": "575:19:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$2091", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 2077, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2091, "src": "575:10:14", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$2091", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 2082, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2080, "name": "newAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2072, "src": "608:10:14", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 2079, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2091, "src": "597:10:14", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$2091_$", "typeString": "type(contract Migrations)" } }, "id": 2081, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "597:22:14", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$2091", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "575:44:14" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2086, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2039, "src": "651:24:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 2083, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2078, "src": "629:8:14", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$2091", "typeString": "contract Migrations" } }, "id": 2085, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 2070, "src": "629:21:14", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 2087, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "629:47:14", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2088, "nodeType": "ExpressionStatement", "src": "629:47:14" } ] }, "documentation": null, "functionSelector": "0900f010", "id": 2090, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 2075, "modifierName": { "argumentTypes": null, "id": 2074, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2049, "src": "554:10:14", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "554:10:14" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2073, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2072, "mutability": "mutable", "name": "newAddress", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2090, "src": "527:18:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2071, "name": "address", "nodeType": "ElementaryTypeName", "src": "527:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "526:20:14" }, "returnParameters": { "id": 2076, "nodeType": "ParameterList", "parameters": [], "src": "565:0:14" }, "scope": 2091, "src": "510:173:14", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" } ], "scope": 2092, "src": "137:548:14" } ], "src": "78:608:14" }, "legacyAST": { "absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/Migrations.sol", "exportedSymbols": { "Migrations": [ 2091 ] }, "id": 2092, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 2034, "literals": [ "solidity", "0.6", ".9" ], "nodeType": "PragmaDirective", "src": "78:22:14" }, { "id": 2035, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "101:33:14" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 2091, "linearizedBaseContracts": [ 2091 ], "name": "Migrations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "8da5cb5b", "id": 2037, "mutability": "mutable", "name": "owner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2091, "src": "163:20:14", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2036, "name": "address", "nodeType": "ElementaryTypeName", "src": "163:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "445df0ac", "id": 2039, "mutability": "mutable", "name": "last_completed_migration", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2091, "src": "189:39:14", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2038, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "189:7:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 2048, "nodeType": "Block", "src": "257:67:14", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2044, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2041, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "271:3:14", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2042, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "271:10:14", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 2043, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2037, "src": "285:5:14", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "271:19:14", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 2047, "nodeType": "IfStatement", "src": "267:51:14", "trueBody": { "id": 2046, "nodeType": "Block", "src": "292:26:14", "statements": [ { "id": 2045, "nodeType": "PlaceholderStatement", "src": "306:1:14" } ] } } ] }, "documentation": null, "id": 2049, "name": "restricted", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 2040, "nodeType": "ParameterList", "parameters": [], "src": "254:2:14" }, "src": "235:89:14", "virtual": false, "visibility": "internal" }, { "body": { "id": 2057, "nodeType": "Block", "src": "351:35:14", "statements": [ { "expression": { "argumentTypes": null, "id": 2055, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2052, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2037, "src": "361:5:14", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2053, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "369:3:14", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2054, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "369:10:14", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "361:18:14", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2056, "nodeType": "ExpressionStatement", "src": "361:18:14" } ] }, "documentation": null, "id": 2058, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2050, "nodeType": "ParameterList", "parameters": [], "src": "341:2:14" }, "returnParameters": { "id": 2051, "nodeType": "ParameterList", "parameters": [], "src": "351:0:14" }, "scope": 2091, "src": "330:56:14", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 2069, "nodeType": "Block", "src": "451:53:14", "statements": [ { "expression": { "argumentTypes": null, "id": 2067, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2065, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2039, "src": "461:24:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2066, "name": "completed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2060, "src": "488:9:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "461:36:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2068, "nodeType": "ExpressionStatement", "src": "461:36:14" } ] }, "documentation": null, "functionSelector": "fdacd576", "id": 2070, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 2063, "modifierName": { "argumentTypes": null, "id": 2062, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2049, "src": "440:10:14", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "440:10:14" } ], "name": "setCompleted", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2061, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2060, "mutability": "mutable", "name": "completed", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2070, "src": "414:17:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2059, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "414:7:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "413:19:14" }, "returnParameters": { "id": 2064, "nodeType": "ParameterList", "parameters": [], "src": "451:0:14" }, "scope": 2091, "src": "392:112:14", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 2089, "nodeType": "Block", "src": "565:118:14", "statements": [ { "assignments": [ 2078 ], "declarations": [ { "constant": false, "id": 2078, "mutability": "mutable", "name": "upgraded", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2089, "src": "575:19:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$2091", "typeString": "contract Migrations" }, "typeName": { "contractScope": null, "id": 2077, "name": "Migrations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2091, "src": "575:10:14", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$2091", "typeString": "contract Migrations" } }, "value": null, "visibility": "internal" } ], "id": 2082, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2080, "name": "newAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2072, "src": "608:10:14", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 2079, "name": "Migrations", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2091, "src": "597:10:14", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Migrations_$2091_$", "typeString": "type(contract Migrations)" } }, "id": 2081, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "597:22:14", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$2091", "typeString": "contract Migrations" } }, "nodeType": "VariableDeclarationStatement", "src": "575:44:14" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2086, "name": "last_completed_migration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2039, "src": "651:24:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 2083, "name": "upgraded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2078, "src": "629:8:14", "typeDescriptions": { "typeIdentifier": "t_contract$_Migrations_$2091", "typeString": "contract Migrations" } }, "id": 2085, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "setCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 2070, "src": "629:21:14", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256) external" } }, "id": 2087, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "629:47:14", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2088, "nodeType": "ExpressionStatement", "src": "629:47:14" } ] }, "documentation": null, "functionSelector": "0900f010", "id": 2090, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 2075, "modifierName": { "argumentTypes": null, "id": 2074, "name": "restricted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2049, "src": "554:10:14", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "554:10:14" } ], "name": "upgrade", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2073, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2072, "mutability": "mutable", "name": "newAddress", "nodeType": "VariableDeclaration", "overrides": null, "scope": 2090, "src": "527:18:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2071, "name": "address", "nodeType": "ElementaryTypeName", "src": "527:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "526:20:14" }, "returnParameters": { "id": 2076, "nodeType": "ParameterList", "parameters": [], "src": "565:0:14" }, "scope": 2091, "src": "510:173:14", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" } ], "scope": 2092, "src": "137:548:14" } ], "src": "78:608:14" }, "compiler": { "name": "solc", "version": "0.6.9+commit.3e3065ac.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.2.3", "updatedAt": "2020-11-06T08:03:35.510Z", "devdoc": { "methods": {} }, "userdoc": { "methods": {} } }