{ "contractName": "PayingProxy", "abi": [ { "constant": true, "inputs": [], "name": "proxyType", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [], "name": "implementation", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [ { "name": "_masterCopy", "type": "address" }, { "name": "initializer", "type": "bytes" }, { "name": "funder", "type": "address" }, { "name": "paymentToken", "type": "address" }, { "name": "payment", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "payable": true, "stateMutability": "payable", "type": "fallback" } ], "bytecode": "0x608060405234801561001057600080fd5b5060405161060a38038061060a833981018060405281019080805190602001909291908051820192919060200180519060200190929190805190602001909291908051906020019092919050505084848160008173ffffffffffffffffffffffffffffffffffffffff1614151515610116576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f496e76616c6964206d617374657220636f707920616464726573732070726f7681526020017f696465640000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506000815111156101a35773ffffffffffffffffffffffffffffffffffffffff60005416600080835160208501846127105a03f46040513d6000823e600082141561019f573d81fd5b5050505b5050600081111561036d57600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156102b7578273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156102b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f436f756c64206e6f74207061792073616665206372656174696f6e207769746881526020017f206574686572000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61036c565b6102d1828483610377640100000000026401000000009004565b151561036b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f436f756c64206e6f74207061792073616665206372656174696f6e207769746881526020017f20746f6b656e000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b5b5b5050505050610490565b600060608383604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000808251602084016000896127105a03f16040513d6000823e3d60008114610473576020811461047b5760009450610485565b829450610485565b8151158315171594505b505050509392505050565b61016b8061049f6000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634555d5c91461008b5780635c60da1b146100b6575b73ffffffffffffffffffffffffffffffffffffffff600054163660008037600080366000845af43d6000803e6000811415610086573d6000fd5b3d6000f35b34801561009757600080fd5b506100a061010d565b6040518082815260200191505060405180910390f35b3480156100c257600080fd5b506100cb610116565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006002905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a72305820f4865d803249158ffb1d82b19d119f60c2a50ca3b6f4fa2715b2740fb12915270029", "deployedBytecode": "0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634555d5c91461008b5780635c60da1b146100b6575b73ffffffffffffffffffffffffffffffffffffffff600054163660008037600080366000845af43d6000803e6000811415610086573d6000fd5b3d6000f35b34801561009757600080fd5b506100a061010d565b6040518082815260200191505060405180910390f35b3480156100c257600080fd5b506100cb610116565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006002905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a72305820f4865d803249158ffb1d82b19d119f60c2a50ca3b6f4fa2715b2740fb12915270029", "sourceMap": "459:1072:22:-;;;953:576;8:9:-1;5:2;;;30:1;27;20:12;5:2;953:576:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1094:11;1107;668::21;593:1:23;578:11;:16;;;;570:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;658:11;645:10;;:24;;;;;;;;;;;;;;;;;;508:168;735:1:21;714:11;:18;:22;710:519;;;879:42;875:1;869:8;865:57;1043:1;1040;1026:11;1020:18;1013:4;1000:11;996:22;984:10;976:5;971:3;967:15;954:91;1079:4;1073:11;1124:14;1121:1;1116:3;1101:38;1171:1;1162:7;1159:14;1156:2;;;1188:14;1183:3;1176:27;1156:2;829:390;;;;610:625;;1163:1:22;1153:7;:11;1149:373;;;1208:1;1184:26;;:12;:26;;;1180:332;;;1300:6;:11;;:20;1312:7;1300:20;;;;;;;;;;;;;;;;;;;;;;;1292:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1180:332;;;1410:44;1424:12;1438:6;1446:7;1410:13;;;:44;;;:::i;:::-;1402:95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1180:332;1149:373;953:576;;;;;459:1072;;430:752:10;568:16;600:17;673:8;683:6;620:70;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;620:70:10;;;;;;;38:4:-1;29:7;25:18;67:10;61:17;96:58;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;620:70:10;600:90;;867:1;864;857:4;851:11;844:4;838;834:15;831:1;824:5;816;811:3;807:15;802:67;899:4;893:11;940:14;937:1;932:3;917:38;975:14;1008:1;1003:33;;;;1054:4;1049:76;;;;1163:1;1148:16;;968:198;;1003:33;1027:7;1012:22;;1003:33;;1049:76;1116:3;1110:10;1103:18;1093:7;1086:15;1083:39;1076:47;1061:62;;968:198;;773:403;;;;;;;;:::o;459:1072:22:-;;;;;;;", "deployedSourceMap": "459:1072:22:-;;;;;;;;;;;;;;;;;;;;;;;;;;955:42:23;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", "source": "pragma solidity 0.4.24;\nimport \"../common/SecuredTokenTransfer.sol\";\nimport \"./DelegateConstructorProxy.sol\";\n\n/// @title Paying Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract. It is possible to send along initialization data with the constructor. And sends funds after creation to a specified account.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract PayingProxy is DelegateConstructorProxy, SecuredTokenTransfer {\n\n /// @dev Constructor function sets address of master copy contract.\n /// @param _masterCopy Master copy address.\n /// @param initializer Data used for a delegate call to initialize the contract.\n /// @param funder Address that should be paid for the execution of this call\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\n /// @param payment Value that should be paid\n constructor(address _masterCopy, bytes initializer, address funder, address paymentToken, uint256 payment) \n DelegateConstructorProxy(_masterCopy, initializer)\n public\n {\n if (payment > 0) {\n if (paymentToken == address(0)) {\n // solium-disable-next-line security/no-send\n require(funder.send(payment), \"Could not pay safe creation with ether\");\n } else {\n require(transferToken(paymentToken, funder, payment), \"Could not pay safe creation with token\");\n }\n } \n }\n}\n", "sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/proxies/PayingProxy.sol", "ast": { "absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/proxies/PayingProxy.sol", "exportedSymbols": { "PayingProxy": [ 2797 ] }, "id": 2798, "nodeType": "SourceUnit", "nodes": [ { "id": 2742, "literals": [ "solidity", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:23:22" }, { "absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/common/SecuredTokenTransfer.sol", "file": "../common/SecuredTokenTransfer.sol", "id": 2743, "nodeType": "ImportDirective", "scope": 2798, "sourceUnit": 1719, "src": "24:44:22", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/proxies/DelegateConstructorProxy.sol", "file": "./DelegateConstructorProxy.sol", "id": 2744, "nodeType": "ImportDirective", "scope": 2798, "sourceUnit": 2741, "src": "69:40:22", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2745, "name": "DelegateConstructorProxy", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2740, "src": "483:24:22", "typeDescriptions": { "typeIdentifier": "t_contract$_DelegateConstructorProxy_$2740", "typeString": "contract DelegateConstructorProxy" } }, "id": 2746, "nodeType": "InheritanceSpecifier", "src": "483:24:22" }, { "arguments": null, "baseName": { "contractScope": null, "id": 2747, "name": "SecuredTokenTransfer", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1718, "src": "509:20:22", "typeDescriptions": { "typeIdentifier": "t_contract$_SecuredTokenTransfer_$1718", "typeString": "contract SecuredTokenTransfer" } }, "id": 2748, "nodeType": "InheritanceSpecifier", "src": "509:20:22" } ], "contractDependencies": [ 1718, 2740, 2840 ], "contractKind": "contract", "documentation": "@title Paying Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract. It is possible to send along initialization data with the constructor. And sends funds after creation to a specified account.\n @author Stefan George - \n @author Richard Meissner - ", "fullyImplemented": true, "id": 2797, "linearizedBaseContracts": [ 2797, 1718, 2740, 2840 ], "name": "PayingProxy", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 2795, "nodeType": "Block", "src": "1139:390:22", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2767, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2765, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2758, "src": "1153:7:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 2766, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1163:1:22", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1153:11:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 2794, "nodeType": "IfStatement", "src": "1149:373:22", "trueBody": { "id": 2793, "nodeType": "Block", "src": "1166:356:22", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2772, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2768, "name": "paymentToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2756, "src": "1184:12:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 2770, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1208:1:22", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 2769, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1200:7:22", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 2771, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1200:10:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1184:26:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 2791, "nodeType": "Block", "src": "1384:128:22", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2784, "name": "paymentToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2756, "src": "1424:12:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 2785, "name": "funder", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2754, "src": "1438:6:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 2786, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2758, "src": "1446:7:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 2783, "name": "transferToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1717, "src": "1410:13:22", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,address,uint256) returns (bool)" } }, "id": 2787, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1410:44:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "436f756c64206e6f74207061792073616665206372656174696f6e207769746820746f6b656e", "id": 2788, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1456:40:22", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_03e5f5a3fbd065ad357c2a53629b6dc528c3f7172cf25b2c45eb26f6e42b59c6", "typeString": "literal_string \"Could not pay safe creation with token\"" }, "value": "Could not pay safe creation with token" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_03e5f5a3fbd065ad357c2a53629b6dc528c3f7172cf25b2c45eb26f6e42b59c6", "typeString": "literal_string \"Could not pay safe creation with token\"" } ], "id": 2782, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4018, 4019 ], "referencedDeclaration": 4019, "src": "1402:7:22", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2789, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1402:95:22", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2790, "nodeType": "ExpressionStatement", "src": "1402:95:22" } ] }, "id": 2792, "nodeType": "IfStatement", "src": "1180:332:22", "trueBody": { "id": 2781, "nodeType": "Block", "src": "1212:166:22", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2776, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2758, "src": "1312:7:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 2774, "name": "funder", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2754, "src": "1300:6:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2775, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "send", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1300:11:22", "typeDescriptions": { "typeIdentifier": "t_function_send_nonpayable$_t_uint256_$returns$_t_bool_$", "typeString": "function (uint256) returns (bool)" } }, "id": 2777, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1300:20:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "436f756c64206e6f74207061792073616665206372656174696f6e2077697468206574686572", "id": 2778, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1322:40:22", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_001db5e0eea429a497fbb276b295895ba66824ab53239e68691cf332a945feab", "typeString": "literal_string \"Could not pay safe creation with ether\"" }, "value": "Could not pay safe creation with ether" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_001db5e0eea429a497fbb276b295895ba66824ab53239e68691cf332a945feab", "typeString": "literal_string \"Could not pay safe creation with ether\"" } ], "id": 2773, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4018, 4019 ], "referencedDeclaration": 4019, "src": "1292:7:22", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2779, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1292:71:22", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2780, "nodeType": "ExpressionStatement", "src": "1292:71:22" } ] } } ] } } ] }, "documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.\n @param initializer Data used for a delegate call to initialize the contract.\n @param funder Address that should be paid for the execution of this call\n @param paymentToken Token that should be used for the payment (0 is ETH)\n @param payment Value that should be paid", "id": 2796, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [ { "arguments": [ { "argumentTypes": null, "id": 2761, "name": "_masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2750, "src": "1094:11:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 2762, "name": "initializer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2752, "src": "1107:11:22", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "id": 2763, "modifierName": { "argumentTypes": null, "id": 2760, "name": "DelegateConstructorProxy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2740, "src": "1069:24:22", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DelegateConstructorProxy_$2740_$", "typeString": "type(contract DelegateConstructorProxy)" } }, "nodeType": "ModifierInvocation", "src": "1069:50:22" } ], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 2759, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2750, "name": "_masterCopy", "nodeType": "VariableDeclaration", "scope": 2796, "src": "965:19:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2749, "name": "address", "nodeType": "ElementaryTypeName", "src": "965:7:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2752, "name": "initializer", "nodeType": "VariableDeclaration", "scope": 2796, "src": "986:17:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 2751, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "986:5:22", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2754, "name": "funder", "nodeType": "VariableDeclaration", "scope": 2796, "src": "1005:14:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2753, "name": "address", "nodeType": "ElementaryTypeName", "src": "1005:7:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2756, "name": "paymentToken", "nodeType": "VariableDeclaration", "scope": 2796, "src": "1021:20:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2755, "name": "address", "nodeType": "ElementaryTypeName", "src": "1021:7:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2758, "name": "payment", "nodeType": "VariableDeclaration", "scope": 2796, "src": "1043:15:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2757, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1043:7:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "964:95:22" }, "payable": false, "returnParameters": { "id": 2764, "nodeType": "ParameterList", "parameters": [], "src": "1139:0:22" }, "scope": 2797, "src": "953:576:22", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 2798, "src": "459:1072:22" } ], "src": "0:1532:22" }, "legacyAST": { "absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/proxies/PayingProxy.sol", "exportedSymbols": { "PayingProxy": [ 2797 ] }, "id": 2798, "nodeType": "SourceUnit", "nodes": [ { "id": 2742, "literals": [ "solidity", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:23:22" }, { "absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/common/SecuredTokenTransfer.sol", "file": "../common/SecuredTokenTransfer.sol", "id": 2743, "nodeType": "ImportDirective", "scope": 2798, "sourceUnit": 1719, "src": "24:44:22", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/proxies/DelegateConstructorProxy.sol", "file": "./DelegateConstructorProxy.sol", "id": 2744, "nodeType": "ImportDirective", "scope": 2798, "sourceUnit": 2741, "src": "69:40:22", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2745, "name": "DelegateConstructorProxy", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2740, "src": "483:24:22", "typeDescriptions": { "typeIdentifier": "t_contract$_DelegateConstructorProxy_$2740", "typeString": "contract DelegateConstructorProxy" } }, "id": 2746, "nodeType": "InheritanceSpecifier", "src": "483:24:22" }, { "arguments": null, "baseName": { "contractScope": null, "id": 2747, "name": "SecuredTokenTransfer", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1718, "src": "509:20:22", "typeDescriptions": { "typeIdentifier": "t_contract$_SecuredTokenTransfer_$1718", "typeString": "contract SecuredTokenTransfer" } }, "id": 2748, "nodeType": "InheritanceSpecifier", "src": "509:20:22" } ], "contractDependencies": [ 1718, 2740, 2840 ], "contractKind": "contract", "documentation": "@title Paying Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract. It is possible to send along initialization data with the constructor. And sends funds after creation to a specified account.\n @author Stefan George - \n @author Richard Meissner - ", "fullyImplemented": true, "id": 2797, "linearizedBaseContracts": [ 2797, 1718, 2740, 2840 ], "name": "PayingProxy", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 2795, "nodeType": "Block", "src": "1139:390:22", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2767, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2765, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2758, "src": "1153:7:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 2766, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1163:1:22", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1153:11:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 2794, "nodeType": "IfStatement", "src": "1149:373:22", "trueBody": { "id": 2793, "nodeType": "Block", "src": "1166:356:22", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2772, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2768, "name": "paymentToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2756, "src": "1184:12:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 2770, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1208:1:22", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 2769, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1200:7:22", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 2771, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1200:10:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1184:26:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 2791, "nodeType": "Block", "src": "1384:128:22", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2784, "name": "paymentToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2756, "src": "1424:12:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 2785, "name": "funder", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2754, "src": "1438:6:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 2786, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2758, "src": "1446:7:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 2783, "name": "transferToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1717, "src": "1410:13:22", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,address,uint256) returns (bool)" } }, "id": 2787, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1410:44:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "436f756c64206e6f74207061792073616665206372656174696f6e207769746820746f6b656e", "id": 2788, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1456:40:22", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_03e5f5a3fbd065ad357c2a53629b6dc528c3f7172cf25b2c45eb26f6e42b59c6", "typeString": "literal_string \"Could not pay safe creation with token\"" }, "value": "Could not pay safe creation with token" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_03e5f5a3fbd065ad357c2a53629b6dc528c3f7172cf25b2c45eb26f6e42b59c6", "typeString": "literal_string \"Could not pay safe creation with token\"" } ], "id": 2782, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4018, 4019 ], "referencedDeclaration": 4019, "src": "1402:7:22", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2789, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1402:95:22", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2790, "nodeType": "ExpressionStatement", "src": "1402:95:22" } ] }, "id": 2792, "nodeType": "IfStatement", "src": "1180:332:22", "trueBody": { "id": 2781, "nodeType": "Block", "src": "1212:166:22", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2776, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2758, "src": "1312:7:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 2774, "name": "funder", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2754, "src": "1300:6:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2775, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "send", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1300:11:22", "typeDescriptions": { "typeIdentifier": "t_function_send_nonpayable$_t_uint256_$returns$_t_bool_$", "typeString": "function (uint256) returns (bool)" } }, "id": 2777, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1300:20:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "436f756c64206e6f74207061792073616665206372656174696f6e2077697468206574686572", "id": 2778, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1322:40:22", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_001db5e0eea429a497fbb276b295895ba66824ab53239e68691cf332a945feab", "typeString": "literal_string \"Could not pay safe creation with ether\"" }, "value": "Could not pay safe creation with ether" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_001db5e0eea429a497fbb276b295895ba66824ab53239e68691cf332a945feab", "typeString": "literal_string \"Could not pay safe creation with ether\"" } ], "id": 2773, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4018, 4019 ], "referencedDeclaration": 4019, "src": "1292:7:22", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2779, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1292:71:22", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2780, "nodeType": "ExpressionStatement", "src": "1292:71:22" } ] } } ] } } ] }, "documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.\n @param initializer Data used for a delegate call to initialize the contract.\n @param funder Address that should be paid for the execution of this call\n @param paymentToken Token that should be used for the payment (0 is ETH)\n @param payment Value that should be paid", "id": 2796, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [ { "arguments": [ { "argumentTypes": null, "id": 2761, "name": "_masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2750, "src": "1094:11:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 2762, "name": "initializer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2752, "src": "1107:11:22", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "id": 2763, "modifierName": { "argumentTypes": null, "id": 2760, "name": "DelegateConstructorProxy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2740, "src": "1069:24:22", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DelegateConstructorProxy_$2740_$", "typeString": "type(contract DelegateConstructorProxy)" } }, "nodeType": "ModifierInvocation", "src": "1069:50:22" } ], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 2759, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2750, "name": "_masterCopy", "nodeType": "VariableDeclaration", "scope": 2796, "src": "965:19:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2749, "name": "address", "nodeType": "ElementaryTypeName", "src": "965:7:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2752, "name": "initializer", "nodeType": "VariableDeclaration", "scope": 2796, "src": "986:17:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 2751, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "986:5:22", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2754, "name": "funder", "nodeType": "VariableDeclaration", "scope": 2796, "src": "1005:14:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2753, "name": "address", "nodeType": "ElementaryTypeName", "src": "1005:7:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2756, "name": "paymentToken", "nodeType": "VariableDeclaration", "scope": 2796, "src": "1021:20:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2755, "name": "address", "nodeType": "ElementaryTypeName", "src": "1021:7:22", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2758, "name": "payment", "nodeType": "VariableDeclaration", "scope": 2796, "src": "1043:15:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2757, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1043:7:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "964:95:22" }, "payable": false, "returnParameters": { "id": 2764, "nodeType": "ParameterList", "parameters": [], "src": "1139:0:22" }, "scope": 2797, "src": "953:576:22", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 2798, "src": "459:1072:22" } ], "src": "0:1532:22" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.0", "updatedAt": "2018-10-05T14:25:58.945Z" }