@daostack/access_control
Version:
Capability-based access control for Ethereum smart contracts.
1,319 lines • 51.9 kB
JSON
{
"contractName": "Migrations",
"abi": [
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "lastCompletedMigration",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"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": "newAddress",
"type": "address"
}
],
"name": "upgrade",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a0319163317905561023c806100326000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f01081146100665780638da5cb5b14610096578063fbdbad3c146100d4578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100e057600080fd5b506100e96101e1565b60408051918252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a7230582096c7e80a03c542415ee2e79e8f4a8378bddc9dcd1ba2cc305be5a4137ed6de7d0029",
"deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f01081146100665780638da5cb5b14610096578063fbdbad3c146100d4578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156100e057600080fd5b506100e96101e1565b60408051918252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a7230582096c7e80a03c542415ee2e79e8f4a8378bddc9dcd1ba2cc305be5a4137ed6de7d0029",
"sourceMap": "27:521:4:-;;;120:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;151:5:4;:18;;-1:-1:-1;;;;;;151:18:4;159:10;151:18;;;27:521;;;;;;",
"deployedSourceMap": "27:521:4:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;375:171;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;375:171:4;;;;;;;;;53:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;53:20:4;;;;;;;;;;;;;;;;;;;;;;;79:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;79:34:4;;;;;;;;;;;;;;;;;;;;262:107;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;262:107:4;;;;;375:171;440:19;232:5;;;;218:10;:19;214:35;;;473:10;440:44;;494:8;:21;;;516:22;;494:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;494:45:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;494:45:4;;;;214:35;375:171;;:::o;53:20::-;;;;;;:::o;79:34::-;;;;:::o;262:107::-;232:5;;;;218:10;:19;214:35;;;328:22;:34;;;214:35;262:107;:::o",
"source": "pragma solidity ^0.4.24;\n\n\ncontract Migrations {\n address public owner;\n uint public lastCompletedMigration;\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier restricted() {\n if (msg.sender == owner) \n _;\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/tsuberim/projects/daostack/access_control/contracts/Migrations.sol",
"ast": {
"absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
412
]
},
"id": 413,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 357,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:4"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 412,
"linearizedBaseContracts": [
412
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 359,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 412,
"src": "53:20:4",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 358,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "53:7:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 361,
"name": "lastCompletedMigration",
"nodeType": "VariableDeclaration",
"scope": 412,
"src": "79:34:4",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 360,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "79:4:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 369,
"nodeType": "Block",
"src": "141:35:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 367,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 364,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 359,
"src": "151:5:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 365,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1462,
"src": "159:3:4",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 366,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "159:10:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "151:18:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 368,
"nodeType": "ExpressionStatement",
"src": "151:18:4"
}
]
},
"documentation": null,
"id": 370,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 362,
"nodeType": "ParameterList",
"parameters": [],
"src": "131:2:4"
},
"payable": false,
"returnParameters": {
"id": 363,
"nodeType": "ParameterList",
"parameters": [],
"src": "141:0:4"
},
"scope": 412,
"src": "120:56:4",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 378,
"nodeType": "Block",
"src": "204:52:4",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 375,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 372,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1462,
"src": "218:3:4",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 373,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "218:10:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 374,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 359,
"src": "232:5:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "218:19:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 377,
"nodeType": "IfStatement",
"src": "214:35:4",
"trueBody": {
"id": 376,
"nodeType": "PlaceholderStatement",
"src": "248:1:4"
}
}
]
},
"documentation": null,
"id": 379,
"name": "restricted",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 371,
"nodeType": "ParameterList",
"parameters": [],
"src": "201:2:4"
},
"src": "182:74:4",
"visibility": "internal"
},
{
"body": {
"id": 390,
"nodeType": "Block",
"src": "318:51:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 388,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 386,
"name": "lastCompletedMigration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 361,
"src": "328:22:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 387,
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 381,
"src": "353:9:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "328:34:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 389,
"nodeType": "ExpressionStatement",
"src": "328:34:4"
}
]
},
"documentation": null,
"id": 391,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 384,
"modifierName": {
"argumentTypes": null,
"id": 383,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 379,
"src": "307:10:4",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "307:10:4"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 382,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 381,
"name": "completed",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "284:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 380,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "284:4:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "283:16:4"
},
"payable": false,
"returnParameters": {
"id": 385,
"nodeType": "ParameterList",
"parameters": [],
"src": "318:0:4"
},
"scope": 412,
"src": "262:107:4",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 410,
"nodeType": "Block",
"src": "430:116:4",
"statements": [
{
"assignments": [
399
],
"declarations": [
{
"constant": false,
"id": 399,
"name": "upgraded",
"nodeType": "VariableDeclaration",
"scope": 411,
"src": "440:19:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$412",
"typeString": "contract Migrations"
},
"typeName": {
"contractScope": null,
"id": 398,
"name": "Migrations",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 412,
"src": "440:10:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$412",
"typeString": "contract Migrations"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 403,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 401,
"name": "newAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 393,
"src": "473:10:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 400,
"name": "Migrations",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 412,
"src": "462:10:4",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Migrations_$412_$",
"typeString": "type(contract Migrations)"
}
},
"id": 402,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "462:22:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$412",
"typeString": "contract Migrations"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "440:44:4"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 407,
"name": "lastCompletedMigration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 361,
"src": "516:22:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 404,
"name": "upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 399,
"src": "494:8:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$412",
"typeString": "contract Migrations"
}
},
"id": 406,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCompleted",
"nodeType": "MemberAccess",
"referencedDeclaration": 391,
"src": "494:21:4",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256) external"
}
},
"id": 408,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "494:45:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 409,
"nodeType": "ExpressionStatement",
"src": "494:45:4"
}
]
},
"documentation": null,
"id": 411,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 396,
"modifierName": {
"argumentTypes": null,
"id": 395,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 379,
"src": "419:10:4",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "419:10:4"
}
],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 394,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 393,
"name": "newAddress",
"nodeType": "VariableDeclaration",
"scope": 411,
"src": "392:18:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 392,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "392:7:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "391:20:4"
},
"payable": false,
"returnParameters": {
"id": 397,
"nodeType": "ParameterList",
"parameters": [],
"src": "430:0:4"
},
"scope": 412,
"src": "375:171:4",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 413,
"src": "27:521:4"
}
],
"src": "0:549:4"
},
"legacyAST": {
"absolutePath": "/home/tsuberim/projects/daostack/access_control/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
412
]
},
"id": 413,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 357,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:4"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 412,
"linearizedBaseContracts": [
412
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 359,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 412,
"src": "53:20:4",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 358,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "53:7:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 361,
"name": "lastCompletedMigration",
"nodeType": "VariableDeclaration",
"scope": 412,
"src": "79:34:4",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 360,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "79:4:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 369,
"nodeType": "Block",
"src": "141:35:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 367,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 364,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 359,
"src": "151:5:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 365,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1462,
"src": "159:3:4",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 366,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "159:10:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "151:18:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 368,
"nodeType": "ExpressionStatement",
"src": "151:18:4"
}
]
},
"documentation": null,
"id": 370,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 362,
"nodeType": "ParameterList",
"parameters": [],
"src": "131:2:4"
},
"payable": false,
"returnParameters": {
"id": 363,
"nodeType": "ParameterList",
"parameters": [],
"src": "141:0:4"
},
"scope": 412,
"src": "120:56:4",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 378,
"nodeType": "Block",
"src": "204:52:4",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 375,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 372,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1462,
"src": "218:3:4",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 373,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "218:10:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 374,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 359,
"src": "232:5:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "218:19:4",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 377,
"nodeType": "IfStatement",
"src": "214:35:4",
"trueBody": {
"id": 376,
"nodeType": "PlaceholderStatement",
"src": "248:1:4"
}
}
]
},
"documentation": null,
"id": 379,
"name": "restricted",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 371,
"nodeType": "ParameterList",
"parameters": [],
"src": "201:2:4"
},
"src": "182:74:4",
"visibility": "internal"
},
{
"body": {
"id": 390,
"nodeType": "Block",
"src": "318:51:4",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 388,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 386,
"name": "lastCompletedMigration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 361,
"src": "328:22:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 387,
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 381,
"src": "353:9:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "328:34:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 389,
"nodeType": "ExpressionStatement",
"src": "328:34:4"
}
]
},
"documentation": null,
"id": 391,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 384,
"modifierName": {
"argumentTypes": null,
"id": 383,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 379,
"src": "307:10:4",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "307:10:4"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 382,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 381,
"name": "completed",
"nodeType": "VariableDeclaration",
"scope": 391,
"src": "284:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 380,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "284:4:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "283:16:4"
},
"payable": false,
"returnParameters": {
"id": 385,
"nodeType": "ParameterList",
"parameters": [],
"src": "318:0:4"
},
"scope": 412,
"src": "262:107:4",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 410,
"nodeType": "Block",
"src": "430:116:4",
"statements": [
{
"assignments": [
399
],
"declarations": [
{
"constant": false,
"id": 399,
"name": "upgraded",
"nodeType": "VariableDeclaration",
"scope": 411,
"src": "440:19:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$412",
"typeString": "contract Migrations"
},
"typeName": {
"contractScope": null,
"id": 398,
"name": "Migrations",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 412,
"src": "440:10:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$412",
"typeString": "contract Migrations"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 403,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 401,
"name": "newAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 393,
"src": "473:10:4",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 400,
"name": "Migrations",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 412,
"src": "462:10:4",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Migrations_$412_$",
"typeString": "type(contract Migrations)"
}
},
"id": 402,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "462:22:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$412",
"typeString": "contract Migrations"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "440:44:4"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 407,
"name": "lastCompletedMigration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 361,
"src": "516:22:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 404,
"name": "upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 399,
"src": "494:8:4",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$412",
"typeString": "contract Migrations"
}
},
"id": 406,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCompleted",
"nodeType": "MemberAccess",
"referencedDeclaration": 391,
"src": "494:21:4",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256) external"
}
},
"id": 408,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "494:45:4",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 409,
"nodeType": "ExpressionStatement",
"src": "494:45:4"
}
]
},
"documentation": null,
"id": 411,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 396,
"modifierName": {
"argumentTypes": null,
"id": 395,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 379,
"src": "419:10:4",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "419:10:4"
}
],
"name": "upgrade",
"nodeType": "F