safe-react/safe-contracts/build/contracts/Migrations.json

1387 lines
52 KiB
JSON
Raw Normal View History

2018-05-31 13:01:02 +00:00
{
"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": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102f8806100606000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100aa5780638da5cb5b146100d5578063fdacd5761461012c575b600080fd5b34801561007357600080fd5b506100a8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610159565b005b3480156100b657600080fd5b506100bf610241565b6040518082815260200191505060405180910390f35b3480156100e157600080fd5b506100ea610247565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013857600080fd5b506101576004803603810190808035906020019092919050505061026c565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561023d578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561022457600080fd5b505af1158015610238573d6000803e3d6000fd5b505050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102c957806001819055505b505600a165627a7a72305820395a1faf61b0f17e3924c1d3e3b1152739b523adb57dd5b79bb0bea6897a5ff70029",
"deployedBytecode": "0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100aa5780638da5cb5b146100d5578063fdacd5761461012c575b600080fd5b34801561007357600080fd5b506100a8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610159565b005b3480156100b657600080fd5b506100bf610241565b6040518082815260200191505060405180910390f35b3480156100e157600080fd5b506100ea610247565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013857600080fd5b506101576004803603810190808035906020019092919050505061026c565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561023d578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561022457600080fd5b505af1158015610238573d6000803e3d6000fd5b505050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102c957806001819055505b505600a165627a7a72305820395a1faf61b0f17e3924c1d3e3b1152739b523adb57dd5b79bb0bea6897a5ff70029",
"sourceMap": "25:572:6:-;;;191:68;8:9:-1;5:2;;;30:1;27;20:12;5:2;191:68:6;242:10;234:5;;:18;;;;;;;;;;;;;;;;;;25:572;;;;;;",
"deployedSourceMap": "25:572:6:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;400:195;;8:9:-1;5:2;;;30:1;27;20:12;5:2;400:195:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;77:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;77:36:6;;;;;;;;;;;;;;;;;;;;;;;51:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;51:20:6;;;;;;;;;;;;;;;;;;;;;;;;;;;265:129;;8:9:-1;5:2;;;30:1;27;20:12;5:2;265:129:6;;;;;;;;;;;;;;;;;;;;;;;;;;400:195;486:19;170:5;;;;;;;;;;;156:19;;:10;:19;;;152:26;;;519:11;486:45;;541:8;:21;;;563:24;;541:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;541:47:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;541:47:6;;;;152:26;400:195;;:::o;77:36::-;;;;:::o;51:20::-;;;;;;;;;;;;;:::o;265:129::-;170:5;;;;;;;;;;;156:19;;:10;:19;;;152:26;;;378:9;351:24;:36;;;;152:26;265:129;:::o",
"source": "pragma solidity ^0.4.4;\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()\n public\n {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed)\n public\n restricted\n {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address)\n public\n restricted\n {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n",
"sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Migrations.sol",
"ast": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
689
2018-05-31 13:01:02 +00:00
]
},
"id": 690,
2018-05-31 13:01:02 +00:00
"nodeType": "SourceUnit",
"nodes": [
{
"id": 634,
2018-05-31 13:01:02 +00:00
"literals": [
"solidity",
"^",
"0.4",
".4"
],
"nodeType": "PragmaDirective",
"src": "0:23:6"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 689,
2018-05-31 13:01:02 +00:00
"linearizedBaseContracts": [
689
2018-05-31 13:01:02 +00:00
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 636,
2018-05-31 13:01:02 +00:00
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 689,
2018-05-31 13:01:02 +00:00
"src": "51:20:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 635,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "51:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 638,
2018-05-31 13:01:02 +00:00
"name": "last_completed_migration",
"nodeType": "VariableDeclaration",
"scope": 689,
2018-05-31 13:01:02 +00:00
"src": "77:36:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 637,
2018-05-31 13:01:02 +00:00
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "77:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 646,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "142:43:6",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 643,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 640,
2018-05-31 13:01:02 +00:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2659,
2018-05-31 13:01:02 +00:00
"src": "156:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 641,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "156:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 642,
2018-05-31 13:01:02 +00:00
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 636,
2018-05-31 13:01:02 +00:00
"src": "170:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "156:19:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 645,
2018-05-31 13:01:02 +00:00
"nodeType": "IfStatement",
"src": "152:26:6",
"trueBody": {
"id": 644,
2018-05-31 13:01:02 +00:00
"nodeType": "PlaceholderStatement",
"src": "177:1:6"
}
}
]
},
"documentation": null,
"id": 647,
2018-05-31 13:01:02 +00:00
"name": "restricted",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 639,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "139:2:6"
},
"src": "120:65:6",
"visibility": "internal"
},
{
"body": {
"id": 655,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "224:35:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 653,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 650,
2018-05-31 13:01:02 +00:00
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 636,
2018-05-31 13:01:02 +00:00
"src": "234:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 651,
2018-05-31 13:01:02 +00:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2659,
2018-05-31 13:01:02 +00:00
"src": "242:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 652,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "242:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "234:18:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 654,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "234:18:6"
}
]
},
"documentation": null,
"id": 656,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 648,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "202:2:6"
},
"payable": false,
"returnParameters": {
"id": 649,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "224:0:6"
},
"scope": 689,
2018-05-31 13:01:02 +00:00
"src": "191:68:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 667,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "341:53:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 665,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 663,
2018-05-31 13:01:02 +00:00
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 638,
2018-05-31 13:01:02 +00:00
"src": "351:24:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 664,
2018-05-31 13:01:02 +00:00
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 658,
2018-05-31 13:01:02 +00:00
"src": "378:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "351:36:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 666,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "351:36:6"
}
]
},
"documentation": null,
"id": 668,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 661,
2018-05-31 13:01:02 +00:00
"modifierName": {
"argumentTypes": null,
"id": 660,
2018-05-31 13:01:02 +00:00
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 647,
2018-05-31 13:01:02 +00:00
"src": "326:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "326:10:6"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 659,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 658,
2018-05-31 13:01:02 +00:00
"name": "completed",
"nodeType": "VariableDeclaration",
"scope": 668,
2018-05-31 13:01:02 +00:00
"src": "287:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 657,
2018-05-31 13:01:02 +00:00
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "287:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "286:16:6"
},
"payable": false,
"returnParameters": {
"id": 662,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "341:0:6"
},
"scope": 689,
2018-05-31 13:01:02 +00:00
"src": "265:129:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 687,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "476:119:6",
"statements": [
{
"assignments": [
676
2018-05-31 13:01:02 +00:00
],
"declarations": [
{
"constant": false,
"id": 676,
2018-05-31 13:01:02 +00:00
"name": "upgraded",
"nodeType": "VariableDeclaration",
"scope": 688,
2018-05-31 13:01:02 +00:00
"src": "486:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$689",
2018-05-31 13:01:02 +00:00
"typeString": "contract Migrations"
},
"typeName": {
"contractScope": null,
"id": 675,
2018-05-31 13:01:02 +00:00
"name": "Migrations",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 689,
2018-05-31 13:01:02 +00:00
"src": "486:10:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$689",
2018-05-31 13:01:02 +00:00
"typeString": "contract Migrations"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 680,
2018-05-31 13:01:02 +00:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 678,
2018-05-31 13:01:02 +00:00
"name": "new_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 670,
2018-05-31 13:01:02 +00:00
"src": "519:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 677,
2018-05-31 13:01:02 +00:00
"name": "Migrations",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 689,
2018-05-31 13:01:02 +00:00
"src": "508:10:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Migrations_$689_$",
2018-05-31 13:01:02 +00:00
"typeString": "type(contract Migrations)"
}
},
"id": 679,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "508:23:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$689",
2018-05-31 13:01:02 +00:00
"typeString": "contract Migrations"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "486:45:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 684,
2018-05-31 13:01:02 +00:00
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 638,
2018-05-31 13:01:02 +00:00
"src": "563:24:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 681,
2018-05-31 13:01:02 +00:00
"name": "upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 676,
2018-05-31 13:01:02 +00:00
"src": "541:8:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$689",
2018-05-31 13:01:02 +00:00
"typeString": "contract Migrations"
}
},
"id": 683,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCompleted",
"nodeType": "MemberAccess",
"referencedDeclaration": 668,
2018-05-31 13:01:02 +00:00
"src": "541:21:6",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256) external"
}
},
"id": 685,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "541:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 686,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "541:47:6"
}
]
},
"documentation": null,
"id": 688,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 673,
2018-05-31 13:01:02 +00:00
"modifierName": {
"argumentTypes": null,
"id": 672,
2018-05-31 13:01:02 +00:00
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 647,
2018-05-31 13:01:02 +00:00
"src": "461:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "461:10:6"
}
],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 671,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 670,
2018-05-31 13:01:02 +00:00
"name": "new_address",
"nodeType": "VariableDeclaration",
"scope": 688,
2018-05-31 13:01:02 +00:00
"src": "417:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 669,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "417:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "416:21:6"
},
"payable": false,
"returnParameters": {
"id": 674,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "476:0:6"
},
"scope": 689,
2018-05-31 13:01:02 +00:00
"src": "400:195:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 690,
2018-05-31 13:01:02 +00:00
"src": "25:572:6"
}
],
"src": "0:598:6"
},
"legacyAST": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Migrations.sol",
"exportedSymbols": {
"Migrations": [
689
2018-05-31 13:01:02 +00:00
]
},
"id": 690,
2018-05-31 13:01:02 +00:00
"nodeType": "SourceUnit",
"nodes": [
{
"id": 634,
2018-05-31 13:01:02 +00:00
"literals": [
"solidity",
"^",
"0.4",
".4"
],
"nodeType": "PragmaDirective",
"src": "0:23:6"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 689,
2018-05-31 13:01:02 +00:00
"linearizedBaseContracts": [
689
2018-05-31 13:01:02 +00:00
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 636,
2018-05-31 13:01:02 +00:00
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 689,
2018-05-31 13:01:02 +00:00
"src": "51:20:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 635,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "51:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 638,
2018-05-31 13:01:02 +00:00
"name": "last_completed_migration",
"nodeType": "VariableDeclaration",
"scope": 689,
2018-05-31 13:01:02 +00:00
"src": "77:36:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 637,
2018-05-31 13:01:02 +00:00
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "77:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 646,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "142:43:6",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 643,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 640,
2018-05-31 13:01:02 +00:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2659,
2018-05-31 13:01:02 +00:00
"src": "156:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 641,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "156:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 642,
2018-05-31 13:01:02 +00:00
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 636,
2018-05-31 13:01:02 +00:00
"src": "170:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "156:19:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 645,
2018-05-31 13:01:02 +00:00
"nodeType": "IfStatement",
"src": "152:26:6",
"trueBody": {
"id": 644,
2018-05-31 13:01:02 +00:00
"nodeType": "PlaceholderStatement",
"src": "177:1:6"
}
}
]
},
"documentation": null,
"id": 647,
2018-05-31 13:01:02 +00:00
"name": "restricted",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 639,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "139:2:6"
},
"src": "120:65:6",
"visibility": "internal"
},
{
"body": {
"id": 655,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "224:35:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 653,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 650,
2018-05-31 13:01:02 +00:00
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 636,
2018-05-31 13:01:02 +00:00
"src": "234:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 651,
2018-05-31 13:01:02 +00:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2659,
2018-05-31 13:01:02 +00:00
"src": "242:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 652,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "242:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "234:18:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 654,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "234:18:6"
}
]
},
"documentation": null,
"id": 656,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 648,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "202:2:6"
},
"payable": false,
"returnParameters": {
"id": 649,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "224:0:6"
},
"scope": 689,
2018-05-31 13:01:02 +00:00
"src": "191:68:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 667,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "341:53:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 665,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 663,
2018-05-31 13:01:02 +00:00
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 638,
2018-05-31 13:01:02 +00:00
"src": "351:24:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 664,
2018-05-31 13:01:02 +00:00
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 658,
2018-05-31 13:01:02 +00:00
"src": "378:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "351:36:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 666,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "351:36:6"
}
]
},
"documentation": null,
"id": 668,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 661,
2018-05-31 13:01:02 +00:00
"modifierName": {
"argumentTypes": null,
"id": 660,
2018-05-31 13:01:02 +00:00
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 647,
2018-05-31 13:01:02 +00:00
"src": "326:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "326:10:6"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 659,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 658,
2018-05-31 13:01:02 +00:00
"name": "completed",
"nodeType": "VariableDeclaration",
"scope": 668,
2018-05-31 13:01:02 +00:00
"src": "287:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 657,
2018-05-31 13:01:02 +00:00
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "287:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "286:16:6"
},
"payable": false,
"returnParameters": {
"id": 662,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "341:0:6"
},
"scope": 689,
2018-05-31 13:01:02 +00:00
"src": "265:129:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 687,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "476:119:6",
"statements": [
{
"assignments": [
676
2018-05-31 13:01:02 +00:00
],
"declarations": [
{
"constant": false,
"id": 676,
2018-05-31 13:01:02 +00:00
"name": "upgraded",
"nodeType": "VariableDeclaration",
"scope": 688,
2018-05-31 13:01:02 +00:00
"src": "486:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$689",
2018-05-31 13:01:02 +00:00
"typeString": "contract Migrations"
},
"typeName": {
"contractScope": null,
"id": 675,
2018-05-31 13:01:02 +00:00
"name": "Migrations",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 689,
2018-05-31 13:01:02 +00:00
"src": "486:10:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$689",
2018-05-31 13:01:02 +00:00
"typeString": "contract Migrations"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 680,
2018-05-31 13:01:02 +00:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 678,
2018-05-31 13:01:02 +00:00
"name": "new_address",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 670,
2018-05-31 13:01:02 +00:00
"src": "519:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 677,
2018-05-31 13:01:02 +00:00
"name": "Migrations",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 689,
2018-05-31 13:01:02 +00:00
"src": "508:10:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Migrations_$689_$",
2018-05-31 13:01:02 +00:00
"typeString": "type(contract Migrations)"
}
},
"id": 679,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "508:23:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$689",
2018-05-31 13:01:02 +00:00
"typeString": "contract Migrations"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "486:45:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 684,
2018-05-31 13:01:02 +00:00
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 638,
2018-05-31 13:01:02 +00:00
"src": "563:24:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 681,
2018-05-31 13:01:02 +00:00
"name": "upgraded",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 676,
2018-05-31 13:01:02 +00:00
"src": "541:8:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Migrations_$689",
2018-05-31 13:01:02 +00:00
"typeString": "contract Migrations"
}
},
"id": 683,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setCompleted",
"nodeType": "MemberAccess",
"referencedDeclaration": 668,
2018-05-31 13:01:02 +00:00
"src": "541:21:6",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256) external"
}
},
"id": 685,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "541:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 686,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "541:47:6"
}
]
},
"documentation": null,
"id": 688,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 673,
2018-05-31 13:01:02 +00:00
"modifierName": {
"argumentTypes": null,
"id": 672,
2018-05-31 13:01:02 +00:00
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 647,
2018-05-31 13:01:02 +00:00
"src": "461:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "461:10:6"
}
],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 671,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 670,
2018-05-31 13:01:02 +00:00
"name": "new_address",
"nodeType": "VariableDeclaration",
"scope": 688,
2018-05-31 13:01:02 +00:00
"src": "417:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 669,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "417:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "416:21:6"
},
"payable": false,
"returnParameters": {
"id": 674,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "476:0:6"
},
"scope": 689,
2018-05-31 13:01:02 +00:00
"src": "400:195:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 690,
2018-05-31 13:01:02 +00:00
"src": "25:572:6"
}
],
"src": "0:598:6"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {
"1530197641790": {
2018-06-15 09:08:51 +00:00
"events": {},
"links": {},
"address": "0xcf48702e524286e7c578496f35d61e0b18d22524",
"transactionHash": "0xaba6cf32ac0288fa6af4d570636b6d5d74c52df2763e8e360b286bd531711331"
2018-05-31 13:01:02 +00:00
}
},
"schemaVersion": "2.0.1",
"updatedAt": "2018-06-28T15:26:58.214Z"
2018-05-31 13:01:02 +00:00
}