@daostack/arc-hive
Version:
A dao's registry
1,282 lines (1,281 loc) • 53.9 kB
JSON
{
"contractName": "Migrations",
"abi": [
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"constant": true,
"inputs": [],
"name": "lastCompletedMigration",
"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": "newAddress",
"type": "address"
}
],
"name": "upgrade",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.15+commit.6a57276f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastCompletedMigration\",\"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\":\"newAddress\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/oren/daostack/arc-hive/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/oren/daostack/arc-hive/contracts/Migrations.sol\":{\"keccak256\":\"0xebb73f05cca34bdab83927f94bc2dc05c261adfbc22bac5d28bdc6cbbe1640f7\",\"urls\":[\"bzz-raw://7eb6058c3715d2af31654322f4610f037f23e76d22e9edca2111ac3314e36b55\",\"dweb:/ipfs/QmSVRB67QbjSCpaXBvg8eRjuDq6vq2bLorLD9LLgGn37oM\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b031916331790556101b3806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f010146100515780638da5cb5b14610079578063fbdbad3c1461009d578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b604080516001600160a01b039092168252519081900360200190f35b6100a5610160565b60408051918252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b6000546001600160a01b031681565b60015481565b6000546001600160a01b031633141561014e5760015556fea265627a7a72315820fb26f95ae851f62a93e3fe9f443f49e8f4832766253ad5dad17b28bceb98ef8364736f6c634300050f0032",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f010146100515780638da5cb5b14610079578063fbdbad3c1461009d578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b604080516001600160a01b039092168252519081900360200190f35b6100a5610160565b60408051918252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b6000546001600160a01b031681565b60015481565b6000546001600160a01b031633141561014e5760015556fea265627a7a72315820fb26f95ae851f62a93e3fe9f443f49e8f4832766253ad5dad17b28bceb98ef8364736f6c634300050f0032",
"sourceMap": "27:542:1:-;;;218:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;249:5:1;:18;;-1:-1:-1;;;;;;249:18:1;257:10;249:18;;;27:542;;;;;;",
"deployedSourceMap": "27:542:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;27:542:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;396:171;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;396:171:1;-1:-1:-1;;;;;396:171:1;;:::i;:::-;;53:20;;;:::i;:::-;;;;-1:-1:-1;;;;;53:20:1;;;;;;;;;;;;;;79:37;;;:::i;:::-;;;;;;;;;;;;;;;;280:110;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;280:110:1;;:::i;396:171::-;173:5;;-1:-1:-1;;;;;173:5:1;159:10;:19;155:51;;;461:19;494:10;461:44;;515:8;-1:-1:-1;;;;;515:21:1;;537:22;;515:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;515:45:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;515:45:1;;;;194:1;155:51;396:171;:::o;53:20::-;;;-1:-1:-1;;;;;53:20:1;;:::o;79:37::-;;;;:::o;280:110::-;173:5;;-1:-1:-1;;;;;173:5:1;159:10;:19;155:51;;;349:22;:34;280:110::o",
"source": "pragma solidity ^0.5.15;\n\n\ncontract Migrations {\n address public owner;\n uint256 public lastCompletedMigration;\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 lastCompletedMigration = completed;\n }\n\n function upgrade(address newAddress) public restricted {\n Migrations upgraded = Migrations(newAddress);\n upgraded.setCompleted(lastCompletedMigration);\n }\n}\n",
"sourcePath": "/Users/oren/daostack/arc-hive/contracts/Migrations.sol",
"ast": {
"absolutePath": "/Users/oren/daostack/arc-hive/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
160
]
},
"id": 161,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 104,
"literals": [
"solidity",
"^",
"0.5",
".15"
],
"nodeType": "PragmaDirective",
"src": "0:24:1"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 160,
"linearizedBaseContracts": [
160
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 106,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "53:20:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 105,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "53:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 108,
"name": "lastCompletedMigration",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "79:37:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 107,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "79:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 117,
"nodeType": "Block",
"src": "145:67:1",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 113,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 110,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 389,
"src": "159:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 111,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "159:10:1",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 112,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 106,
"src": "173:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "159:19:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 116,
"nodeType": "IfStatement",
"src": "155:51:1",
"trueBody": {
"id": 115,
"nodeType": "Block",
"src": "180:26:1",
"statements": [
{
"id": 114,
"nodeType": "PlaceholderStatement",
"src": "194:1:1"
}
]
}
}
]
},
"documentation": null,
"id": 118,
"name": "restricted",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 109,
"nodeType": "ParameterList",
"parameters": [],
"src": "142:2:1"
},
"src": "123:89:1",
"visibility": "internal"
},
{
"body": {
"id": 126,
"nodeType": "Block",
"src": "239:35:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 124,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 121,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 106,
"src": "249:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 122,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 389,
"src": "257:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 123,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "257:10:1",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "249:18:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 125,
"nodeType": "ExpressionStatement",
"src": "249:18:1"
}
]
},
"documentation": null,
"id": 127,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 119,
"nodeType": "ParameterList",
"parameters": [],
"src": "229:2:1"
},
"returnParameters": {
"id": 120,
"nodeType": "ParameterList",
"parameters": [],
"src": "239:0:1"
},
"scope": 160,
"src": "218:56:1",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 138,
"nodeType": "Block",
"src": "339:51:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 136,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 134,
"name": "lastCompletedMigration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 108,
"src": "349:22:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 135,
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 129,
"src": "374:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "349:34:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 137,
"nodeType": "ExpressionStatement",
"src": "349:34:1"
}
]
},
"documentation": null,
"id": 139,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 132,
"modifierName": {
"argumentTypes": null,
"id": 131,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 118,
"src": "328:10:1",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "328:10:1"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 130,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 129,
"name": "completed",
"nodeType": "VariableDeclaration",
"scope": 139,
"src": "302:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 128,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "302:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "301:19:1"
},
"returnParameters": {
"id": 133,
"nodeType": "ParameterList",
"parameters": [],
"src": "339:0:1"
},
"scope": 160,
"src": "280:110:1",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 158,
"nodeType": "Block",
"src": "451:116:1",
"statements": [
{
"assignments": [
147
],
"declarations": [
{
"constant": false,
"id": 147,
"name": "upgraded",
"nodeType": "VariableDeclaration",
"scope": 158,
"src": "461:19:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$160",
"typeString": "contract Migrations"
},
"typeName": {
"contractScope": null,
"id": 146,
"name": "Migrations",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 160,
"src": "461:10:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$160",
"typeString": "contract Migrations"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 151,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 149,
"name": "newAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 141,
"src": "494:10:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 148,
"name": "Migrations",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 160,
"src": "483:10:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Migrations_$160_$",
"typeString": "type(contract Migrations)"
}
},
"id": 150,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "483:22:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$160",
"typeString": "contract Migrations"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "461:44:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 155,
"name": "lastCompletedMigration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 108,
"src": "537:22:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 152,
"name": "upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 147,
"src": "515:8:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$160",
"typeString": "contract Migrations"
}
},
"id": 154,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCompleted",
"nodeType": "MemberAccess",
"referencedDeclaration": 139,
"src": "515:21:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256) external"
}
},
"id": 156,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "515:45:1",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 157,
"nodeType": "ExpressionStatement",
"src": "515:45:1"
}
]
},
"documentation": null,
"id": 159,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 144,
"modifierName": {
"argumentTypes": null,
"id": 143,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 118,
"src": "440:10:1",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "440:10:1"
}
],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 142,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 141,
"name": "newAddress",
"nodeType": "VariableDeclaration",
"scope": 159,
"src": "413:18:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 140,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "413:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "412:20:1"
},
"returnParameters": {
"id": 145,
"nodeType": "ParameterList",
"parameters": [],
"src": "451:0:1"
},
"scope": 160,
"src": "396:171:1",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 161,
"src": "27:542:1"
}
],
"src": "0:570:1"
},
"legacyAST": {
"absolutePath": "/Users/oren/daostack/arc-hive/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
160
]
},
"id": 161,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 104,
"literals": [
"solidity",
"^",
"0.5",
".15"
],
"nodeType": "PragmaDirective",
"src": "0:24:1"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 160,
"linearizedBaseContracts": [
160
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 106,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "53:20:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 105,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "53:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 108,
"name": "lastCompletedMigration",
"nodeType": "VariableDeclaration",
"scope": 160,
"src": "79:37:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 107,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "79:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 117,
"nodeType": "Block",
"src": "145:67:1",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 113,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 110,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 389,
"src": "159:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 111,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "159:10:1",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 112,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 106,
"src": "173:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "159:19:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 116,
"nodeType": "IfStatement",
"src": "155:51:1",
"trueBody": {
"id": 115,
"nodeType": "Block",
"src": "180:26:1",
"statements": [
{
"id": 114,
"nodeType": "PlaceholderStatement",
"src": "194:1:1"
}
]
}
}
]
},
"documentation": null,
"id": 118,
"name": "restricted",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 109,
"nodeType": "ParameterList",
"parameters": [],
"src": "142:2:1"
},
"src": "123:89:1",
"visibility": "internal"
},
{
"body": {
"id": 126,
"nodeType": "Block",
"src": "239:35:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 124,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 121,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 106,
"src": "249:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 122,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 389,
"src": "257:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 123,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "257:10:1",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "249:18:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 125,
"nodeType": "ExpressionStatement",
"src": "249:18:1"
}
]
},
"documentation": null,
"id": 127,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 119,
"nodeType": "ParameterList",
"parameters": [],
"src": "229:2:1"
},
"returnParameters": {
"id": 120,
"nodeType": "ParameterList",
"parameters": [],
"src": "239:0:1"
},
"scope": 160,
"src": "218:56:1",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 138,
"nodeType": "Block",
"src": "339:51:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 136,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 134,
"name": "lastCompletedMigration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 108,
"src": "349:22:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 135,
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 129,
"src": "374:9:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "349:34:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 137,
"nodeType": "ExpressionStatement",
"src": "349:34:1"
}
]
},
"documentation": null,
"id": 139,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 132,
"modifierName": {
"argumentTypes": null,
"id": 131,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 118,
"src": "328:10:1",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "328:10:1"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 130,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 129,
"name": "completed",
"nodeType": "VariableDeclaration",
"scope": 139,
"src": "302:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 128,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "302:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "301:19:1"
},
"returnParameters": {
"id": 133,
"nodeType": "ParameterList",
"parameters": [],
"src": "339:0:1"
},
"scope": 160,
"src": "280:110:1",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 158,
"nodeType": "Block",
"src": "451:116:1",
"statements": [
{
"assignments": [
147
],
"declarations": [
{
"constant": false,
"id": 147,
"name": "upgraded",
"nodeType": "VariableDeclaration",
"scope": 158,
"src": "461:19:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$160",
"typeString": "contract Migrations"
},
"typeName": {
"contractScope": null,
"id": 146,
"name": "Migrations",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 160,
"src": "461:10:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$160",
"typeString": "contract Migrations"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 151,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 149,
"name": "newAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 141,
"src": "494:10:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 148,
"name": "Migrations",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 160,
"src": "483:10:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Migrations_$160_$",
"typeString": "type(contract Migrations)"
}
},
"id": 150,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "483:22:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$160",
"typeString": "contract Migrations"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "461:44:1"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 155,
"name": "lastCompletedMigration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 108,
"src": "537:22:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 152,
"name": "upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 147,
"src": "515:8:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$160",
"typeString": "contract Migrations"
}
},
"id": 154,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCompleted",
"nodeType": "MemberAccess",
"referencedDeclaration": 139,
"src": "515:21:1",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256) external"