UNPKG

@windfallswap/periphery

Version:

🎚 Peripheral smart contracts for interacting with Windfall Swap

1,049 lines (1,048 loc) • 219 kB
{ "contractName": "TransferHelper", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.6.6+commit.6c089d02\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@windfallswap/lib/contracts/libraries/TransferHelper.sol\":\"TransferHelper\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"@windfallswap/lib/contracts/libraries/TransferHelper.sol\":{\"keccak256\":\"0xeea8564e527b64b5201b31c01f713ee2b6897eb63fb83bf1b0da7a82b668b60c\",\"urls\":[\"bzz-raw://936050173b4c572e0193bb232579b2fe5a714faa83c43476568c707c022674f4\",\"dweb:/ipfs/QmQzNm9bZ546rak7DZaucYZFU1dUUVrEFbTf9RqLG3XekD\"]}},\"version\":1}", "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e3759dbe10dc5e4c48f3685e4395fda030fe6c254b42ece174e2ed7478e9117464736f6c63430006060033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e3759dbe10dc5e4c48f3685e4395fda030fe6c254b42ece174e2ed7478e9117464736f6c63430006060033", "immutableReferences": {}, "sourceMap": "188:1666:19:-:0;;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": "188:1666:19:-:0;;;;;;12:1:-1;9;2:12", "source": "// SPDX-License-Identifier: GPL-3.0-or-later\r\n\r\npragma solidity >=0.6.0;\r\n\r\n// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false\r\nlibrary TransferHelper {\r\n function safeApprove(\r\n address token,\r\n address to,\r\n uint256 value\r\n ) internal {\r\n // bytes4(keccak256(bytes('approve(address,uint256)')));\r\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));\r\n require(\r\n success && (data.length == 0 || abi.decode(data, (bool))),\r\n 'TransferHelper::safeApprove: approve failed'\r\n );\r\n }\r\n\r\n function safeTransfer(\r\n address token,\r\n address to,\r\n uint256 value\r\n ) internal {\r\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\r\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));\r\n require(\r\n success && (data.length == 0 || abi.decode(data, (bool))),\r\n 'TransferHelper::safeTransfer: transfer failed'\r\n );\r\n }\r\n\r\n function safeTransferFrom(\r\n address token,\r\n address from,\r\n address to,\r\n uint256 value\r\n ) internal {\r\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\r\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));\r\n require(\r\n success && (data.length == 0 || abi.decode(data, (bool))),\r\n 'TransferHelper::transferFrom: transferFrom failed'\r\n );\r\n }\r\n\r\n function safeTransferETH(address to, uint256 value) internal {\r\n (bool success, ) = to.call{value: value}(new bytes(0));\r\n require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');\r\n }\r\n}\r\n", "sourcePath": "@windfallswap/lib/contracts/libraries/TransferHelper.sol", "ast": { "absolutePath": "@windfallswap/lib/contracts/libraries/TransferHelper.sol", "exportedSymbols": { "TransferHelper": [ 6643 ] }, "id": 6644, "nodeType": "SourceUnit", "nodes": [ { "id": 6485, "literals": [ "solidity", ">=", "0.6", ".0" ], "nodeType": "PragmaDirective", "src": "48:24:19" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": null, "fullyImplemented": true, "id": 6643, "linearizedBaseContracts": [ 6643 ], "name": "TransferHelper", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 6527, "nodeType": "Block", "src": "324:339:19", "statements": [ { "assignments": [ 6495, 6497 ], "declarations": [ { "constant": false, "id": 6495, "mutability": "mutable", "name": "success", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6527, "src": "402:12:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 6494, "name": "bool", "nodeType": "ElementaryTypeName", "src": "402:4:19", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6497, "mutability": "mutable", "name": "data", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6527, "src": "416:17:19", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 6496, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "416:5:19", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "id": 6507, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30783039356561376233", "id": 6502, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "471:10:19", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_157198259_by_1", "typeString": "int_const 157198259" }, "value": "0x095ea7b3" }, { "argumentTypes": null, "id": 6503, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6489, "src": "483:2:19", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 6504, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6491, "src": "487:5:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_157198259_by_1", "typeString": "int_const 157198259" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 6500, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "448:3:19", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 6501, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "encodeWithSelector", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "448:22:19", "typeDescriptions": { "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", "typeString": "function (bytes4) pure returns (bytes memory)" } }, "id": 6505, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "448:45:19", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "expression": { "argumentTypes": null, "id": 6498, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6487, "src": "437:5:19", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 6499, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "call", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "437:10:19", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, "id": 6506, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "437:57:19", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", "src": "401:93:19" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 6523, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 6509, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6495, "src": "527:7:19", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "argumentTypes": null, "components": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 6521, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6513, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 6510, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6497, "src": "539:4:19", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 6511, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "539:11:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 6512, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "554:1:19", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "539:16:19", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 6516, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6497, "src": "570:4:19", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "components": [ { "argumentTypes": null, "id": 6518, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "577:4:19", "typeDescriptions": { "typeIdentifier": "t_type$_t_bool_$", "typeString": "type(bool)" }, "typeName": { "id": 6517, "name": "bool", "nodeType": "ElementaryTypeName", "src": "577:4:19", "typeDescriptions": { "typeIdentifier": null, "typeString": null } } } ], "id": 6519, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", "src": "576:6:19", "typeDescriptions": { "typeIdentifier": "t_type$_t_bool_$", "typeString": "type(bool)" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_type$_t_bool_$", "typeString": "type(bool)" } ], "expression": { "argumentTypes": null, "id": 6514, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "559:3:19", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 6515, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "decode", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "559:10:19", "typeDescriptions": { "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 6520, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "559:24:19", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "539:44:19", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "id": 6522, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "538:46:19", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "527:57:19", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "5472616e7366657248656c7065723a3a73616665417070726f76653a20617070726f7665206661696c6564", "id": 6524, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "599:45:19", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_b4dd1eb4be82119fd3a99acfb5dd4c57591eb0ea309359b1af3d65a4460c7123", "typeString": "literal_string \"TransferHelper::safeApprove: approve failed\"" }, "value": "TransferHelper::safeApprove: approve failed" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_b4dd1eb4be82119fd3a99acfb5dd4c57591eb0ea309359b1af3d65a4460c7123", "typeString": "literal_string \"TransferHelper::safeApprove: approve failed\"" } ], "id": 6508, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "505:7:19", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 6525, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "505:150:19", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 6526, "nodeType": "ExpressionStatement", "src": "505:150:19" } ] }, "documentation": null, "id": 6528, "implemented": true, "kind": "function", "modifiers": [], "name": "safeApprove", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 6492, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6487, "mutability": "mutable", "name": "token", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6528, "src": "249:13:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6486, "name": "address", "nodeType": "ElementaryTypeName", "src": "249:7:19", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6489, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6528, "src": "273:10:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6488, "name": "address", "nodeType": "ElementaryTypeName", "src": "273:7:19", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6491, "mutability": "mutable", "name": "value", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6528, "src": "294:13:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6490, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "294:7:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "238:76:19" }, "returnParameters": { "id": 6493, "nodeType": "ParameterList", "parameters": [], "src": "324:0:19" }, "scope": 6643, "src": "218:445:19", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 6570, "nodeType": "Block", "src": "778:342:19", "statements": [ { "assignments": [ 6538, 6540 ], "declarations": [ { "constant": false, "id": 6538, "mutability": "mutable", "name": "success", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6570, "src": "857:12:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 6537, "name": "bool", "nodeType": "ElementaryTypeName", "src": "857:4:19", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6540, "mutability": "mutable", "name": "data", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6570, "src": "871:17:19", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 6539, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "871:5:19", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "id": 6550, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30786139303539636262", "id": 6545, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "926:10:19", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2835717307_by_1", "typeString": "int_const 2835717307" }, "value": "0xa9059cbb" }, { "argumentTypes": null, "id": 6546, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6532, "src": "938:2:19", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 6547, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6534, "src": "942:5:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_2835717307_by_1", "typeString": "int_const 2835717307" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 6543, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "903:3:19", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 6544, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "encodeWithSelector", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "903:22:19", "typeDescriptions": { "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", "typeString": "function (bytes4) pure returns (bytes memory)" } }, "id": 6548, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "903:45:19", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "expression": { "argumentTypes": null, "id": 6541, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6530, "src": "892:5:19", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 6542, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "call", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "892:10:19", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, "id": 6549, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "892:57:19", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", "src": "856:93:19" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 6566, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 6552, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6538, "src": "982:7:19", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "argumentTypes": null, "components": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 6564, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6556, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 6553, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6540, "src": "994:4:19", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 6554, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "994:11:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 6555, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1009:1:19", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "994:16:19", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": {