1379 lines
51 KiB
JSON
1379 lines
51 KiB
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"
|
|
}
|
|
],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"new_address\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"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\"},{\"constant\":false,\"inputs\":[{\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/mmv/work/safe-react/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"/home/mmv/work/safe-react/contracts/Migrations.sol\":{\"keccak256\":\"0x30af91a38d74f2c905faadbc4efd95a911625ffef0f13675a3501060e646705c\",\"urls\":[\"bzzr://b8dd34982b6c50cf2f1927c0b23967ab5b77ca4a0a7a8068fd79a86a968fb3ab\"]}},\"version\":1}",
|
|
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b031916331790556101aa806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea165627a7a72305820d6f9d332fd4035368bdb390fc28d3f94281609485f5e5638d949f78492c92eb70029",
|
|
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea165627a7a72305820d6f9d332fd4035368bdb390fc28d3f94281609485f5e5638d949f78492c92eb70029",
|
|
"sourceMap": "25:481:1:-;;;177:51;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;205:5:1;:18;;-1:-1:-1;;;;;;205:18:1;213:10;205:18;;;25:481;;;;;;",
|
|
"deployedSourceMap": "25:481:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:481:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;339:165;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;339:165:1;-1:-1:-1;;;;;339:165:1;;:::i;:::-;;73:36;;;:::i;:::-;;;;;;;;;;;;;;;;49:20;;;:::i;:::-;;;;-1:-1:-1;;;;;49:20:1;;;;;;;;;;;;;;232:103;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;232:103:1;;:::i;339:165::-;160:5;;-1:-1:-1;;;;;160:5:1;146:10;:19;142:26;;;401:19;434:11;401:45;;452:8;-1:-1:-1;;;;;452:21:1;;474:24;;452:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;452:47:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;452:47:1;;;;167:1;142:26;339:165;:::o;73:36::-;;;;:::o;49:20::-;;;-1:-1:-1;;;;;49:20:1;;:::o;232:103::-;160:5;;-1:-1:-1;;;;;160:5:1;146:10;:19;142:26;;;294:24;:36;232:103::o",
|
|
"source": "pragma solidity ^0.5.2;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n constructor () public {\n owner = msg.sender;\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}",
|
|
"sourcePath": "/home/mmv/work/safe-react/contracts/Migrations.sol",
|
|
"ast": {
|
|
"absolutePath": "/home/mmv/work/safe-react/contracts/Migrations.sol",
|
|
"exportedSymbols": {
|
|
"Migrations": [
|
|
61
|
|
]
|
|
},
|
|
"id": 62,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 6,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.5",
|
|
".2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:1"
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 61,
|
|
"linearizedBaseContracts": [
|
|
61
|
|
],
|
|
"name": "Migrations",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": false,
|
|
"id": 8,
|
|
"name": "owner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 61,
|
|
"src": "49:20:1",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 7,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "49:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10,
|
|
"name": "last_completed_migration",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 61,
|
|
"src": "73:36:1",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "73:4:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 18,
|
|
"nodeType": "Block",
|
|
"src": "136:37:1",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 15,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 12,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1578,
|
|
"src": "146:3:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "146:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 14,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8,
|
|
"src": "160:5:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "146:19:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 17,
|
|
"nodeType": "IfStatement",
|
|
"src": "142:26:1",
|
|
"trueBody": {
|
|
"id": 16,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "167:1:1"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 19,
|
|
"name": "restricted",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 11,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "133:2:1"
|
|
},
|
|
"src": "114:59:1",
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 27,
|
|
"nodeType": "Block",
|
|
"src": "199:29:1",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 25,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 22,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8,
|
|
"src": "205:5:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 23,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1578,
|
|
"src": "213:3:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 24,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "213:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "205:18:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 26,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "205:18:1"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 28,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 20,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "189:2:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 21,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "199:0:1"
|
|
},
|
|
"scope": 61,
|
|
"src": "177:51:1",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 39,
|
|
"nodeType": "Block",
|
|
"src": "288:47:1",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 37,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 35,
|
|
"name": "last_completed_migration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10,
|
|
"src": "294:24:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 36,
|
|
"name": "completed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 30,
|
|
"src": "321:9:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "294:36:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 38,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "294:36:1"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 40,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 33,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 32,
|
|
"name": "restricted",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 19,
|
|
"src": "277:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "277:10:1"
|
|
}
|
|
],
|
|
"name": "setCompleted",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 31,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 30,
|
|
"name": "completed",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 40,
|
|
"src": "254:14:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 29,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "254:4:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "253:16:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 34,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "288:0:1"
|
|
},
|
|
"scope": 61,
|
|
"src": "232:103:1",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 59,
|
|
"nodeType": "Block",
|
|
"src": "395:109:1",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
48
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 48,
|
|
"name": "upgraded",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 59,
|
|
"src": "401:19:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Migrations_$61",
|
|
"typeString": "contract Migrations"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 47,
|
|
"name": "Migrations",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 61,
|
|
"src": "401:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Migrations_$61",
|
|
"typeString": "contract Migrations"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 52,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 50,
|
|
"name": "new_address",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 42,
|
|
"src": "434:11:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 49,
|
|
"name": "Migrations",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 61,
|
|
"src": "423:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Migrations_$61_$",
|
|
"typeString": "type(contract Migrations)"
|
|
}
|
|
},
|
|
"id": 51,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "423:23:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Migrations_$61",
|
|
"typeString": "contract Migrations"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "401:45:1"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 56,
|
|
"name": "last_completed_migration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10,
|
|
"src": "474:24:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 53,
|
|
"name": "upgraded",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 48,
|
|
"src": "452:8:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Migrations_$61",
|
|
"typeString": "contract Migrations"
|
|
}
|
|
},
|
|
"id": 55,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "setCompleted",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 40,
|
|
"src": "452:21:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256) external"
|
|
}
|
|
},
|
|
"id": 57,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "452:47:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 58,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "452:47:1"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 60,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 45,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 44,
|
|
"name": "restricted",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 19,
|
|
"src": "384:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "384:10:1"
|
|
}
|
|
],
|
|
"name": "upgrade",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 43,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 42,
|
|
"name": "new_address",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 60,
|
|
"src": "356:19:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 41,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "356:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "355:21:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 46,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "395:0:1"
|
|
},
|
|
"scope": 61,
|
|
"src": "339:165:1",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 62,
|
|
"src": "25:481:1"
|
|
}
|
|
],
|
|
"src": "0:506:1"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/home/mmv/work/safe-react/contracts/Migrations.sol",
|
|
"exportedSymbols": {
|
|
"Migrations": [
|
|
61
|
|
]
|
|
},
|
|
"id": 62,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 6,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.5",
|
|
".2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:1"
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 61,
|
|
"linearizedBaseContracts": [
|
|
61
|
|
],
|
|
"name": "Migrations",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": false,
|
|
"id": 8,
|
|
"name": "owner",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 61,
|
|
"src": "49:20:1",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 7,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "49:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10,
|
|
"name": "last_completed_migration",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 61,
|
|
"src": "73:36:1",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 9,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "73:4:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 18,
|
|
"nodeType": "Block",
|
|
"src": "136:37:1",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 15,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 12,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1578,
|
|
"src": "146:3:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "146:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 14,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8,
|
|
"src": "160:5:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "146:19:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 17,
|
|
"nodeType": "IfStatement",
|
|
"src": "142:26:1",
|
|
"trueBody": {
|
|
"id": 16,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "167:1:1"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 19,
|
|
"name": "restricted",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 11,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "133:2:1"
|
|
},
|
|
"src": "114:59:1",
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 27,
|
|
"nodeType": "Block",
|
|
"src": "199:29:1",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 25,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 22,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8,
|
|
"src": "205:5:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 23,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1578,
|
|
"src": "213:3:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 24,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "213:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"src": "205:18:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 26,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "205:18:1"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 28,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 20,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "189:2:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 21,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "199:0:1"
|
|
},
|
|
"scope": 61,
|
|
"src": "177:51:1",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 39,
|
|
"nodeType": "Block",
|
|
"src": "288:47:1",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 37,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 35,
|
|
"name": "last_completed_migration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10,
|
|
"src": "294:24:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 36,
|
|
"name": "completed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 30,
|
|
"src": "321:9:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "294:36:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 38,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "294:36:1"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 40,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 33,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 32,
|
|
"name": "restricted",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 19,
|
|
"src": "277:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "277:10:1"
|
|
}
|
|
],
|
|
"name": "setCompleted",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 31,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 30,
|
|
"name": "completed",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 40,
|
|
"src": "254:14:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 29,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "254:4:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "253:16:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 34,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "288:0:1"
|
|
},
|
|
"scope": 61,
|
|
"src": "232:103:1",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 59,
|
|
"nodeType": "Block",
|
|
"src": "395:109:1",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
48
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 48,
|
|
"name": "upgraded",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 59,
|
|
"src": "401:19:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Migrations_$61",
|
|
"typeString": "contract Migrations"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 47,
|
|
"name": "Migrations",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 61,
|
|
"src": "401:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Migrations_$61",
|
|
"typeString": "contract Migrations"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 52,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 50,
|
|
"name": "new_address",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 42,
|
|
"src": "434:11:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 49,
|
|
"name": "Migrations",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 61,
|
|
"src": "423:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Migrations_$61_$",
|
|
"typeString": "type(contract Migrations)"
|
|
}
|
|
},
|
|
"id": 51,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "423:23:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Migrations_$61",
|
|
"typeString": "contract Migrations"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "401:45:1"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 56,
|
|
"name": "last_completed_migration",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10,
|
|
"src": "474:24:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 53,
|
|
"name": "upgraded",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 48,
|
|
"src": "452:8:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Migrations_$61",
|
|
"typeString": "contract Migrations"
|
|
}
|
|
},
|
|
"id": 55,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "setCompleted",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 40,
|
|
"src": "452:21:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256) external"
|
|
}
|
|
},
|
|
"id": 57,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "452:47:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 58,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "452:47:1"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 60,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 45,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 44,
|
|
"name": "restricted",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 19,
|
|
"src": "384:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "384:10:1"
|
|
}
|
|
],
|
|
"name": "upgrade",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 43,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 42,
|
|
"name": "new_address",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 60,
|
|
"src": "356:19:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 41,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "356:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "355:21:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 46,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "395:0:1"
|
|
},
|
|
"scope": 61,
|
|
"src": "339:165:1",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 62,
|
|
"src": "25:481:1"
|
|
}
|
|
],
|
|
"src": "0:506:1"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.5.8+commit.23d335f2.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.0.10",
|
|
"updatedAt": "2019-05-31T13:47:05.344Z",
|
|
"devdoc": {
|
|
"methods": {}
|
|
},
|
|
"userdoc": {
|
|
"methods": {}
|
|
}
|
|
} |