@ethsub/sol
Version:
ethsub contracts
1,318 lines (1,317 loc) • 57.7 kB
JSON
{
"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": "new_address",
"type": "address"
}
],
"name": "upgrade",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"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\":\"new_address\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/Migrations.sol\":{\"keccak256\":\"0x7f4023acd98f3ffe409524aa67110b06f5efed612acdaffdcb1081143ba87c5b\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://09b27d653576d08889cd931611e1cb67cca452dfe026de19567ae41a8479b43e\",\"dweb:/ipfs/QmcFAGewfdhYuziRPeTuXiw4acECN1FSJARpcAPtGTeeiD\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b031916331790556101b4806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea2646970667358221220d7947963ca4e8fc2e8110d7f2727f7446e6c3038078a318c9bd094ceb219f68e64736f6c634300060c0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea2646970667358221220d7947963ca4e8fc2e8110d7f2727f7446e6c3038078a318c9bd094ceb219f68e64736f6c634300060c0033",
"immutableReferences": {},
"sourceMap": "67:480:41:-:0;;;156:50;;;;;;;;;-1:-1:-1;183:5:41;:18;;-1:-1:-1;;;;;;183:18:41;191:10;183:18;;;67:480;;;;;;",
"deployedSourceMap": "67:480:41:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;380:165;;;;;;;;;;;;;;;;-1:-1:-1;380:165:41;-1:-1:-1;;;;;380:165:41;;:::i;:::-;;115:36;;;:::i;:::-;;;;;;;;;;;;;;;;91:20;;;:::i;:::-;;;;-1:-1:-1;;;;;91:20:41;;;;;;;;;;;;;;273:103;;;;;;;;;;;;;;;;-1:-1:-1;273:103:41;;:::i;380:165::-;256:5;;-1:-1:-1;;;;;256:5:41;242:10;:19;238:26;;;442:19:::1;475:11;442:45;;493:8;-1:-1:-1::0;;;;;493:21:41::1;;515:24;;493:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;263:1;238:26:::0;380:165;:::o;115:36::-;;;;:::o;91:20::-;;;-1:-1:-1;;;;;91:20:41;;:::o;273:103::-;256:5;;-1:-1:-1;;;;;256:5:41;242:10;:19;238:26;;;335:24:::1;:36:::0;273:103::o",
"source": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity 0.6.12;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n",
"sourcePath": "/home/sigo/w/deer/ethsub/packages/sol/contracts/Migrations.sol",
"ast": {
"absolutePath": "project:/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
8072
]
},
"id": 8073,
"license": "LGPL-3.0-only",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 8017,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "42:23:41"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 8072,
"linearizedBaseContracts": [
8072
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "8da5cb5b",
"id": 8019,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 8072,
"src": "91:20:41",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 8018,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "91:7:41",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "445df0ac",
"id": 8021,
"mutability": "mutable",
"name": "last_completed_migration",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 8072,
"src": "115:36:41",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 8020,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "115:4:41",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 8029,
"nodeType": "Block",
"src": "177:29:41",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 8027,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 8024,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8019,
"src": "183:5:41",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 8025,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "191:3:41",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 8026,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "191:10:41",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "183:18:41",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 8028,
"nodeType": "ExpressionStatement",
"src": "183:18:41"
}
]
},
"documentation": null,
"id": 8030,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 8022,
"nodeType": "ParameterList",
"parameters": [],
"src": "167:2:41"
},
"returnParameters": {
"id": 8023,
"nodeType": "ParameterList",
"parameters": [],
"src": "177:0:41"
},
"scope": 8072,
"src": "156:50:41",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 8038,
"nodeType": "Block",
"src": "232:37:41",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 8035,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 8032,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "242:3:41",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 8033,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "242:10:41",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 8034,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8019,
"src": "256:5:41",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "242:19:41",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 8037,
"nodeType": "IfStatement",
"src": "238:26:41",
"trueBody": {
"id": 8036,
"nodeType": "PlaceholderStatement",
"src": "263:1:41"
}
}
]
},
"documentation": null,
"id": 8039,
"name": "restricted",
"nodeType": "ModifierDefinition",
"overrides": null,
"parameters": {
"id": 8031,
"nodeType": "ParameterList",
"parameters": [],
"src": "229:2:41"
},
"src": "210:59:41",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 8050,
"nodeType": "Block",
"src": "329:47:41",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 8048,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 8046,
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8021,
"src": "335:24:41",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 8047,
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8041,
"src": "362:9:41",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "335:36:41",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 8049,
"nodeType": "ExpressionStatement",
"src": "335:36:41"
}
]
},
"documentation": null,
"functionSelector": "fdacd576",
"id": 8051,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 8044,
"modifierName": {
"argumentTypes": null,
"id": 8043,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8039,
"src": "318:10:41",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "318:10:41"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 8042,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 8041,
"mutability": "mutable",
"name": "completed",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 8051,
"src": "295:14:41",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 8040,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "295:4:41",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "294:16:41"
},
"returnParameters": {
"id": 8045,
"nodeType": "ParameterList",
"parameters": [],
"src": "329:0:41"
},
"scope": 8072,
"src": "273:103:41",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 8070,
"nodeType": "Block",
"src": "436:109:41",
"statements": [
{
"assignments": [
8059
],
"declarations": [
{
"constant": false,
"id": 8059,
"mutability": "mutable",
"name": "upgraded",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 8070,
"src": "442:19:41",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$8072",
"typeString": "contract Migrations"
},
"typeName": {
"contractScope": null,
"id": 8058,
"name": "Migrations",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 8072,
"src": "442:10:41",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$8072",
"typeString": "contract Migrations"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 8063,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 8061,
"name": "new_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8053,
"src": "475:11:41",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 8060,
"name": "Migrations",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8072,
"src": "464:10:41",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Migrations_$8072_$",
"typeString": "type(contract Migrations)"
}
},
"id": 8062,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "464:23:41",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$8072",
"typeString": "contract Migrations"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "442:45:41"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 8067,
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8021,
"src": "515:24:41",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 8064,
"name": "upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8059,
"src": "493:8:41",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$8072",
"typeString": "contract Migrations"
}
},
"id": 8066,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCompleted",
"nodeType": "MemberAccess",
"referencedDeclaration": 8051,
"src": "493:21:41",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256) external"
}
},
"id": 8068,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "493:47:41",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 8069,
"nodeType": "ExpressionStatement",
"src": "493:47:41"
}
]
},
"documentation": null,
"functionSelector": "0900f010",
"id": 8071,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 8056,
"modifierName": {
"argumentTypes": null,
"id": 8055,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8039,
"src": "425:10:41",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "425:10:41"
}
],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 8054,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 8053,
"mutability": "mutable",
"name": "new_address",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 8071,
"src": "397:19:41",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 8052,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "397:7:41",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "396:21:41"
},
"returnParameters": {
"id": 8057,
"nodeType": "ParameterList",
"parameters": [],
"src": "436:0:41"
},
"scope": 8072,
"src": "380:165:41",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 8073,
"src": "67:480:41"
}
],
"src": "42:506:41"
},
"legacyAST": {
"attributes": {
"absolutePath": "project:/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
8072
]
},
"license": "LGPL-3.0-only"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"0.6",
".12"
]
},
"id": 8017,
"name": "PragmaDirective",
"src": "42:23:41"
},
{
"attributes": {
"abstract": false,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"linearizedBaseContracts": [
8072
],
"name": "Migrations",
"scope": 8073
},
"children": [
{
"attributes": {
"constant": false,
"functionSelector": "8da5cb5b",
"mutability": "mutable",
"name": "owner",
"overrides": null,
"scope": 8072,
"stateVariable": true,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 8018,
"name": "ElementaryTypeName",
"src": "91:7:41"
}
],
"id": 8019,
"name": "VariableDeclaration",
"src": "91:20:41"
},
{
"attributes": {
"constant": false,
"functionSelector": "445df0ac",
"mutability": "mutable",
"name": "last_completed_migration",
"overrides": null,
"scope": 8072,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 8020,
"name": "ElementaryTypeName",
"src": "115:4:41"
}
],
"id": 8021,
"name": "VariableDeclaration",
"src": "115:36:41"
},
{
"attributes": {
"documentation": null,
"implemented": true,
"isConstructor": true,
"kind": "constructor",
"modifiers": [
null
],
"name": "",
"overrides": null,
"scope": 8072,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 8022,
"name": "ParameterList",
"src": "167:2:41"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 8023,
"name": "ParameterList",
"src": "177:0:41"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 8019,
"type": "address",
"value": "owner"
},
"id": 8024,
"name": "Identifier",
"src": "183:5:41"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address payable"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 8025,
"name": "Identifier",
"src": "191:3:41"
}
],
"id": 8026,
"name": "MemberAccess",
"src": "191:10:41"
}
],
"id": 8027,
"name": "Assignment",
"src": "183:18:41"
}
],
"id": 8028,
"name": "ExpressionStatement",
"src": "183:18:41"
}
],
"id": 8029,
"name": "Block",
"src": "177:29:41"
}
],
"id": 8030,
"name": "FunctionDefinition",
"src": "156:50:41"
},
{
"attributes": {
"documentation": null,
"name": "restricted",
"overrides": null,
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 8031,
"name": "ParameterList",
"src": "229:2:41"
},
{
"children": [
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address payable"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 8032,
"name": "Identifier",
"src": "242:3:41"
}
],
"id": 8033,
"name": "MemberAccess",
"src": "242:10:41"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 8019,
"type": "address",
"value": "owner"
},
"id": 8034,
"name": "Identifier",
"src": "256:5:41"
}
],
"id": 8035,
"name": "BinaryOperation",
"src": "242:19:41"
},
{
"id": 8036,
"name": "PlaceholderStatement",
"src": "263:1:41"
}
],
"id": 8037,
"name": "IfStatement",
"src": "238:26:41"
}
],
"id": 8038,
"name": "Block",
"src": "232:37:41"
}
],
"id": 8039,
"name": "ModifierDefinition",
"src": "210:59:41"
},
{
"attributes": {
"documentation": null,
"functionSelector": "fdacd576",
"implemented": true,
"isConstructor": false,
"kind": "function",
"name": "setCompleted",
"overrides": null,
"scope": 8072,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "completed",
"overrides": null,
"scope": 8051,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 8040,
"name": "ElementaryTypeName",
"src": "295:4:41"
}
],
"id": 8041,
"name": "VariableDeclaration",
"src": "295:14:41"
}
],
"id": 8042,
"name": "ParameterList",
"src": "294:16:41"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 8045,
"name": "ParameterList",
"src": "329:0:41"
},
{
"attributes": {
"arguments": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 8039,
"type": "modifier ()",
"value": "restricted"
},
"id": 8043,
"name": "Identifier",
"src": "318:10:41"
}
],
"id": 8044,
"name": "ModifierInvocation",
"src": "318:10:41"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 8021,
"type": "uint256",
"value": "last_completed_migration"
},
"id": 8046,
"name": "Identifier",
"src": "335:24:41"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 8041,
"type": "uint256",
"value": "completed"
},
"id": 8047,
"name": "Identifier",
"src": "362:9:41"
}
],
"id": 8048,
"name": "Assignment",
"src": "335:36:41"
}
],
"id": 8049,
"name": "ExpressionStatement",
"src": "335:36:41"
}
],
"id": 8050,
"name": "Block",
"src": "329:47:41"
}
],
"id": 8051,
"name": "FunctionDefinition",
"src": "273:103:41"
},
{
"attributes": {
"documentation": null,
"functionSelector": "0900f010",
"implemented": true,
"isConstructor": false,
"kind": "function",
"name": "upgrade",
"overrides": null,
"scope": 8072,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "new_address",
"overrides": null,
"scope": 8071,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 8052,
"name": "ElementaryTypeName",
"src": "397:7:41"
}
],
"id": 8053,
"name": "VariableDeclaration",
"src": "397:19:41"
}
],
"id": 8054,
"name": "ParameterList",
"src": "396:21:41"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 8057,
"name": "ParameterList",
"src": "436:0:41"
},
{
"attributes": {
"arguments": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 8039,
"type": "modifier ()",
"value": "restricted"
},
"id": 8055,
"name": "Identifier",
"src": "425:10:41"
}
],
"id": 8056,
"name": "ModifierInvocation",
"src": "425:10:41"
},
{
"children": [
{
"attributes": {
"assignments": [
8059
]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "upgraded",