moonwalkerswap-v1-core
Version:
Moonwalkerswap v1 core
1,109 lines (1,108 loc) • 69.5 kB
JSON
{
"contractName": "TransferHelper",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"TransferHelper\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Contains helper methods for interacting with ERC20 tokens that do not consistently return true/false\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/libraries/TransferHelper.sol\":\"TransferHelper\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/IERC20Minimal.sol\":{\"keccak256\":\"0x7ab95ce2d6a483f0255ecee7068989051c3ed85fce0c44fab13889e7a71334e1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a62f6b6dc9ba1843687ad346a10cafc8d86b95d1f498032054f11baef3d6c22e\",\"dweb:/ipfs/QmdiDLfAZLr1pkE8ZVCnSgBocAEejPwstaJJvPN4LZYEcf\"]},\"/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/libraries/TransferHelper.sol\":{\"keccak256\":\"0x3f66e0d24a6bfb74a62a667c7229c65add3075375ef77d8eb2f929994bd4ab3e\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://e1f9dcb71c151c5cd17f7733139100a4a5befb4f1f05e9085e905d0a32276c17\",\"dweb:/ipfs/QmNZBS1kh2y92bKufQbxxfpVRC1aAJDJD5B8qjmFyhuwMq\"]}},\"version\":1}",
"bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d095888daacdfedb8d05db36faed486d288b2bc0433447f0e34989c972c7b8c964736f6c63430007060033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d095888daacdfedb8d05db36faed486d288b2bc0433447f0e34989c972c7b8c964736f6c63430007060033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "253:679:31:-:0;;;;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "253:679:31:-:0;;;;;;;;",
"source": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.6.0;\n\nimport '../interfaces/IERC20Minimal.sol';\n\n/// @title TransferHelper\n/// @notice Contains helper methods for interacting with ERC20 tokens that do not consistently return true/false\nlibrary TransferHelper {\n /// @notice Transfers tokens from msg.sender to a recipient\n /// @dev Calls transfer on token contract, errors with TF if transfer fails\n /// @param token The contract address of the token which will be transferred\n /// @param to The recipient of the transfer\n /// @param value The value of the transfer\n function safeTransfer(\n address token,\n address to,\n uint256 value\n ) internal {\n (bool success, bytes memory data) =\n token.call(abi.encodeWithSelector(IERC20Minimal.transfer.selector, to, value));\n require(success && (data.length == 0 || abi.decode(data, (bool))), 'TF');\n }\n}\n",
"sourcePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/libraries/TransferHelper.sol",
"ast": {
"absolutePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/libraries/TransferHelper.sol",
"exportedSymbols": {
"IERC20Minimal": [
2936
],
"TransferHelper": [
7221
]
},
"id": 7222,
"license": "GPL-2.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 7172,
"literals": [
"solidity",
">=",
"0.6",
".0"
],
"nodeType": "PragmaDirective",
"src": "45:24:31"
},
{
"absolutePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/IERC20Minimal.sol",
"file": "../interfaces/IERC20Minimal.sol",
"id": 7173,
"nodeType": "ImportDirective",
"scope": 7222,
"sourceUnit": 2937,
"src": "71:41:31",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 7174,
"nodeType": "StructuredDocumentation",
"src": "114:139:31",
"text": "@title TransferHelper\n @notice Contains helper methods for interacting with ERC20 tokens that do not consistently return true/false"
},
"fullyImplemented": true,
"id": 7221,
"linearizedBaseContracts": [
7221
],
"name": "TransferHelper",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 7219,
"nodeType": "Block",
"src": "705:225:31",
"statements": [
{
"assignments": [
7185,
7187
],
"declarations": [
{
"constant": false,
"id": 7185,
"mutability": "mutable",
"name": "success",
"nodeType": "VariableDeclaration",
"scope": 7219,
"src": "716:12:31",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 7184,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "716:4:31",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7187,
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 7219,
"src": "730:17:31",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 7186,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "730:5:31",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 7199,
"initialValue": {
"arguments": [
{
"arguments": [
{
"expression": {
"expression": {
"id": 7192,
"name": "IERC20Minimal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2936,
"src": "797:13:31",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20Minimal_$2936_$",
"typeString": "type(contract IERC20Minimal)"
}
},
"id": 7193,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 2885,
"src": "797:22:31",
"typeDescriptions": {
"typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function IERC20Minimal.transfer(address,uint256) returns (bool)"
}
},
"id": 7194,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "selector",
"nodeType": "MemberAccess",
"src": "797:31:31",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
{
"id": 7195,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7179,
"src": "830:2:31",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 7196,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7181,
"src": "834:5:31",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 7190,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967295,
"src": "774:3:31",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 7191,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodeWithSelector",
"nodeType": "MemberAccess",
"src": "774:22:31",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (bytes4) pure returns (bytes memory)"
}
},
"id": 7197,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "774:66:31",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"id": 7188,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7177,
"src": "763:5:31",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 7189,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "call",
"nodeType": "MemberAccess",
"src": "763:10:31",
"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": 7198,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "763:78:31",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "715:126:31"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 7215,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 7201,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7185,
"src": "859:7:31",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 7213,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 7205,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 7202,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7187,
"src": "871:4:31",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 7203,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"src": "871:11:31",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 7204,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "886:1:31",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "871:16:31",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"arguments": [
{
"id": 7208,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7187,
"src": "902:4:31",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"components": [
{
"id": 7210,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "909:4:31",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
},
"typeName": {
"id": 7209,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "909:4:31",
"typeDescriptions": {}
}
}
],
"id": 7211,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "908:6:31",
"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": {
"id": 7206,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967295,
"src": "891:3:31",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 7207,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "decode",
"nodeType": "MemberAccess",
"src": "891:10:31",
"typeDescriptions": {
"typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 7212,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "891:24:31",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "871:44:31",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 7214,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "870:46:31",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "859:57:31",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "5446",
"id": 7216,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "918:4:31",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cebb2b2e317200ffcf39e4291b6400d95f06e73adfd258bd495d227b7d846ff0",
"typeString": "literal_string \"TF\""
},
"value": "TF"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_cebb2b2e317200ffcf39e4291b6400d95f06e73adfd258bd495d227b7d846ff0",
"typeString": "literal_string \"TF\""
}
],
"id": 7200,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "851:7:31",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 7217,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "851:72:31",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 7218,
"nodeType": "ExpressionStatement",
"src": "851:72:31"
}
]
},
"documentation": {
"id": 7175,
"nodeType": "StructuredDocumentation",
"src": "282:315:31",
"text": "@notice Transfers tokens from msg.sender to a recipient\n @dev Calls transfer on token contract, errors with TF if transfer fails\n @param token The contract address of the token which will be transferred\n @param to The recipient of the transfer\n @param value The value of the transfer"
},
"id": 7220,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "safeTransfer",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 7182,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 7177,
"mutability": "mutable",
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 7220,
"src": "633:13:31",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 7176,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "633:7:31",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7179,
"mutability": "mutable",
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 7220,
"src": "656:10:31",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 7178,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "656:7:31",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7181,
"mutability": "mutable",
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 7220,
"src": "676:13:31",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 7180,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "676:7:31",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "623:72:31"
},
"returnParameters": {
"id": 7183,
"nodeType": "ParameterList",
"parameters": [],
"src": "705:0:31"
},
"scope": 7221,
"src": "602:328:31",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
}
],
"scope": 7222,
"src": "253:679:31"
}
],
"src": "45:888:31"
},
"legacyAST": {
"attributes": {
"absolutePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/libraries/TransferHelper.sol",
"exportedSymbols": {
"IERC20Minimal": [
2936
],
"TransferHelper": [
7221
]
},
"license": "GPL-2.0-or-later"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
">=",
"0.6",
".0"
]
},
"id": 7172,
"name": "PragmaDirective",
"src": "45:24:31"
},
{
"attributes": {
"SourceUnit": 2937,
"absolutePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/IERC20Minimal.sol",
"file": "../interfaces/IERC20Minimal.sol",
"scope": 7222,
"symbolAliases": [
null
],
"unitAlias": ""
},
"id": 7173,
"name": "ImportDirective",
"src": "71:41:31"
},
{
"attributes": {
"abstract": false,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "library",
"fullyImplemented": true,
"linearizedBaseContracts": [
7221
],
"name": "TransferHelper",
"scope": 7222
},
"children": [
{
"attributes": {
"text": "@title TransferHelper\n @notice Contains helper methods for interacting with ERC20 tokens that do not consistently return true/false"
},
"id": 7174,
"name": "StructuredDocumentation",
"src": "114:139:31"
},
{
"attributes": {
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "safeTransfer",
"scope": 7221,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"text": "@notice Transfers tokens from msg.sender to a recipient\n @dev Calls transfer on token contract, errors with TF if transfer fails\n @param token The contract address of the token which will be transferred\n @param to The recipient of the transfer\n @param value The value of the transfer"
},
"id": 7175,
"name": "StructuredDocumentation",
"src": "282:315:31"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "token",
"scope": 7220,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 7176,
"name": "ElementaryTypeName",
"src": "633:7:31"
}
],
"id": 7177,
"name": "VariableDeclaration",
"src": "633:13:31"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "to",
"scope": 7220,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 7178,
"name": "ElementaryTypeName",
"src": "656:7:31"
}
],
"id": 7179,
"name": "VariableDeclaration",
"src": "656:10:31"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "value",
"scope": 7220,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 7180,
"name": "ElementaryTypeName",
"src": "676:7:31"
}
],
"id": 7181,
"name": "VariableDeclaration",
"src": "676:13:31"
}
],
"id": 7182,
"name": "ParameterList",
"src": "623:72:31"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 7183,
"name": "ParameterList",
"src": "705:0:31"
},
{
"children": [
{
"attributes": {
"assignments": [
7185,
7187
]
},
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "success",
"scope": 7219,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 7184,
"name": "ElementaryTypeName",
"src": "716:4:31"
}
],
"id": 7185,
"name": "VariableDeclaration",
"src": "716:12:31"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "data",
"scope": 7219,
"stateVariable": false,
"storageLocation": "memory",
"type": "bytes",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 7186,
"name": "ElementaryTypeName",
"src": "730:5:31"
}
],
"id": 7187,
"name": "VariableDeclaration",
"src": "730:17:31"
},
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "tuple(bool,bytes memory)",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "call",
"type": "function (bytes memory) payable returns (bool,bytes memory)"
},
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 7177,
"type": "address",
"value": "token"
},
"id": 7188,
"name": "Identifier",
"src": "763:5:31"
}
],
"id": 7189,
"name": "MemberAccess",
"src": "763:10:31"
},
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "bytes memory",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"member_name": "encodeWithSelector",
"type": "function (bytes4) pure returns (bytes memory)"
},
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 4294967295,
"type": "abi",
"value": "abi"
},
"id": 7190,
"name": "Identifier",
"src": "774:3:31"
}
],
"id": 7191,
"name": "MemberAccess",
"src": "774:22:31"
},
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"member_name": "selector",
"type": "bytes4"
},
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"member_name": "transfer",
"referencedDeclaration": 2885,
"type": "function IERC20Minimal.transfer(address,uint256) returns (bool)"
},
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2936,
"type": "type(contract IERC20Minimal)",
"value": "IERC20Minimal"
},
"id": 7192,