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

1524 lines
72 KiB
JSON

{
"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": "0x608060405234801561001057600080fd5b50604051610502380380610502833981018060405281019080805190602001909291908051820192919060200180519060200190929190805190602001909291908051906020019092919050505084848160008173ffffffffffffffffffffffffffffffffffffffff1614151515610116576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f496e76616c6964206d617374657220636f707920616464726573732070726f7681526020017f696465640000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506000815111156101a35773ffffffffffffffffffffffffffffffffffffffff60005416600080835160208501846127105a03f46040513d6000823e600082141561019f573d81fd5b5050505b5050600081111561038357600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561022f578273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610229573d6000803e3d6000fd5b50610382565b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156102d257600080fd5b505af11580156102e6573d6000803e3d6000fd5b505050506040513d60208110156102fc57600080fd5b81019080805190602001909291905050501515610381576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f436f756c64206e6f74206578656375746520746f6b656e207061796d656e740081525060200191505060405180910390fd5b5b5b505050505061016b806103976000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634555d5c91461008b5780635c60da1b146100b6575b73ffffffffffffffffffffffffffffffffffffffff600054163660008037600080366000845af43d6000803e6000811415610086573d6000fd5b3d6000f35b34801561009757600080fd5b506100a061010d565b6040518082815260200191505060405180910390f35b3480156100c257600080fd5b506100cb610116565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006002905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a723058207c0d46b157e8df6d783e305a80b9c841f620d4bf15b4e2b2c93f261b93e8d6fa0029",
"deployedBytecode": "0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634555d5c91461008b5780635c60da1b146100b6575b73ffffffffffffffffffffffffffffffffffffffff600054163660008037600080366000845af43d6000803e6000811415610086573d6000fd5b3d6000f35b34801561009757600080fd5b506100a061010d565b6040518082815260200191505060405180910390f35b3480156100c257600080fd5b506100cb610116565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006002905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a723058207c0d46b157e8df6d783e305a80b9c841f620d4bf15b4e2b2c93f261b93e8d6fa0029",
"sourceMap": "452:940:10:-;;;924:466;8:9:-1;5:2;;;30:1;27;20:12;5:2;924:466:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1065:11;1078;668::0;593:1:11;578:11;:16;;;;570:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;658:11;645:10;;:24;;;;;;;;;;;;;;;;;;508:168;735:1:0;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;;1134:1:10;1124:7;:11;1120:263;;;1179:1;1155:26;;:12;:26;;;1151:222;;;1201:6;:15;;:24;1217:7;1201:24;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1201:24:10;1151:222;;;1283:12;1272:33;;;1306:6;1314:7;1272:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1272:50:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1272:50:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1272:50:10;;;;;;;;;;;;;;;;1264:94;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1151:222;1120:263;924:466;;;;;452:940;;;;;;",
"deployedSourceMap": "452:940:10:-;;;;;;;;;;;;;;;;;;;;;;;;;;955:42:11;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:11;;;;;;;;;;;;;;;;;;;;;;;1302:118;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1302:118:11;;;;;;;;;;;;;;;;;;;;;;;;;;;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 \"./DelegateConstructorProxy.sol\";\nimport \"./interfaces/ERC20Token.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 - <stefan@gnosis.pm>\n/// @author Richard Meissner - <richard@gnosis.pm>\ncontract PayingProxy is DelegateConstructorProxy {\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 funder.transfer(payment);\n } else {\n require(ERC20Token(paymentToken).transfer(funder, payment), \"Could not execute token payment\");\n }\n } \n }\n}\n",
"sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/PayingProxy.sol",
"ast": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/PayingProxy.sol",
"exportedSymbols": {
"PayingProxy": [
1559
]
},
"id": 1560,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1506,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:10"
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/DelegateConstructorProxy.sol",
"file": "./DelegateConstructorProxy.sol",
"id": 1507,
"nodeType": "ImportDirective",
"scope": 1560,
"sourceUnit": 24,
"src": "24:40:10",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/interfaces/ERC20Token.sol",
"file": "./interfaces/ERC20Token.sol",
"id": 1508,
"nodeType": "ImportDirective",
"scope": 1560,
"sourceUnit": 1721,
"src": "65:37:10",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1509,
"name": "DelegateConstructorProxy",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 23,
"src": "476:24:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_DelegateConstructorProxy_$23",
"typeString": "contract DelegateConstructorProxy"
}
},
"id": 1510,
"nodeType": "InheritanceSpecifier",
"src": "476:24:10"
}
],
"contractDependencies": [
23,
1602
],
"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 - <stefan@gnosis.pm>\n @author Richard Meissner - <richard@gnosis.pm>",
"fullyImplemented": true,
"id": 1559,
"linearizedBaseContracts": [
1559,
23,
1602
],
"name": "PayingProxy",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1557,
"nodeType": "Block",
"src": "1110:280:10",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1529,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1527,
"name": "payment",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "1124:7:10",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1528,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1134:1:10",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1124:11:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1556,
"nodeType": "IfStatement",
"src": "1120:263:10",
"trueBody": {
"id": 1555,
"nodeType": "Block",
"src": "1137:246:10",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1530,
"name": "paymentToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "1155:12:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 1532,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1179:1:10",
"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": 1531,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1171:7:10",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 1533,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1171:10:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1155:26:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 1553,
"nodeType": "Block",
"src": "1246:127:10",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1547,
"name": "funder",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "1306:6:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1548,
"name": "payment",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "1314:7:10",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1544,
"name": "paymentToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "1283:12:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1543,
"name": "ERC20Token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1720,
"src": "1272:10:10",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ERC20Token_$1720_$",
"typeString": "type(contract ERC20Token)"
}
},
"id": 1545,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1272:24:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Token_$1720",
"typeString": "contract ERC20Token"
}
},
"id": 1546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 1674,
"src": "1272:33:10",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256) external returns (bool)"
}
},
"id": 1549,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1272:50:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "436f756c64206e6f74206578656375746520746f6b656e207061796d656e74",
"id": 1550,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1324:33:10",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_56ee7cbc844d6a78f120ea6d555eb9afe8d3243b816d5489758d19d83ae941d2",
"typeString": "literal_string \"Could not execute token payment\""
},
"value": "Could not execute token payment"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_56ee7cbc844d6a78f120ea6d555eb9afe8d3243b816d5489758d19d83ae941d2",
"typeString": "literal_string \"Could not execute token payment\""
}
],
"id": 1542,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2657,
2658
],
"referencedDeclaration": 2658,
"src": "1264:7:10",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1551,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1264:94:10",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1552,
"nodeType": "ExpressionStatement",
"src": "1264:94:10"
}
]
},
"id": 1554,
"nodeType": "IfStatement",
"src": "1151:222:10",
"trueBody": {
"id": 1541,
"nodeType": "Block",
"src": "1183:57:10",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1538,
"name": "payment",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "1217:7:10",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1535,
"name": "funder",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "1201:6:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1201:15:10",
"typeDescriptions": {
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 1539,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1201:24:10",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1540,
"nodeType": "ExpressionStatement",
"src": "1201:24:10"
}
]
}
}
]
}
}
]
},
"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": 1558,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 1523,
"name": "_masterCopy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1512,
"src": "1065:11:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1524,
"name": "initializer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1514,
"src": "1078:11:10",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"id": 1525,
"modifierName": {
"argumentTypes": null,
"id": 1522,
"name": "DelegateConstructorProxy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23,
"src": "1040:24:10",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_DelegateConstructorProxy_$23_$",
"typeString": "type(contract DelegateConstructorProxy)"
}
},
"nodeType": "ModifierInvocation",
"src": "1040:50:10"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1521,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1512,
"name": "_masterCopy",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "936:19:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1511,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "936:7:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1514,
"name": "initializer",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "957:17:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1513,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "957:5:10",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1516,
"name": "funder",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "976:14:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1515,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "976:7:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1518,
"name": "paymentToken",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "992:20:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1517,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "992:7:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1520,
"name": "payment",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "1014:15:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1519,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1014:7:10",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "935:95:10"
},
"payable": false,
"returnParameters": {
"id": 1526,
"nodeType": "ParameterList",
"parameters": [],
"src": "1110:0:10"
},
"scope": 1559,
"src": "924:466:10",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1560,
"src": "452:940:10"
}
],
"src": "0:1393:10"
},
"legacyAST": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/PayingProxy.sol",
"exportedSymbols": {
"PayingProxy": [
1559
]
},
"id": 1560,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1506,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:10"
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/DelegateConstructorProxy.sol",
"file": "./DelegateConstructorProxy.sol",
"id": 1507,
"nodeType": "ImportDirective",
"scope": 1560,
"sourceUnit": 24,
"src": "24:40:10",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/interfaces/ERC20Token.sol",
"file": "./interfaces/ERC20Token.sol",
"id": 1508,
"nodeType": "ImportDirective",
"scope": 1560,
"sourceUnit": 1721,
"src": "65:37:10",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1509,
"name": "DelegateConstructorProxy",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 23,
"src": "476:24:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_DelegateConstructorProxy_$23",
"typeString": "contract DelegateConstructorProxy"
}
},
"id": 1510,
"nodeType": "InheritanceSpecifier",
"src": "476:24:10"
}
],
"contractDependencies": [
23,
1602
],
"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 - <stefan@gnosis.pm>\n @author Richard Meissner - <richard@gnosis.pm>",
"fullyImplemented": true,
"id": 1559,
"linearizedBaseContracts": [
1559,
23,
1602
],
"name": "PayingProxy",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1557,
"nodeType": "Block",
"src": "1110:280:10",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1529,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1527,
"name": "payment",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "1124:7:10",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1528,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1134:1:10",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1124:11:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1556,
"nodeType": "IfStatement",
"src": "1120:263:10",
"trueBody": {
"id": 1555,
"nodeType": "Block",
"src": "1137:246:10",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1530,
"name": "paymentToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "1155:12:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 1532,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1179:1:10",
"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": 1531,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1171:7:10",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 1533,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1171:10:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1155:26:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 1553,
"nodeType": "Block",
"src": "1246:127:10",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1547,
"name": "funder",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "1306:6:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1548,
"name": "payment",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "1314:7:10",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1544,
"name": "paymentToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "1283:12:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1543,
"name": "ERC20Token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1720,
"src": "1272:10:10",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ERC20Token_$1720_$",
"typeString": "type(contract ERC20Token)"
}
},
"id": 1545,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1272:24:10",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20Token_$1720",
"typeString": "contract ERC20Token"
}
},
"id": 1546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 1674,
"src": "1272:33:10",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256) external returns (bool)"
}
},
"id": 1549,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1272:50:10",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "436f756c64206e6f74206578656375746520746f6b656e207061796d656e74",
"id": 1550,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1324:33:10",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_56ee7cbc844d6a78f120ea6d555eb9afe8d3243b816d5489758d19d83ae941d2",
"typeString": "literal_string \"Could not execute token payment\""
},
"value": "Could not execute token payment"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_56ee7cbc844d6a78f120ea6d555eb9afe8d3243b816d5489758d19d83ae941d2",
"typeString": "literal_string \"Could not execute token payment\""
}
],
"id": 1542,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2657,
2658
],
"referencedDeclaration": 2658,
"src": "1264:7:10",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1551,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1264:94:10",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1552,
"nodeType": "ExpressionStatement",
"src": "1264:94:10"
}
]
},
"id": 1554,
"nodeType": "IfStatement",
"src": "1151:222:10",
"trueBody": {
"id": 1541,
"nodeType": "Block",
"src": "1183:57:10",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1538,
"name": "payment",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "1217:7:10",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 1535,
"name": "funder",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "1201:6:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1201:15:10",
"typeDescriptions": {
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 1539,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1201:24:10",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1540,
"nodeType": "ExpressionStatement",
"src": "1201:24:10"
}
]
}
}
]
}
}
]
},
"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": 1558,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 1523,
"name": "_masterCopy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1512,
"src": "1065:11:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1524,
"name": "initializer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1514,
"src": "1078:11:10",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"id": 1525,
"modifierName": {
"argumentTypes": null,
"id": 1522,
"name": "DelegateConstructorProxy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 23,
"src": "1040:24:10",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_DelegateConstructorProxy_$23_$",
"typeString": "type(contract DelegateConstructorProxy)"
}
},
"nodeType": "ModifierInvocation",
"src": "1040:50:10"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1521,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1512,
"name": "_masterCopy",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "936:19:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1511,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "936:7:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1514,
"name": "initializer",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "957:17:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1513,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "957:5:10",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1516,
"name": "funder",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "976:14:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1515,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "976:7:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1518,
"name": "paymentToken",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "992:20:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1517,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "992:7:10",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1520,
"name": "payment",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "1014:15:10",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1519,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1014:7:10",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "935:95:10"
},
"payable": false,
"returnParameters": {
"id": 1526,
"nodeType": "ParameterList",
"parameters": [],
"src": "1110:0:10"
},
"scope": 1559,
"src": "924:466:10",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1560,
"src": "452:940:10"
}
],
"src": "0:1393:10"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.0",
"updatedAt": "2018-06-15T07:49:20.498Z"
}