{ "abi": [], "bytecode": { "object": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122056be2ebce76e4290720561f253dc753a19ee8769db9f15ec48ecc4a27ee349dd64736f6c63430008160033", "sourceMap": "255:5831:56:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;255:5831:56;;;;;;;;;;;;;;;;;", "linkReferences": {} }, "deployedBytecode": { "object": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122056be2ebce76e4290720561f253dc753a19ee8769db9f15ec48ecc4a27ee349dd64736f6c63430008160033", "sourceMap": "255:5831:56:-: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\":{\"src/UniswapSwapper.sol\":\"UniswapSwapper\"},\"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/forge-std/src/console2.sol\":{\"keccak256\":\"0x954646445d1014c3cd85c7918f5e7adeeca5ee44b68c00bafa237e597a4e35ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://516fa3be52da4763147175bfba4be0aa011fadbb0c1afb01f97265bd4cee7973\",\"dweb:/ipfs/QmdixAyMJefx7qePChgdxcBH5MxhmN7vsqPuPLx3CgrVmF\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0xab28a56179c1db258c9bf5235b382698cb650debecb51b23d12be9e241374b68\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://daae589a9d6fa7e55f99f86c0a16796ca490f243fb3693632c3711c0646c1d56\",\"dweb:/ipfs/QmR3zpd7wNw3rcUdekwiv6FYHJqksuTCXLVioTxu6Fbxk3\"]},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Enumerable.sol\":{\"keccak256\":\"0xd1556954440b31c97a142c6ba07d5cade45f96fafd52091d33a14ebe365aecbf\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://26fef835622b46a5ba08b3ef6b46a22e94b5f285d0f0fb66b703bd30217d2c34\",\"dweb:/ipfs/QmZ548qdwfL1qF7aXz3xh1GCdTiST81kGGuKRqVUfYmPZR\"]},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a0a107160525724f9e1bbbab031defc2f298296dd9e331f16a6f7130cec32146\",\"dweb:/ipfs/QmemujxSd7gX8A9M8UwmNbz4Ms3U9FG9QfudUgxwvTmPWf\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"lib_uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol\":{\"keccak256\":\"0xcc3d0c93fc9ac0febbe09f941b465b57f750bcf3b48432da0b97dc289cfdc489\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://b9379ad954680c44a0bc523b314ae4c4da735f9fe1d02aa56ea5bdba6f1136f2\",\"dweb:/ipfs/QmZXdgQNXKAckrXWz9R3mc47F1fvDvr28a2ewJrwNAw71B\"]},\"lib_uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol\":{\"keccak256\":\"0x3f485fb1a44e8fbeadefb5da07d66edab3cfe809f0ac4074b1e54e3eb3c4cf69\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://095ce0626b41318c772b3ebf19d548282607f6a8f3d6c41c13edfbd5370c8652\",\"dweb:/ipfs/QmVDZfJJ89UUCE1hMyzqpkZAtQ8jUsBgZNE5AMRG7RzRFS\"]},\"lib_uniswap/v3-periphery/contracts/interfaces/IERC721Permit.sol\":{\"keccak256\":\"0x9e3c2a4ee65ddf95b2dfcb0815784eea3a295707e6f8b83e4c4f0f8fe2e3a1d4\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://bfd939085b3618101b955f87c7fabf38338ba1aad480295acb8102ebc5d72471\",\"dweb:/ipfs/QmauQD8bGDHTztmTDfaKXjzM7Wacrq2XU7VcTbwn1WrDBL\"]},\"lib_uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol\":{\"keccak256\":\"0x3357b065654abb7f4a9ebd184a260bc39efde2afa4e99dca2e72ffc28e9c2984\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://f7682dab014724be8e0a5a401b047788ff9c70b77fa5bd567ea6adc333cb3b56\",\"dweb:/ipfs/QmatH1Gc6z3AkP4dHjAEBKfCBbgBfD4vCceF4TuZU2bCyW\"]},\"lib_uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState.sol\":{\"keccak256\":\"0x7affcfeb5127c0925a71d6a65345e117c33537523aeca7bc98085ead8452519d\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://e16b291294210e71cb0f20cd0afe62ae2dc6878d627f5ccc19c4dc9cd80aec3f\",\"dweb:/ipfs/QmQGitSyBr26nour81BZmpmDMyJpvZRqHQZvnCD1Acb127\"]},\"lib_uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments.sol\":{\"keccak256\":\"0xb547e10f1e69bed03621a62b73a503e260643066c6b4054867a4d1fef47eb274\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://f9a90f58f5fd5fb42f7811f4094113b532f307b14a73764c91f977590747f407\",\"dweb:/ipfs/QmSeNH2mfiDMKf3Q6V2sqtNxx1s72JNuA1VVxRM9HoMqYp\"]},\"lib_uniswap/v3-periphery/contracts/interfaces/IPoolInitializer.sol\":{\"keccak256\":\"0x9d7695e8d94c22cc5fcced602017aabb988de89981ea7bee29ea629d5328a862\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://61b50933026ee1017db2a6273af8cedc3238c95dca58880db0918dbdbb2f064f\",\"dweb:/ipfs/QmUebR26pqG25d18aBELKz8aFFKkmHa8PxntzXTA7o9Ldu\"]},\"lib_uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol\":{\"keccak256\":\"0x9bfaf1feb32814623e627ab70f2409760b15d95f1f9b058e2b3399a8bb732975\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://a8a2c3e55965b61bcd91993d8e1d5d34b8b8a63e0fdfce87a85f6af92526fd53\",\"dweb:/ipfs/QmQj2CSCSwqDSU4KMNWxGsN2336Cy64WgpV1X1EHXNZWxM\"]},\"lib_uniswap/v3-periphery/contracts/libraries/PoolAddress.sol\":{\"keccak256\":\"0x0a107d09991fd2dc9a3ca13bf0745f0b6f6f6ffea3e55ad3677ecdbadef089b4\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://e179110a9ec825b7f15384a9c61f90261fe6227b289dac9996b0ed9cf1655b48\",\"dweb:/ipfs/Qma2amC8zJSW2PzPCk1nBYiFd4mjZiAW9z4kxjoYZPCtRr\"]},\"lib_uniswap/v3-periphery/contracts/libraries/TransferHelper.sol\":{\"keccak256\":\"0x9af98b0908c96320ca6d08b22f0efca864742f6adbe5794cafe2d1d2e808b0cd\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://da1d1e81e5bf534f0bf2934b3193db6cb1933f91ec006d2b88e9ad10a617a2d2\",\"dweb:/ipfs/QmcPBk47QLMFWcX2y2S9eMFsJgoYWBd3R8ey55Bgmv6w6v\"]},\"src/Constants.sol\":{\"keccak256\":\"0x0dfa2216f60ff43f051a140d565171d67dc461b61dd7c486668c6f085d9405c3\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://015f74b4f9193c43cd67d59dcf9f2c5338995eee0d7cd0feb4d4ab908e3492be\",\"dweb:/ipfs/QmUaawZvDZi2ERKNE34xGkQvBjoKhdddCTduPxWZZGf1pu\"]},\"src/UniswapSwapper.sol\":{\"keccak256\":\"0xeba32c1f50322147452a5e8bb33daf0de90d0abaa26929f00da4cea788f92825\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://ccef611297b80392e32363f9dce4f10403d2a9b3780475ffde7c38f1f2d23781\",\"dweb:/ipfs/QmVCN2oa3aQCx1KMxGN7EM4reJNFxegXyLSCQoe62dM2Kx\"]}},\"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": { "src/UniswapSwapper.sol": "UniswapSwapper" }, "libraries": {} }, "sources": { "lib/forge-std/src/console2.sol": { "keccak256": "0x954646445d1014c3cd85c7918f5e7adeeca5ee44b68c00bafa237e597a4e35ea", "urls": [ "bzz-raw://516fa3be52da4763147175bfba4be0aa011fadbb0c1afb01f97265bd4cee7973", "dweb:/ipfs/QmdixAyMJefx7qePChgdxcBH5MxhmN7vsqPuPLx3CgrVmF" ], "license": "MIT" }, "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol": { "keccak256": "0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b", "urls": [ "bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34", "dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr" ], "license": "MIT" }, "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol": { "keccak256": "0xab28a56179c1db258c9bf5235b382698cb650debecb51b23d12be9e241374b68", "urls": [ "bzz-raw://daae589a9d6fa7e55f99f86c0a16796ca490f243fb3693632c3711c0646c1d56", "dweb:/ipfs/QmR3zpd7wNw3rcUdekwiv6FYHJqksuTCXLVioTxu6Fbxk3" ], "license": "MIT" }, "lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Enumerable.sol": { "keccak256": "0xd1556954440b31c97a142c6ba07d5cade45f96fafd52091d33a14ebe365aecbf", "urls": [ "bzz-raw://26fef835622b46a5ba08b3ef6b46a22e94b5f285d0f0fb66b703bd30217d2c34", "dweb:/ipfs/QmZ548qdwfL1qF7aXz3xh1GCdTiST81kGGuKRqVUfYmPZR" ], "license": "MIT" }, "lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol": { "keccak256": "0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9", "urls": [ "bzz-raw://a0a107160525724f9e1bbbab031defc2f298296dd9e331f16a6f7130cec32146", "dweb:/ipfs/QmemujxSd7gX8A9M8UwmNbz4Ms3U9FG9QfudUgxwvTmPWf" ], "license": "MIT" }, "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol": { "keccak256": "0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1", "urls": [ "bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f", "dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy" ], "license": "MIT" }, "lib_uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol": { "keccak256": "0xcc3d0c93fc9ac0febbe09f941b465b57f750bcf3b48432da0b97dc289cfdc489", "urls": [ "bzz-raw://b9379ad954680c44a0bc523b314ae4c4da735f9fe1d02aa56ea5bdba6f1136f2", "dweb:/ipfs/QmZXdgQNXKAckrXWz9R3mc47F1fvDvr28a2ewJrwNAw71B" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol": { "keccak256": "0x3f485fb1a44e8fbeadefb5da07d66edab3cfe809f0ac4074b1e54e3eb3c4cf69", "urls": [ "bzz-raw://095ce0626b41318c772b3ebf19d548282607f6a8f3d6c41c13edfbd5370c8652", "dweb:/ipfs/QmVDZfJJ89UUCE1hMyzqpkZAtQ8jUsBgZNE5AMRG7RzRFS" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/interfaces/IERC721Permit.sol": { "keccak256": "0x9e3c2a4ee65ddf95b2dfcb0815784eea3a295707e6f8b83e4c4f0f8fe2e3a1d4", "urls": [ "bzz-raw://bfd939085b3618101b955f87c7fabf38338ba1aad480295acb8102ebc5d72471", "dweb:/ipfs/QmauQD8bGDHTztmTDfaKXjzM7Wacrq2XU7VcTbwn1WrDBL" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol": { "keccak256": "0x3357b065654abb7f4a9ebd184a260bc39efde2afa4e99dca2e72ffc28e9c2984", "urls": [ "bzz-raw://f7682dab014724be8e0a5a401b047788ff9c70b77fa5bd567ea6adc333cb3b56", "dweb:/ipfs/QmatH1Gc6z3AkP4dHjAEBKfCBbgBfD4vCceF4TuZU2bCyW" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState.sol": { "keccak256": "0x7affcfeb5127c0925a71d6a65345e117c33537523aeca7bc98085ead8452519d", "urls": [ "bzz-raw://e16b291294210e71cb0f20cd0afe62ae2dc6878d627f5ccc19c4dc9cd80aec3f", "dweb:/ipfs/QmQGitSyBr26nour81BZmpmDMyJpvZRqHQZvnCD1Acb127" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments.sol": { "keccak256": "0xb547e10f1e69bed03621a62b73a503e260643066c6b4054867a4d1fef47eb274", "urls": [ "bzz-raw://f9a90f58f5fd5fb42f7811f4094113b532f307b14a73764c91f977590747f407", "dweb:/ipfs/QmSeNH2mfiDMKf3Q6V2sqtNxx1s72JNuA1VVxRM9HoMqYp" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/interfaces/IPoolInitializer.sol": { "keccak256": "0x9d7695e8d94c22cc5fcced602017aabb988de89981ea7bee29ea629d5328a862", "urls": [ "bzz-raw://61b50933026ee1017db2a6273af8cedc3238c95dca58880db0918dbdbb2f064f", "dweb:/ipfs/QmUebR26pqG25d18aBELKz8aFFKkmHa8PxntzXTA7o9Ldu" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol": { "keccak256": "0x9bfaf1feb32814623e627ab70f2409760b15d95f1f9b058e2b3399a8bb732975", "urls": [ "bzz-raw://a8a2c3e55965b61bcd91993d8e1d5d34b8b8a63e0fdfce87a85f6af92526fd53", "dweb:/ipfs/QmQj2CSCSwqDSU4KMNWxGsN2336Cy64WgpV1X1EHXNZWxM" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/libraries/PoolAddress.sol": { "keccak256": "0x0a107d09991fd2dc9a3ca13bf0745f0b6f6f6ffea3e55ad3677ecdbadef089b4", "urls": [ "bzz-raw://e179110a9ec825b7f15384a9c61f90261fe6227b289dac9996b0ed9cf1655b48", "dweb:/ipfs/Qma2amC8zJSW2PzPCk1nBYiFd4mjZiAW9z4kxjoYZPCtRr" ], "license": "GPL-2.0-or-later" }, "lib_uniswap/v3-periphery/contracts/libraries/TransferHelper.sol": { "keccak256": "0x9af98b0908c96320ca6d08b22f0efca864742f6adbe5794cafe2d1d2e808b0cd", "urls": [ "bzz-raw://da1d1e81e5bf534f0bf2934b3193db6cb1933f91ec006d2b88e9ad10a617a2d2", "dweb:/ipfs/QmcPBk47QLMFWcX2y2S9eMFsJgoYWBd3R8ey55Bgmv6w6v" ], "license": "GPL-2.0-or-later" }, "src/Constants.sol": { "keccak256": "0x0dfa2216f60ff43f051a140d565171d67dc461b61dd7c486668c6f085d9405c3", "urls": [ "bzz-raw://015f74b4f9193c43cd67d59dcf9f2c5338995eee0d7cd0feb4d4ab908e3492be", "dweb:/ipfs/QmUaawZvDZi2ERKNE34xGkQvBjoKhdddCTduPxWZZGf1pu" ], "license": "UNLICENSED" }, "src/UniswapSwapper.sol": { "keccak256": "0xeba32c1f50322147452a5e8bb33daf0de90d0abaa26929f00da4cea788f92825", "urls": [ "bzz-raw://ccef611297b80392e32363f9dce4f10403d2a9b3780475ffde7c38f1f2d23781", "dweb:/ipfs/QmVCN2oa3aQCx1KMxGN7EM4reJNFxegXyLSCQoe62dM2Kx" ], "license": "UNLICENSED" } }, "version": 1 }, "ast": { "absolutePath": "src/UniswapSwapper.sol", "id": 48845, "exportedSymbols": { "Constants": [ 46261 ], "IERC165": [ 43789 ], "IERC20": [ 43556 ], "IERC721": [ 43697 ], "IERC721Enumerable": [ 43728 ], "IERC721Metadata": [ 43755 ], "IERC721Permit": [ 45094 ], "INonfungiblePositionManager": [ 45293 ], "IPeripheryImmutableState": [ 45309 ], "IPeripheryPayments": [ 45335 ], "IPoolInitializer": [ 45354 ], "ISwapRouter": [ 45454 ], "IUniswapV3Factory": [ 43872 ], "IUniswapV3SwapCallback": [ 43908 ], "PoolAddress": [ 45892 ], "TransferHelper": [ 46063 ], "UniswapSwapper": [ 48844 ], "console2": [ 29653 ] }, "nodeType": "SourceUnit", "src": "39:6048:56", "nodes": [ { "id": 48319, "nodeType": "PragmaDirective", "src": "39:24:56", "nodes": [], "literals": [ "solidity", ">=", "0.8", ".0" ] }, { "id": 48320, "nodeType": "PragmaDirective", "src": "64:19:56", "nodes": [], "literals": [ "abicoder", "v2" ] }, { "id": 48321, "nodeType": "ImportDirective", "src": "85:25:56", "nodes": [], "absolutePath": "src/Constants.sol", "file": "./Constants.sol", "nameLocation": "-1:-1:-1", "scope": 48845, "sourceUnit": 46262, "symbolAliases": [], "unitAlias": "" }, { "id": 48322, "nodeType": "ImportDirective", "src": "111:56:56", "nodes": [], "absolutePath": "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol", "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", "nameLocation": "-1:-1:-1", "scope": 48845, "sourceUnit": 43557, "symbolAliases": [], "unitAlias": "" }, { "id": 48323, "nodeType": "ImportDirective", "src": "168:51:56", "nodes": [], "absolutePath": "lib_uniswap/v3-periphery/contracts/libraries/TransferHelper.sol", "file": "v3-periphery/libraries/TransferHelper.sol", "nameLocation": "-1:-1:-1", "scope": 48845, "sourceUnit": 46064, "symbolAliases": [], "unitAlias": "" }, { "id": 48324, "nodeType": "ImportDirective", "src": "220:32:56", "nodes": [], "absolutePath": "lib/forge-std/src/console2.sol", "file": "forge-std/console2.sol", "nameLocation": "-1:-1:-1", "scope": 48845, "sourceUnit": 29654, "symbolAliases": [], "unitAlias": "" }, { "id": 48844, "nodeType": "ContractDefinition", "src": "255:5831:56", "nodes": [ { "id": 48339, "nodeType": "StructDefinition", "src": "285:293:56", "nodes": [], "canonicalName": "UniswapSwapper.SwapParams", "members": [ { "constant": false, "id": 48326, "mutability": "mutable", "name": "pool", "nameLocation": "321:4:56", "nodeType": "VariableDeclaration", "scope": 48339, "src": "313:12:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 48325, "name": "address", "nodeType": "ElementaryTypeName", "src": "313:7:56", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 48328, "mutability": "mutable", "name": "tokenIn", "nameLocation": "343:7:56", "nodeType": "VariableDeclaration", "scope": 48339, "src": "335:15:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 48327, "name": "address", "nodeType": "ElementaryTypeName", "src": "335:7:56", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 48330, "mutability": "mutable", "name": "tokenOut", "nameLocation": "368:8:56", "nodeType": "VariableDeclaration", "scope": 48339, "src": "360:16:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 48329, "name": "address", "nodeType": "ElementaryTypeName", "src": "360:7:56", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 48332, "mutability": "mutable", "name": "recipient", "nameLocation": "394:9:56", "nodeType": "VariableDeclaration", "scope": 48339, "src": "386:17:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 48331, "name": "address", "nodeType": "ElementaryTypeName", "src": "386:7:56", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 48334, "mutability": "mutable", "name": "fee", "nameLocation": "509:3:56", "nodeType": "VariableDeclaration", "scope": 48339, "src": "502:10:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" }, "typeName": { "id": 48333, "name": "uint24", "nodeType": "ElementaryTypeName", "src": "502:6:56", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, "visibility": "internal" }, { "constant": false, "id": 48336, "mutability": "mutable", "name": "amount", "nameLocation": "530:6:56", "nodeType": "VariableDeclaration", "scope": 48339, "src": "522:14:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48335, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "522:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 48338, "mutability": "mutable", "name": "sqrtPriceLimitX96", "nameLocation": "554:17:56", "nodeType": "VariableDeclaration", "scope": 48339, "src": "546:25:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" }, "typeName": { "id": 48337, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "546:7:56", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "visibility": "internal" } ], "name": "SwapParams", "nameLocation": "292:10:56", "scope": 48844, "visibility": "public" }, { "id": 48529, "nodeType": "FunctionDefinition", "src": "584:1981:56", "nodes": [], "body": { "id": 48528, "nodeType": "Block", "src": "693:1872:56", "nodes": [], "statements": [ { "expression": { "arguments": [ { "hexValue": "737761704578616374496e70757420617070726f76652e2e2e", "id": 48352, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1078:27:56", "typeDescriptions": { "typeIdentifier": "t_stringliteral_0df20dea6fcd4bd16a605a1732f2967daf9db7866e999d25fff8dac403f3ccd7", "typeString": "literal_string \"swapExactInput approve...\"" }, "value": "swapExactInput approve..." } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_0df20dea6fcd4bd16a605a1732f2967daf9db7866e999d25fff8dac403f3ccd7", "typeString": "literal_string \"swapExactInput approve...\"" } ], "expression": { "id": 48349, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "1065:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48351, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1074:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "1065:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 48353, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1065:41:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48354, "nodeType": "ExpressionStatement", "src": "1065:41:56" }, { "expression": { "arguments": [ { "arguments": [ { "id": 48360, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1137:4:56", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapSwapper_$48844", "typeString": "library UniswapSwapper" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapSwapper_$48844", "typeString": "library UniswapSwapper" } ], "id": 48359, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1129:7:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 48358, "name": "address", "nodeType": "ElementaryTypeName", "src": "1129:7:56", "typeDescriptions": {} } }, "id": 48361, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1129:13:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 48355, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "1116:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48357, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1125:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22195, "src": "1116:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", "typeString": "function (address) pure" } }, "id": 48362, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1116:27:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48363, "nodeType": "ExpressionStatement", "src": "1116:27:56" }, { "expression": { "arguments": [ { "expression": { "id": 48367, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "1166:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48368, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "1173:7:56", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 48328, "src": "1166:14:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 48364, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "1153:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48366, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1162:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22195, "src": "1153:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", "typeString": "function (address) pure" } }, "id": 48369, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1153:28:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48370, "nodeType": "ExpressionStatement", "src": "1153:28:56" }, { "expression": { "arguments": [ { "expression": { "id": 48374, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "1204:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48375, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "1211:8:56", "memberName": "tokenOut", "nodeType": "MemberAccess", "referencedDeclaration": 48330, "src": "1204:15:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 48371, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "1191:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48373, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1200:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22195, "src": "1191:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", "typeString": "function (address) pure" } }, "id": 48376, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1191:29:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48377, "nodeType": "ExpressionStatement", "src": "1191:29:56" }, { "expression": { "arguments": [ { "arguments": [ { "expression": { "id": 48383, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "1248:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48384, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "1255:3:56", "memberName": "fee", "nodeType": "MemberAccess", "referencedDeclaration": 48334, "src": "1248:10:56", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint24", "typeString": "uint24" } ], "id": 48382, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1243:4:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 48381, "name": "uint", "nodeType": "ElementaryTypeName", "src": "1243:4:56", "typeDescriptions": {} } }, "id": 48385, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1243:16:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 48378, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "1230:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48380, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1239:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "1230:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 48386, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1230:30:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48387, "nodeType": "ExpressionStatement", "src": "1230:30:56" }, { "expression": { "arguments": [ { "arguments": [ { "expression": { "id": 48393, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "1291:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48394, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "1298:9:56", "memberName": "recipient", "nodeType": "MemberAccess", "referencedDeclaration": 48332, "src": "1291:16:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 48392, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1283:7:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 48391, "name": "address", "nodeType": "ElementaryTypeName", "src": "1283:7:56", "typeDescriptions": {} } }, "id": 48395, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1283:25:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 48388, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "1270:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48390, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1279:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22195, "src": "1270:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", "typeString": "function (address) pure" } }, "id": 48396, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1270:39:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48397, "nodeType": "ExpressionStatement", "src": "1270:39:56" }, { "expression": { "arguments": [ { "expression": { "id": 48401, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "1332:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48402, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "1339:6:56", "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 48336, "src": "1332:13:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 48398, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "1319:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48400, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1328:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "1319:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 48403, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1319:27:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48404, "nodeType": "ExpressionStatement", "src": "1319:27:56" }, { "expression": { "arguments": [ { "arguments": [ { "expression": { "id": 48410, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "1374:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48411, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "1381:17:56", "memberName": "sqrtPriceLimitX96", "nodeType": "MemberAccess", "referencedDeclaration": 48338, "src": "1374:24:56", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint160", "typeString": "uint160" } ], "id": 48409, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1369:4:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 48408, "name": "uint", "nodeType": "ElementaryTypeName", "src": "1369:4:56", "typeDescriptions": {} } }, "id": 48412, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1369:30:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 48405, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "1356:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48407, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1365:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "1356:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 48413, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1356:44:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48414, "nodeType": "ExpressionStatement", "src": "1356:44:56" }, { "expression": { "arguments": [ { "arguments": [ { "expression": { "id": 48420, "name": "Constants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46261, "src": "1431:9:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Constants_$46261_$", "typeString": "type(library Constants)" } }, "id": 48421, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "1441:19:56", "memberName": "uniswapV3SwapRouter", "nodeType": "MemberAccess", "referencedDeclaration": 46260, "src": "1431:29:56", "typeDescriptions": { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } ], "id": 48419, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1423:7:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 48418, "name": "address", "nodeType": "ElementaryTypeName", "src": "1423:7:56", "typeDescriptions": {} } }, "id": 48422, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1423:38:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 48415, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "1410:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48417, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1419:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22195, "src": "1410:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", "typeString": "function (address) pure" } }, "id": 48423, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1410:52:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48424, "nodeType": "ExpressionStatement", "src": "1410:52:56" }, { "expression": { "id": 48428, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 48425, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48345, "src": "1473:8:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 48426, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "1484:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48427, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "1491:6:56", "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 48336, "src": "1484:13:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1473:24:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 48429, "nodeType": "ExpressionStatement", "src": "1473:24:56" }, { "assignments": [ 48431 ], "declarations": [ { "constant": false, "id": 48431, "mutability": "mutable", "name": "balance", "nameLocation": "1515:7:56", "nodeType": "VariableDeclaration", "scope": 48528, "src": "1507:15:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48430, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1507:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 48442, "initialValue": { "arguments": [ { "arguments": [ { "id": 48439, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1566:4:56", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapSwapper_$48844", "typeString": "library UniswapSwapper" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapSwapper_$48844", "typeString": "library UniswapSwapper" } ], "id": 48438, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1558:7:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 48437, "name": "address", "nodeType": "ElementaryTypeName", "src": "1558:7:56", "typeDescriptions": {} } }, "id": 48440, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1558:13:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "arguments": [ { "expression": { "id": 48433, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "1532:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48434, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "1539:7:56", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 48328, "src": "1532:14:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 48432, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 43556, "src": "1525:6:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$43556_$", "typeString": "type(contract IERC20)" } }, "id": 48435, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1525:22:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$43556", "typeString": "contract IERC20" } }, "id": 48436, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1548:9:56", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 43513, "src": "1525:32:56", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 48441, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1525:47:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "1507:65:56" }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 48445, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 48443, "name": "balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48431, "src": "1586:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "hexValue": "30", "id": 48444, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1597:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1586:12:56", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 48451, "nodeType": "IfStatement", "src": "1582:83:56", "trueBody": { "id": 48450, "nodeType": "Block", "src": "1601:64:56", "statements": [ { "expression": { "arguments": [ { "hexValue": "494941", "id": 48447, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1648:5:56", "typeDescriptions": { "typeIdentifier": "t_stringliteral_ead9ba8f24b0c9c3e87a0076a48a0a166e1d5cd0bd355971195d20d966e145fc", "typeString": "literal_string \"IIA\"" }, "value": "IIA" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_ead9ba8f24b0c9c3e87a0076a48a0a166e1d5cd0bd355971195d20d966e145fc", "typeString": "literal_string \"IIA\"" } ], "id": 48446, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "1641:6:56", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 48448, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1641:13:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48449, "nodeType": "ExpressionStatement", "src": "1641:13:56" } ] } }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 48454, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 48452, "name": "balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48431, "src": "1678:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "id": 48453, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48345, "src": "1688:8:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1678:18:56", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 48459, "nodeType": "IfStatement", "src": "1674:55:56", "trueBody": { "expression": { "id": 48457, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 48455, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48345, "src": "1711:8:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 48456, "name": "balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48431, "src": "1722:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1711:18:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 48458, "nodeType": "ExpressionStatement", "src": "1711:18:56" } }, { "expression": { "arguments": [ { "expression": { "id": 48463, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "1767:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48464, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "1774:7:56", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 48328, "src": "1767:14:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "arguments": [ { "expression": { "id": 48467, "name": "Constants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46261, "src": "1791:9:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Constants_$46261_$", "typeString": "type(library Constants)" } }, "id": 48468, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "1801:19:56", "memberName": "uniswapV3SwapRouter", "nodeType": "MemberAccess", "referencedDeclaration": 46260, "src": "1791:29:56", "typeDescriptions": { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } ], "id": 48466, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1783:7:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 48465, "name": "address", "nodeType": "ElementaryTypeName", "src": "1783:7:56", "typeDescriptions": {} } }, "id": 48469, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1783:38:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 48470, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48345, "src": "1823:8:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 48460, "name": "TransferHelper", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46063, "src": "1740:14:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_TransferHelper_$46063_$", "typeString": "type(library TransferHelper)" } }, "id": 48462, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1755:11:56", "memberName": "safeApprove", "nodeType": "MemberAccess", "referencedDeclaration": 46036, "src": "1740:26:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, "id": 48471, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1740:92:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48472, "nodeType": "ExpressionStatement", "src": "1740:92:56" }, { "expression": { "arguments": [ { "hexValue": "7377617070696e672e2e2e", "id": 48476, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2032:13:56", "typeDescriptions": { "typeIdentifier": "t_stringliteral_52bc5304535ca536835e2660a8952b1f8d5ddddb47fa9f0f4f22cba63596ba46", "typeString": "literal_string \"swapping...\"" }, "value": "swapping..." } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_52bc5304535ca536835e2660a8952b1f8d5ddddb47fa9f0f4f22cba63596ba46", "typeString": "literal_string \"swapping...\"" } ], "expression": { "id": 48473, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "2019:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48475, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2028:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "2019:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 48477, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2019:27:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48478, "nodeType": "ExpressionStatement", "src": "2019:27:56" }, { "expression": { "id": 48501, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 48479, "name": "amountOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48347, "src": "2056:9:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "arguments": [ { "expression": { "id": 48485, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "2173:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48486, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "2180:7:56", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 48328, "src": "2173:14:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 48487, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "2199:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48488, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "2206:8:56", "memberName": "tokenOut", "nodeType": "MemberAccess", "referencedDeclaration": 48330, "src": "2199:15:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 48489, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "2221:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48490, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "2228:3:56", "memberName": "fee", "nodeType": "MemberAccess", "referencedDeclaration": 48334, "src": "2221:10:56", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, { "expression": { "id": 48491, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "2244:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48492, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "2251:9:56", "memberName": "recipient", "nodeType": "MemberAccess", "referencedDeclaration": 48332, "src": "2244:16:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 48493, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, "src": "2284:5:56", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 48494, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2290:9:56", "memberName": "timestamp", "nodeType": "MemberAccess", "src": "2284:15:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 48495, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48345, "src": "2311:8:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "hexValue": "31", "id": 48496, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2339:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, { "expression": { "id": 48497, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "2361:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48498, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "2368:17:56", "memberName": "sqrtPriceLimitX96", "nodeType": "MemberAccess", "referencedDeclaration": 48338, "src": "2361:24:56", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint24", "typeString": "uint24" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, { "typeIdentifier": "t_uint160", "typeString": "uint160" } ], "expression": { "id": 48483, "name": "ISwapRouter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45454, "src": "2115:11:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_ISwapRouter_$45454_$", "typeString": "type(contract ISwapRouter)" } }, "id": 48484, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2127:22:56", "memberName": "ExactInputSingleParams", "nodeType": "MemberAccess", "referencedDeclaration": 45378, "src": "2115:34:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_ExactInputSingleParams_$45378_storage_ptr_$", "typeString": "type(struct ISwapRouter.ExactInputSingleParams storage pointer)" } }, "id": 48499, "isConstant": false, "isLValue": false, "isPure": false, "kind": "structConstructorCall", "lValueRequested": false, "nameLocations": [ "2164:7:56", "2189:8:56", "2216:3:56", "2233:9:56", "2274:8:56", "2301:8:56", "2321:16:56", "2342:17:56" ], "names": [ "tokenIn", "tokenOut", "fee", "recipient", "deadline", "amountIn", "amountOutMinimum", "sqrtPriceLimitX96" ], "nodeType": "FunctionCall", "src": "2115:281:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_ExactInputSingleParams_$45378_memory_ptr", "typeString": "struct ISwapRouter.ExactInputSingleParams memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_ExactInputSingleParams_$45378_memory_ptr", "typeString": "struct ISwapRouter.ExactInputSingleParams memory" } ], "expression": { "expression": { "id": 48480, "name": "Constants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46261, "src": "2068:9:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Constants_$46261_$", "typeString": "type(library Constants)" } }, "id": 48481, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "2078:19:56", "memberName": "uniswapV3SwapRouter", "nodeType": "MemberAccess", "referencedDeclaration": 46260, "src": "2068:29:56", "typeDescriptions": { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } }, "id": 48482, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2098:16:56", "memberName": "exactInputSingle", "nodeType": "MemberAccess", "referencedDeclaration": 45387, "src": "2068:46:56", "typeDescriptions": { "typeIdentifier": "t_function_external_payable$_t_struct$_ExactInputSingleParams_$45378_memory_ptr_$returns$_t_uint256_$", "typeString": "function (struct ISwapRouter.ExactInputSingleParams memory) payable external returns (uint256)" } }, "id": 48500, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2068:329:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2056:341:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 48502, "nodeType": "ExpressionStatement", "src": "2056:341:56" }, { "expression": { "arguments": [ { "hexValue": "73776170706564", "id": 48506, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2420:9:56", "typeDescriptions": { "typeIdentifier": "t_stringliteral_ea70726f3c3d7c665487e2474e526a22024ec725a171343093798aad96942759", "typeString": "literal_string \"swapped\"" }, "value": "swapped" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_ea70726f3c3d7c665487e2474e526a22024ec725a171343093798aad96942759", "typeString": "literal_string \"swapped\"" } ], "expression": { "id": 48503, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "2407:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48505, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2416:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "2407:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 48507, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2407:23:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48508, "nodeType": "ExpressionStatement", "src": "2407:23:56" }, { "expression": { "arguments": [ { "id": 48512, "name": "amountOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48347, "src": "2453:9:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 48509, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "2440:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48511, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2449:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "2440:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 48513, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2440:23:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48514, "nodeType": "ExpressionStatement", "src": "2440:23:56" }, { "expression": { "arguments": [ { "expression": { "id": 48518, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48342, "src": "2500:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48519, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "2507:7:56", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 48328, "src": "2500:14:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "arguments": [ { "expression": { "id": 48522, "name": "Constants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46261, "src": "2524:9:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Constants_$46261_$", "typeString": "type(library Constants)" } }, "id": 48523, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "2534:19:56", "memberName": "uniswapV3SwapRouter", "nodeType": "MemberAccess", "referencedDeclaration": 46260, "src": "2524:29:56", "typeDescriptions": { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } ], "id": 48521, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2516:7:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 48520, "name": "address", "nodeType": "ElementaryTypeName", "src": "2516:7:56", "typeDescriptions": {} } }, "id": 48524, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2516:38:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "hexValue": "30", "id": 48525, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2556:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "expression": { "id": 48515, "name": "TransferHelper", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46063, "src": "2473:14:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_TransferHelper_$46063_$", "typeString": "type(library TransferHelper)" } }, "id": 48517, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2488:11:56", "memberName": "safeApprove", "nodeType": "MemberAccess", "referencedDeclaration": 46036, "src": "2473:26:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, "id": 48526, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2473:85:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48527, "nodeType": "ExpressionStatement", "src": "2473:85:56" } ] }, "implemented": true, "kind": "function", "modifiers": [], "name": "swapExactInput", "nameLocation": "593:14:56", "parameters": { "id": 48343, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 48342, "mutability": "mutable", "name": "params", "nameLocation": "626:6:56", "nodeType": "VariableDeclaration", "scope": 48529, "src": "608:24:56", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams" }, "typeName": { "id": 48341, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 48340, "name": "SwapParams", "nameLocations": [ "608:10:56" ], "nodeType": "IdentifierPath", "referencedDeclaration": 48339, "src": "608:10:56" }, "referencedDeclaration": 48339, "src": "608:10:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_storage_ptr", "typeString": "struct UniswapSwapper.SwapParams" } }, "visibility": "internal" } ], "src": "607:26:56" }, "returnParameters": { "id": 48348, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 48345, "mutability": "mutable", "name": "amountIn", "nameLocation": "660:8:56", "nodeType": "VariableDeclaration", "scope": 48529, "src": "652:16:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48344, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "652:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 48347, "mutability": "mutable", "name": "amountOut", "nameLocation": "678:9:56", "nodeType": "VariableDeclaration", "scope": 48529, "src": "670:17:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48346, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "670:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "651:37:56" }, "scope": 48844, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "id": 48790, "nodeType": "FunctionDefinition", "src": "2571:3025:56", "nodes": [], "body": { "id": 48789, "nodeType": "Block", "src": "2681:2915:56", "nodes": [], "statements": [ { "assignments": [ 48540 ], "declarations": [ { "constant": false, "id": 48540, "mutability": "mutable", "name": "balance", "nameLocation": "3117:7:56", "nodeType": "VariableDeclaration", "scope": 48789, "src": "3109:15:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48539, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3109:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 48551, "initialValue": { "arguments": [ { "arguments": [ { "id": 48548, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "3168:4:56", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapSwapper_$48844", "typeString": "library UniswapSwapper" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapSwapper_$48844", "typeString": "library UniswapSwapper" } ], "id": 48547, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3160:7:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 48546, "name": "address", "nodeType": "ElementaryTypeName", "src": "3160:7:56", "typeDescriptions": {} } }, "id": 48549, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3160:13:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "arguments": [ { "expression": { "id": 48542, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "3134:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48543, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "3141:7:56", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 48328, "src": "3134:14:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 48541, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 43556, "src": "3127:6:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$43556_$", "typeString": "type(contract IERC20)" } }, "id": 48544, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3127:22:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$43556", "typeString": "contract IERC20" } }, "id": 48545, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3150:9:56", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 43513, "src": "3127:32:56", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 48550, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3127:47:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3109:65:56" }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 48554, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 48552, "name": "balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48540, "src": "3188:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "hexValue": "30", "id": 48553, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3199:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3188:12:56", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 48560, "nodeType": "IfStatement", "src": "3184:83:56", "trueBody": { "id": 48559, "nodeType": "Block", "src": "3203:64:56", "statements": [ { "expression": { "arguments": [ { "hexValue": "494941", "id": 48556, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3250:5:56", "typeDescriptions": { "typeIdentifier": "t_stringliteral_ead9ba8f24b0c9c3e87a0076a48a0a166e1d5cd0bd355971195d20d966e145fc", "typeString": "literal_string \"IIA\"" }, "value": "IIA" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_ead9ba8f24b0c9c3e87a0076a48a0a166e1d5cd0bd355971195d20d966e145fc", "typeString": "literal_string \"IIA\"" } ], "id": 48555, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "3243:6:56", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 48557, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3243:13:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48558, "nodeType": "ExpressionStatement", "src": "3243:13:56" } ] } }, { "assignments": [ 48562 ], "declarations": [ { "constant": false, "id": 48562, "mutability": "mutable", "name": "maxAmountIn", "nameLocation": "3284:11:56", "nodeType": "VariableDeclaration", "scope": 48789, "src": "3276:19:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48561, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3276:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 48564, "initialValue": { "id": 48563, "name": "balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48540, "src": "3298:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3276:29:56" }, { "expression": { "arguments": [ { "hexValue": "7377617045786163744f757470757420617070726f76652e2e2e", "id": 48568, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3329:28:56", "typeDescriptions": { "typeIdentifier": "t_stringliteral_2a2e977824be8953ac2e3a572c10c40bba598f538c825d5766dbc63116064ac5", "typeString": "literal_string \"swapExactOutput approve...\"" }, "value": "swapExactOutput approve..." } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_2a2e977824be8953ac2e3a572c10c40bba598f538c825d5766dbc63116064ac5", "typeString": "literal_string \"swapExactOutput approve...\"" } ], "expression": { "id": 48565, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "3316:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48567, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3325:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "3316:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 48569, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3316:42:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48570, "nodeType": "ExpressionStatement", "src": "3316:42:56" }, { "expression": { "arguments": [ { "arguments": [ { "id": 48576, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "3389:4:56", "typeDescriptions": { "typeIdentifier": "t_contract$_UniswapSwapper_$48844", "typeString": "library UniswapSwapper" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_UniswapSwapper_$48844", "typeString": "library UniswapSwapper" } ], "id": 48575, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3381:7:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 48574, "name": "address", "nodeType": "ElementaryTypeName", "src": "3381:7:56", "typeDescriptions": {} } }, "id": 48577, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3381:13:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 48571, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "3368:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48573, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3377:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22195, "src": "3368:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", "typeString": "function (address) pure" } }, "id": 48578, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3368:27:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48579, "nodeType": "ExpressionStatement", "src": "3368:27:56" }, { "expression": { "arguments": [ { "expression": { "id": 48583, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "3418:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48584, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "3425:7:56", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 48328, "src": "3418:14:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 48580, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "3405:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48582, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3414:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22195, "src": "3405:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", "typeString": "function (address) pure" } }, "id": 48585, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3405:28:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48586, "nodeType": "ExpressionStatement", "src": "3405:28:56" }, { "expression": { "arguments": [ { "expression": { "id": 48590, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "3456:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48591, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "3463:8:56", "memberName": "tokenOut", "nodeType": "MemberAccess", "referencedDeclaration": 48330, "src": "3456:15:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 48587, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "3443:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48589, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3452:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22195, "src": "3443:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", "typeString": "function (address) pure" } }, "id": 48592, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3443:29:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48593, "nodeType": "ExpressionStatement", "src": "3443:29:56" }, { "expression": { "arguments": [ { "arguments": [ { "expression": { "id": 48599, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "3500:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48600, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "3507:3:56", "memberName": "fee", "nodeType": "MemberAccess", "referencedDeclaration": 48334, "src": "3500:10:56", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint24", "typeString": "uint24" } ], "id": 48598, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3495:4:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 48597, "name": "uint", "nodeType": "ElementaryTypeName", "src": "3495:4:56", "typeDescriptions": {} } }, "id": 48601, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3495:16:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 48594, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "3482:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48596, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3491:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "3482:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 48602, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3482:30:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48603, "nodeType": "ExpressionStatement", "src": "3482:30:56" }, { "expression": { "arguments": [ { "arguments": [ { "expression": { "id": 48609, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "3543:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48610, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "3550:9:56", "memberName": "recipient", "nodeType": "MemberAccess", "referencedDeclaration": 48332, "src": "3543:16:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 48608, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3535:7:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 48607, "name": "address", "nodeType": "ElementaryTypeName", "src": "3535:7:56", "typeDescriptions": {} } }, "id": 48611, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3535:25:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 48604, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "3522:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48606, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3531:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22195, "src": "3522:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", "typeString": "function (address) pure" } }, "id": 48612, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3522:39:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48613, "nodeType": "ExpressionStatement", "src": "3522:39:56" }, { "expression": { "arguments": [ { "expression": { "id": 48617, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "3584:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48618, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "3591:6:56", "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 48336, "src": "3584:13:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 48614, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "3571:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48616, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3580:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "3571:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 48619, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3571:27:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48620, "nodeType": "ExpressionStatement", "src": "3571:27:56" }, { "expression": { "arguments": [ { "arguments": [ { "expression": { "id": 48626, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "3626:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48627, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "3633:17:56", "memberName": "sqrtPriceLimitX96", "nodeType": "MemberAccess", "referencedDeclaration": 48338, "src": "3626:24:56", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint160", "typeString": "uint160" } ], "id": 48625, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3621:4:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 48624, "name": "uint", "nodeType": "ElementaryTypeName", "src": "3621:4:56", "typeDescriptions": {} } }, "id": 48628, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3621:30:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 48621, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "3608:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48623, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3617:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "3608:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 48629, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3608:44:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48630, "nodeType": "ExpressionStatement", "src": "3608:44:56" }, { "expression": { "arguments": [ { "arguments": [ { "expression": { "id": 48636, "name": "Constants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46261, "src": "3683:9:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Constants_$46261_$", "typeString": "type(library Constants)" } }, "id": 48637, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3693:19:56", "memberName": "uniswapV3SwapRouter", "nodeType": "MemberAccess", "referencedDeclaration": 46260, "src": "3683:29:56", "typeDescriptions": { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } ], "id": 48635, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3675:7:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 48634, "name": "address", "nodeType": "ElementaryTypeName", "src": "3675:7:56", "typeDescriptions": {} } }, "id": 48638, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3675:38:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 48631, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "3662:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48633, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3671:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22195, "src": "3662:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", "typeString": "function (address) pure" } }, "id": 48639, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3662:52:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48640, "nodeType": "ExpressionStatement", "src": "3662:52:56" }, { "expression": { "arguments": [ { "hexValue": "617070726f7665", "id": 48644, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3737:9:56", "typeDescriptions": { "typeIdentifier": "t_stringliteral_5219209e083275171774dab1df80982e9df2096516f06319c5c6d71ae0a8480c", "typeString": "literal_string \"approve\"" }, "value": "approve" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_5219209e083275171774dab1df80982e9df2096516f06319c5c6d71ae0a8480c", "typeString": "literal_string \"approve\"" } ], "expression": { "id": 48641, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "3724:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48643, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3733:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "3724:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 48645, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3724:23:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48646, "nodeType": "ExpressionStatement", "src": "3724:23:56" }, { "expression": { "arguments": [ { "id": 48650, "name": "maxAmountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48562, "src": "3770:11:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 48647, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "3757:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48649, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3766:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "3757:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 48651, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3757:25:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48652, "nodeType": "ExpressionStatement", "src": "3757:25:56" }, { "expression": { "arguments": [ { "expression": { "id": 48656, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "3820:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48657, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "3827:7:56", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 48328, "src": "3820:14:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "arguments": [ { "expression": { "id": 48660, "name": "Constants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46261, "src": "3844:9:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Constants_$46261_$", "typeString": "type(library Constants)" } }, "id": 48661, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3854:19:56", "memberName": "uniswapV3SwapRouter", "nodeType": "MemberAccess", "referencedDeclaration": 46260, "src": "3844:29:56", "typeDescriptions": { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } ], "id": 48659, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3836:7:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 48658, "name": "address", "nodeType": "ElementaryTypeName", "src": "3836:7:56", "typeDescriptions": {} } }, "id": 48662, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3836:38:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 48663, "name": "maxAmountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48562, "src": "3876:11:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 48653, "name": "TransferHelper", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46063, "src": "3793:14:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_TransferHelper_$46063_$", "typeString": "type(library TransferHelper)" } }, "id": 48655, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3808:11:56", "memberName": "safeApprove", "nodeType": "MemberAccess", "referencedDeclaration": 46036, "src": "3793:26:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, "id": 48664, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3793:95:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48665, "nodeType": "ExpressionStatement", "src": "3793:95:56" }, { "expression": { "arguments": [ { "hexValue": "7377617070696e672e2e2e", "id": 48669, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4089:13:56", "typeDescriptions": { "typeIdentifier": "t_stringliteral_52bc5304535ca536835e2660a8952b1f8d5ddddb47fa9f0f4f22cba63596ba46", "typeString": "literal_string \"swapping...\"" }, "value": "swapping..." } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_52bc5304535ca536835e2660a8952b1f8d5ddddb47fa9f0f4f22cba63596ba46", "typeString": "literal_string \"swapping...\"" } ], "expression": { "id": 48666, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "4076:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48668, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4085:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "4076:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 48670, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4076:27:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48671, "nodeType": "ExpressionStatement", "src": "4076:27:56" }, { "clauses": [ { "block": { "id": 48706, "nodeType": "Block", "src": "4500:80:56", "statements": [ { "expression": { "id": 48699, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 48697, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48535, "src": "4514:8:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 48698, "name": "amtIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48695, "src": "4525:5:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4514:16:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 48700, "nodeType": "ExpressionStatement", "src": "4514:16:56" }, { "expression": { "id": 48704, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 48701, "name": "amountOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48537, "src": "4544:9:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 48702, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "4556:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48703, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4563:6:56", "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 48336, "src": "4556:13:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4544:25:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 48705, "nodeType": "ExpressionStatement", "src": "4544:25:56" } ] }, "errorName": "", "id": 48707, "nodeType": "TryCatchClause", "parameters": { "id": 48696, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 48695, "mutability": "mutable", "name": "amtIn", "nameLocation": "4493:5:56", "nodeType": "VariableDeclaration", "scope": 48707, "src": "4485:13:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48694, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4485:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "4484:15:56" }, "src": "4476:104:56" }, { "block": { "id": 48755, "nodeType": "Block", "src": "4625:770:56", "statements": [ { "clauses": [ { "block": { "id": 48743, "nodeType": "Block", "src": "5172:91:56", "statements": [ { "expression": { "id": 48737, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 48735, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48535, "src": "5190:8:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 48736, "name": "maxAmountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48562, "src": "5201:11:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5190:22:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 48738, "nodeType": "ExpressionStatement", "src": "5190:22:56" }, { "expression": { "id": 48741, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 48739, "name": "amountOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48537, "src": "5230:9:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 48740, "name": "amtOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48733, "src": "5242:6:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5230:18:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 48742, "nodeType": "ExpressionStatement", "src": "5230:18:56" } ] }, "errorName": "", "id": 48744, "nodeType": "TryCatchClause", "parameters": { "id": 48734, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 48733, "mutability": "mutable", "name": "amtOut", "nameLocation": "5164:6:56", "nodeType": "VariableDeclaration", "scope": 48744, "src": "5156:14:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48732, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5156:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "5155:16:56" }, "src": "5147:116:56" }, { "block": { "id": 48752, "nodeType": "Block", "src": "5305:80:56", "statements": [ { "expression": { "arguments": [ { "id": 48749, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48709, "src": "5330:6:56", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "id": 48748, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ -19, -19 ], "referencedDeclaration": -19, "src": "5323:6:56", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 48750, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5323:14:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48751, "nodeType": "ExpressionStatement", "src": "5323:14:56" } ] }, "errorName": "Error", "id": 48753, "nodeType": "TryCatchClause", "parameters": { "id": 48747, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 48746, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 48753, "src": "5289:13:56", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 48745, "name": "string", "nodeType": "ElementaryTypeName", "src": "5289:6:56", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "5287:17:56" }, "src": "5276:109:56" } ], "externalCall": { "arguments": [ { "arguments": [ { "expression": { "id": 48716, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "4911:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48717, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4918:7:56", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 48328, "src": "4911:14:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 48718, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "4937:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48719, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4944:8:56", "memberName": "tokenOut", "nodeType": "MemberAccess", "referencedDeclaration": 48330, "src": "4937:15:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 48720, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "4959:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48721, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4966:3:56", "memberName": "fee", "nodeType": "MemberAccess", "referencedDeclaration": 48334, "src": "4959:10:56", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, { "expression": { "id": 48722, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "4982:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48723, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4989:9:56", "memberName": "recipient", "nodeType": "MemberAccess", "referencedDeclaration": 48332, "src": "4982:16:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 48724, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, "src": "5026:5:56", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 48725, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5032:9:56", "memberName": "timestamp", "nodeType": "MemberAccess", "src": "5026:15:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 48726, "name": "maxAmountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48562, "src": "5053:11:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "hexValue": "31", "id": 48727, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5084:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, { "expression": { "id": 48728, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "5106:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48729, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5113:17:56", "memberName": "sqrtPriceLimitX96", "nodeType": "MemberAccess", "referencedDeclaration": 48338, "src": "5106:24:56", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint24", "typeString": "uint24" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, { "typeIdentifier": "t_uint160", "typeString": "uint160" } ], "expression": { "id": 48714, "name": "ISwapRouter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45454, "src": "4849:11:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_ISwapRouter_$45454_$", "typeString": "type(contract ISwapRouter)" } }, "id": 48715, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4861:22:56", "memberName": "ExactInputSingleParams", "nodeType": "MemberAccess", "referencedDeclaration": 45378, "src": "4849:34:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_ExactInputSingleParams_$45378_storage_ptr_$", "typeString": "type(struct ISwapRouter.ExactInputSingleParams storage pointer)" } }, "id": 48730, "isConstant": false, "isLValue": false, "isPure": false, "kind": "structConstructorCall", "lValueRequested": false, "nameLocations": [ "4902:7:56", "4927:8:56", "4954:3:56", "4971:9:56", "5016:8:56", "5043:8:56", "5066:16:56", "5087:17:56" ], "names": [ "tokenIn", "tokenOut", "fee", "recipient", "deadline", "amountIn", "amountOutMinimum", "sqrtPriceLimitX96" ], "nodeType": "FunctionCall", "src": "4849:296:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_ExactInputSingleParams_$45378_memory_ptr", "typeString": "struct ISwapRouter.ExactInputSingleParams memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_ExactInputSingleParams_$45378_memory_ptr", "typeString": "struct ISwapRouter.ExactInputSingleParams memory" } ], "expression": { "expression": { "id": 48711, "name": "Constants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46261, "src": "4802:9:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Constants_$46261_$", "typeString": "type(library Constants)" } }, "id": 48712, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "4812:19:56", "memberName": "uniswapV3SwapRouter", "nodeType": "MemberAccess", "referencedDeclaration": 46260, "src": "4802:29:56", "typeDescriptions": { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } }, "id": 48713, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4832:16:56", "memberName": "exactInputSingle", "nodeType": "MemberAccess", "referencedDeclaration": 45387, "src": "4802:46:56", "typeDescriptions": { "typeIdentifier": "t_function_external_payable$_t_struct$_ExactInputSingleParams_$45378_memory_ptr_$returns$_t_uint256_$", "typeString": "function (struct ISwapRouter.ExactInputSingleParams memory) payable external returns (uint256)" } }, "id": 48731, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4802:344:56", "tryCall": true, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 48754, "nodeType": "TryStatement", "src": "4798:587:56" } ] }, "errorName": "Error", "id": 48756, "nodeType": "TryCatchClause", "parameters": { "id": 48710, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 48709, "mutability": "mutable", "name": "reason", "nameLocation": "4616:6:56", "nodeType": "VariableDeclaration", "scope": 48756, "src": "4602:20:56", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 48708, "name": "string", "nodeType": "ElementaryTypeName", "src": "4602:6:56", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "4600:24:56" }, "src": "4589:806:56" } ], "externalCall": { "arguments": [ { "arguments": [ { "expression": { "id": 48677, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "4224:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48678, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4231:7:56", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 48328, "src": "4224:14:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 48679, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "4250:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48680, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4257:8:56", "memberName": "tokenOut", "nodeType": "MemberAccess", "referencedDeclaration": 48330, "src": "4250:15:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 48681, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "4272:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48682, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4279:3:56", "memberName": "fee", "nodeType": "MemberAccess", "referencedDeclaration": 48334, "src": "4272:10:56", "typeDescriptions": { "typeIdentifier": "t_uint24", "typeString": "uint24" } }, { "expression": { "id": 48683, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "4295:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48684, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4302:9:56", "memberName": "recipient", "nodeType": "MemberAccess", "referencedDeclaration": 48332, "src": "4295:16:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "expression": { "id": 48685, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, "src": "4335:5:56", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 48686, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4341:9:56", "memberName": "timestamp", "nodeType": "MemberAccess", "src": "4335:15:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "expression": { "id": 48687, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "4363:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48688, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4370:6:56", "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 48336, "src": "4363:13:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 48689, "name": "maxAmountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48562, "src": "4395:11:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "expression": { "id": 48690, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "4439:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48691, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "4446:17:56", "memberName": "sqrtPriceLimitX96", "nodeType": "MemberAccess", "referencedDeclaration": 48338, "src": "4439:24:56", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint24", "typeString": "uint24" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint160", "typeString": "uint160" } ], "expression": { "id": 48675, "name": "ISwapRouter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45454, "src": "4165:11:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_ISwapRouter_$45454_$", "typeString": "type(contract ISwapRouter)" } }, "id": 48676, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4177:23:56", "memberName": "ExactOutputSingleParams", "nodeType": "MemberAccess", "referencedDeclaration": 45424, "src": "4165:35:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_ExactOutputSingleParams_$45424_storage_ptr_$", "typeString": "type(struct ISwapRouter.ExactOutputSingleParams storage pointer)" } }, "id": 48692, "isConstant": false, "isLValue": false, "isPure": false, "kind": "structConstructorCall", "lValueRequested": false, "nameLocations": [ "4215:7:56", "4240:8:56", "4267:3:56", "4284:9:56", "4325:8:56", "4352:9:56", "4378:15:56", "4420:17:56" ], "names": [ "tokenIn", "tokenOut", "fee", "recipient", "deadline", "amountOut", "amountInMaximum", "sqrtPriceLimitX96" ], "nodeType": "FunctionCall", "src": "4165:309:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_ExactOutputSingleParams_$45424_memory_ptr", "typeString": "struct ISwapRouter.ExactOutputSingleParams memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_ExactOutputSingleParams_$45424_memory_ptr", "typeString": "struct ISwapRouter.ExactOutputSingleParams memory" } ], "expression": { "expression": { "id": 48672, "name": "Constants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46261, "src": "4117:9:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Constants_$46261_$", "typeString": "type(library Constants)" } }, "id": 48673, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "4127:19:56", "memberName": "uniswapV3SwapRouter", "nodeType": "MemberAccess", "referencedDeclaration": 46260, "src": "4117:29:56", "typeDescriptions": { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } }, "id": 48674, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4147:17:56", "memberName": "exactOutputSingle", "nodeType": "MemberAccess", "referencedDeclaration": 45433, "src": "4117:47:56", "typeDescriptions": { "typeIdentifier": "t_function_external_payable$_t_struct$_ExactOutputSingleParams_$45424_memory_ptr_$returns$_t_uint256_$", "typeString": "function (struct ISwapRouter.ExactOutputSingleParams memory) payable external returns (uint256)" } }, "id": 48693, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4117:358:56", "tryCall": true, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 48757, "nodeType": "TryStatement", "src": "4113:1282:56" }, { "expression": { "arguments": [ { "hexValue": "73776170706564", "id": 48761, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5418:9:56", "typeDescriptions": { "typeIdentifier": "t_stringliteral_ea70726f3c3d7c665487e2474e526a22024ec725a171343093798aad96942759", "typeString": "literal_string \"swapped\"" }, "value": "swapped" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_ea70726f3c3d7c665487e2474e526a22024ec725a171343093798aad96942759", "typeString": "literal_string \"swapped\"" } ], "expression": { "id": 48758, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "5405:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48760, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5414:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22167, "src": "5405:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 48762, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5405:23:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48763, "nodeType": "ExpressionStatement", "src": "5405:23:56" }, { "expression": { "arguments": [ { "id": 48767, "name": "amountIn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48535, "src": "5451:8:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 48764, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "5438:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48766, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5447:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "5438:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 48768, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5438:22:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48769, "nodeType": "ExpressionStatement", "src": "5438:22:56" }, { "expression": { "arguments": [ { "id": 48773, "name": "amountOut", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48537, "src": "5483:9:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 48770, "name": "console2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29653, "src": "5470:8:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_console2_$29653_$", "typeString": "type(library console2)" } }, "id": 48772, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5479:3:56", "memberName": "log", "nodeType": "MemberAccess", "referencedDeclaration": 22139, "src": "5470:12:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", "typeString": "function (uint256) pure" } }, "id": 48774, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5470:23:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48775, "nodeType": "ExpressionStatement", "src": "5470:23:56" }, { "expression": { "arguments": [ { "expression": { "id": 48779, "name": "params", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48532, "src": "5531:6:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams memory" } }, "id": 48780, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberLocation": "5538:7:56", "memberName": "tokenIn", "nodeType": "MemberAccess", "referencedDeclaration": 48328, "src": "5531:14:56", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "arguments": [ { "expression": { "id": 48783, "name": "Constants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46261, "src": "5555:9:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Constants_$46261_$", "typeString": "type(library Constants)" } }, "id": 48784, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "5565:19:56", "memberName": "uniswapV3SwapRouter", "nodeType": "MemberAccess", "referencedDeclaration": 46260, "src": "5555:29:56", "typeDescriptions": { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_ISwapRouter_$45454", "typeString": "contract ISwapRouter" } ], "id": 48782, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5547:7:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 48781, "name": "address", "nodeType": "ElementaryTypeName", "src": "5547:7:56", "typeDescriptions": {} } }, "id": 48785, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5547:38:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "hexValue": "30", "id": 48786, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5587:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "expression": { "id": 48776, "name": "TransferHelper", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46063, "src": "5504:14:56", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_TransferHelper_$46063_$", "typeString": "type(library TransferHelper)" } }, "id": 48778, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5519:11:56", "memberName": "safeApprove", "nodeType": "MemberAccess", "referencedDeclaration": 46036, "src": "5504:26:56", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, "id": 48787, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5504:85:56", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 48788, "nodeType": "ExpressionStatement", "src": "5504:85:56" } ] }, "implemented": true, "kind": "function", "modifiers": [], "name": "swapExactOutput", "nameLocation": "2580:15:56", "parameters": { "id": 48533, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 48532, "mutability": "mutable", "name": "params", "nameLocation": "2614:6:56", "nodeType": "VariableDeclaration", "scope": 48790, "src": "2596:24:56", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_memory_ptr", "typeString": "struct UniswapSwapper.SwapParams" }, "typeName": { "id": 48531, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 48530, "name": "SwapParams", "nameLocations": [ "2596:10:56" ], "nodeType": "IdentifierPath", "referencedDeclaration": 48339, "src": "2596:10:56" }, "referencedDeclaration": 48339, "src": "2596:10:56", "typeDescriptions": { "typeIdentifier": "t_struct$_SwapParams_$48339_storage_ptr", "typeString": "struct UniswapSwapper.SwapParams" } }, "visibility": "internal" } ], "src": "2595:26:56" }, "returnParameters": { "id": 48538, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 48535, "mutability": "mutable", "name": "amountIn", "nameLocation": "2648:8:56", "nodeType": "VariableDeclaration", "scope": 48790, "src": "2640:16:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48534, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2640:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 48537, "mutability": "mutable", "name": "amountOut", "nameLocation": "2666:9:56", "nodeType": "VariableDeclaration", "scope": 48790, "src": "2658:17:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48536, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2658:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "2639:37:56" }, "scope": 48844, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "id": 48843, "nodeType": "FunctionDefinition", "src": "5718:365:56", "nodes": [], "body": { "id": 48842, "nodeType": "Block", "src": "5771:312:56", "nodes": [], "statements": [ { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 48799, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 48797, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48792, "src": "5886:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "hexValue": "30", "id": 48798, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5891:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "5886:6:56", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 48804, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 48802, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48792, "src": "5921:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "hexValue": "33", "id": 48803, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5926:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_3_by_1", "typeString": "int_const 3" }, "value": "3" }, "src": "5921:6:56", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 48807, "nodeType": "IfStatement", "src": "5917:20:56", "trueBody": { "expression": { "hexValue": "31", "id": 48805, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5936:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "functionReturnParameters": 48796, "id": 48806, "nodeType": "Return", "src": "5929:8:56" } }, "id": 48808, "nodeType": "IfStatement", "src": "5882:55:56", "trueBody": { "expression": { "hexValue": "30", "id": 48800, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5901:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 48796, "id": 48801, "nodeType": "Return", "src": "5894:8:56" } }, { "assignments": [ 48810 ], "declarations": [ { "constant": false, "id": 48810, "mutability": "mutable", "name": "z", "nameLocation": "5952:1:56", "nodeType": "VariableDeclaration", "scope": 48842, "src": "5947:6:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48809, "name": "uint", "nodeType": "ElementaryTypeName", "src": "5947:4:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 48817, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 48816, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "components": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 48813, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 48811, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48792, "src": "5957:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "hexValue": "31", "id": 48812, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5961:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "src": "5957:5:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 48814, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "5956:7:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "hexValue": "32", "id": 48815, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5966:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "src": "5956:11:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "5947:20:56" }, { "expression": { "id": 48820, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 48818, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48795, "src": "5977:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 48819, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48792, "src": "5981:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5977:5:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 48821, "nodeType": "ExpressionStatement", "src": "5977:5:56" }, { "body": { "id": 48840, "nodeType": "Block", "src": "6014:63:56", "statements": [ { "expression": { "id": 48827, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 48825, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48795, "src": "6028:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "id": 48826, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48810, "src": "6032:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6028:5:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 48828, "nodeType": "ExpressionStatement", "src": "6028:5:56" }, { "expression": { "id": 48838, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 48829, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48810, "src": "6047:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 48837, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "components": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 48834, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 48832, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 48830, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48792, "src": "6052:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "id": 48831, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48810, "src": "6056:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6052:5:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "id": 48833, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48810, "src": "6060:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6052:9:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 48835, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "6051:11:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "hexValue": "32", "id": 48836, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6065:1:56", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "src": "6051:15:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6047:19:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 48839, "nodeType": "ExpressionStatement", "src": "6047:19:56" } ] }, "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 48824, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 48822, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48810, "src": "5999:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "id": 48823, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 48795, "src": "6003:1:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5999:5:56", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 48841, "nodeType": "WhileStatement", "src": "5992:85:56" } ] }, "implemented": true, "kind": "function", "modifiers": [], "name": "sqrt", "nameLocation": "5727:4:56", "parameters": { "id": 48793, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 48792, "mutability": "mutable", "name": "x", "nameLocation": "5737:1:56", "nodeType": "VariableDeclaration", "scope": 48843, "src": "5732:6:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48791, "name": "uint", "nodeType": "ElementaryTypeName", "src": "5732:4:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "5731:8:56" }, "returnParameters": { "id": 48796, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 48795, "mutability": "mutable", "name": "y", "nameLocation": "5768:1:56", "nodeType": "VariableDeclaration", "scope": 48843, "src": "5763:6:56", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 48794, "name": "uint", "nodeType": "ElementaryTypeName", "src": "5763:4:56", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "5762:8:56" }, "scope": 48844, "stateMutability": "pure", "virtual": false, "visibility": "internal" } ], "abstract": false, "baseContracts": [], "canonicalName": "UniswapSwapper", "contractDependencies": [], "contractKind": "library", "fullyImplemented": true, "linearizedBaseContracts": [ 48844 ], "name": "UniswapSwapper", "nameLocation": "263:14:56", "scope": 48845, "usedErrors": [], "usedEvents": [] } ], "license": "UNLICENSED" }, "id": 56 }