@vporton/future-contracts
Version:
Ethereum accounts bid on future financing (essentially, transfer money from the future) - smart contracts
1,305 lines (1,304 loc) • 54.5 kB
JSON
{
"contractName": "Migrations",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "lastCompletedMigration",
"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.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"lastCompletedMigration\",\"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\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/user/Projects/future-contracts/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"/home/user/Projects/future-contracts/contracts/Migrations.sol\":{\"keccak256\":\"0x75882295079533ed6a7d83f7de4b8dbc21f930b356399c23a28780abc7f88690\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://ffeee482f649130f652ca97193454c21288d3f4f257a1c0557b12a70321e8a99\",\"dweb:/ipfs/QmW5U2w3V8cvdjrKyEzAUdWsqKtrMvStkC8mX9jJZ2eEA4\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610202806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f010146100515780638da5cb5b14610086578063fbdbad3c146100b7578063fdacd576146100d1575b600080fd5b6100846004803603602081101561006757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166100ee565b005b61008e610185565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100bf6101a1565b60408051918252519081900360200190f35b610084600480360360208110156100e757600080fd5b50356101a7565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101825760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561016857600080fd5b505af115801561017c573d6000803e3d6000fd5b50505050505b50565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101825760015556fea2646970667358221220bdbafdad50715a5f7ff884754f9a83d1b6ae5305607cce871bb181d74d6c02c564736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f010146100515780638da5cb5b14610086578063fbdbad3c146100b7578063fdacd576146100d1575b600080fd5b6100846004803603602081101561006757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166100ee565b005b61008e610185565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100bf6101a1565b60408051918252519081900360200190f35b610084600480360360208110156100e757600080fd5b50356101a7565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101825760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561016857600080fd5b505af115801561017c573d6000803e3d6000fd5b50505050505b50565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101825760015556fea2646970667358221220bdbafdad50715a5f7ff884754f9a83d1b6ae5305607cce871bb181d74d6c02c564736f6c63430007060033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "72:505:11:-:0;;;236:49;;;;;;;;;-1:-1:-1;260:5:11;:18;;-1:-1:-1;;;;;;260:18:11;268:10;260:18;;;72:505;;;;;;",
"deployedSourceMap": "72:505:11:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;404:171;;;;;;;;;;;;;;;;-1:-1:-1;404:171:11;;;;:::i;:::-;;98:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;124:34;;;:::i;:::-;;;;;;;;;;;;;;;;291:107;;;;;;;;;;;;;;;;-1:-1:-1;291:107:11;;:::i;404:171::-;215:5;;;;201:10;:19;197:26;;;469:19:::1;502:10;469:44;;523:8;:21;;;545:22;;523:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;222:1;197:26:::0;404:171;:::o;98:20::-;;;;;;:::o;124:34::-;;;;:::o;291:107::-;215:5;;;;201:10;:19;197:26;;;357:22:::1;:34:::0;291:107::o",
"source": "// SPDX-License-Identifier: LGPL-3.0-or-later\npragma solidity ^0.7.1;\n\n\ncontract Migrations {\n address public owner;\n uint public lastCompletedMigration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n constructor() {\n owner = msg.sender;\n }\n\n function setCompleted(uint 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": "/home/user/Projects/future-contracts/contracts/Migrations.sol",
"ast": {
"absolutePath": "/home/user/Projects/future-contracts/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
4074
]
},
"id": 4075,
"license": "LGPL-3.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4019,
"literals": [
"solidity",
"^",
"0.7",
".1"
],
"nodeType": "PragmaDirective",
"src": "46:23:11"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 4074,
"linearizedBaseContracts": [
4074
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "8da5cb5b",
"id": 4021,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 4074,
"src": "98:20:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4020,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "98:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "public"
},
{
"constant": false,
"functionSelector": "fbdbad3c",
"id": 4023,
"mutability": "mutable",
"name": "lastCompletedMigration",
"nodeType": "VariableDeclaration",
"scope": 4074,
"src": "124:34:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4022,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "124:4:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "public"
},
{
"body": {
"id": 4031,
"nodeType": "Block",
"src": "187:43:11",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 4028,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 4025,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967281,
"src": "201:3:11",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 4026,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"src": "201:10:11",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 4027,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4021,
"src": "215:5:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "201:19:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 4030,
"nodeType": "IfStatement",
"src": "197:26:11",
"trueBody": {
"id": 4029,
"nodeType": "PlaceholderStatement",
"src": "222:1:11"
}
}
]
},
"id": 4032,
"name": "restricted",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 4024,
"nodeType": "ParameterList",
"parameters": [],
"src": "184:2:11"
},
"src": "165:65:11",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 4040,
"nodeType": "Block",
"src": "250:35:11",
"statements": [
{
"expression": {
"id": 4038,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 4035,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4021,
"src": "260:5:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 4036,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967281,
"src": "268:3:11",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 4037,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"src": "268:10:11",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "260:18:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 4039,
"nodeType": "ExpressionStatement",
"src": "260:18:11"
}
]
},
"id": 4041,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4033,
"nodeType": "ParameterList",
"parameters": [],
"src": "247:2:11"
},
"returnParameters": {
"id": 4034,
"nodeType": "ParameterList",
"parameters": [],
"src": "250:0:11"
},
"scope": 4074,
"src": "236:49:11",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 4052,
"nodeType": "Block",
"src": "347:51:11",
"statements": [
{
"expression": {
"id": 4050,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 4048,
"name": "lastCompletedMigration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4023,
"src": "357:22:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 4049,
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4043,
"src": "382:9:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "357:34:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4051,
"nodeType": "ExpressionStatement",
"src": "357:34:11"
}
]
},
"functionSelector": "fdacd576",
"id": 4053,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 4046,
"modifierName": {
"id": 4045,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4032,
"src": "336:10:11",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "336:10:11"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4044,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4043,
"mutability": "mutable",
"name": "completed",
"nodeType": "VariableDeclaration",
"scope": 4053,
"src": "313:14:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4042,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "313:4:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "312:16:11"
},
"returnParameters": {
"id": 4047,
"nodeType": "ParameterList",
"parameters": [],
"src": "347:0:11"
},
"scope": 4074,
"src": "291:107:11",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 4072,
"nodeType": "Block",
"src": "459:116:11",
"statements": [
{
"assignments": [
4061
],
"declarations": [
{
"constant": false,
"id": 4061,
"mutability": "mutable",
"name": "upgraded",
"nodeType": "VariableDeclaration",
"scope": 4072,
"src": "469:19:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$4074",
"typeString": "contract Migrations"
},
"typeName": {
"id": 4060,
"name": "Migrations",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4074,
"src": "469:10:11",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$4074",
"typeString": "contract Migrations"
}
},
"visibility": "internal"
}
],
"id": 4065,
"initialValue": {
"arguments": [
{
"id": 4063,
"name": "newAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4055,
"src": "502:10:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 4062,
"name": "Migrations",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4074,
"src": "491:10:11",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Migrations_$4074_$",
"typeString": "type(contract Migrations)"
}
},
"id": 4064,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "491:22:11",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$4074",
"typeString": "contract Migrations"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "469:44:11"
},
{
"expression": {
"arguments": [
{
"id": 4069,
"name": "lastCompletedMigration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4023,
"src": "545:22:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 4066,
"name": "upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4061,
"src": "523:8:11",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$4074",
"typeString": "contract Migrations"
}
},
"id": 4068,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCompleted",
"nodeType": "MemberAccess",
"referencedDeclaration": 4053,
"src": "523:21:11",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256) external"
}
},
"id": 4070,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "523:45:11",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4071,
"nodeType": "ExpressionStatement",
"src": "523:45:11"
}
]
},
"functionSelector": "0900f010",
"id": 4073,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 4058,
"modifierName": {
"id": 4057,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4032,
"src": "448:10:11",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "448:10:11"
}
],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4056,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4055,
"mutability": "mutable",
"name": "newAddress",
"nodeType": "VariableDeclaration",
"scope": 4073,
"src": "421:18:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4054,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "421:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "420:20:11"
},
"returnParameters": {
"id": 4059,
"nodeType": "ParameterList",
"parameters": [],
"src": "459:0:11"
},
"scope": 4074,
"src": "404:171:11",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 4075,
"src": "72:505:11"
}
],
"src": "46:532:11"
},
"legacyAST": {
"attributes": {
"absolutePath": "/home/user/Projects/future-contracts/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
4074
]
},
"license": "LGPL-3.0-or-later"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"^",
"0.7",
".1"
]
},
"id": 4019,
"name": "PragmaDirective",
"src": "46:23:11"
},
{
"attributes": {
"abstract": false,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts": [
4074
],
"name": "Migrations",
"scope": 4075
},
"children": [
{
"attributes": {
"constant": false,
"functionSelector": "8da5cb5b",
"mutability": "mutable",
"name": "owner",
"scope": 4074,
"stateVariable": true,
"storageLocation": "default",
"type": "address",
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 4020,
"name": "ElementaryTypeName",
"src": "98:7:11"
}
],
"id": 4021,
"name": "VariableDeclaration",
"src": "98:20:11"
},
{
"attributes": {
"constant": false,
"functionSelector": "fbdbad3c",
"mutability": "mutable",
"name": "lastCompletedMigration",
"scope": 4074,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 4022,
"name": "ElementaryTypeName",
"src": "124:4:11"
}
],
"id": 4023,
"name": "VariableDeclaration",
"src": "124:34:11"
},
{
"attributes": {
"name": "restricted",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 4024,
"name": "ParameterList",
"src": "184:2:11"
},
{
"children": [
{
"attributes": {},
"children": [
{
"attributes": {
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"type": "address payable"
},
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4294967281,
"type": "msg",
"value": "msg"
},
"id": 4025,
"name": "Identifier",
"src": "201:3:11"
}
],
"id": 4026,
"name": "MemberAccess",
"src": "201:10:11"
},
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4021,
"type": "address",
"value": "owner"
},
"id": 4027,
"name": "Identifier",
"src": "215:5:11"
}
],
"id": 4028,
"name": "BinaryOperation",
"src": "201:19:11"
},
{
"id": 4029,
"name": "PlaceholderStatement",
"src": "222:1:11"
}
],
"id": 4030,
"name": "IfStatement",
"src": "197:26:11"
}
],
"id": 4031,
"name": "Block",
"src": "187:43:11"
}
],
"id": 4032,
"name": "ModifierDefinition",
"src": "165:65:11"
},
{
"attributes": {
"implemented": true,
"isConstructor": true,
"kind": "constructor",
"modifiers": [
null
],
"name": "",
"scope": 4074,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 4033,
"name": "ParameterList",
"src": "247:2:11"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 4034,
"name": "ParameterList",
"src": "250:0:11"
},
{
"children": [
{
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4021,
"type": "address",
"value": "owner"
},
"id": 4035,
"name": "Identifier",
"src": "260:5:11"
},
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"type": "address payable"
},
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4294967281,
"type": "msg",
"value": "msg"
},
"id": 4036,
"name": "Identifier",
"src": "268:3:11"
}
],
"id": 4037,
"name": "MemberAccess",
"src": "268:10:11"
}
],
"id": 4038,
"name": "Assignment",
"src": "260:18:11"
}
],
"id": 4039,
"name": "ExpressionStatement",
"src": "260:18:11"
}
],
"id": 4040,
"name": "Block",
"src": "250:35:11"
}
],
"id": 4041,
"name": "FunctionDefinition",
"src": "236:49:11"
},
{
"attributes": {
"functionSelector": "fdacd576",
"implemented": true,
"isConstructor": false,
"kind": "function",
"name": "setCompleted",
"scope": 4074,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "completed",
"scope": 4053,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 4042,
"name": "ElementaryTypeName",
"src": "313:4:11"
}
],
"id": 4043,
"name": "VariableDeclaration",
"src": "313:14:11"
}
],
"id": 4044,
"name": "ParameterList",
"src": "312:16:11"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 4047,
"name": "ParameterList",
"src": "347:0:11"
},
{
"attributes": {},
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4032,
"type": "modifier ()",
"value": "restricted"
},
"id": 4045,
"name": "Identifier",
"src": "336:10:11"
}
],
"id": 4046,
"name": "ModifierInvocation",
"src": "336:10:11"
},
{
"children": [
{
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4023,
"type": "uint256",
"value": "lastCompletedMigration"
},
"id": 4048,
"name": "Identifier",
"src": "357:22:11"
},
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4043,
"type": "uint256",
"value": "completed"
},
"id": 4049,
"name": "Identifier",
"src": "382:9:11"
}
],
"id": 4050,
"name": "Assignment",
"src": "357:34:11"
}
],
"id": 4051,
"name": "ExpressionStatement",
"src": "357:34:11"
}
],
"id": 4052,
"name": "Block",
"src": "347:51:11"
}
],
"id": 4053,
"name": "FunctionDefinition",
"src": "291:107:11"
},
{
"attributes": {
"functionSelector": "0900f010",
"implemented": true,
"isConstructor": false,
"kind": "function",
"name": "upgrade",
"scope": 4074,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "newAddress",
"scope": 4073,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 4054,
"name": "ElementaryTypeName",
"src": "421:7:11"
}
],
"id": 4055,
"name": "VariableDeclaration",
"src": "421:18:11"
}
],
"id": 4056,
"name": "ParameterList",
"src": "420:20:11"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 4059,
"name": "ParameterList",
"src": "459:0:11"
},
{
"attributes": {},
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4032,
"type": "modifier ()",
"value": "restricted"
},
"id": 4057,
"name": "Identifier",
"src": "448:10:11"
}
],
"id": 4058,
"name": "ModifierInvocation",
"src": "448:10:11"
},
{
"children": [
{
"attributes": {
"assignments": [
4061
]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "upgraded",
"scope": 4072,
"stateVariable": false,
"storageLocation": "default",
"type": "contract Migrations",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "Migrations",
"referencedDeclaration": 4074,
"type": "contract Migrations"
},
"id": 4060,
"name": "UserDefinedTypeName",
"src": "469:10:11"
}
],
"id": 4061,
"name": "VariableDeclaration",
"src": "469:19:11"
},
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "contract Migrations",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4074,
"type": "type(contract Migrations)",
"value": "Migrations"
},
"id": 4062,
"name": "Identifier",
"src": "491:10:11"
},
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4055,
"type": "address",
"value": "newAddress"