1008 lines
41 KiB
JSON
1008 lines
41 KiB
JSON
|
{
|
||
|
"contractName": "ProxyFactory",
|
||
|
"abi": [
|
||
|
{
|
||
|
"anonymous": false,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"indexed": false,
|
||
|
"name": "proxy",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"name": "ProxyCreation",
|
||
|
"type": "event"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"name": "masterCopy",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"name": "data",
|
||
|
"type": "bytes"
|
||
|
}
|
||
|
],
|
||
|
"name": "createProxy",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "proxy",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"payable": false,
|
||
|
"stateMutability": "nonpayable",
|
||
|
"type": "function"
|
||
|
}
|
||
|
],
|
||
|
"bytecode": "0x6060604052341561000f57600080fd5b61033e8061001e6000396000f300606060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806361b69abd14610046575b600080fd5b341561005157600080fd5b6100c0600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610102565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008261010d6101f2565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f080151561015957600080fd5b905060008251111561018957600080835160208501600085600019f16000811461018257610187565b600080fd5b505b7fa38789425dbeee0239e16ff2d2567e31720127fbc6430758c1a4efc6aef29f8081604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a192915050565b604051610110806102038339019056006060604052341561000f57600080fd5b6040516020806101108339810160405280805190602001909190505060008173ffffffffffffffffffffffffffffffffffffffff161415151561005157600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506070806100a06000396000f300606060405273ffffffffffffffffffffffffffffffffffffffff60005416366000803760008036600084600019f43d6000803e8060008114603f573d6000f35b3d6000fd00a165627a7a72305820daad8330a1c74b6650ef400638bc3fcb59dcd0b0341bff33bbe640bd2ffdaff60029a165627a7a7230582016c17d280f9b2d074d821cd6f6e791d8a9100e0da9af1a0cc86af635d90935070029",
|
||
|
"deployedBytecode": "0x606060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806361b69abd14610046575b600080fd5b341561005157600080fd5b6100c0600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610102565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008261010d6101f2565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f080151561015957600080fd5b905060008251111561018957600080835160208501600085600019f16000811461018257610187565b600080fd5b505b7fa38789425dbeee0239e16ff2d2567e31720127fbc6430758c1a4efc6aef29f8081604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a192915050565b604051610110806102038339019056006060604052341561000f57600080fd5b6040516020806101108339810160405280805190602001909190505060008173ffffffffffffffffffffffffffffffffffffffff161415151561005157600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506070806100a06000396000f300606060405273ffffffffffffffffffffffffffffffffffffffff60005416366000803760008036600084600019f43d6000803e8060008114603f573d6000f35b3d6000fd00a165627a7a72305820daad8330a1c74b6650ef400638bc3fcb59dcd0b0341bff33bbe640bd2ffdaff60029a165627a7a7230582016c17d280f9b2d074d821cd6f6e791d8a9100e0da9af1a0cc86af635d90935070029",
|
||
|
"sourceMap": "225:675:4:-;;;;;;;;;;;;;;;;;",
|
||
|
"deployedSourceMap": "225:675:4:-;;;;;;;;;;;;;;;;;;;;;;;;532:366;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;617:11;662:10;652:21;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;644:29;;701:1;687:4;:11;:15;683:201;;;806:1;803;796:4;790:5;783:4;777;773:3;770:1;763:5;759:1;755:3;750:4;830:1;825:23;;;;743:105;;825:23;844:1;841;834:6;743:105;;725:137;871:20;885:5;871:20;;;;;;;;;;;;;;;;;;;;;;532:366;;;;:::o;225:675::-;;;;;;;;;;:::o",
|
||
|
"source": "pragma solidity 0.4.19;\nimport \"./Proxy.sol\";\n\n\n/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract ProxyFactory {\n\n event ProxyCreation(Proxy proxy);\n\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n /// @param masterCopy Address of master copy.\n /// @param data Payload for message call sent to new proxy contract.\n function createProxy(address masterCopy, bytes data)\n public\n returns (Proxy proxy)\n {\n proxy = new Proxy(masterCopy);\n if (data.length > 0)\n assembly {\n switch call(not(0), proxy, 0, add(data, 0x20), mload(data), 0, 0)\n case 0 { revert(0, 0) }\n }\n ProxyCreation(proxy);\n }\n}\n",
|
||
|
"sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/ProxyFactory.sol",
|
||
|
"ast": {
|
||
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/ProxyFactory.sol",
|
||
|
"exportedSymbols": {
|
||
|
"ProxyFactory": [
|
||
|
1081
|
||
|
]
|
||
|
},
|
||
|
"id": 1082,
|
||
|
"nodeType": "SourceUnit",
|
||
|
"nodes": [
|
||
|
{
|
||
|
"id": 1048,
|
||
|
"literals": [
|
||
|
"solidity",
|
||
|
"0.4",
|
||
|
".19"
|
||
|
],
|
||
|
"nodeType": "PragmaDirective",
|
||
|
"src": "0:23:4"
|
||
|
},
|
||
|
{
|
||
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Proxy.sol",
|
||
|
"file": "./Proxy.sol",
|
||
|
"id": 1049,
|
||
|
"nodeType": "ImportDirective",
|
||
|
"scope": 1082,
|
||
|
"sourceUnit": 1047,
|
||
|
"src": "24:21:4",
|
||
|
"symbolAliases": [],
|
||
|
"unitAlias": ""
|
||
|
},
|
||
|
{
|
||
|
"baseContracts": [],
|
||
|
"contractDependencies": [
|
||
|
1046
|
||
|
],
|
||
|
"contractKind": "contract",
|
||
|
"documentation": "@title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n @author Stefan George - <stefan@gnosis.pm>",
|
||
|
"fullyImplemented": true,
|
||
|
"id": 1081,
|
||
|
"linearizedBaseContracts": [
|
||
|
1081
|
||
|
],
|
||
|
"name": "ProxyFactory",
|
||
|
"nodeType": "ContractDefinition",
|
||
|
"nodes": [
|
||
|
{
|
||
|
"anonymous": false,
|
||
|
"id": 1053,
|
||
|
"name": "ProxyCreation",
|
||
|
"nodeType": "EventDefinition",
|
||
|
"parameters": {
|
||
|
"id": 1052,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1051,
|
||
|
"indexed": false,
|
||
|
"name": "proxy",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1053,
|
||
|
"src": "274:11:4",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"contractScope": null,
|
||
|
"id": 1050,
|
||
|
"name": "Proxy",
|
||
|
"nodeType": "UserDefinedTypeName",
|
||
|
"referencedDeclaration": 1046,
|
||
|
"src": "274:5:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "273:13:4"
|
||
|
},
|
||
|
"src": "254:33:4"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 1079,
|
||
|
"nodeType": "Block",
|
||
|
"src": "634:264:4",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 1067,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 1062,
|
||
|
"name": "proxy",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1060,
|
||
|
"src": "644:5:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1065,
|
||
|
"name": "masterCopy",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1055,
|
||
|
"src": "662:10:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
],
|
||
|
"id": 1064,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "NewExpression",
|
||
|
"src": "652:9:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_creation_nonpayable$_t_address_$returns$_t_contract$_Proxy_$1046_$",
|
||
|
"typeString": "function (address) returns (contract Proxy)"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"contractScope": null,
|
||
|
"id": 1063,
|
||
|
"name": "Proxy",
|
||
|
"nodeType": "UserDefinedTypeName",
|
||
|
"referencedDeclaration": 1046,
|
||
|
"src": "656:5:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"id": 1066,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "652:21:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
},
|
||
|
"src": "644:29:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
},
|
||
|
"id": 1068,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "644:29:4"
|
||
|
},
|
||
|
{
|
||
|
"condition": {
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"id": 1072,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 1069,
|
||
|
"name": "data",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1057,
|
||
|
"src": "687:4:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_memory_ptr",
|
||
|
"typeString": "bytes memory"
|
||
|
}
|
||
|
},
|
||
|
"id": 1070,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "length",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "687:11:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": ">",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 1071,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "701:1:4",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_rational_0_by_1",
|
||
|
"typeString": "int_const 0"
|
||
|
},
|
||
|
"value": "0"
|
||
|
},
|
||
|
"src": "687:15:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
"falseBody": null,
|
||
|
"id": 1074,
|
||
|
"nodeType": "IfStatement",
|
||
|
"src": "683:201:4",
|
||
|
"trueBody": {
|
||
|
"externalReferences": [
|
||
|
{
|
||
|
"data": {
|
||
|
"declaration": 1057,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "777:4:4",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"declaration": 1057,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "796:4:4",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"proxy": {
|
||
|
"declaration": 1060,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "763:5:4",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"id": 1073,
|
||
|
"nodeType": "InlineAssembly",
|
||
|
"operations": "{\n switch call(not(0), proxy, 0, add(data, 0x20), mload(data), 0, 0)\n case 0 {\n revert(0, 0)\n }\n}",
|
||
|
"src": "716:168:4"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1076,
|
||
|
"name": "proxy",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1060,
|
||
|
"src": "885:5:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
],
|
||
|
"id": 1075,
|
||
|
"name": "ProxyCreation",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1053,
|
||
|
"src": "871:13:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_event_nonpayable$_t_contract$_Proxy_$1046_$returns$__$",
|
||
|
"typeString": "function (contract Proxy)"
|
||
|
}
|
||
|
},
|
||
|
"id": 1077,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "871:20:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 1078,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "871:20:4"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"id": 1080,
|
||
|
"implemented": true,
|
||
|
"isConstructor": false,
|
||
|
"isDeclaredConst": false,
|
||
|
"modifiers": [],
|
||
|
"name": "createProxy",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 1058,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1055,
|
||
|
"name": "masterCopy",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1080,
|
||
|
"src": "553:18:4",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1054,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "553:7:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1057,
|
||
|
"name": "data",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1080,
|
||
|
"src": "573:10:4",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_memory_ptr",
|
||
|
"typeString": "bytes memory"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1056,
|
||
|
"name": "bytes",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "573:5:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_storage_ptr",
|
||
|
"typeString": "bytes storage pointer"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "552:32:4"
|
||
|
},
|
||
|
"payable": false,
|
||
|
"returnParameters": {
|
||
|
"id": 1061,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1060,
|
||
|
"name": "proxy",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1080,
|
||
|
"src": "617:11:4",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"contractScope": null,
|
||
|
"id": 1059,
|
||
|
"name": "Proxy",
|
||
|
"nodeType": "UserDefinedTypeName",
|
||
|
"referencedDeclaration": 1046,
|
||
|
"src": "617:5:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "616:13:4"
|
||
|
},
|
||
|
"scope": 1081,
|
||
|
"src": "532:366:4",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "public"
|
||
|
}
|
||
|
],
|
||
|
"scope": 1082,
|
||
|
"src": "225:675:4"
|
||
|
}
|
||
|
],
|
||
|
"src": "0:901:4"
|
||
|
},
|
||
|
"legacyAST": {
|
||
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/ProxyFactory.sol",
|
||
|
"exportedSymbols": {
|
||
|
"ProxyFactory": [
|
||
|
1081
|
||
|
]
|
||
|
},
|
||
|
"id": 1082,
|
||
|
"nodeType": "SourceUnit",
|
||
|
"nodes": [
|
||
|
{
|
||
|
"id": 1048,
|
||
|
"literals": [
|
||
|
"solidity",
|
||
|
"0.4",
|
||
|
".19"
|
||
|
],
|
||
|
"nodeType": "PragmaDirective",
|
||
|
"src": "0:23:4"
|
||
|
},
|
||
|
{
|
||
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Proxy.sol",
|
||
|
"file": "./Proxy.sol",
|
||
|
"id": 1049,
|
||
|
"nodeType": "ImportDirective",
|
||
|
"scope": 1082,
|
||
|
"sourceUnit": 1047,
|
||
|
"src": "24:21:4",
|
||
|
"symbolAliases": [],
|
||
|
"unitAlias": ""
|
||
|
},
|
||
|
{
|
||
|
"baseContracts": [],
|
||
|
"contractDependencies": [
|
||
|
1046
|
||
|
],
|
||
|
"contractKind": "contract",
|
||
|
"documentation": "@title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n @author Stefan George - <stefan@gnosis.pm>",
|
||
|
"fullyImplemented": true,
|
||
|
"id": 1081,
|
||
|
"linearizedBaseContracts": [
|
||
|
1081
|
||
|
],
|
||
|
"name": "ProxyFactory",
|
||
|
"nodeType": "ContractDefinition",
|
||
|
"nodes": [
|
||
|
{
|
||
|
"anonymous": false,
|
||
|
"id": 1053,
|
||
|
"name": "ProxyCreation",
|
||
|
"nodeType": "EventDefinition",
|
||
|
"parameters": {
|
||
|
"id": 1052,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1051,
|
||
|
"indexed": false,
|
||
|
"name": "proxy",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1053,
|
||
|
"src": "274:11:4",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"contractScope": null,
|
||
|
"id": 1050,
|
||
|
"name": "Proxy",
|
||
|
"nodeType": "UserDefinedTypeName",
|
||
|
"referencedDeclaration": 1046,
|
||
|
"src": "274:5:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "273:13:4"
|
||
|
},
|
||
|
"src": "254:33:4"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 1079,
|
||
|
"nodeType": "Block",
|
||
|
"src": "634:264:4",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 1067,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 1062,
|
||
|
"name": "proxy",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1060,
|
||
|
"src": "644:5:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1065,
|
||
|
"name": "masterCopy",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1055,
|
||
|
"src": "662:10:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
],
|
||
|
"id": 1064,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "NewExpression",
|
||
|
"src": "652:9:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_creation_nonpayable$_t_address_$returns$_t_contract$_Proxy_$1046_$",
|
||
|
"typeString": "function (address) returns (contract Proxy)"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"contractScope": null,
|
||
|
"id": 1063,
|
||
|
"name": "Proxy",
|
||
|
"nodeType": "UserDefinedTypeName",
|
||
|
"referencedDeclaration": 1046,
|
||
|
"src": "656:5:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"id": 1066,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "652:21:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
},
|
||
|
"src": "644:29:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
},
|
||
|
"id": 1068,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "644:29:4"
|
||
|
},
|
||
|
{
|
||
|
"condition": {
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"id": 1072,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 1069,
|
||
|
"name": "data",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1057,
|
||
|
"src": "687:4:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_memory_ptr",
|
||
|
"typeString": "bytes memory"
|
||
|
}
|
||
|
},
|
||
|
"id": 1070,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "length",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "687:11:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": ">",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 1071,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "701:1:4",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_rational_0_by_1",
|
||
|
"typeString": "int_const 0"
|
||
|
},
|
||
|
"value": "0"
|
||
|
},
|
||
|
"src": "687:15:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
"falseBody": null,
|
||
|
"id": 1074,
|
||
|
"nodeType": "IfStatement",
|
||
|
"src": "683:201:4",
|
||
|
"trueBody": {
|
||
|
"externalReferences": [
|
||
|
{
|
||
|
"data": {
|
||
|
"declaration": 1057,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "777:4:4",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"declaration": 1057,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "796:4:4",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"proxy": {
|
||
|
"declaration": 1060,
|
||
|
"isOffset": false,
|
||
|
"isSlot": false,
|
||
|
"src": "763:5:4",
|
||
|
"valueSize": 1
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"id": 1073,
|
||
|
"nodeType": "InlineAssembly",
|
||
|
"operations": "{\n switch call(not(0), proxy, 0, add(data, 0x20), mload(data), 0, 0)\n case 0 {\n revert(0, 0)\n }\n}",
|
||
|
"src": "716:168:4"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 1076,
|
||
|
"name": "proxy",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1060,
|
||
|
"src": "885:5:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
],
|
||
|
"id": 1075,
|
||
|
"name": "ProxyCreation",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 1053,
|
||
|
"src": "871:13:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_event_nonpayable$_t_contract$_Proxy_$1046_$returns$__$",
|
||
|
"typeString": "function (contract Proxy)"
|
||
|
}
|
||
|
},
|
||
|
"id": 1077,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "871:20:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 1078,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "871:20:4"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"id": 1080,
|
||
|
"implemented": true,
|
||
|
"isConstructor": false,
|
||
|
"isDeclaredConst": false,
|
||
|
"modifiers": [],
|
||
|
"name": "createProxy",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 1058,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1055,
|
||
|
"name": "masterCopy",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1080,
|
||
|
"src": "553:18:4",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1054,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "553:7:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1057,
|
||
|
"name": "data",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1080,
|
||
|
"src": "573:10:4",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_memory_ptr",
|
||
|
"typeString": "bytes memory"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 1056,
|
||
|
"name": "bytes",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "573:5:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bytes_storage_ptr",
|
||
|
"typeString": "bytes storage pointer"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "552:32:4"
|
||
|
},
|
||
|
"payable": false,
|
||
|
"returnParameters": {
|
||
|
"id": 1061,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 1060,
|
||
|
"name": "proxy",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 1080,
|
||
|
"src": "617:11:4",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"contractScope": null,
|
||
|
"id": 1059,
|
||
|
"name": "Proxy",
|
||
|
"nodeType": "UserDefinedTypeName",
|
||
|
"referencedDeclaration": 1046,
|
||
|
"src": "617:5:4",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_Proxy_$1046",
|
||
|
"typeString": "contract Proxy"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "616:13:4"
|
||
|
},
|
||
|
"scope": 1081,
|
||
|
"src": "532:366:4",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "public"
|
||
|
}
|
||
|
],
|
||
|
"scope": 1082,
|
||
|
"src": "225:675:4"
|
||
|
}
|
||
|
],
|
||
|
"src": "0:901:4"
|
||
|
},
|
||
|
"compiler": {
|
||
|
"name": "solc",
|
||
|
"version": "0.4.19+commit.c4cbbb05.Emscripten.clang"
|
||
|
},
|
||
|
"networks": {
|
||
|
"4": {
|
||
|
"events": {},
|
||
|
"links": {},
|
||
|
"address": "0x28442b8a4c6ffbe02fa75a1d1524b7c38ef79194",
|
||
|
"transactionHash": "0xc0e9f6268bb1b4e75e1683d0d93175523c18a23ef01bf660f6332d54ca03ad92"
|
||
|
},
|
||
|
"42": {
|
||
|
"events": {},
|
||
|
"links": {},
|
||
|
"address": "0x53294c9c8def7e613c5bc68ac232125c0a60bef7",
|
||
|
"transactionHash": "0x641afc57ac89b6f66587df51dda6b602bf35fc0feef170b48e8a047729eb8784"
|
||
|
},
|
||
|
"1525342778744": {
|
||
|
"events": {},
|
||
|
"links": {},
|
||
|
"address": "0xba6fb7147e7586b483610639adf7ad72ca52bb0f",
|
||
|
"transactionHash": "0x9eef5bbd728a1a1add6215268dd534fda491d32af43574c029fefa98eb798e03"
|
||
|
}
|
||
|
},
|
||
|
"schemaVersion": "2.0.0",
|
||
|
"updatedAt": "2018-05-04T13:47:03.959Z"
|
||
|
}
|