UNPKG

hardlydifficult-ethereum-contracts

Version:
1,242 lines (1,241 loc) 87.4 kB
{ "contractName": "CallContract", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{},\"title\":\"Calls an arbitrary contract function.\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/circleci/repo/contracts/proxies/CallContract.sol\":\"CallContract\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":2000000},\"remappings\":[]},\"sources\":{\"/home/circleci/repo/contracts/proxies/CallContract.sol\":{\"keccak256\":\"0x5b891896d85a8937da32acd5af2d4b2d3fd8f5fbae639540d54ed972d05304b4\",\"urls\":[\"bzz-raw://982e6db3cc9a612ab3ecd4a404ed15255429e857ebf0bb96b404dedb83313dc1\",\"dweb:/ipfs/Qmeh7ezyMrD4q62edq1oLdR93NuTr8GYwE4XKE62T125Mt\"]}},\"version\":1}", "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158200a3814e600697a3fab5df15e41ef45fc72196b424e3759adb7f8d321a154062264736f6c63430005110032", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158200a3814e600697a3fab5df15e41ef45fc72196b424e3759adb7f8d321a154062264736f6c63430005110032", "sourceMap": "81:1338:7:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", "deployedSourceMap": "81:1338:7:-;;;;;;;;", "source": "pragma solidity ^0.5.0;\n\n/**\n * @title Calls an arbitrary contract function.\n */\nlibrary CallContract\n{\n function _readUint(\n address _contract,\n bytes memory _callData\n ) internal view\n returns (uint)\n {\n (bool success, bytes memory result) = _contract.staticcall(_callData);\n require(success, 'INTERNAL_CONTRACT_READ_CALL_FAILED');\n return abi.decode(result, (uint));\n }\n\n function _call(\n address _contract,\n bytes memory _callData,\n uint _ethValue\n ) internal\n {\n bool result;\n // solium-disable-next-line\n assembly\n {\n result := call(\n gas,\n _contract,\n _ethValue,\n add(_callData, 32), // Start of callData information\n mload(_callData), // Size of callData\n 0, // Output ignored\n 0 // Output ignored\n )\n }\n require(result, 'INTERNAL_CONTRACT_CALL_FAILED');\n }\n\n function _callByPosition(\n address _contract,\n bytes memory _callDataConcat,\n uint _startPosition,\n uint _length,\n uint _ethValue\n ) internal\n {\n bool result;\n // solium-disable-next-line\n assembly\n {\n result := call(\n gas,\n _contract,\n _ethValue,\n add(_callDataConcat, add(32, _startPosition)), // Start of callData information\n _length,\n 0, // Output ignored\n 0 // Output ignored\n )\n }\n require(result, 'INTERNAL_CONTRACT_CALL_FAILED');\n }\n}\n", "sourcePath": "/home/circleci/repo/contracts/proxies/CallContract.sol", "ast": { "absolutePath": "/home/circleci/repo/contracts/proxies/CallContract.sol", "exportedSymbols": { "CallContract": [ 1329 ] }, "id": 1330, "nodeType": "SourceUnit", "nodes": [ { "id": 1255, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:7" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "@title Calls an arbitrary contract function.", "fullyImplemented": true, "id": 1329, "linearizedBaseContracts": [ 1329 ], "name": "CallContract", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 1285, "nodeType": "Block", "src": "215:179:7", "statements": [ { "assignments": [ 1265, 1267 ], "declarations": [ { "constant": false, "id": 1265, "name": "success", "nodeType": "VariableDeclaration", "scope": 1285, "src": "222:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1264, "name": "bool", "nodeType": "ElementaryTypeName", "src": "222:4:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1267, "name": "result", "nodeType": "VariableDeclaration", "scope": 1285, "src": "236:19:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1266, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "236:5:7", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "id": 1272, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1270, "name": "_callData", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1259, "src": "280:9:7", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "expression": { "argumentTypes": null, "id": 1268, "name": "_contract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1257, "src": "259:9:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1269, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "staticcall", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "259:20:7", "typeDescriptions": { "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "function (bytes memory) view returns (bool,bytes memory)" } }, "id": 1271, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "259:31:7", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", "src": "221:69:7" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1274, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1265, "src": "304:7:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "494e5445524e414c5f434f4e54524143545f524541445f43414c4c5f4641494c4544", "id": 1275, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "313:36:7", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_460500885b09a276a8bbffd9560c9bd39ee301270d1a1601c753ade188d5d945", "typeString": "literal_string \"INTERNAL_CONTRACT_READ_CALL_FAILED\"" }, "value": "INTERNAL_CONTRACT_READ_CALL_FAILED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_460500885b09a276a8bbffd9560c9bd39ee301270d1a1601c753ade188d5d945", "typeString": "literal_string \"INTERNAL_CONTRACT_READ_CALL_FAILED\"" } ], "id": 1273, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 2266, 2267 ], "referencedDeclaration": 2267, "src": "296:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 1276, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "296:54:7", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1277, "nodeType": "ExpressionStatement", "src": "296:54:7" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1280, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1267, "src": "374:6:7", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "components": [ { "argumentTypes": null, "id": 1281, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "383:4:7", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint" } ], "id": 1282, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", "src": "382:6:7", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" } ], "expression": { "argumentTypes": null, "id": 1278, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2250, "src": "363:3:7", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 1279, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "decode", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "363:10:7", "typeDescriptions": { "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 1283, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "363:26:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 1263, "id": 1284, "nodeType": "Return", "src": "356:33:7" } ] }, "documentation": null, "id": 1286, "implemented": true, "kind": "function", "modifiers": [], "name": "_readUint", "nodeType": "FunctionDefinition", "parameters": { "id": 1260, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1257, "name": "_contract", "nodeType": "VariableDeclaration", "scope": 1286, "src": "130:17:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1256, "name": "address", "nodeType": "ElementaryTypeName", "src": "130:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1259, "name": "_callData", "nodeType": "VariableDeclaration", "scope": 1286, "src": "153:22:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1258, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "153:5:7", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "124:55:7" }, "returnParameters": { "id": 1263, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1262, "name": "", "nodeType": "VariableDeclaration", "scope": 1286, "src": "207:4:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1261, "name": "uint", "nodeType": "ElementaryTypeName", "src": "207:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "206:6:7" }, "scope": 1329, "src": "106:288:7", "stateMutability": "view", "superFunction": null, "visibility": "internal" }, { "body": { "id": 1304, "nodeType": "Block", "src": "499:378:7", "statements": [ { "assignments": [ 1296 ], "declarations": [ { "constant": false, "id": 1296, "name": "result", "nodeType": "VariableDeclaration", "scope": 1304, "src": "505:11:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1295, "name": "bool", "nodeType": "ElementaryTypeName", "src": "505:4:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "id": 1297, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "505:11:7" }, { "externalReferences": [ { "result": { "declaration": 1296, "isOffset": false, "isSlot": false, "src": "575:6:7", "valueSize": 1 } }, { "_callData": { "declaration": 1290, "isOffset": false, "isSlot": false, "src": "717:9:7", "valueSize": 1 } }, { "_callData": { "declaration": 1290, "isOffset": false, "isSlot": false, "src": "654:9:7", "valueSize": 1 } }, { "_contract": { "declaration": 1288, "isOffset": false, "isSlot": false, "src": "612:9:7", "valueSize": 1 } }, { "_ethValue": { "declaration": 1292, "isOffset": false, "isSlot": false, "src": "631:9:7", "valueSize": 1 } } ], "id": 1298, "nodeType": "InlineAssembly", "operations": "{\n result := call(gas(), _contract, _ethValue, add(_callData, 32), mload(_callData), 0, 0)\n}", "src": "554:265:7" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1300, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1296, "src": "832:6:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "494e5445524e414c5f434f4e54524143545f43414c4c5f4641494c4544", "id": 1301, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "840:31:7", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ddf638174fc17ca90a5b28ed70027a57af4c383bef9c2359a73583c8bd399756", "typeString": "literal_string \"INTERNAL_CONTRACT_CALL_FAILED\"" }, "value": "INTERNAL_CONTRACT_CALL_FAILED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ddf638174fc17ca90a5b28ed70027a57af4c383bef9c2359a73583c8bd399756", "typeString": "literal_string \"INTERNAL_CONTRACT_CALL_FAILED\"" } ], "id": 1299, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 2266, 2267 ], "referencedDeclaration": 2267, "src": "824:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 1302, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "824:48:7", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1303, "nodeType": "ExpressionStatement", "src": "824:48:7" } ] }, "documentation": null, "id": 1305, "implemented": true, "kind": "function", "modifiers": [], "name": "_call", "nodeType": "FunctionDefinition", "parameters": { "id": 1293, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1288, "name": "_contract", "nodeType": "VariableDeclaration", "scope": 1305, "src": "418:17:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1287, "name": "address", "nodeType": "ElementaryTypeName", "src": "418:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1290, "name": "_callData", "nodeType": "VariableDeclaration", "scope": 1305, "src": "441:22:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1289, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "441:5:7", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1292, "name": "_ethValue", "nodeType": "VariableDeclaration", "scope": 1305, "src": "469:14:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1291, "name": "uint", "nodeType": "ElementaryTypeName", "src": "469:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "412:75:7" }, "returnParameters": { "id": 1294, "nodeType": "ParameterList", "parameters": [], "src": "499:0:7" }, "scope": 1329, "src": "398:479:7", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { "id": 1327, "nodeType": "Block", "src": "1041:376:7", "statements": [ { "assignments": [ 1319 ], "declarations": [ { "constant": false, "id": 1319, "name": "result", "nodeType": "VariableDeclaration", "scope": 1327, "src": "1047:11:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1318, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1047:4:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "id": 1320, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "1047:11:7" }, { "externalReferences": [ { "result": { "declaration": 1319, "isOffset": false, "isSlot": false, "src": "1117:6:7", "valueSize": 1 } }, { "_startPosition": { "declaration": 1311, "isOffset": false, "isSlot": false, "src": "1221:14:7", "valueSize": 1 } }, { "_callDataConcat": { "declaration": 1309, "isOffset": false, "isSlot": false, "src": "1196:15:7", "valueSize": 1 } }, { "_contract": { "declaration": 1307, "isOffset": false, "isSlot": false, "src": "1154:9:7", "valueSize": 1 } }, { "_ethValue": { "declaration": 1315, "isOffset": false, "isSlot": false, "src": "1173:9:7", "valueSize": 1 } }, { "_length": { "declaration": 1313, "isOffset": false, "isSlot": false, "src": "1280:7:7", "valueSize": 1 } } ], "id": 1321, "nodeType": "InlineAssembly", "operations": "{\n result := call(gas(), _contract, _ethValue, add(_callDataConcat, add(32, _startPosition)), _length, 0, 0)\n}", "src": "1096:263:7" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1323, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1319, "src": "1372:6:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "494e5445524e414c5f434f4e54524143545f43414c4c5f4641494c4544", "id": 1324, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1380:31:7", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ddf638174fc17ca90a5b28ed70027a57af4c383bef9c2359a73583c8bd399756", "typeString": "literal_string \"INTERNAL_CONTRACT_CALL_FAILED\"" }, "value": "INTERNAL_CONTRACT_CALL_FAILED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ddf638174fc17ca90a5b28ed70027a57af4c383bef9c2359a73583c8bd399756", "typeString": "literal_string \"INTERNAL_CONTRACT_CALL_FAILED\"" } ], "id": 1322, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 2266, 2267 ], "referencedDeclaration": 2267, "src": "1364:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 1325, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1364:48:7", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1326, "nodeType": "ExpressionStatement", "src": "1364:48:7" } ] }, "documentation": null, "id": 1328, "implemented": true, "kind": "function", "modifiers": [], "name": "_callByPosition", "nodeType": "FunctionDefinition", "parameters": { "id": 1316, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1307, "name": "_contract", "nodeType": "VariableDeclaration", "scope": 1328, "src": "911:17:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1306, "name": "address", "nodeType": "ElementaryTypeName", "src": "911:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1309, "name": "_callDataConcat", "nodeType": "VariableDeclaration", "scope": 1328, "src": "934:28:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1308, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "934:5:7", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1311, "name": "_startPosition", "nodeType": "VariableDeclaration", "scope": 1328, "src": "968:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1310, "name": "uint", "nodeType": "ElementaryTypeName", "src": "968:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1313, "name": "_length", "nodeType": "VariableDeclaration", "scope": 1328, "src": "993:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1312, "name": "uint", "nodeType": "ElementaryTypeName", "src": "993:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1315, "name": "_ethValue", "nodeType": "VariableDeclaration", "scope": 1328, "src": "1011:14:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1314, "name": "uint", "nodeType": "ElementaryTypeName", "src": "1011:4:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "905:124:7" }, "returnParameters": { "id": 1317, "nodeType": "ParameterList", "parameters": [], "src": "1041:0:7" }, "scope": 1329, "src": "881:536:7", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], "scope": 1330, "src": "81:1338:7" } ], "src": "0:1420:7" }, "legacyAST": { "absolutePath": "/home/circleci/repo/contracts/proxies/CallContract.sol", "exportedSymbols": { "CallContract": [ 1329 ] }, "id": 1330, "nodeType": "SourceUnit", "nodes": [ { "id": 1255, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:7" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "@title Calls an arbitrary contract function.", "fullyImplemented": true, "id": 1329, "linearizedBaseContracts": [ 1329 ], "name": "CallContract", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 1285, "nodeType": "Block", "src": "215:179:7", "statements": [ { "assignments": [ 1265, 1267 ], "declarations": [ { "constant": false, "id": 1265, "name": "success", "nodeType": "VariableDeclaration", "scope": 1285, "src": "222:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1264, "name": "bool", "nodeType": "ElementaryTypeName", "src": "222:4:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1267, "name": "result", "nodeType": "VariableDeclaration", "scope": 1285, "src": "236:19:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1266, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "236:5:7", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "id": 1272, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1270, "name": "_callData", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1259, "src": "280:9:7", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "expression": { "argumentTypes": null, "id": 1268, "name": "_contract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1257, "src": "259:9:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } },