Files
contract/deployment/alpha/out/UniswapSwapper.sol/UniswapSwapper.json
2023-11-16 17:36:43 -04:00

7234 lines
322 KiB
JSON

{
"abi": [],
"bytecode": {
"object": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a27cf458e71d491c56b05a642c37c070db77fa0153230bf969e78582e04e833d64736f6c63430008160033",
"sourceMap": "255:5831:56:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;255:5831:56;;;;;;;;;;;;;;;;;",
"linkReferences": {}
},
"deployedBytecode": {
"object": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a27cf458e71d491c56b05a642c37c070db77fa0153230bf969e78582e04e833d64736f6c63430008160033",
"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\":\"0x41bf66b69d0d8c9c32c43fd3af5396d1288ac512fd5c6c14e06dbb06a06adf3f\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://283443c74eef1b4ff300c1465a46877957188c3f65ed71aea60bd11362938418\",\"dweb:/ipfs/QmQPn2nrbKVei7HUooGXy7msfoXNT8E2yVkT1kZAC9T3ds\"]},\"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": "0x41bf66b69d0d8c9c32c43fd3af5396d1288ac512fd5c6c14e06dbb06a06adf3f",
"urls": [
"bzz-raw://283443c74eef1b4ff300c1465a46877957188c3f65ed71aea60bd11362938418",
"dweb:/ipfs/QmQPn2nrbKVei7HUooGXy7msfoXNT8E2yVkT1kZAC9T3ds"
],
"license": "UNLICENSED"
},
"src/UniswapSwapper.sol": {
"keccak256": "0xeba32c1f50322147452a5e8bb33daf0de90d0abaa26929f00da4cea788f92825",
"urls": [
"bzz-raw://ccef611297b80392e32363f9dce4f10403d2a9b3780475ffde7c38f1f2d23781",
"dweb:/ipfs/QmVCN2oa3aQCx1KMxGN7EM4reJNFxegXyLSCQoe62dM2Kx"
],
"license": "UNLICENSED"
}
},
"version": 1
},
"ast": {
"absolutePath": "src/UniswapSwapper.sol",
"id": 48848,
"exportedSymbols": {
"Constants": [
46264
],
"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": [
48847
],
"console2": [
29653
]
},
"nodeType": "SourceUnit",
"src": "39:6048:56",
"nodes": [
{
"id": 48322,
"nodeType": "PragmaDirective",
"src": "39:24:56",
"nodes": [],
"literals": [
"solidity",
">=",
"0.8",
".0"
]
},
{
"id": 48323,
"nodeType": "PragmaDirective",
"src": "64:19:56",
"nodes": [],
"literals": [
"abicoder",
"v2"
]
},
{
"id": 48324,
"nodeType": "ImportDirective",
"src": "85:25:56",
"nodes": [],
"absolutePath": "src/Constants.sol",
"file": "./Constants.sol",
"nameLocation": "-1:-1:-1",
"scope": 48848,
"sourceUnit": 46265,
"symbolAliases": [],
"unitAlias": ""
},
{
"id": 48325,
"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": 48848,
"sourceUnit": 43557,
"symbolAliases": [],
"unitAlias": ""
},
{
"id": 48326,
"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": 48848,
"sourceUnit": 46064,
"symbolAliases": [],
"unitAlias": ""
},
{
"id": 48327,
"nodeType": "ImportDirective",
"src": "220:32:56",
"nodes": [],
"absolutePath": "lib/forge-std/src/console2.sol",
"file": "forge-std/console2.sol",
"nameLocation": "-1:-1:-1",
"scope": 48848,
"sourceUnit": 29654,
"symbolAliases": [],
"unitAlias": ""
},
{
"id": 48847,
"nodeType": "ContractDefinition",
"src": "255:5831:56",
"nodes": [
{
"id": 48342,
"nodeType": "StructDefinition",
"src": "285:293:56",
"nodes": [],
"canonicalName": "UniswapSwapper.SwapParams",
"members": [
{
"constant": false,
"id": 48329,
"mutability": "mutable",
"name": "pool",
"nameLocation": "321:4:56",
"nodeType": "VariableDeclaration",
"scope": 48342,
"src": "313:12:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 48328,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "313:7:56",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 48331,
"mutability": "mutable",
"name": "tokenIn",
"nameLocation": "343:7:56",
"nodeType": "VariableDeclaration",
"scope": 48342,
"src": "335:15:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 48330,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "335:7:56",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 48333,
"mutability": "mutable",
"name": "tokenOut",
"nameLocation": "368:8:56",
"nodeType": "VariableDeclaration",
"scope": 48342,
"src": "360:16:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 48332,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "360:7:56",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 48335,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "394:9:56",
"nodeType": "VariableDeclaration",
"scope": 48342,
"src": "386:17:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 48334,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "386:7:56",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 48337,
"mutability": "mutable",
"name": "fee",
"nameLocation": "509:3:56",
"nodeType": "VariableDeclaration",
"scope": 48342,
"src": "502:10:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
},
"typeName": {
"id": 48336,
"name": "uint24",
"nodeType": "ElementaryTypeName",
"src": "502:6:56",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 48339,
"mutability": "mutable",
"name": "amount",
"nameLocation": "530:6:56",
"nodeType": "VariableDeclaration",
"scope": 48342,
"src": "522:14:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48338,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "522:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 48341,
"mutability": "mutable",
"name": "sqrtPriceLimitX96",
"nameLocation": "554:17:56",
"nodeType": "VariableDeclaration",
"scope": 48342,
"src": "546:25:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"typeName": {
"id": 48340,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "546:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"visibility": "internal"
}
],
"name": "SwapParams",
"nameLocation": "292:10:56",
"scope": 48847,
"visibility": "public"
},
{
"id": 48532,
"nodeType": "FunctionDefinition",
"src": "584:1981:56",
"nodes": [],
"body": {
"id": 48531,
"nodeType": "Block",
"src": "693:1872:56",
"nodes": [],
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "737761704578616374496e70757420617070726f76652e2e2e",
"id": 48355,
"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": 48352,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "1065:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48354,
"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": 48356,
"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": 48357,
"nodeType": "ExpressionStatement",
"src": "1065:41:56"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 48363,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "1137:4:56",
"typeDescriptions": {
"typeIdentifier": "t_contract$_UniswapSwapper_$48847",
"typeString": "library UniswapSwapper"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_UniswapSwapper_$48847",
"typeString": "library UniswapSwapper"
}
],
"id": 48362,
"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": 48361,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1129:7:56",
"typeDescriptions": {}
}
},
"id": 48364,
"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": 48358,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "1116:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48360,
"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": 48365,
"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": 48366,
"nodeType": "ExpressionStatement",
"src": "1116:27:56"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 48370,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "1166:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48371,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1173:7:56",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 48331,
"src": "1166:14:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"id": 48367,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "1153:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48369,
"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": 48372,
"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": 48373,
"nodeType": "ExpressionStatement",
"src": "1153:28:56"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 48377,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "1204:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48378,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1211:8:56",
"memberName": "tokenOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 48333,
"src": "1204:15:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"id": 48374,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "1191:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48376,
"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": 48379,
"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": 48380,
"nodeType": "ExpressionStatement",
"src": "1191:29:56"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"expression": {
"id": 48386,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "1248:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48387,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1255:3:56",
"memberName": "fee",
"nodeType": "MemberAccess",
"referencedDeclaration": 48337,
"src": "1248:10:56",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
],
"id": 48385,
"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": 48384,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1243:4:56",
"typeDescriptions": {}
}
},
"id": 48388,
"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": 48381,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "1230:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48383,
"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": 48389,
"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": 48390,
"nodeType": "ExpressionStatement",
"src": "1230:30:56"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"expression": {
"id": 48396,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "1291:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48397,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1298:9:56",
"memberName": "recipient",
"nodeType": "MemberAccess",
"referencedDeclaration": 48335,
"src": "1291:16:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 48395,
"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": 48394,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1283:7:56",
"typeDescriptions": {}
}
},
"id": 48398,
"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": 48391,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "1270:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48393,
"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": 48399,
"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": 48400,
"nodeType": "ExpressionStatement",
"src": "1270:39:56"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 48404,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "1332:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48405,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1339:6:56",
"memberName": "amount",
"nodeType": "MemberAccess",
"referencedDeclaration": 48339,
"src": "1332:13:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 48401,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "1319:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48403,
"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": 48406,
"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": 48407,
"nodeType": "ExpressionStatement",
"src": "1319:27:56"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"expression": {
"id": 48413,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "1374:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48414,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1381:17:56",
"memberName": "sqrtPriceLimitX96",
"nodeType": "MemberAccess",
"referencedDeclaration": 48341,
"src": "1374:24:56",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
],
"id": 48412,
"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": 48411,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1369:4:56",
"typeDescriptions": {}
}
},
"id": 48415,
"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": 48408,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "1356:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48410,
"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": 48416,
"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": 48417,
"nodeType": "ExpressionStatement",
"src": "1356:44:56"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"expression": {
"id": 48423,
"name": "Constants",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46264,
"src": "1431:9:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Constants_$46264_$",
"typeString": "type(library Constants)"
}
},
"id": 48424,
"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": 48422,
"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": 48421,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1423:7:56",
"typeDescriptions": {}
}
},
"id": 48425,
"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": 48418,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "1410:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48420,
"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": 48426,
"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": 48427,
"nodeType": "ExpressionStatement",
"src": "1410:52:56"
},
{
"expression": {
"id": 48431,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 48428,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48348,
"src": "1473:8:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 48429,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "1484:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48430,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1491:6:56",
"memberName": "amount",
"nodeType": "MemberAccess",
"referencedDeclaration": 48339,
"src": "1484:13:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1473:24:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 48432,
"nodeType": "ExpressionStatement",
"src": "1473:24:56"
},
{
"assignments": [
48434
],
"declarations": [
{
"constant": false,
"id": 48434,
"mutability": "mutable",
"name": "balance",
"nameLocation": "1515:7:56",
"nodeType": "VariableDeclaration",
"scope": 48531,
"src": "1507:15:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48433,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1507:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 48445,
"initialValue": {
"arguments": [
{
"arguments": [
{
"id": 48442,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "1566:4:56",
"typeDescriptions": {
"typeIdentifier": "t_contract$_UniswapSwapper_$48847",
"typeString": "library UniswapSwapper"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_UniswapSwapper_$48847",
"typeString": "library UniswapSwapper"
}
],
"id": 48441,
"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": 48440,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1558:7:56",
"typeDescriptions": {}
}
},
"id": 48443,
"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": 48436,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "1532:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48437,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1539:7:56",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 48331,
"src": "1532:14:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 48435,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 43556,
"src": "1525:6:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$43556_$",
"typeString": "type(contract IERC20)"
}
},
"id": 48438,
"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": 48439,
"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": 48444,
"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": 48448,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 48446,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48434,
"src": "1586:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 48447,
"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": 48454,
"nodeType": "IfStatement",
"src": "1582:83:56",
"trueBody": {
"id": 48453,
"nodeType": "Block",
"src": "1601:64:56",
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "494941",
"id": 48450,
"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": 48449,
"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": 48451,
"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": 48452,
"nodeType": "ExpressionStatement",
"src": "1641:13:56"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 48457,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 48455,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48434,
"src": "1678:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 48456,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48348,
"src": "1688:8:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1678:18:56",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 48462,
"nodeType": "IfStatement",
"src": "1674:55:56",
"trueBody": {
"expression": {
"id": 48460,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 48458,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48348,
"src": "1711:8:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 48459,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48434,
"src": "1722:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1711:18:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 48461,
"nodeType": "ExpressionStatement",
"src": "1711:18:56"
}
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 48466,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "1767:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48467,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1774:7:56",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 48331,
"src": "1767:14:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"arguments": [
{
"expression": {
"id": 48470,
"name": "Constants",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46264,
"src": "1791:9:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Constants_$46264_$",
"typeString": "type(library Constants)"
}
},
"id": 48471,
"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": 48469,
"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": 48468,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1783:7:56",
"typeDescriptions": {}
}
},
"id": 48472,
"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": 48473,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48348,
"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": 48463,
"name": "TransferHelper",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46063,
"src": "1740:14:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_TransferHelper_$46063_$",
"typeString": "type(library TransferHelper)"
}
},
"id": 48465,
"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": 48474,
"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": 48475,
"nodeType": "ExpressionStatement",
"src": "1740:92:56"
},
{
"expression": {
"arguments": [
{
"hexValue": "7377617070696e672e2e2e",
"id": 48479,
"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": 48476,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "2019:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48478,
"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": 48480,
"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": 48481,
"nodeType": "ExpressionStatement",
"src": "2019:27:56"
},
{
"expression": {
"id": 48504,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 48482,
"name": "amountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48350,
"src": "2056:9:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"arguments": [
{
"expression": {
"id": 48488,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "2173:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48489,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2180:7:56",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 48331,
"src": "2173:14:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 48490,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "2199:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48491,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2206:8:56",
"memberName": "tokenOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 48333,
"src": "2199:15:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 48492,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "2221:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48493,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2228:3:56",
"memberName": "fee",
"nodeType": "MemberAccess",
"referencedDeclaration": 48337,
"src": "2221:10:56",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
{
"expression": {
"id": 48494,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "2244:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48495,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2251:9:56",
"memberName": "recipient",
"nodeType": "MemberAccess",
"referencedDeclaration": 48335,
"src": "2244:16:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 48496,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "2284:5:56",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 48497,
"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": 48498,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48348,
"src": "2311:8:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"hexValue": "31",
"id": 48499,
"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": 48500,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "2361:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48501,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2368:17:56",
"memberName": "sqrtPriceLimitX96",
"nodeType": "MemberAccess",
"referencedDeclaration": 48341,
"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": 48486,
"name": "ISwapRouter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 45454,
"src": "2115:11:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ISwapRouter_$45454_$",
"typeString": "type(contract ISwapRouter)"
}
},
"id": 48487,
"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": 48502,
"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": 48483,
"name": "Constants",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46264,
"src": "2068:9:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Constants_$46264_$",
"typeString": "type(library Constants)"
}
},
"id": 48484,
"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": 48485,
"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": 48503,
"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": 48505,
"nodeType": "ExpressionStatement",
"src": "2056:341:56"
},
{
"expression": {
"arguments": [
{
"hexValue": "73776170706564",
"id": 48509,
"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": 48506,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "2407:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48508,
"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": 48510,
"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": 48511,
"nodeType": "ExpressionStatement",
"src": "2407:23:56"
},
{
"expression": {
"arguments": [
{
"id": 48515,
"name": "amountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48350,
"src": "2453:9:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 48512,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "2440:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48514,
"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": 48516,
"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": 48517,
"nodeType": "ExpressionStatement",
"src": "2440:23:56"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 48521,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48345,
"src": "2500:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48522,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2507:7:56",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 48331,
"src": "2500:14:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"arguments": [
{
"expression": {
"id": 48525,
"name": "Constants",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46264,
"src": "2524:9:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Constants_$46264_$",
"typeString": "type(library Constants)"
}
},
"id": 48526,
"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": 48524,
"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": 48523,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2516:7:56",
"typeDescriptions": {}
}
},
"id": 48527,
"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": 48528,
"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": 48518,
"name": "TransferHelper",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46063,
"src": "2473:14:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_TransferHelper_$46063_$",
"typeString": "type(library TransferHelper)"
}
},
"id": 48520,
"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": 48529,
"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": 48530,
"nodeType": "ExpressionStatement",
"src": "2473:85:56"
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "swapExactInput",
"nameLocation": "593:14:56",
"parameters": {
"id": 48346,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 48345,
"mutability": "mutable",
"name": "params",
"nameLocation": "626:6:56",
"nodeType": "VariableDeclaration",
"scope": 48532,
"src": "608:24:56",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams"
},
"typeName": {
"id": 48344,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 48343,
"name": "SwapParams",
"nameLocations": [
"608:10:56"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 48342,
"src": "608:10:56"
},
"referencedDeclaration": 48342,
"src": "608:10:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_storage_ptr",
"typeString": "struct UniswapSwapper.SwapParams"
}
},
"visibility": "internal"
}
],
"src": "607:26:56"
},
"returnParameters": {
"id": 48351,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 48348,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "660:8:56",
"nodeType": "VariableDeclaration",
"scope": 48532,
"src": "652:16:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48347,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "652:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 48350,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "678:9:56",
"nodeType": "VariableDeclaration",
"scope": 48532,
"src": "670:17:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48349,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "670:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "651:37:56"
},
"scope": 48847,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"id": 48793,
"nodeType": "FunctionDefinition",
"src": "2571:3025:56",
"nodes": [],
"body": {
"id": 48792,
"nodeType": "Block",
"src": "2681:2915:56",
"nodes": [],
"statements": [
{
"assignments": [
48543
],
"declarations": [
{
"constant": false,
"id": 48543,
"mutability": "mutable",
"name": "balance",
"nameLocation": "3117:7:56",
"nodeType": "VariableDeclaration",
"scope": 48792,
"src": "3109:15:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48542,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3109:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 48554,
"initialValue": {
"arguments": [
{
"arguments": [
{
"id": 48551,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "3168:4:56",
"typeDescriptions": {
"typeIdentifier": "t_contract$_UniswapSwapper_$48847",
"typeString": "library UniswapSwapper"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_UniswapSwapper_$48847",
"typeString": "library UniswapSwapper"
}
],
"id": 48550,
"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": 48549,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3160:7:56",
"typeDescriptions": {}
}
},
"id": 48552,
"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": 48545,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "3134:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48546,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3141:7:56",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 48331,
"src": "3134:14:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 48544,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 43556,
"src": "3127:6:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$43556_$",
"typeString": "type(contract IERC20)"
}
},
"id": 48547,
"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": 48548,
"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": 48553,
"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": 48557,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 48555,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48543,
"src": "3188:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 48556,
"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": 48563,
"nodeType": "IfStatement",
"src": "3184:83:56",
"trueBody": {
"id": 48562,
"nodeType": "Block",
"src": "3203:64:56",
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "494941",
"id": 48559,
"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": 48558,
"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": 48560,
"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": 48561,
"nodeType": "ExpressionStatement",
"src": "3243:13:56"
}
]
}
},
{
"assignments": [
48565
],
"declarations": [
{
"constant": false,
"id": 48565,
"mutability": "mutable",
"name": "maxAmountIn",
"nameLocation": "3284:11:56",
"nodeType": "VariableDeclaration",
"scope": 48792,
"src": "3276:19:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48564,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3276:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 48567,
"initialValue": {
"id": 48566,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48543,
"src": "3298:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3276:29:56"
},
{
"expression": {
"arguments": [
{
"hexValue": "7377617045786163744f757470757420617070726f76652e2e2e",
"id": 48571,
"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": 48568,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "3316:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48570,
"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": 48572,
"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": 48573,
"nodeType": "ExpressionStatement",
"src": "3316:42:56"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 48579,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "3389:4:56",
"typeDescriptions": {
"typeIdentifier": "t_contract$_UniswapSwapper_$48847",
"typeString": "library UniswapSwapper"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_UniswapSwapper_$48847",
"typeString": "library UniswapSwapper"
}
],
"id": 48578,
"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": 48577,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3381:7:56",
"typeDescriptions": {}
}
},
"id": 48580,
"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": 48574,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "3368:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48576,
"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": 48581,
"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": 48582,
"nodeType": "ExpressionStatement",
"src": "3368:27:56"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 48586,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "3418:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48587,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3425:7:56",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 48331,
"src": "3418:14:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"id": 48583,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "3405:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48585,
"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": 48588,
"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": 48589,
"nodeType": "ExpressionStatement",
"src": "3405:28:56"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 48593,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "3456:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48594,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3463:8:56",
"memberName": "tokenOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 48333,
"src": "3456:15:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"id": 48590,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "3443:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48592,
"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": 48595,
"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": 48596,
"nodeType": "ExpressionStatement",
"src": "3443:29:56"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"expression": {
"id": 48602,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "3500:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48603,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3507:3:56",
"memberName": "fee",
"nodeType": "MemberAccess",
"referencedDeclaration": 48337,
"src": "3500:10:56",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
],
"id": 48601,
"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": 48600,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3495:4:56",
"typeDescriptions": {}
}
},
"id": 48604,
"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": 48597,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "3482:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48599,
"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": 48605,
"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": 48606,
"nodeType": "ExpressionStatement",
"src": "3482:30:56"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"expression": {
"id": 48612,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "3543:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48613,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3550:9:56",
"memberName": "recipient",
"nodeType": "MemberAccess",
"referencedDeclaration": 48335,
"src": "3543:16:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 48611,
"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": 48610,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3535:7:56",
"typeDescriptions": {}
}
},
"id": 48614,
"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": 48607,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "3522:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48609,
"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": 48615,
"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": 48616,
"nodeType": "ExpressionStatement",
"src": "3522:39:56"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 48620,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "3584:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48621,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3591:6:56",
"memberName": "amount",
"nodeType": "MemberAccess",
"referencedDeclaration": 48339,
"src": "3584:13:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 48617,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "3571:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48619,
"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": 48622,
"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": 48623,
"nodeType": "ExpressionStatement",
"src": "3571:27:56"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"expression": {
"id": 48629,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "3626:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48630,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3633:17:56",
"memberName": "sqrtPriceLimitX96",
"nodeType": "MemberAccess",
"referencedDeclaration": 48341,
"src": "3626:24:56",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
],
"id": 48628,
"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": 48627,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3621:4:56",
"typeDescriptions": {}
}
},
"id": 48631,
"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": 48624,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "3608:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48626,
"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": 48632,
"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": 48633,
"nodeType": "ExpressionStatement",
"src": "3608:44:56"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"expression": {
"id": 48639,
"name": "Constants",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46264,
"src": "3683:9:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Constants_$46264_$",
"typeString": "type(library Constants)"
}
},
"id": 48640,
"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": 48638,
"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": 48637,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3675:7:56",
"typeDescriptions": {}
}
},
"id": 48641,
"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": 48634,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "3662:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48636,
"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": 48642,
"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": 48643,
"nodeType": "ExpressionStatement",
"src": "3662:52:56"
},
{
"expression": {
"arguments": [
{
"hexValue": "617070726f7665",
"id": 48647,
"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": 48644,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "3724:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48646,
"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": 48648,
"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": 48649,
"nodeType": "ExpressionStatement",
"src": "3724:23:56"
},
{
"expression": {
"arguments": [
{
"id": 48653,
"name": "maxAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48565,
"src": "3770:11:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 48650,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "3757:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48652,
"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": 48654,
"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": 48655,
"nodeType": "ExpressionStatement",
"src": "3757:25:56"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 48659,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "3820:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48660,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "3827:7:56",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 48331,
"src": "3820:14:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"arguments": [
{
"expression": {
"id": 48663,
"name": "Constants",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46264,
"src": "3844:9:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Constants_$46264_$",
"typeString": "type(library Constants)"
}
},
"id": 48664,
"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": 48662,
"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": 48661,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3836:7:56",
"typeDescriptions": {}
}
},
"id": 48665,
"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": 48666,
"name": "maxAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48565,
"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": 48656,
"name": "TransferHelper",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46063,
"src": "3793:14:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_TransferHelper_$46063_$",
"typeString": "type(library TransferHelper)"
}
},
"id": 48658,
"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": 48667,
"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": 48668,
"nodeType": "ExpressionStatement",
"src": "3793:95:56"
},
{
"expression": {
"arguments": [
{
"hexValue": "7377617070696e672e2e2e",
"id": 48672,
"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": 48669,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "4076:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48671,
"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": 48673,
"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": 48674,
"nodeType": "ExpressionStatement",
"src": "4076:27:56"
},
{
"clauses": [
{
"block": {
"id": 48709,
"nodeType": "Block",
"src": "4500:80:56",
"statements": [
{
"expression": {
"id": 48702,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 48700,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48538,
"src": "4514:8:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 48701,
"name": "amtIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48698,
"src": "4525:5:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4514:16:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 48703,
"nodeType": "ExpressionStatement",
"src": "4514:16:56"
},
{
"expression": {
"id": 48707,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 48704,
"name": "amountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48540,
"src": "4544:9:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"expression": {
"id": 48705,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "4556:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48706,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4563:6:56",
"memberName": "amount",
"nodeType": "MemberAccess",
"referencedDeclaration": 48339,
"src": "4556:13:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4544:25:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 48708,
"nodeType": "ExpressionStatement",
"src": "4544:25:56"
}
]
},
"errorName": "",
"id": 48710,
"nodeType": "TryCatchClause",
"parameters": {
"id": 48699,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 48698,
"mutability": "mutable",
"name": "amtIn",
"nameLocation": "4493:5:56",
"nodeType": "VariableDeclaration",
"scope": 48710,
"src": "4485:13:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48697,
"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": 48758,
"nodeType": "Block",
"src": "4625:770:56",
"statements": [
{
"clauses": [
{
"block": {
"id": 48746,
"nodeType": "Block",
"src": "5172:91:56",
"statements": [
{
"expression": {
"id": 48740,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 48738,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48538,
"src": "5190:8:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 48739,
"name": "maxAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48565,
"src": "5201:11:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5190:22:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 48741,
"nodeType": "ExpressionStatement",
"src": "5190:22:56"
},
{
"expression": {
"id": 48744,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 48742,
"name": "amountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48540,
"src": "5230:9:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 48743,
"name": "amtOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48736,
"src": "5242:6:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5230:18:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 48745,
"nodeType": "ExpressionStatement",
"src": "5230:18:56"
}
]
},
"errorName": "",
"id": 48747,
"nodeType": "TryCatchClause",
"parameters": {
"id": 48737,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 48736,
"mutability": "mutable",
"name": "amtOut",
"nameLocation": "5164:6:56",
"nodeType": "VariableDeclaration",
"scope": 48747,
"src": "5156:14:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48735,
"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": 48755,
"nodeType": "Block",
"src": "5305:80:56",
"statements": [
{
"expression": {
"arguments": [
{
"id": 48752,
"name": "reason",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48712,
"src": "5330:6:56",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 48751,
"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": 48753,
"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": 48754,
"nodeType": "ExpressionStatement",
"src": "5323:14:56"
}
]
},
"errorName": "Error",
"id": 48756,
"nodeType": "TryCatchClause",
"parameters": {
"id": 48750,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 48749,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 48756,
"src": "5289:13:56",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 48748,
"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": 48719,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "4911:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48720,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4918:7:56",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 48331,
"src": "4911:14:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 48721,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "4937:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48722,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4944:8:56",
"memberName": "tokenOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 48333,
"src": "4937:15:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 48723,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "4959:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48724,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4966:3:56",
"memberName": "fee",
"nodeType": "MemberAccess",
"referencedDeclaration": 48337,
"src": "4959:10:56",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
{
"expression": {
"id": 48725,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "4982:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48726,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4989:9:56",
"memberName": "recipient",
"nodeType": "MemberAccess",
"referencedDeclaration": 48335,
"src": "4982:16:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 48727,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "5026:5:56",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 48728,
"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": 48729,
"name": "maxAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48565,
"src": "5053:11:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"hexValue": "31",
"id": 48730,
"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": 48731,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "5106:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48732,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5113:17:56",
"memberName": "sqrtPriceLimitX96",
"nodeType": "MemberAccess",
"referencedDeclaration": 48341,
"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": 48717,
"name": "ISwapRouter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 45454,
"src": "4849:11:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ISwapRouter_$45454_$",
"typeString": "type(contract ISwapRouter)"
}
},
"id": 48718,
"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": 48733,
"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": 48714,
"name": "Constants",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46264,
"src": "4802:9:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Constants_$46264_$",
"typeString": "type(library Constants)"
}
},
"id": 48715,
"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": 48716,
"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": 48734,
"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": 48757,
"nodeType": "TryStatement",
"src": "4798:587:56"
}
]
},
"errorName": "Error",
"id": 48759,
"nodeType": "TryCatchClause",
"parameters": {
"id": 48713,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 48712,
"mutability": "mutable",
"name": "reason",
"nameLocation": "4616:6:56",
"nodeType": "VariableDeclaration",
"scope": 48759,
"src": "4602:20:56",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 48711,
"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": 48680,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "4224:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48681,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4231:7:56",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 48331,
"src": "4224:14:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 48682,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "4250:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48683,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4257:8:56",
"memberName": "tokenOut",
"nodeType": "MemberAccess",
"referencedDeclaration": 48333,
"src": "4250:15:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 48684,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "4272:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48685,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4279:3:56",
"memberName": "fee",
"nodeType": "MemberAccess",
"referencedDeclaration": 48337,
"src": "4272:10:56",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
{
"expression": {
"id": 48686,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "4295:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48687,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4302:9:56",
"memberName": "recipient",
"nodeType": "MemberAccess",
"referencedDeclaration": 48335,
"src": "4295:16:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 48688,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "4335:5:56",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 48689,
"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": 48690,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "4363:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48691,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4370:6:56",
"memberName": "amount",
"nodeType": "MemberAccess",
"referencedDeclaration": 48339,
"src": "4363:13:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 48692,
"name": "maxAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48565,
"src": "4395:11:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"expression": {
"id": 48693,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "4439:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48694,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4446:17:56",
"memberName": "sqrtPriceLimitX96",
"nodeType": "MemberAccess",
"referencedDeclaration": 48341,
"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": 48678,
"name": "ISwapRouter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 45454,
"src": "4165:11:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ISwapRouter_$45454_$",
"typeString": "type(contract ISwapRouter)"
}
},
"id": 48679,
"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": 48695,
"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": 48675,
"name": "Constants",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46264,
"src": "4117:9:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Constants_$46264_$",
"typeString": "type(library Constants)"
}
},
"id": 48676,
"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": 48677,
"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": 48696,
"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": 48760,
"nodeType": "TryStatement",
"src": "4113:1282:56"
},
{
"expression": {
"arguments": [
{
"hexValue": "73776170706564",
"id": 48764,
"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": 48761,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "5405:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48763,
"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": 48765,
"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": 48766,
"nodeType": "ExpressionStatement",
"src": "5405:23:56"
},
{
"expression": {
"arguments": [
{
"id": 48770,
"name": "amountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48538,
"src": "5451:8:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 48767,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "5438:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48769,
"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": 48771,
"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": 48772,
"nodeType": "ExpressionStatement",
"src": "5438:22:56"
},
{
"expression": {
"arguments": [
{
"id": 48776,
"name": "amountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48540,
"src": "5483:9:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 48773,
"name": "console2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29653,
"src": "5470:8:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_console2_$29653_$",
"typeString": "type(library console2)"
}
},
"id": 48775,
"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": 48777,
"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": 48778,
"nodeType": "ExpressionStatement",
"src": "5470:23:56"
},
{
"expression": {
"arguments": [
{
"expression": {
"id": 48782,
"name": "params",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48535,
"src": "5531:6:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams memory"
}
},
"id": 48783,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "5538:7:56",
"memberName": "tokenIn",
"nodeType": "MemberAccess",
"referencedDeclaration": 48331,
"src": "5531:14:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"arguments": [
{
"expression": {
"id": 48786,
"name": "Constants",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46264,
"src": "5555:9:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Constants_$46264_$",
"typeString": "type(library Constants)"
}
},
"id": 48787,
"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": 48785,
"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": 48784,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5547:7:56",
"typeDescriptions": {}
}
},
"id": 48788,
"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": 48789,
"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": 48779,
"name": "TransferHelper",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 46063,
"src": "5504:14:56",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_TransferHelper_$46063_$",
"typeString": "type(library TransferHelper)"
}
},
"id": 48781,
"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": 48790,
"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": 48791,
"nodeType": "ExpressionStatement",
"src": "5504:85:56"
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "swapExactOutput",
"nameLocation": "2580:15:56",
"parameters": {
"id": 48536,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 48535,
"mutability": "mutable",
"name": "params",
"nameLocation": "2614:6:56",
"nodeType": "VariableDeclaration",
"scope": 48793,
"src": "2596:24:56",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_memory_ptr",
"typeString": "struct UniswapSwapper.SwapParams"
},
"typeName": {
"id": 48534,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 48533,
"name": "SwapParams",
"nameLocations": [
"2596:10:56"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 48342,
"src": "2596:10:56"
},
"referencedDeclaration": 48342,
"src": "2596:10:56",
"typeDescriptions": {
"typeIdentifier": "t_struct$_SwapParams_$48342_storage_ptr",
"typeString": "struct UniswapSwapper.SwapParams"
}
},
"visibility": "internal"
}
],
"src": "2595:26:56"
},
"returnParameters": {
"id": 48541,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 48538,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "2648:8:56",
"nodeType": "VariableDeclaration",
"scope": 48793,
"src": "2640:16:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48537,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2640:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 48540,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "2666:9:56",
"nodeType": "VariableDeclaration",
"scope": 48793,
"src": "2658:17:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48539,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2658:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2639:37:56"
},
"scope": 48847,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"id": 48846,
"nodeType": "FunctionDefinition",
"src": "5718:365:56",
"nodes": [],
"body": {
"id": 48845,
"nodeType": "Block",
"src": "5771:312:56",
"nodes": [],
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 48802,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 48800,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48795,
"src": "5886:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 48801,
"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": 48807,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 48805,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48795,
"src": "5921:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"hexValue": "33",
"id": 48806,
"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": 48810,
"nodeType": "IfStatement",
"src": "5917:20:56",
"trueBody": {
"expression": {
"hexValue": "31",
"id": 48808,
"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": 48799,
"id": 48809,
"nodeType": "Return",
"src": "5929:8:56"
}
},
"id": 48811,
"nodeType": "IfStatement",
"src": "5882:55:56",
"trueBody": {
"expression": {
"hexValue": "30",
"id": 48803,
"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": 48799,
"id": 48804,
"nodeType": "Return",
"src": "5894:8:56"
}
},
{
"assignments": [
48813
],
"declarations": [
{
"constant": false,
"id": 48813,
"mutability": "mutable",
"name": "z",
"nameLocation": "5952:1:56",
"nodeType": "VariableDeclaration",
"scope": 48845,
"src": "5947:6:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48812,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "5947:4:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 48820,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 48819,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 48816,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 48814,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48795,
"src": "5957:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 48815,
"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": 48817,
"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": 48818,
"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": 48823,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 48821,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48798,
"src": "5977:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 48822,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48795,
"src": "5981:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5977:5:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 48824,
"nodeType": "ExpressionStatement",
"src": "5977:5:56"
},
{
"body": {
"id": 48843,
"nodeType": "Block",
"src": "6014:63:56",
"statements": [
{
"expression": {
"id": 48830,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 48828,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48798,
"src": "6028:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 48829,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48813,
"src": "6032:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6028:5:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 48831,
"nodeType": "ExpressionStatement",
"src": "6028:5:56"
},
{
"expression": {
"id": 48841,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 48832,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48813,
"src": "6047:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 48840,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 48837,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 48835,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 48833,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48795,
"src": "6052:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 48834,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48813,
"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": 48836,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48813,
"src": "6060:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6052:9:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 48838,
"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": 48839,
"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": 48842,
"nodeType": "ExpressionStatement",
"src": "6047:19:56"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 48827,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 48825,
"name": "z",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48813,
"src": "5999:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"id": 48826,
"name": "y",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 48798,
"src": "6003:1:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5999:5:56",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 48844,
"nodeType": "WhileStatement",
"src": "5992:85:56"
}
]
},
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "sqrt",
"nameLocation": "5727:4:56",
"parameters": {
"id": 48796,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 48795,
"mutability": "mutable",
"name": "x",
"nameLocation": "5737:1:56",
"nodeType": "VariableDeclaration",
"scope": 48846,
"src": "5732:6:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48794,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "5732:4:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5731:8:56"
},
"returnParameters": {
"id": 48799,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 48798,
"mutability": "mutable",
"name": "y",
"nameLocation": "5768:1:56",
"nodeType": "VariableDeclaration",
"scope": 48846,
"src": "5763:6:56",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 48797,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "5763:4:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "5762:8:56"
},
"scope": 48847,
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"abstract": false,
"baseContracts": [],
"canonicalName": "UniswapSwapper",
"contractDependencies": [],
"contractKind": "library",
"fullyImplemented": true,
"linearizedBaseContracts": [
48847
],
"name": "UniswapSwapper",
"nameLocation": "263:14:56",
"scope": 48848,
"usedErrors": [],
"usedEvents": []
}
],
"license": "UNLICENSED"
},
"id": 56
}