1072 lines
45 KiB
JSON
1072 lines
45 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": "0x608060405234801561001057600080fd5b506104dd806100206000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806361b69abd14610046575b600080fd5b34801561005257600080fd5b506100cd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061010f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008261011a6101fe565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f08015801561016c573d6000803e3d6000fd5b5090506000825111156101955760008060008451602086016000865af1141561019457600080fd5b5b7fa38789425dbeee0239e16ff2d2567e31720127fbc6430758c1a4efc6aef29f8081604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a192915050565b6040516102a38061020f833901905600608060405234801561001057600080fd5b506040516020806102a38339810180604052810190808051906020019092919050505060008173ffffffffffffffffffffffffffffffffffffffff16141515156100e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f496e76616c6964206d617374657220636f707920616464726573732070726f7681526020017f696465640000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061016b806101386000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634555d5c91461008b5780635c60da1b146100b6575b73ffffffffffffffffffffffffffffffffffffffff600054163660008037600080366000845af43d6000803e6000811415610086573d6000fd5b3d6000f35b34801561009757600080fd5b506100a061010d565b6040518082815260200191505060405180910390f35b3480156100c257600080fd5b506100cb610116565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006002905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a72305820fb8f7addc79801292900c520af66dd86a1f9d0b643abe5d3ef1ac03eeb2d04080029a165627a7a72305820c742bd15271cf4492803c598458497f17945465dfdcebd0ab4ff208e21d7becf0029",
|
|
"deployedBytecode": "0x608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806361b69abd14610046575b600080fd5b34801561005257600080fd5b506100cd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061010f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008261011a6101fe565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f08015801561016c573d6000803e3d6000fd5b5090506000825111156101955760008060008451602086016000865af1141561019457600080fd5b5b7fa38789425dbeee0239e16ff2d2567e31720127fbc6430758c1a4efc6aef29f8081604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a192915050565b6040516102a38061020f833901905600608060405234801561001057600080fd5b506040516020806102a38339810180604052810190808051906020019092919050505060008173ffffffffffffffffffffffffffffffffffffffff16141515156100e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f496e76616c6964206d617374657220636f707920616464726573732070726f7681526020017f696465640000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061016b806101386000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634555d5c91461008b5780635c60da1b146100b6575b73ffffffffffffffffffffffffffffffffffffffff600054163660008037600080366000845af43d6000803e6000811415610086573d6000fd5b3d6000f35b34801561009757600080fd5b506100a061010d565b6040518082815260200191505060405180910390f35b3480156100c257600080fd5b506100cb610116565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006002905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a72305820fb8f7addc79801292900c520af66dd86a1f9d0b643abe5d3ef1ac03eeb2d04080029a165627a7a72305820c742bd15271cf4492803c598458497f17945465dfdcebd0ab4ff208e21d7becf0029",
|
|
"sourceMap": "225:725:12:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;225:725:12;;;;;;;",
|
|
"deployedSourceMap": "225:725:12:-;;;;;;;;;;;;;;;;;;;;;;;;532:416;;8:9:-1;5:2;;;30:1;27;20:12;5:2;532:416:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;617:11;662:10;652:21;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;652:21:12;644:29;;701:1;687:4;:11;:15;683:237;;;874:1;870;867;860:4;854:11;847:4;841;837:15;834:1;827:5;822:3;817:55;814:62;811:2;;;889:1;886;879:12;811:2;793:114;921:20;935:5;921:20;;;;;;;;;;;;;;;;;;;;;;532:416;;;;:::o;225:725::-;;;;;;;;;;:::o",
|
|
"source": "pragma solidity 0.4.24;\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 // solium-disable-next-line security/no-inline-assembly\n assembly {\n if eq(call(gas, proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) { revert(0, 0) }\n }\n emit 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": [
|
|
1646
|
|
]
|
|
},
|
|
"id": 1647,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1613,
|
|
"literals": [
|
|
"solidity",
|
|
"0.4",
|
|
".24"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:12"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Proxy.sol",
|
|
"file": "./Proxy.sol",
|
|
"id": 1614,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1647,
|
|
"sourceUnit": 1612,
|
|
"src": "24:21:12",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [
|
|
1611
|
|
],
|
|
"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": 1646,
|
|
"linearizedBaseContracts": [
|
|
1646
|
|
],
|
|
"name": "ProxyFactory",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 1618,
|
|
"name": "ProxyCreation",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 1617,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1616,
|
|
"indexed": false,
|
|
"name": "proxy",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1618,
|
|
"src": "274:11:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 1615,
|
|
"name": "Proxy",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1611,
|
|
"src": "274:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "273:13:12"
|
|
},
|
|
"src": "254:33:12"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1644,
|
|
"nodeType": "Block",
|
|
"src": "634:314:12",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1632,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 1627,
|
|
"name": "proxy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1625,
|
|
"src": "644:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1630,
|
|
"name": "masterCopy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1620,
|
|
"src": "662:10:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1629,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "NewExpression",
|
|
"src": "652:9:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_creation_nonpayable$_t_address_$returns$_t_contract$_Proxy_$1611_$",
|
|
"typeString": "function (address) returns (contract Proxy)"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 1628,
|
|
"name": "Proxy",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1611,
|
|
"src": "656:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
}
|
|
},
|
|
"id": 1631,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "652:21:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
},
|
|
"src": "644:29:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
},
|
|
"id": 1633,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "644:29:12"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1637,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1634,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1622,
|
|
"src": "687:4:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 1635,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "687:11:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1636,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "701:1:12",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "687:15:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 1639,
|
|
"nodeType": "IfStatement",
|
|
"src": "683:237:12",
|
|
"trueBody": {
|
|
"externalReferences": [
|
|
{
|
|
"data": {
|
|
"declaration": 1622,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "860:4:12",
|
|
"valueSize": 1
|
|
}
|
|
},
|
|
{
|
|
"proxy": {
|
|
"declaration": 1625,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "827:5:12",
|
|
"valueSize": 1
|
|
}
|
|
},
|
|
{
|
|
"data": {
|
|
"declaration": 1622,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "841:4:12",
|
|
"valueSize": 1
|
|
}
|
|
}
|
|
],
|
|
"id": 1638,
|
|
"nodeType": "InlineAssembly",
|
|
"operations": "{\n if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0)\n {\n revert(0, 0)\n }\n}",
|
|
"src": "784:136:12"
|
|
}
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1641,
|
|
"name": "proxy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1625,
|
|
"src": "935:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
],
|
|
"id": 1640,
|
|
"name": "ProxyCreation",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1618,
|
|
"src": "921:13:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_contract$_Proxy_$1611_$returns$__$",
|
|
"typeString": "function (contract Proxy)"
|
|
}
|
|
},
|
|
"id": 1642,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "921:20:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1643,
|
|
"nodeType": "EmitStatement",
|
|
"src": "916:25:12"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@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.",
|
|
"id": 1645,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "createProxy",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1623,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1620,
|
|
"name": "masterCopy",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1645,
|
|
"src": "553:18:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1619,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "553:7:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1622,
|
|
"name": "data",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1645,
|
|
"src": "573:10:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1621,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "573:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "552:32:12"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1626,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1625,
|
|
"name": "proxy",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1645,
|
|
"src": "617:11:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 1624,
|
|
"name": "Proxy",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1611,
|
|
"src": "617:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "616:13:12"
|
|
},
|
|
"scope": 1646,
|
|
"src": "532:416:12",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 1647,
|
|
"src": "225:725:12"
|
|
}
|
|
],
|
|
"src": "0:951:12"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/ProxyFactory.sol",
|
|
"exportedSymbols": {
|
|
"ProxyFactory": [
|
|
1646
|
|
]
|
|
},
|
|
"id": 1647,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1613,
|
|
"literals": [
|
|
"solidity",
|
|
"0.4",
|
|
".24"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:12"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Proxy.sol",
|
|
"file": "./Proxy.sol",
|
|
"id": 1614,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1647,
|
|
"sourceUnit": 1612,
|
|
"src": "24:21:12",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [
|
|
1611
|
|
],
|
|
"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": 1646,
|
|
"linearizedBaseContracts": [
|
|
1646
|
|
],
|
|
"name": "ProxyFactory",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 1618,
|
|
"name": "ProxyCreation",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 1617,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1616,
|
|
"indexed": false,
|
|
"name": "proxy",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1618,
|
|
"src": "274:11:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 1615,
|
|
"name": "Proxy",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1611,
|
|
"src": "274:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "273:13:12"
|
|
},
|
|
"src": "254:33:12"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1644,
|
|
"nodeType": "Block",
|
|
"src": "634:314:12",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1632,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 1627,
|
|
"name": "proxy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1625,
|
|
"src": "644:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1630,
|
|
"name": "masterCopy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1620,
|
|
"src": "662:10:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1629,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "NewExpression",
|
|
"src": "652:9:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_creation_nonpayable$_t_address_$returns$_t_contract$_Proxy_$1611_$",
|
|
"typeString": "function (address) returns (contract Proxy)"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 1628,
|
|
"name": "Proxy",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1611,
|
|
"src": "656:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
}
|
|
},
|
|
"id": 1631,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "652:21:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
},
|
|
"src": "644:29:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
},
|
|
"id": 1633,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "644:29:12"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1637,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1634,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1622,
|
|
"src": "687:4:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 1635,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "687:11:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1636,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "701:1:12",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "687:15:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 1639,
|
|
"nodeType": "IfStatement",
|
|
"src": "683:237:12",
|
|
"trueBody": {
|
|
"externalReferences": [
|
|
{
|
|
"data": {
|
|
"declaration": 1622,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "860:4:12",
|
|
"valueSize": 1
|
|
}
|
|
},
|
|
{
|
|
"proxy": {
|
|
"declaration": 1625,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "827:5:12",
|
|
"valueSize": 1
|
|
}
|
|
},
|
|
{
|
|
"data": {
|
|
"declaration": 1622,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "841:4:12",
|
|
"valueSize": 1
|
|
}
|
|
}
|
|
],
|
|
"id": 1638,
|
|
"nodeType": "InlineAssembly",
|
|
"operations": "{\n if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0)\n {\n revert(0, 0)\n }\n}",
|
|
"src": "784:136:12"
|
|
}
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1641,
|
|
"name": "proxy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1625,
|
|
"src": "935:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
],
|
|
"id": 1640,
|
|
"name": "ProxyCreation",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1618,
|
|
"src": "921:13:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_contract$_Proxy_$1611_$returns$__$",
|
|
"typeString": "function (contract Proxy)"
|
|
}
|
|
},
|
|
"id": 1642,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "921:20:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1643,
|
|
"nodeType": "EmitStatement",
|
|
"src": "916:25:12"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@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.",
|
|
"id": 1645,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "createProxy",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1623,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1620,
|
|
"name": "masterCopy",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1645,
|
|
"src": "553:18:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1619,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "553:7:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1622,
|
|
"name": "data",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1645,
|
|
"src": "573:10:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1621,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "573:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "552:32:12"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1626,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1625,
|
|
"name": "proxy",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1645,
|
|
"src": "617:11:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 1624,
|
|
"name": "Proxy",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1611,
|
|
"src": "617:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Proxy_$1611",
|
|
"typeString": "contract Proxy"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "616:13:12"
|
|
},
|
|
"scope": 1646,
|
|
"src": "532:416:12",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 1647,
|
|
"src": "225:725:12"
|
|
}
|
|
],
|
|
"src": "0:951:12"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
|
|
},
|
|
"networks": {
|
|
"4": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0xe799418aadc40eb8f2081424bd518cdb442d50f4",
|
|
"transactionHash": "0x83f7e65d10e5b2ae69f461d86bba33a67a845d65a591749327bd73ce6e28d50b"
|
|
},
|
|
"1529327661534": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0xa0e45d0af3d5daeb68a725e7f2dd544bcce9dd29",
|
|
"transactionHash": "0x5db6814a3b712012c000eb4d202e8d481abd2fcd127b1f746e2ab1d88ee523c9"
|
|
},
|
|
"1529333415702": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0xce824fab495ef56405218cce3512b7a73df9e2ca",
|
|
"transactionHash": "0x10a89cb87c96bb1becc3a78f1bfdd54f98cdc1cb7e5164e26b1cbbd09d69be8c"
|
|
},
|
|
"1529652204341": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0xffacf76025eda5f84659135a9d5c2d815dbe1caa",
|
|
"transactionHash": "0x75ad1066b44cd801ac66a316dbe4c09e72636d72b70fd62eb647295a0fc5e285"
|
|
},
|
|
"1529931780812": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0xe2fc46c79ca4e0d84448f13d87c1037bca2cea2c",
|
|
"transactionHash": "0x75ad1066b44cd801ac66a316dbe4c09e72636d72b70fd62eb647295a0fc5e285"
|
|
},
|
|
"1529933005377": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0xa3cb424b431bb8d9ec4a6c7b6872e785a376e540",
|
|
"transactionHash": "0x75ad1066b44cd801ac66a316dbe4c09e72636d72b70fd62eb647295a0fc5e285"
|
|
},
|
|
"1529934931891": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0x2005509bbecb0c2bcbfbce77633bfadad3a28ac6",
|
|
"transactionHash": "0x75ad1066b44cd801ac66a316dbe4c09e72636d72b70fd62eb647295a0fc5e285"
|
|
},
|
|
"1529935355957": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0xa7ebfbfb51c1c928f58188e06ad43706208dd25a",
|
|
"transactionHash": "0x75ad1066b44cd801ac66a316dbe4c09e72636d72b70fd62eb647295a0fc5e285"
|
|
},
|
|
"1529936204222": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0xe408142c5a74c8b49ad5cafac0d825fc30e6b157",
|
|
"transactionHash": "0x75ad1066b44cd801ac66a316dbe4c09e72636d72b70fd62eb647295a0fc5e285"
|
|
},
|
|
"1529937280871": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0xf334c67727173561c53f63af8662632c302607c4",
|
|
"transactionHash": "0x75ad1066b44cd801ac66a316dbe4c09e72636d72b70fd62eb647295a0fc5e285"
|
|
},
|
|
"1529937637076": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0xca874c0e7e80da403e8b93aa9e16b3053e207f02",
|
|
"transactionHash": "0x75ad1066b44cd801ac66a316dbe4c09e72636d72b70fd62eb647295a0fc5e285"
|
|
},
|
|
"1529937890676": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0x3e0eee3a1f3c71659cb15d8b9cc7f3ea163fe960",
|
|
"transactionHash": "0x75ad1066b44cd801ac66a316dbe4c09e72636d72b70fd62eb647295a0fc5e285"
|
|
},
|
|
"1530013596495": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0x58831bc2afcef77f12cf8e02560ae3af6c343f2f",
|
|
"transactionHash": "0x75ad1066b44cd801ac66a316dbe4c09e72636d72b70fd62eb647295a0fc5e285"
|
|
}
|
|
},
|
|
"schemaVersion": "2.0.0",
|
|
"updatedAt": "2018-06-26T11:47:04.119Z"
|
|
} |