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

1060 lines
41 KiB
JSON
Raw Normal View History

2018-05-31 13:01:02 +00:00
{
"contractName": "Proxy",
"abi": [
{
"inputs": [
{
"name": "_masterCopy",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"constant": true,
"inputs": [],
"name": "implementation",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "proxyType",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
}
],
2018-09-26 09:19:53 +00:00
"bytecode": "0x608060405234801561001057600080fd5b506040516020806102a38339810180604052810190808051906020019092919050505060008173ffffffffffffffffffffffffffffffffffffffff16141515156100e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f496e76616c6964206d617374657220636f707920616464726573732070726f7681526020017f696465640000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061016b806101386000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634555d5c91461008b5780635c60da1b146100b6575b73ffffffffffffffffffffffffffffffffffffffff600054163660008037600080366000845af43d6000803e6000811415610086573d6000fd5b3d6000f35b34801561009757600080fd5b506100a061010d565b6040518082815260200191505060405180910390f35b3480156100c257600080fd5b506100cb610116565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006002905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a72305820aeb00387246db55c17338bd7ef9b5b2e6db9a2a81ab640f7b12e1488be97fe9f0029",
"deployedBytecode": "0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634555d5c91461008b5780635c60da1b146100b6575b73ffffffffffffffffffffffffffffffffffffffff600054163660008037600080366000845af43d6000803e6000811415610086573d6000fd5b3d6000f35b34801561009757600080fd5b506100a061010d565b6040518082815260200191505060405180910390f35b3480156100c257600080fd5b506100cb610116565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006002905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a72305820aeb00387246db55c17338bd7ef9b5b2e6db9a2a81ab640f7b12e1488be97fe9f0029",
"sourceMap": "190:1342:23:-;;;508:168;8:9:-1;5:2;;;30:1;27;20:12;5:2;508:168:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;593:1;578:11;:16;;;;570:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;658:11;645:10;;:24;;;;;;;;;;;;;;;;;;508:168;190:1342;;;;;;",
"deployedSourceMap": "190:1342:23:-;;;;;;;;;;;;;;;;;;;;;;;;;;955:42;951:1;945:8;941:57;1030:14;1027:1;1024;1011:34;1125:1;1122;1106:14;1103:1;1091:10;1086:3;1073:54;1161:16;1158:1;1155;1140:38;1206:1;1197:7;1194:14;1191:2;;;1221:16;1218:1;1211:27;1191:2;1263:16;1260:1;1253:27;1426:104;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1426:104:23;;;;;;;;;;;;;;;;;;;;;;;1302:118;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1302:118:23;;;;;;;;;;;;;;;;;;;;;;;;;;;1426:104;1492:7;1522:1;1515:8;;1426:104;:::o;1302:118::-;1373:7;1403:10;;;;;;;;;;;1396:17;;1302:118;:::o",
2018-05-31 13:01:02 +00:00
"source": "pragma solidity 0.4.24;\n\n\n/// @title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract Proxy {\n\n // masterCopy always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.\n address masterCopy;\n\n /// @dev Constructor function sets address of master copy contract.\n /// @param _masterCopy Master copy address.\n constructor(address _masterCopy)\n public\n {\n require(_masterCopy != 0, \"Invalid master copy address provided\");\n masterCopy = _masterCopy;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n function ()\n external\n payable\n {\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n let masterCopy := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(gas, masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if eq(success, 0) { revert(0, returndatasize()) }\n return(0, returndatasize())\n }\n }\n\n function implementation()\n public\n view\n returns (address)\n {\n return masterCopy;\n }\n\n function proxyType()\n public\n pure\n returns (uint256)\n {\n return 2;\n }\n}\n",
2018-09-26 09:19:53 +00:00
"sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/proxies/Proxy.sol",
2018-05-31 13:01:02 +00:00
"ast": {
2018-09-26 09:19:53 +00:00
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/proxies/Proxy.sol",
2018-05-31 13:01:02 +00:00
"exportedSymbols": {
"Proxy": [
2018-09-26 09:19:53 +00:00
2840
2018-05-31 13:01:02 +00:00
]
},
2018-09-26 09:19:53 +00:00
"id": 2841,
2018-05-31 13:01:02 +00:00
"nodeType": "SourceUnit",
"nodes": [
{
2018-09-26 09:19:53 +00:00
"id": 2799,
2018-05-31 13:01:02 +00:00
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
2018-09-26 09:19:53 +00:00
"src": "0:23:23"
2018-05-31 13:01:02 +00:00
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - <stefan@gnosis.pm>",
"fullyImplemented": true,
2018-09-26 09:19:53 +00:00
"id": 2840,
2018-05-31 13:01:02 +00:00
"linearizedBaseContracts": [
2018-09-26 09:19:53 +00:00
2840
2018-05-31 13:01:02 +00:00
],
"name": "Proxy",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
2018-09-26 09:19:53 +00:00
"id": 2801,
2018-05-31 13:01:02 +00:00
"name": "masterCopy",
"nodeType": "VariableDeclaration",
2018-09-26 09:19:53 +00:00
"scope": 2840,
"src": "363:18:23",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2018-09-26 09:19:53 +00:00
"id": 2800,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
2018-09-26 09:19:53 +00:00
"src": "363:7:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
2018-09-26 09:19:53 +00:00
"id": 2817,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
2018-09-26 09:19:53 +00:00
"src": "560:116:23",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
2018-09-26 09:19:53 +00:00
"id": 2809,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2018-09-26 09:19:53 +00:00
"id": 2807,
2018-05-31 13:01:02 +00:00
"name": "_masterCopy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2018-09-26 09:19:53 +00:00
"referencedDeclaration": 2803,
"src": "578:11:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
2018-09-26 09:19:53 +00:00
"id": 2808,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2018-09-26 09:19:53 +00:00
"src": "593:1:23",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
2018-09-26 09:19:53 +00:00
"src": "578:16:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "496e76616c6964206d617374657220636f707920616464726573732070726f7669646564",
2018-09-26 09:19:53 +00:00
"id": 2810,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2018-09-26 09:19:53 +00:00
"src": "596:38:23",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_108d84599042957b954e89d43b52f80be89321dfc114a37800028eba58dafc87",
"typeString": "literal_string \"Invalid master copy address provided\""
},
"value": "Invalid master copy address provided"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_108d84599042957b954e89d43b52f80be89321dfc114a37800028eba58dafc87",
"typeString": "literal_string \"Invalid master copy address provided\""
}
],
2018-09-26 09:19:53 +00:00
"id": 2806,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2018-10-05 15:26:48 +00:00
4018,
4019
2018-05-31 13:01:02 +00:00
],
2018-10-05 15:26:48 +00:00
"referencedDeclaration": 4019,
2018-09-26 09:19:53 +00:00
"src": "570:7:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2018-09-26 09:19:53 +00:00
"id": 2811,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2018-09-26 09:19:53 +00:00
"src": "570:65:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2018-09-26 09:19:53 +00:00
"id": 2812,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
2018-09-26 09:19:53 +00:00
"src": "570:65:23"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
2018-09-26 09:19:53 +00:00
"id": 2815,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2018-09-26 09:19:53 +00:00
"id": 2813,
2018-05-31 13:01:02 +00:00
"name": "masterCopy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2018-09-26 09:19:53 +00:00
"referencedDeclaration": 2801,
"src": "645:10:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
2018-09-26 09:19:53 +00:00
"id": 2814,
2018-05-31 13:01:02 +00:00
"name": "_masterCopy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2018-09-26 09:19:53 +00:00
"referencedDeclaration": 2803,
"src": "658:11:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2018-09-26 09:19:53 +00:00
"src": "645:24:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2018-09-26 09:19:53 +00:00
"id": 2816,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
2018-09-26 09:19:53 +00:00
"src": "645:24:23"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.",
2018-09-26 09:19:53 +00:00
"id": 2818,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
2018-09-26 09:19:53 +00:00
"id": 2804,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2018-09-26 09:19:53 +00:00
"id": 2803,
2018-05-31 13:01:02 +00:00
"name": "_masterCopy",
"nodeType": "VariableDeclaration",
2018-09-26 09:19:53 +00:00
"scope": 2818,
"src": "520:19:23",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2018-09-26 09:19:53 +00:00
"id": 2802,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
2018-09-26 09:19:53 +00:00
"src": "520:7:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2018-09-26 09:19:53 +00:00
"src": "519:21:23"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
2018-09-26 09:19:53 +00:00
"id": 2805,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
2018-09-26 09:19:53 +00:00
"src": "560:0:23"
2018-05-31 13:01:02 +00:00
},
2018-09-26 09:19:53 +00:00
"scope": 2840,
"src": "508:168:23",
2018-05-31 13:01:02 +00:00
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
2018-09-26 09:19:53 +00:00
"id": 2822,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
2018-09-26 09:19:53 +00:00
"src": "826:470:23",
2018-05-31 13:01:02 +00:00
"statements": [
{
"externalReferences": [],
2018-09-26 09:19:53 +00:00
"id": 2821,
2018-05-31 13:01:02 +00:00
"nodeType": "InlineAssembly",
"operations": "{\n let masterCopy := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(gas(), masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if eq(success, 0)\n {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n}",
2018-09-26 09:19:53 +00:00
"src": "900:396:23"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Fallback function forwards all transactions and returns all received return data.",
2018-09-26 09:19:53 +00:00
"id": 2823,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
2018-09-26 09:19:53 +00:00
"id": 2819,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
2018-09-26 09:19:53 +00:00
"src": "786:2:23"
2018-05-31 13:01:02 +00:00
},
"payable": true,
"returnParameters": {
2018-09-26 09:19:53 +00:00
"id": 2820,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
2018-09-26 09:19:53 +00:00
"src": "826:0:23"
2018-05-31 13:01:02 +00:00
},
2018-09-26 09:19:53 +00:00
"scope": 2840,
"src": "777:519:23",
2018-05-31 13:01:02 +00:00
"stateMutability": "payable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
2018-09-26 09:19:53 +00:00
"id": 2830,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
2018-09-26 09:19:53 +00:00
"src": "1386:34:23",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
2018-09-26 09:19:53 +00:00
"id": 2828,
2018-05-31 13:01:02 +00:00
"name": "masterCopy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2018-09-26 09:19:53 +00:00
"referencedDeclaration": 2801,
"src": "1403:10:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2018-09-26 09:19:53 +00:00
"functionReturnParameters": 2827,
"id": 2829,
2018-05-31 13:01:02 +00:00
"nodeType": "Return",
2018-09-26 09:19:53 +00:00
"src": "1396:17:23"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": null,
2018-09-26 09:19:53 +00:00
"id": 2831,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "implementation",
"nodeType": "FunctionDefinition",
"parameters": {
2018-09-26 09:19:53 +00:00
"id": 2824,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
2018-09-26 09:19:53 +00:00
"src": "1325:2:23"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
2018-09-26 09:19:53 +00:00
"id": 2827,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2018-09-26 09:19:53 +00:00
"id": 2826,
2018-05-31 13:01:02 +00:00
"name": "",
"nodeType": "VariableDeclaration",
2018-09-26 09:19:53 +00:00
"scope": 2831,
"src": "1373:7:23",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2018-09-26 09:19:53 +00:00
"id": 2825,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
2018-09-26 09:19:53 +00:00
"src": "1373:7:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2018-09-26 09:19:53 +00:00
"src": "1372:9:23"
2018-05-31 13:01:02 +00:00
},
2018-09-26 09:19:53 +00:00
"scope": 2840,
"src": "1302:118:23",
2018-05-31 13:01:02 +00:00
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
2018-09-26 09:19:53 +00:00
"id": 2838,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
2018-09-26 09:19:53 +00:00
"src": "1505:25:23",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "32",
2018-09-26 09:19:53 +00:00
"id": 2836,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2018-09-26 09:19:53 +00:00
"src": "1522:1:23",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
2018-09-26 09:19:53 +00:00
"functionReturnParameters": 2835,
"id": 2837,
2018-05-31 13:01:02 +00:00
"nodeType": "Return",
2018-09-26 09:19:53 +00:00
"src": "1515:8:23"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": null,
2018-09-26 09:19:53 +00:00
"id": 2839,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "proxyType",
"nodeType": "FunctionDefinition",
"parameters": {
2018-09-26 09:19:53 +00:00
"id": 2832,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
2018-09-26 09:19:53 +00:00
"src": "1444:2:23"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
2018-09-26 09:19:53 +00:00
"id": 2835,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2018-09-26 09:19:53 +00:00
"id": 2834,
2018-05-31 13:01:02 +00:00
"name": "",
"nodeType": "VariableDeclaration",
2018-09-26 09:19:53 +00:00
"scope": 2839,
"src": "1492:7:23",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2018-09-26 09:19:53 +00:00
"id": 2833,
2018-05-31 13:01:02 +00:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2018-09-26 09:19:53 +00:00
"src": "1492:7:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2018-09-26 09:19:53 +00:00
"src": "1491:9:23"
2018-05-31 13:01:02 +00:00
},
2018-09-26 09:19:53 +00:00
"scope": 2840,
"src": "1426:104:23",
2018-05-31 13:01:02 +00:00
"stateMutability": "pure",
"superFunction": null,
"visibility": "public"
}
],
2018-09-26 09:19:53 +00:00
"scope": 2841,
"src": "190:1342:23"
2018-05-31 13:01:02 +00:00
}
],
2018-09-26 09:19:53 +00:00
"src": "0:1533:23"
2018-05-31 13:01:02 +00:00
},
"legacyAST": {
2018-09-26 09:19:53 +00:00
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/proxies/Proxy.sol",
2018-05-31 13:01:02 +00:00
"exportedSymbols": {
"Proxy": [
2018-09-26 09:19:53 +00:00
2840
2018-05-31 13:01:02 +00:00
]
},
2018-09-26 09:19:53 +00:00
"id": 2841,
2018-05-31 13:01:02 +00:00
"nodeType": "SourceUnit",
"nodes": [
{
2018-09-26 09:19:53 +00:00
"id": 2799,
2018-05-31 13:01:02 +00:00
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
2018-09-26 09:19:53 +00:00
"src": "0:23:23"
2018-05-31 13:01:02 +00:00
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - <stefan@gnosis.pm>",
"fullyImplemented": true,
2018-09-26 09:19:53 +00:00
"id": 2840,
2018-05-31 13:01:02 +00:00
"linearizedBaseContracts": [
2018-09-26 09:19:53 +00:00
2840
2018-05-31 13:01:02 +00:00
],
"name": "Proxy",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
2018-09-26 09:19:53 +00:00
"id": 2801,
2018-05-31 13:01:02 +00:00
"name": "masterCopy",
"nodeType": "VariableDeclaration",
2018-09-26 09:19:53 +00:00
"scope": 2840,
"src": "363:18:23",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2018-09-26 09:19:53 +00:00
"id": 2800,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
2018-09-26 09:19:53 +00:00
"src": "363:7:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
2018-09-26 09:19:53 +00:00
"id": 2817,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
2018-09-26 09:19:53 +00:00
"src": "560:116:23",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
2018-09-26 09:19:53 +00:00
"id": 2809,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
2018-09-26 09:19:53 +00:00
"id": 2807,
2018-05-31 13:01:02 +00:00
"name": "_masterCopy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2018-09-26 09:19:53 +00:00
"referencedDeclaration": 2803,
"src": "578:11:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
2018-09-26 09:19:53 +00:00
"id": 2808,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2018-09-26 09:19:53 +00:00
"src": "593:1:23",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
2018-09-26 09:19:53 +00:00
"src": "578:16:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "496e76616c6964206d617374657220636f707920616464726573732070726f7669646564",
2018-09-26 09:19:53 +00:00
"id": 2810,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
2018-09-26 09:19:53 +00:00
"src": "596:38:23",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_108d84599042957b954e89d43b52f80be89321dfc114a37800028eba58dafc87",
"typeString": "literal_string \"Invalid master copy address provided\""
},
"value": "Invalid master copy address provided"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_108d84599042957b954e89d43b52f80be89321dfc114a37800028eba58dafc87",
"typeString": "literal_string \"Invalid master copy address provided\""
}
],
2018-09-26 09:19:53 +00:00
"id": 2806,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2018-10-05 15:26:48 +00:00
4018,
4019
2018-05-31 13:01:02 +00:00
],
2018-10-05 15:26:48 +00:00
"referencedDeclaration": 4019,
2018-09-26 09:19:53 +00:00
"src": "570:7:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
2018-09-26 09:19:53 +00:00
"id": 2811,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
2018-09-26 09:19:53 +00:00
"src": "570:65:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
2018-09-26 09:19:53 +00:00
"id": 2812,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
2018-09-26 09:19:53 +00:00
"src": "570:65:23"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
2018-09-26 09:19:53 +00:00
"id": 2815,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
2018-09-26 09:19:53 +00:00
"id": 2813,
2018-05-31 13:01:02 +00:00
"name": "masterCopy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2018-09-26 09:19:53 +00:00
"referencedDeclaration": 2801,
"src": "645:10:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
2018-09-26 09:19:53 +00:00
"id": 2814,
2018-05-31 13:01:02 +00:00
"name": "_masterCopy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2018-09-26 09:19:53 +00:00
"referencedDeclaration": 2803,
"src": "658:11:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2018-09-26 09:19:53 +00:00
"src": "645:24:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2018-09-26 09:19:53 +00:00
"id": 2816,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
2018-09-26 09:19:53 +00:00
"src": "645:24:23"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.",
2018-09-26 09:19:53 +00:00
"id": 2818,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
2018-09-26 09:19:53 +00:00
"id": 2804,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2018-09-26 09:19:53 +00:00
"id": 2803,
2018-05-31 13:01:02 +00:00
"name": "_masterCopy",
"nodeType": "VariableDeclaration",
2018-09-26 09:19:53 +00:00
"scope": 2818,
"src": "520:19:23",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2018-09-26 09:19:53 +00:00
"id": 2802,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
2018-09-26 09:19:53 +00:00
"src": "520:7:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2018-09-26 09:19:53 +00:00
"src": "519:21:23"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
2018-09-26 09:19:53 +00:00
"id": 2805,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
2018-09-26 09:19:53 +00:00
"src": "560:0:23"
2018-05-31 13:01:02 +00:00
},
2018-09-26 09:19:53 +00:00
"scope": 2840,
"src": "508:168:23",
2018-05-31 13:01:02 +00:00
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
2018-09-26 09:19:53 +00:00
"id": 2822,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
2018-09-26 09:19:53 +00:00
"src": "826:470:23",
2018-05-31 13:01:02 +00:00
"statements": [
{
"externalReferences": [],
2018-09-26 09:19:53 +00:00
"id": 2821,
2018-05-31 13:01:02 +00:00
"nodeType": "InlineAssembly",
"operations": "{\n let masterCopy := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(gas(), masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if eq(success, 0)\n {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n}",
2018-09-26 09:19:53 +00:00
"src": "900:396:23"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Fallback function forwards all transactions and returns all received return data.",
2018-09-26 09:19:53 +00:00
"id": 2823,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
2018-09-26 09:19:53 +00:00
"id": 2819,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
2018-09-26 09:19:53 +00:00
"src": "786:2:23"
2018-05-31 13:01:02 +00:00
},
"payable": true,
"returnParameters": {
2018-09-26 09:19:53 +00:00
"id": 2820,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
2018-09-26 09:19:53 +00:00
"src": "826:0:23"
2018-05-31 13:01:02 +00:00
},
2018-09-26 09:19:53 +00:00
"scope": 2840,
"src": "777:519:23",
2018-05-31 13:01:02 +00:00
"stateMutability": "payable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
2018-09-26 09:19:53 +00:00
"id": 2830,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
2018-09-26 09:19:53 +00:00
"src": "1386:34:23",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
2018-09-26 09:19:53 +00:00
"id": 2828,
2018-05-31 13:01:02 +00:00
"name": "masterCopy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
2018-09-26 09:19:53 +00:00
"referencedDeclaration": 2801,
"src": "1403:10:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
2018-09-26 09:19:53 +00:00
"functionReturnParameters": 2827,
"id": 2829,
2018-05-31 13:01:02 +00:00
"nodeType": "Return",
2018-09-26 09:19:53 +00:00
"src": "1396:17:23"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": null,
2018-09-26 09:19:53 +00:00
"id": 2831,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "implementation",
"nodeType": "FunctionDefinition",
"parameters": {
2018-09-26 09:19:53 +00:00
"id": 2824,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
2018-09-26 09:19:53 +00:00
"src": "1325:2:23"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
2018-09-26 09:19:53 +00:00
"id": 2827,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2018-09-26 09:19:53 +00:00
"id": 2826,
2018-05-31 13:01:02 +00:00
"name": "",
"nodeType": "VariableDeclaration",
2018-09-26 09:19:53 +00:00
"scope": 2831,
"src": "1373:7:23",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
2018-09-26 09:19:53 +00:00
"id": 2825,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
2018-09-26 09:19:53 +00:00
"src": "1373:7:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
2018-09-26 09:19:53 +00:00
"src": "1372:9:23"
2018-05-31 13:01:02 +00:00
},
2018-09-26 09:19:53 +00:00
"scope": 2840,
"src": "1302:118:23",
2018-05-31 13:01:02 +00:00
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
2018-09-26 09:19:53 +00:00
"id": 2838,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
2018-09-26 09:19:53 +00:00
"src": "1505:25:23",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "32",
2018-09-26 09:19:53 +00:00
"id": 2836,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
2018-09-26 09:19:53 +00:00
"src": "1522:1:23",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
2018-09-26 09:19:53 +00:00
"functionReturnParameters": 2835,
"id": 2837,
2018-05-31 13:01:02 +00:00
"nodeType": "Return",
2018-09-26 09:19:53 +00:00
"src": "1515:8:23"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": null,
2018-09-26 09:19:53 +00:00
"id": 2839,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "proxyType",
"nodeType": "FunctionDefinition",
"parameters": {
2018-09-26 09:19:53 +00:00
"id": 2832,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
2018-09-26 09:19:53 +00:00
"src": "1444:2:23"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
2018-09-26 09:19:53 +00:00
"id": 2835,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
2018-09-26 09:19:53 +00:00
"id": 2834,
2018-05-31 13:01:02 +00:00
"name": "",
"nodeType": "VariableDeclaration",
2018-09-26 09:19:53 +00:00
"scope": 2839,
"src": "1492:7:23",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
2018-09-26 09:19:53 +00:00
"id": 2833,
2018-05-31 13:01:02 +00:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
2018-09-26 09:19:53 +00:00
"src": "1492:7:23",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
2018-09-26 09:19:53 +00:00
"src": "1491:9:23"
2018-05-31 13:01:02 +00:00
},
2018-09-26 09:19:53 +00:00
"scope": 2840,
"src": "1426:104:23",
2018-05-31 13:01:02 +00:00
"stateMutability": "pure",
"superFunction": null,
"visibility": "public"
}
],
2018-09-26 09:19:53 +00:00
"scope": 2841,
"src": "190:1342:23"
2018-05-31 13:01:02 +00:00
}
],
2018-09-26 09:19:53 +00:00
"src": "0:1533:23"
2018-05-31 13:01:02 +00:00
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
2018-06-29 11:23:01 +00:00
"schemaVersion": "2.0.0",
2018-10-05 15:26:48 +00:00
"updatedAt": "2018-10-05T14:25:58.946Z"
2018-05-31 13:01:02 +00:00
}