tokenboost-solidity
Version:
Solidity contracts for TokenBoost
1,321 lines (1,320 loc) • 52.2 kB
JSON
{
"contractName": "Migrations",
"abi": [
{
"constant": true,
"inputs": [],
"name": "last_completed_migration",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"constant": false,
"inputs": [
{
"name": "completed",
"type": "uint256"
}
],
"name": "setCompleted",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "new_address",
"type": "address"
}
],
"name": "upgrade",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a0319163317905561023c806100326000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a723058206597a1a5b7af62be2c3983ca3f39e439fe0d23d5739a48e2fed20e173755b43b0029",
"deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a723058206597a1a5b7af62be2c3983ca3f39e439fe0d23d5739a48e2fed20e173755b43b0029",
"sourceMap": "26:480:3:-;;;115:50;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;142:5:3;:18;;-1:-1:-1;;;;;;142:18:3;150:10;142:18;;;26:480;;;;;;",
"deployedSourceMap": "26:480:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;339:165;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;339:165:3;;;;;;;;;74:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;74:36:3;;;;;;;;;;;;;;;;;;;;50:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;50:20:3;;;;;;;;;;;;;;;;;;;;;;;232:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;232:103:3;;;;;339:165;401:19;215:5;;;;201:10;:19;197:26;;;434:11;401:45;;452:8;:21;;;474:24;;452:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;452:47:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;452:47:3;;;;197:26;339:165;;:::o;74:36::-;;;;:::o;50:20::-;;;;;;:::o;232:103::-;215:5;;;;201:10;:19;197:26;;;294:24;:36;;;197:26;232:103;:::o",
"source": "pragma solidity ^0.4.23;\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": "/Users/yoonjae/SolidityProjects/tokenboost-solidity/contracts/Migrations.sol",
"ast": {
"absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
138
]
},
"id": 139,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 83,
"literals": [
"solidity",
"^",
"0.4",
".23"
],
"nodeType": "PragmaDirective",
"src": "0:24:3"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 138,
"linearizedBaseContracts": [
138
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 85,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 138,
"src": "50:20:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 84,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "50:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 87,
"name": "last_completed_migration",
"nodeType": "VariableDeclaration",
"scope": 138,
"src": "74:36:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 86,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "74:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 95,
"nodeType": "Block",
"src": "136:29:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 93,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 90,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "142:5:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 91,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7118,
"src": "150:3:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 92,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "150:10:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "142:18:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 94,
"nodeType": "ExpressionStatement",
"src": "142:18:3"
}
]
},
"documentation": null,
"id": 96,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 88,
"nodeType": "ParameterList",
"parameters": [],
"src": "126:2:3"
},
"payable": false,
"returnParameters": {
"id": 89,
"nodeType": "ParameterList",
"parameters": [],
"src": "136:0:3"
},
"scope": 138,
"src": "115:50:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 104,
"nodeType": "Block",
"src": "191:37:3",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 101,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 98,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7118,
"src": "201:3:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 99,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "201:10:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 100,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "215:5:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "201:19:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 103,
"nodeType": "IfStatement",
"src": "197:26:3",
"trueBody": {
"id": 102,
"nodeType": "PlaceholderStatement",
"src": "222:1:3"
}
}
]
},
"documentation": null,
"id": 105,
"name": "restricted",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 97,
"nodeType": "ParameterList",
"parameters": [],
"src": "188:2:3"
},
"src": "169:59:3",
"visibility": "internal"
},
{
"body": {
"id": 116,
"nodeType": "Block",
"src": "288:47:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 114,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 112,
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 87,
"src": "294:24:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 113,
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 107,
"src": "321:9:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "294:36:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 115,
"nodeType": "ExpressionStatement",
"src": "294:36:3"
}
]
},
"documentation": null,
"id": 117,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 110,
"modifierName": {
"argumentTypes": null,
"id": 109,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 105,
"src": "277:10:3",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "277:10:3"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 108,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 107,
"name": "completed",
"nodeType": "VariableDeclaration",
"scope": 117,
"src": "254:14:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 106,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "254:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "253:16:3"
},
"payable": false,
"returnParameters": {
"id": 111,
"nodeType": "ParameterList",
"parameters": [],
"src": "288:0:3"
},
"scope": 138,
"src": "232:103:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 136,
"nodeType": "Block",
"src": "395:109:3",
"statements": [
{
"assignments": [
125
],
"declarations": [
{
"constant": false,
"id": 125,
"name": "upgraded",
"nodeType": "VariableDeclaration",
"scope": 137,
"src": "401:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$138",
"typeString": "contract Migrations"
},
"typeName": {
"contractScope": null,
"id": 124,
"name": "Migrations",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 138,
"src": "401:10:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$138",
"typeString": "contract Migrations"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 129,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 127,
"name": "new_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "434:11:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 126,
"name": "Migrations",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 138,
"src": "423:10:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Migrations_$138_$",
"typeString": "type(contract Migrations)"
}
},
"id": 128,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "423:23:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$138",
"typeString": "contract Migrations"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "401:45:3"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 133,
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 87,
"src": "474:24:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 130,
"name": "upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 125,
"src": "452:8:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$138",
"typeString": "contract Migrations"
}
},
"id": 132,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCompleted",
"nodeType": "MemberAccess",
"referencedDeclaration": 117,
"src": "452:21:3",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256) external"
}
},
"id": 134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "452:47:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 135,
"nodeType": "ExpressionStatement",
"src": "452:47:3"
}
]
},
"documentation": null,
"id": 137,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 122,
"modifierName": {
"argumentTypes": null,
"id": 121,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 105,
"src": "384:10:3",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "384:10:3"
}
],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 120,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 119,
"name": "new_address",
"nodeType": "VariableDeclaration",
"scope": 137,
"src": "356:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 118,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "356:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "355:21:3"
},
"payable": false,
"returnParameters": {
"id": 123,
"nodeType": "ParameterList",
"parameters": [],
"src": "395:0:3"
},
"scope": 138,
"src": "339:165:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 139,
"src": "26:480:3"
}
],
"src": "0:507:3"
},
"legacyAST": {
"absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
138
]
},
"id": 139,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 83,
"literals": [
"solidity",
"^",
"0.4",
".23"
],
"nodeType": "PragmaDirective",
"src": "0:24:3"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 138,
"linearizedBaseContracts": [
138
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 85,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 138,
"src": "50:20:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 84,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "50:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 87,
"name": "last_completed_migration",
"nodeType": "VariableDeclaration",
"scope": 138,
"src": "74:36:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 86,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "74:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 95,
"nodeType": "Block",
"src": "136:29:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 93,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 90,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "142:5:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 91,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7118,
"src": "150:3:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 92,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "150:10:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "142:18:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 94,
"nodeType": "ExpressionStatement",
"src": "142:18:3"
}
]
},
"documentation": null,
"id": 96,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 88,
"nodeType": "ParameterList",
"parameters": [],
"src": "126:2:3"
},
"payable": false,
"returnParameters": {
"id": 89,
"nodeType": "ParameterList",
"parameters": [],
"src": "136:0:3"
},
"scope": 138,
"src": "115:50:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 104,
"nodeType": "Block",
"src": "191:37:3",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 101,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 98,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7118,
"src": "201:3:3",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 99,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "201:10:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 100,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "215:5:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "201:19:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 103,
"nodeType": "IfStatement",
"src": "197:26:3",
"trueBody": {
"id": 102,
"nodeType": "PlaceholderStatement",
"src": "222:1:3"
}
}
]
},
"documentation": null,
"id": 105,
"name": "restricted",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 97,
"nodeType": "ParameterList",
"parameters": [],
"src": "188:2:3"
},
"src": "169:59:3",
"visibility": "internal"
},
{
"body": {
"id": 116,
"nodeType": "Block",
"src": "288:47:3",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 114,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 112,
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 87,
"src": "294:24:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 113,
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 107,
"src": "321:9:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "294:36:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 115,
"nodeType": "ExpressionStatement",
"src": "294:36:3"
}
]
},
"documentation": null,
"id": 117,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 110,
"modifierName": {
"argumentTypes": null,
"id": 109,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 105,
"src": "277:10:3",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "277:10:3"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 108,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 107,
"name": "completed",
"nodeType": "VariableDeclaration",
"scope": 117,
"src": "254:14:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 106,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "254:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "253:16:3"
},
"payable": false,
"returnParameters": {
"id": 111,
"nodeType": "ParameterList",
"parameters": [],
"src": "288:0:3"
},
"scope": 138,
"src": "232:103:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 136,
"nodeType": "Block",
"src": "395:109:3",
"statements": [
{
"assignments": [
125
],
"declarations": [
{
"constant": false,
"id": 125,
"name": "upgraded",
"nodeType": "VariableDeclaration",
"scope": 137,
"src": "401:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$138",
"typeString": "contract Migrations"
},
"typeName": {
"contractScope": null,
"id": 124,
"name": "Migrations",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 138,
"src": "401:10:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$138",
"typeString": "contract Migrations"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 129,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 127,
"name": "new_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "434:11:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 126,
"name": "Migrations",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 138,
"src": "423:10:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Migrations_$138_$",
"typeString": "type(contract Migrations)"
}
},
"id": 128,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "423:23:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$138",
"typeString": "contract Migrations"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "401:45:3"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 133,
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 87,
"src": "474:24:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 130,
"name": "upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 125,
"src": "452:8:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$138",
"typeString": "contract Migrations"
}
},
"id": 132,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCompleted",
"nodeType": "MemberAccess",
"referencedDeclaration": 117,
"src": "452:21:3",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256) external"
}
},
"id": 134,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "452:47:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 135,
"nodeType": "ExpressionStatement",
"src": "452:47:3"
}
]
},
"documentation": null,
"id": 137,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 122,
"modifierName": {
"argumentTypes": null,
"id": 121,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 105,
"src": "384:10:3",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "384:10:3"
}
],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"parameters": {