{ "abi": [], "bytecode": { "object": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b29fd1f0496eba3e1a2b73fad77137622a2116d584467a3b7008b195dbd2031e64736f6c63430008160033", "sourceMap": "129:2408:47:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;129:2408:47;;;;;;;;;;;;;;;;;", "linkReferences": {} }, "deployedBytecode": { "object": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b29fd1f0496eba3e1a2b73fad77137622a2116d584467a3b7008b195dbd2031e64736f6c63430008160033", "sourceMap": "129:2408:47:-:0;;;;;;;;", "linkReferences": {} }, "methodIdentifiers": {}, "rawMetadata": "{\"compiler\":{\"version\":\"0.8.22+commit.4fc1097e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib_uniswap/v3-periphery/contracts/libraries/TransferHelper.sol\":\"TransferHelper\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":true,\"cse\":true,\"deduplicate\":true,\"inliner\":true,\"jumpdestRemover\":true,\"orderLiterals\":true,\"peephole\":true,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoD[xarrscLMcCTU]uljmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":999999999},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":@uniswap/v3-core/=lib_uniswap/v3-core/\",\":@uniswap/v3-periphery/=lib_uniswap/v3-periphery/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":v3-core/=lib_uniswap/v3-core/\",\":v3-periphery/libraries/=lib_uniswap/v3-periphery/contracts/libraries/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib_uniswap/v3-periphery/contracts/libraries/TransferHelper.sol\":{\"keccak256\":\"0x9af98b0908c96320ca6d08b22f0efca864742f6adbe5794cafe2d1d2e808b0cd\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://da1d1e81e5bf534f0bf2934b3193db6cb1933f91ec006d2b88e9ad10a617a2d2\",\"dweb:/ipfs/QmcPBk47QLMFWcX2y2S9eMFsJgoYWBd3R8ey55Bgmv6w6v\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.22+commit.4fc1097e" }, "language": "Solidity", "output": { "abi": [], "devdoc": { "kind": "dev", "methods": {}, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }, "settings": { "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@uniswap/v3-core/=lib_uniswap/v3-core/", "@uniswap/v3-periphery/=lib_uniswap/v3-periphery/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "v3-core/=lib_uniswap/v3-core/", "v3-periphery/libraries/=lib_uniswap/v3-periphery/contracts/libraries/" ], "optimizer": { "runs": 999999999, "details": { "peephole": true, "inliner": true, "jumpdestRemover": true, "orderLiterals": true, "deduplicate": true, "cse": true, "constantOptimizer": true, "yul": true, "yulDetails": { "stackAllocation": true, "optimizerSteps": "dhfoD[xarrscLMcCTU]uljmul:fDnTOcmu" } } }, "metadata": { "bytecodeHash": "ipfs" }, "compilationTarget": { "lib_uniswap/v3-periphery/contracts/libraries/TransferHelper.sol": "TransferHelper" }, "libraries": {} }, "sources": { "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol": { "keccak256": "0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b", "urls": [ "bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34", "dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr" ], "license": "MIT" }, "lib_uniswap/v3-periphery/contracts/libraries/TransferHelper.sol": { "keccak256": "0x9af98b0908c96320ca6d08b22f0efca864742f6adbe5794cafe2d1d2e808b0cd", "urls": [ "bzz-raw://da1d1e81e5bf534f0bf2934b3193db6cb1933f91ec006d2b88e9ad10a617a2d2", "dweb:/ipfs/QmcPBk47QLMFWcX2y2S9eMFsJgoYWBd3R8ey55Bgmv6w6v" ], "license": "GPL-2.0-or-later" } }, "version": 1 }, "ast": { "absolutePath": "lib_uniswap/v3-periphery/contracts/libraries/TransferHelper.sol", "id": 46064, "exportedSymbols": { "IERC20": [ 43556 ], "TransferHelper": [ 46063 ] }, "nodeType": "SourceUnit", "src": "45:2493:47", "nodes": [ { "id": 45894, "nodeType": "PragmaDirective", "src": "45:24:47", "nodes": [], "literals": [ "solidity", ">=", "0.6", ".0" ] }, { "id": 45895, "nodeType": "ImportDirective", "src": "71:56:47", "nodes": [], "absolutePath": "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol", "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", "nameLocation": "-1:-1:-1", "scope": 46064, "sourceUnit": 43557, "symbolAliases": [], "unitAlias": "" }, { "id": 46063, "nodeType": "ContractDefinition", "src": "129:2408:47", "nodes": [ { "id": 45944, "nodeType": "FunctionDefinition", "src": "561:358:47", "nodes": [], "body": { "id": 45943, "nodeType": "Block", "src": "690:229:47", "nodes": [], "statements": [ { "assignments": [ 45908, 45910 ], "declarations": [ { "constant": false, "id": 45908, "mutability": "mutable", "name": "success", "nameLocation": "706:7:47", "nodeType": "VariableDeclaration", "scope": 45943, "src": "701:12:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 45907, "name": "bool", "nodeType": "ElementaryTypeName", "src": "701:4:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, { "constant": false, "id": 45910, "mutability": "mutable", "name": "data", "nameLocation": "728:4:47", "nodeType": "VariableDeclaration", "scope": 45943, "src": "715:17:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 45909, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "715:5:47", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "id": 45923, "initialValue": { "arguments": [ { "arguments": [ { "expression": { "expression": { "id": 45915, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 43556, "src": "782:6:47", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$43556_$", "typeString": "type(contract IERC20)" } }, "id": 45916, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "789:12:47", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 43555, "src": "782:19:47", "typeDescriptions": { "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function IERC20.transferFrom(address,address,uint256) returns (bool)" } }, "id": 45917, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "802:8:47", "memberName": "selector", "nodeType": "MemberAccess", "src": "782:28:47", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, { "id": 45918, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45900, "src": "812:4:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 45919, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45902, "src": "818:2:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 45920, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45904, "src": "822:5:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 45913, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "759:3:47", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 45914, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "763:18:47", "memberName": "encodeWithSelector", "nodeType": "MemberAccess", "src": "759:22:47", "typeDescriptions": { "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", "typeString": "function (bytes4) pure returns (bytes memory)" } }, "id": 45921, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "759:69:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "expression": { "id": 45911, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45898, "src": "748:5:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 45912, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "754:4:47", "memberName": "call", "nodeType": "MemberAccess", "src": "748:10:47", "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": 45922, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "748:81:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", "src": "700:129:47" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 45939, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 45925, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45908, "src": "847:7:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "components": [ { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 45937, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 45929, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 45926, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45910, "src": "859:4:47", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 45927, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "864:6:47", "memberName": "length", "nodeType": "MemberAccess", "src": "859:11:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "hexValue": "30", "id": 45928, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "874:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "859:16:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "arguments": [ { "id": 45932, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45910, "src": "890:4:47", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "components": [ { "id": 45934, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "897:4:47", "typeDescriptions": { "typeIdentifier": "t_type$_t_bool_$", "typeString": "type(bool)" }, "typeName": { "id": 45933, "name": "bool", "nodeType": "ElementaryTypeName", "src": "897:4:47", "typeDescriptions": {} } } ], "id": 45935, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", "src": "896:6:47", "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": 45930, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "879:3:47", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 45931, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "883:6:47", "memberName": "decode", "nodeType": "MemberAccess", "src": "879:10:47", "typeDescriptions": { "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 45936, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "879:24:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "859:44:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "id": 45938, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "858:46:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "847:57:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "535446", "id": 45940, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "906:5:47", "typeDescriptions": { "typeIdentifier": "t_stringliteral_a1c4b1d67db284650e7cfb49cb11ce76848206ad466478425bd3418f8bbb9a86", "typeString": "literal_string \"STF\"" }, "value": "STF" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_a1c4b1d67db284650e7cfb49cb11ce76848206ad466478425bd3418f8bbb9a86", "typeString": "literal_string \"STF\"" } ], "id": 45924, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "839:7:47", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 45941, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "839:73:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 45942, "nodeType": "ExpressionStatement", "src": "839:73:47" } ] }, "documentation": { "id": 45896, "nodeType": "StructuredDocumentation", "src": "158:398:47", "text": "@notice Transfers tokens from the targeted address to the given destination\n @notice Errors with 'STF' if transfer fails\n @param token The contract address of the token to be transferred\n @param from The originating address from which the tokens will be transferred\n @param to The destination address of the transfer\n @param value The amount to be transferred" }, "implemented": true, "kind": "function", "modifiers": [], "name": "safeTransferFrom", "nameLocation": "570:16:47", "parameters": { "id": 45905, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45898, "mutability": "mutable", "name": "token", "nameLocation": "604:5:47", "nodeType": "VariableDeclaration", "scope": 45944, "src": "596:13:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45897, "name": "address", "nodeType": "ElementaryTypeName", "src": "596:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 45900, "mutability": "mutable", "name": "from", "nameLocation": "627:4:47", "nodeType": "VariableDeclaration", "scope": 45944, "src": "619:12:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45899, "name": "address", "nodeType": "ElementaryTypeName", "src": "619:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 45902, "mutability": "mutable", "name": "to", "nameLocation": "649:2:47", "nodeType": "VariableDeclaration", "scope": 45944, "src": "641:10:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45901, "name": "address", "nodeType": "ElementaryTypeName", "src": "641:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 45904, "mutability": "mutable", "name": "value", "nameLocation": "669:5:47", "nodeType": "VariableDeclaration", "scope": 45944, "src": "661:13:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 45903, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "661:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "586:94:47" }, "returnParameters": { "id": 45906, "nodeType": "ParameterList", "parameters": [], "src": "690:0:47" }, "scope": 46063, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "id": 45990, "nodeType": "FunctionDefinition", "src": "1211:309:47", "nodes": [], "body": { "id": 45989, "nodeType": "Block", "src": "1314:206:47", "nodes": [], "statements": [ { "assignments": [ 45955, 45957 ], "declarations": [ { "constant": false, "id": 45955, "mutability": "mutable", "name": "success", "nameLocation": "1330:7:47", "nodeType": "VariableDeclaration", "scope": 45989, "src": "1325:12:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 45954, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1325:4:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, { "constant": false, "id": 45957, "mutability": "mutable", "name": "data", "nameLocation": "1352:4:47", "nodeType": "VariableDeclaration", "scope": 45989, "src": "1339:17:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 45956, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1339:5:47", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "id": 45969, "initialValue": { "arguments": [ { "arguments": [ { "expression": { "expression": { "id": 45962, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 43556, "src": "1394:6:47", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$43556_$", "typeString": "type(contract IERC20)" } }, "id": 45963, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "1401:8:47", "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 43523, "src": "1394:15:47", "typeDescriptions": { "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function IERC20.transfer(address,uint256) returns (bool)" } }, "id": 45964, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "1410:8:47", "memberName": "selector", "nodeType": "MemberAccess", "src": "1394:24:47", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, { "id": 45965, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45949, "src": "1420:2:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 45966, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45951, "src": "1424:5:47", "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": 45960, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "1371:3:47", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 45961, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "1375:18:47", "memberName": "encodeWithSelector", "nodeType": "MemberAccess", "src": "1371:22:47", "typeDescriptions": { "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", "typeString": "function (bytes4) pure returns (bytes memory)" } }, "id": 45967, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1371:59:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "expression": { "id": 45958, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45947, "src": "1360:5:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 45959, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1366:4:47", "memberName": "call", "nodeType": "MemberAccess", "src": "1360:10:47", "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": 45968, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1360:71:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", "src": "1324:107:47" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 45985, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 45971, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45955, "src": "1449:7:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "components": [ { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 45983, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 45975, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 45972, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45957, "src": "1461:4:47", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 45973, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1466:6:47", "memberName": "length", "nodeType": "MemberAccess", "src": "1461:11:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "hexValue": "30", "id": 45974, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1476:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1461:16:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "arguments": [ { "id": 45978, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45957, "src": "1492:4:47", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "components": [ { "id": 45980, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1499:4:47", "typeDescriptions": { "typeIdentifier": "t_type$_t_bool_$", "typeString": "type(bool)" }, "typeName": { "id": 45979, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1499:4:47", "typeDescriptions": {} } } ], "id": 45981, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", "src": "1498:6:47", "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": 45976, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "1481:3:47", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 45977, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "1485:6:47", "memberName": "decode", "nodeType": "MemberAccess", "src": "1481:10:47", "typeDescriptions": { "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 45982, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1481:24:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "1461:44:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "id": 45984, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "1460:46:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "1449:57:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "5354", "id": 45986, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1508:4:47", "typeDescriptions": { "typeIdentifier": "t_stringliteral_8e992d6a09e3feb7936717fa482f3a7086f18407e19b697f3153d17fd25870ca", "typeString": "literal_string \"ST\"" }, "value": "ST" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_8e992d6a09e3feb7936717fa482f3a7086f18407e19b697f3153d17fd25870ca", "typeString": "literal_string \"ST\"" } ], "id": 45970, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1441:7:47", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 45987, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1441:72:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 45988, "nodeType": "ExpressionStatement", "src": "1441:72:47" } ] }, "documentation": { "id": 45945, "nodeType": "StructuredDocumentation", "src": "925:281:47", "text": "@notice Transfers tokens from msg.sender to a recipient\n @dev Errors with ST 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" }, "implemented": true, "kind": "function", "modifiers": [], "name": "safeTransfer", "nameLocation": "1220:12:47", "parameters": { "id": 45952, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45947, "mutability": "mutable", "name": "token", "nameLocation": "1250:5:47", "nodeType": "VariableDeclaration", "scope": 45990, "src": "1242:13:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45946, "name": "address", "nodeType": "ElementaryTypeName", "src": "1242:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 45949, "mutability": "mutable", "name": "to", "nameLocation": "1273:2:47", "nodeType": "VariableDeclaration", "scope": 45990, "src": "1265:10:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45948, "name": "address", "nodeType": "ElementaryTypeName", "src": "1265:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 45951, "mutability": "mutable", "name": "value", "nameLocation": "1293:5:47", "nodeType": "VariableDeclaration", "scope": 45990, "src": "1285:13:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 45950, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1285:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "1232:72:47" }, "returnParameters": { "id": 45953, "nodeType": "ParameterList", "parameters": [], "src": "1314:0:47" }, "scope": 46063, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "id": 46036, "nodeType": "FunctionDefinition", "src": "1873:307:47", "nodes": [], "body": { "id": 46035, "nodeType": "Block", "src": "1975:205:47", "nodes": [], "statements": [ { "assignments": [ 46001, 46003 ], "declarations": [ { "constant": false, "id": 46001, "mutability": "mutable", "name": "success", "nameLocation": "1991:7:47", "nodeType": "VariableDeclaration", "scope": 46035, "src": "1986:12:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 46000, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1986:4:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, { "constant": false, "id": 46003, "mutability": "mutable", "name": "data", "nameLocation": "2013:4:47", "nodeType": "VariableDeclaration", "scope": 46035, "src": "2000:17:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 46002, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2000:5:47", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "id": 46015, "initialValue": { "arguments": [ { "arguments": [ { "expression": { "expression": { "id": 46008, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 43556, "src": "2055:6:47", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$43556_$", "typeString": "type(contract IERC20)" } }, "id": 46009, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "2062:7:47", "memberName": "approve", "nodeType": "MemberAccess", "referencedDeclaration": 43543, "src": "2055:14:47", "typeDescriptions": { "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function IERC20.approve(address,uint256) returns (bool)" } }, "id": 46010, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "2070:8:47", "memberName": "selector", "nodeType": "MemberAccess", "src": "2055:23:47", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, { "id": 46011, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45995, "src": "2080:2:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 46012, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45997, "src": "2084:5:47", "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": 46006, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "2032:3:47", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 46007, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "2036:18:47", "memberName": "encodeWithSelector", "nodeType": "MemberAccess", "src": "2032:22:47", "typeDescriptions": { "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", "typeString": "function (bytes4) pure returns (bytes memory)" } }, "id": 46013, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2032:58:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "expression": { "id": 46004, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45993, "src": "2021:5:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 46005, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2027:4:47", "memberName": "call", "nodeType": "MemberAccess", "src": "2021:10:47", "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": 46014, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2021:70:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", "src": "1985:106:47" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 46031, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 46017, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46001, "src": "2109:7:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { "components": [ { "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 46029, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 46021, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 46018, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46003, "src": "2121:4:47", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 46019, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2126:6:47", "memberName": "length", "nodeType": "MemberAccess", "src": "2121:11:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "hexValue": "30", "id": 46020, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2136:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "2121:16:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "arguments": [ { "id": 46024, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46003, "src": "2152:4:47", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "components": [ { "id": 46026, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2159:4:47", "typeDescriptions": { "typeIdentifier": "t_type$_t_bool_$", "typeString": "type(bool)" }, "typeName": { "id": 46025, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2159:4:47", "typeDescriptions": {} } } ], "id": 46027, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", "src": "2158:6:47", "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": 46022, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "2141:3:47", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 46023, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "2145:6:47", "memberName": "decode", "nodeType": "MemberAccess", "src": "2141:10:47", "typeDescriptions": { "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 46028, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2141:24:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "2121:44:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "id": 46030, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "2120:46:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "2109:57:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "5341", "id": 46032, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2168:4:47", "typeDescriptions": { "typeIdentifier": "t_stringliteral_0c382912095e7706ed01a66755a50c713445aceaf5a9168954498b03dd381faa", "typeString": "literal_string \"SA\"" }, "value": "SA" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_0c382912095e7706ed01a66755a50c713445aceaf5a9168954498b03dd381faa", "typeString": "literal_string \"SA\"" } ], "id": 46016, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "2101:7:47", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 46033, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2101:72:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 46034, "nodeType": "ExpressionStatement", "src": "2101:72:47" } ] }, "documentation": { "id": 45991, "nodeType": "StructuredDocumentation", "src": "1526:342:47", "text": "@notice Approves the stipulated contract to spend the given allowance in the given token\n @dev Errors with 'SA' if transfer fails\n @param token The contract address of the token to be approved\n @param to The target of the approval\n @param value The amount of the given token the target will be allowed to spend" }, "implemented": true, "kind": "function", "modifiers": [], "name": "safeApprove", "nameLocation": "1882:11:47", "parameters": { "id": 45998, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45993, "mutability": "mutable", "name": "token", "nameLocation": "1911:5:47", "nodeType": "VariableDeclaration", "scope": 46036, "src": "1903:13:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45992, "name": "address", "nodeType": "ElementaryTypeName", "src": "1903:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 45995, "mutability": "mutable", "name": "to", "nameLocation": "1934:2:47", "nodeType": "VariableDeclaration", "scope": 46036, "src": "1926:10:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45994, "name": "address", "nodeType": "ElementaryTypeName", "src": "1926:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 45997, "mutability": "mutable", "name": "value", "nameLocation": "1954:5:47", "nodeType": "VariableDeclaration", "scope": 46036, "src": "1946:13:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 45996, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1946:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "1893:72:47" }, "returnParameters": { "id": 45999, "nodeType": "ParameterList", "parameters": [], "src": "1975:0:47" }, "scope": 46063, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "id": 46062, "nodeType": "FunctionDefinition", "src": "2370:165:47", "nodes": [], "body": { "id": 46061, "nodeType": "Block", "src": "2431:104:47", "nodes": [], "statements": [ { "assignments": [ 46045, null ], "declarations": [ { "constant": false, "id": 46045, "mutability": "mutable", "name": "success", "nameLocation": "2447:7:47", "nodeType": "VariableDeclaration", "scope": 46061, "src": "2442:12:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 46044, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2442:4:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, null ], "id": 46055, "initialValue": { "arguments": [ { "arguments": [ { "hexValue": "30", "id": 46052, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2492:1:47", "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": 46051, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", "src": "2482:9:47", "typeDescriptions": { "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", "typeString": "function (uint256) pure returns (bytes memory)" }, "typeName": { "id": 46050, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2486:5:47", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } } }, "id": 46053, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2482:12:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "expression": { "id": 46046, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46039, "src": "2460:2:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 46047, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2463:4:47", "memberName": "call", "nodeType": "MemberAccess", "src": "2460:7:47", "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": 46049, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "names": [ "value" ], "nodeType": "FunctionCallOptions", "options": [ { "id": 46048, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46041, "src": "2475:5:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "src": "2460:21:47", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, "id": 46054, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2460:35:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "tuple(bool,bytes memory)" } }, "nodeType": "VariableDeclarationStatement", "src": "2441:54:47" }, { "expression": { "arguments": [ { "id": 46057, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46045, "src": "2513:7:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "535445", "id": 46058, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2522:5:47", "typeDescriptions": { "typeIdentifier": "t_stringliteral_48541fce89df928ec30caa1aed6c0cd94b8e2ef76b3c68b10b9a184ceadb93d4", "typeString": "literal_string \"STE\"" }, "value": "STE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_48541fce89df928ec30caa1aed6c0cd94b8e2ef76b3c68b10b9a184ceadb93d4", "typeString": "literal_string \"STE\"" } ], "id": 46056, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "2505:7:47", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 46059, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2505:23:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 46060, "nodeType": "ExpressionStatement", "src": "2505:23:47" } ] }, "documentation": { "id": 46037, "nodeType": "StructuredDocumentation", "src": "2186:179:47", "text": "@notice Transfers ETH to the recipient address\n @dev Fails with `STE`\n @param to The destination of the transfer\n @param value The value to be transferred" }, "implemented": true, "kind": "function", "modifiers": [], "name": "safeTransferETH", "nameLocation": "2379:15:47", "parameters": { "id": 46042, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 46039, "mutability": "mutable", "name": "to", "nameLocation": "2403:2:47", "nodeType": "VariableDeclaration", "scope": 46062, "src": "2395:10:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 46038, "name": "address", "nodeType": "ElementaryTypeName", "src": "2395:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 46041, "mutability": "mutable", "name": "value", "nameLocation": "2415:5:47", "nodeType": "VariableDeclaration", "scope": 46062, "src": "2407:13:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 46040, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2407:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "2394:27:47" }, "returnParameters": { "id": 46043, "nodeType": "ParameterList", "parameters": [], "src": "2431:0:47" }, "scope": 46063, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" } ], "abstract": false, "baseContracts": [], "canonicalName": "TransferHelper", "contractDependencies": [], "contractKind": "library", "fullyImplemented": true, "linearizedBaseContracts": [ 46063 ], "name": "TransferHelper", "nameLocation": "137:14:47", "scope": 46064, "usedErrors": [], "usedEvents": [] } ], "license": "GPL-2.0-or-later" }, "id": 47 }