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

1886 lines
71 KiB
JSON

{
"abi": [
{
"inputs": [
{
"components": [
{
"internalType": "bytes",
"name": "path",
"type": "bytes"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountOutMinimum",
"type": "uint256"
}
],
"internalType": "struct ISwapRouter.ExactInputParams",
"name": "params",
"type": "tuple"
}
],
"name": "exactInput",
"outputs": [
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "tokenIn",
"type": "address"
},
{
"internalType": "address",
"name": "tokenOut",
"type": "address"
},
{
"internalType": "uint24",
"name": "fee",
"type": "uint24"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountOutMinimum",
"type": "uint256"
},
{
"internalType": "uint160",
"name": "sqrtPriceLimitX96",
"type": "uint160"
}
],
"internalType": "struct ISwapRouter.ExactInputSingleParams",
"name": "params",
"type": "tuple"
}
],
"name": "exactInputSingle",
"outputs": [
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "bytes",
"name": "path",
"type": "bytes"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountInMaximum",
"type": "uint256"
}
],
"internalType": "struct ISwapRouter.ExactOutputParams",
"name": "params",
"type": "tuple"
}
],
"name": "exactOutput",
"outputs": [
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "tokenIn",
"type": "address"
},
{
"internalType": "address",
"name": "tokenOut",
"type": "address"
},
{
"internalType": "uint24",
"name": "fee",
"type": "uint24"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountInMaximum",
"type": "uint256"
},
{
"internalType": "uint160",
"name": "sqrtPriceLimitX96",
"type": "uint160"
}
],
"internalType": "struct ISwapRouter.ExactOutputSingleParams",
"name": "params",
"type": "tuple"
}
],
"name": "exactOutputSingle",
"outputs": [
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "int256",
"name": "amount0Delta",
"type": "int256"
},
{
"internalType": "int256",
"name": "amount1Delta",
"type": "int256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "uniswapV3SwapCallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": {
"object": "0x",
"sourceMap": "",
"linkReferences": {}
},
"deployedBytecode": {
"object": "0x",
"sourceMap": "",
"linkReferences": {}
},
"methodIdentifiers": {
"exactInput((bytes,address,uint256,uint256,uint256))": "c04b8d59",
"exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))": "414bf389",
"exactOutput((bytes,address,uint256,uint256,uint256))": "f28c0498",
"exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))": "db3e2198",
"uniswapV3SwapCallback(int256,int256,bytes)": "fa461e33"
},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.22+commit.4fc1097e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"path\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMinimum\",\"type\":\"uint256\"}],\"internalType\":\"struct ISwapRouter.ExactInputParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactInput\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMinimum\",\"type\":\"uint256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"}],\"internalType\":\"struct ISwapRouter.ExactInputSingleParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactInputSingle\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"path\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMaximum\",\"type\":\"uint256\"}],\"internalType\":\"struct ISwapRouter.ExactOutputParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactOutput\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMaximum\",\"type\":\"uint256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"}],\"internalType\":\"struct ISwapRouter.ExactOutputSingleParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactOutputSingle\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"amount0Delta\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"amount1Delta\",\"type\":\"int256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"uniswapV3SwapCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"exactInput((bytes,address,uint256,uint256,uint256))\":{\"params\":{\"params\":\"The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata\"},\"returns\":{\"amountOut\":\"The amount of the received token\"}},\"exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))\":{\"params\":{\"params\":\"The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata\"},\"returns\":{\"amountOut\":\"The amount of the received token\"}},\"exactOutput((bytes,address,uint256,uint256,uint256))\":{\"params\":{\"params\":\"The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata\"},\"returns\":{\"amountIn\":\"The amount of the input token\"}},\"exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))\":{\"params\":{\"params\":\"The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata\"},\"returns\":{\"amountIn\":\"The amount of the input token\"}},\"uniswapV3SwapCallback(int256,int256,bytes)\":{\"details\":\"In the implementation you must pay the pool tokens owed for the swap. The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. amount0Delta and amount1Delta can both be 0 if no tokens were swapped.\",\"params\":{\"amount0Delta\":\"The amount of token0 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token0 to the pool.\",\"amount1Delta\":\"The amount of token1 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token1 to the pool.\",\"data\":\"Any data passed through by the caller via the IUniswapV3PoolActions#swap call\"}}},\"title\":\"Router token swapping functionality\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"exactInput((bytes,address,uint256,uint256,uint256))\":{\"notice\":\"Swaps `amountIn` of one token for as much as possible of another along the specified path\"},\"exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))\":{\"notice\":\"Swaps `amountIn` of one token for as much as possible of another token\"},\"exactOutput((bytes,address,uint256,uint256,uint256))\":{\"notice\":\"Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)\"},\"exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))\":{\"notice\":\"Swaps as little as possible of one token for `amountOut` of another token\"},\"uniswapV3SwapCallback(int256,int256,bytes)\":{\"notice\":\"Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.\"}},\"notice\":\"Functions for swapping tokens via Uniswap V3\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib_uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol\":\"ISwapRouter\"},\"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_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/ISwapRouter.sol\":{\"keccak256\":\"0x9bfaf1feb32814623e627ab70f2409760b15d95f1f9b058e2b3399a8bb732975\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://a8a2c3e55965b61bcd91993d8e1d5d34b8b8a63e0fdfce87a85f6af92526fd53\",\"dweb:/ipfs/QmQj2CSCSwqDSU4KMNWxGsN2336Cy64WgpV1X1EHXNZWxM\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.22+commit.4fc1097e"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "struct ISwapRouter.ExactInputParams",
"name": "params",
"type": "tuple",
"components": [
{
"internalType": "bytes",
"name": "path",
"type": "bytes"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountOutMinimum",
"type": "uint256"
}
]
}
],
"stateMutability": "payable",
"type": "function",
"name": "exactInput",
"outputs": [
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "struct ISwapRouter.ExactInputSingleParams",
"name": "params",
"type": "tuple",
"components": [
{
"internalType": "address",
"name": "tokenIn",
"type": "address"
},
{
"internalType": "address",
"name": "tokenOut",
"type": "address"
},
{
"internalType": "uint24",
"name": "fee",
"type": "uint24"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountOutMinimum",
"type": "uint256"
},
{
"internalType": "uint160",
"name": "sqrtPriceLimitX96",
"type": "uint160"
}
]
}
],
"stateMutability": "payable",
"type": "function",
"name": "exactInputSingle",
"outputs": [
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "struct ISwapRouter.ExactOutputParams",
"name": "params",
"type": "tuple",
"components": [
{
"internalType": "bytes",
"name": "path",
"type": "bytes"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountInMaximum",
"type": "uint256"
}
]
}
],
"stateMutability": "payable",
"type": "function",
"name": "exactOutput",
"outputs": [
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "struct ISwapRouter.ExactOutputSingleParams",
"name": "params",
"type": "tuple",
"components": [
{
"internalType": "address",
"name": "tokenIn",
"type": "address"
},
{
"internalType": "address",
"name": "tokenOut",
"type": "address"
},
{
"internalType": "uint24",
"name": "fee",
"type": "uint24"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountInMaximum",
"type": "uint256"
},
{
"internalType": "uint160",
"name": "sqrtPriceLimitX96",
"type": "uint160"
}
]
}
],
"stateMutability": "payable",
"type": "function",
"name": "exactOutputSingle",
"outputs": [
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "int256",
"name": "amount0Delta",
"type": "int256"
},
{
"internalType": "int256",
"name": "amount1Delta",
"type": "int256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "uniswapV3SwapCallback"
}
],
"devdoc": {
"kind": "dev",
"methods": {
"exactInput((bytes,address,uint256,uint256,uint256))": {
"params": {
"params": "The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata"
},
"returns": {
"amountOut": "The amount of the received token"
}
},
"exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))": {
"params": {
"params": "The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata"
},
"returns": {
"amountOut": "The amount of the received token"
}
},
"exactOutput((bytes,address,uint256,uint256,uint256))": {
"params": {
"params": "The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata"
},
"returns": {
"amountIn": "The amount of the input token"
}
},
"exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))": {
"params": {
"params": "The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata"
},
"returns": {
"amountIn": "The amount of the input token"
}
},
"uniswapV3SwapCallback(int256,int256,bytes)": {
"details": "In the implementation you must pay the pool tokens owed for the swap. The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. amount0Delta and amount1Delta can both be 0 if no tokens were swapped.",
"params": {
"amount0Delta": "The amount of token0 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token0 to the pool.",
"amount1Delta": "The amount of token1 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token1 to the pool.",
"data": "Any data passed through by the caller via the IUniswapV3PoolActions#swap call"
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"exactInput((bytes,address,uint256,uint256,uint256))": {
"notice": "Swaps `amountIn` of one token for as much as possible of another along the specified path"
},
"exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))": {
"notice": "Swaps `amountIn` of one token for as much as possible of another token"
},
"exactOutput((bytes,address,uint256,uint256,uint256))": {
"notice": "Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)"
},
"exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))": {
"notice": "Swaps as little as possible of one token for `amountOut` of another token"
},
"uniswapV3SwapCallback(int256,int256,bytes)": {
"notice": "Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap."
}
},
"version": 1
}
},
"settings": {
"remappings": [
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@uniswap/v3-core/=lib_uniswap/v3-core/",
"@uniswap/v3-periphery/=lib_uniswap/v3-periphery/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"v3-core/=lib_uniswap/v3-core/",
"v3-periphery/libraries/=lib_uniswap/v3-periphery/contracts/libraries/"
],
"optimizer": {
"runs": 999999999,
"details": {
"peephole": true,
"inliner": true,
"jumpdestRemover": true,
"orderLiterals": true,
"deduplicate": true,
"cse": true,
"constantOptimizer": true,
"yul": true,
"yulDetails": {
"stackAllocation": true,
"optimizerSteps": "dhfoD[xarrscLMcCTU]uljmul:fDnTOcmu"
}
}
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"lib_uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol": "ISwapRouter"
},
"libraries": {}
},
"sources": {
"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/ISwapRouter.sol": {
"keccak256": "0x9bfaf1feb32814623e627ab70f2409760b15d95f1f9b058e2b3399a8bb732975",
"urls": [
"bzz-raw://a8a2c3e55965b61bcd91993d8e1d5d34b8b8a63e0fdfce87a85f6af92526fd53",
"dweb:/ipfs/QmQj2CSCSwqDSU4KMNWxGsN2336Cy64WgpV1X1EHXNZWxM"
],
"license": "GPL-2.0-or-later"
}
},
"version": 1
},
"ast": {
"absolutePath": "lib_uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol",
"id": 45455,
"exportedSymbols": {
"ISwapRouter": [
45454
],
"IUniswapV3SwapCallback": [
43908
]
},
"nodeType": "SourceUnit",
"src": "45:2675:44",
"nodes": [
{
"id": 45356,
"nodeType": "PragmaDirective",
"src": "45:24:44",
"nodes": [],
"literals": [
"solidity",
">=",
"0.7",
".5"
]
},
{
"id": 45357,
"nodeType": "PragmaDirective",
"src": "70:19:44",
"nodes": [],
"literals": [
"abicoder",
"v2"
]
},
{
"id": 45358,
"nodeType": "ImportDirective",
"src": "91:83:44",
"nodes": [],
"absolutePath": "lib_uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol",
"file": "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol",
"nameLocation": "-1:-1:-1",
"scope": 45455,
"sourceUnit": 43909,
"symbolAliases": [],
"unitAlias": ""
},
{
"id": 45454,
"nodeType": "ContractDefinition",
"src": "280:2439:44",
"nodes": [
{
"id": 45378,
"nodeType": "StructDefinition",
"src": "334:256:44",
"nodes": [],
"canonicalName": "ISwapRouter.ExactInputSingleParams",
"members": [
{
"constant": false,
"id": 45363,
"mutability": "mutable",
"name": "tokenIn",
"nameLocation": "382:7:44",
"nodeType": "VariableDeclaration",
"scope": 45378,
"src": "374:15:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45362,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "374:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45365,
"mutability": "mutable",
"name": "tokenOut",
"nameLocation": "407:8:44",
"nodeType": "VariableDeclaration",
"scope": 45378,
"src": "399:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45364,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "399:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45367,
"mutability": "mutable",
"name": "fee",
"nameLocation": "432:3:44",
"nodeType": "VariableDeclaration",
"scope": 45378,
"src": "425:10:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
},
"typeName": {
"id": 45366,
"name": "uint24",
"nodeType": "ElementaryTypeName",
"src": "425:6:44",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45369,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "453:9:44",
"nodeType": "VariableDeclaration",
"scope": 45378,
"src": "445:17:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45368,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "445:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45371,
"mutability": "mutable",
"name": "deadline",
"nameLocation": "480:8:44",
"nodeType": "VariableDeclaration",
"scope": 45378,
"src": "472:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45370,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "472:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45373,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "506:8:44",
"nodeType": "VariableDeclaration",
"scope": 45378,
"src": "498:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45372,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "498:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45375,
"mutability": "mutable",
"name": "amountOutMinimum",
"nameLocation": "532:16:44",
"nodeType": "VariableDeclaration",
"scope": 45378,
"src": "524:24:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45374,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "524:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45377,
"mutability": "mutable",
"name": "sqrtPriceLimitX96",
"nameLocation": "566:17:44",
"nodeType": "VariableDeclaration",
"scope": 45378,
"src": "558:25:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"typeName": {
"id": 45376,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "558:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"visibility": "internal"
}
],
"name": "ExactInputSingleParams",
"nameLocation": "341:22:44",
"scope": 45454,
"visibility": "public"
},
{
"id": 45387,
"nodeType": "FunctionDefinition",
"src": "851:111:44",
"nodes": [],
"documentation": {
"id": 45379,
"nodeType": "StructuredDocumentation",
"src": "596:250:44",
"text": "@notice Swaps `amountIn` of one token for as much as possible of another token\n @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata\n @return amountOut The amount of the received token"
},
"functionSelector": "414bf389",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "exactInputSingle",
"nameLocation": "860:16:44",
"parameters": {
"id": 45383,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45382,
"mutability": "mutable",
"name": "params",
"nameLocation": "909:6:44",
"nodeType": "VariableDeclaration",
"scope": 45387,
"src": "877:38:44",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactInputSingleParams_$45378_calldata_ptr",
"typeString": "struct ISwapRouter.ExactInputSingleParams"
},
"typeName": {
"id": 45381,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 45380,
"name": "ExactInputSingleParams",
"nameLocations": [
"877:22:44"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 45378,
"src": "877:22:44"
},
"referencedDeclaration": 45378,
"src": "877:22:44",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactInputSingleParams_$45378_storage_ptr",
"typeString": "struct ISwapRouter.ExactInputSingleParams"
}
},
"visibility": "internal"
}
],
"src": "876:40:44"
},
"returnParameters": {
"id": 45386,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45385,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "951:9:44",
"nodeType": "VariableDeclaration",
"scope": 45387,
"src": "943:17:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45384,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "943:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "942:19:44"
},
"scope": 45454,
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"id": 45398,
"nodeType": "StructDefinition",
"src": "968:164:44",
"nodes": [],
"canonicalName": "ISwapRouter.ExactInputParams",
"members": [
{
"constant": false,
"id": 45389,
"mutability": "mutable",
"name": "path",
"nameLocation": "1008:4:44",
"nodeType": "VariableDeclaration",
"scope": 45398,
"src": "1002:10:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 45388,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1002:5:44",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45391,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "1030:9:44",
"nodeType": "VariableDeclaration",
"scope": 45398,
"src": "1022:17:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45390,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1022:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45393,
"mutability": "mutable",
"name": "deadline",
"nameLocation": "1057:8:44",
"nodeType": "VariableDeclaration",
"scope": 45398,
"src": "1049:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45392,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1049:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45395,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "1083:8:44",
"nodeType": "VariableDeclaration",
"scope": 45398,
"src": "1075:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45394,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1075:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45397,
"mutability": "mutable",
"name": "amountOutMinimum",
"nameLocation": "1109:16:44",
"nodeType": "VariableDeclaration",
"scope": 45398,
"src": "1101:24:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45396,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1101:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"name": "ExactInputParams",
"nameLocation": "975:16:44",
"scope": 45454,
"visibility": "public"
},
{
"id": 45407,
"nodeType": "FunctionDefinition",
"src": "1416:99:44",
"nodes": [],
"documentation": {
"id": 45399,
"nodeType": "StructuredDocumentation",
"src": "1138:273:44",
"text": "@notice Swaps `amountIn` of one token for as much as possible of another along the specified path\n @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata\n @return amountOut The amount of the received token"
},
"functionSelector": "c04b8d59",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "exactInput",
"nameLocation": "1425:10:44",
"parameters": {
"id": 45403,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45402,
"mutability": "mutable",
"name": "params",
"nameLocation": "1462:6:44",
"nodeType": "VariableDeclaration",
"scope": 45407,
"src": "1436:32:44",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactInputParams_$45398_calldata_ptr",
"typeString": "struct ISwapRouter.ExactInputParams"
},
"typeName": {
"id": 45401,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 45400,
"name": "ExactInputParams",
"nameLocations": [
"1436:16:44"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 45398,
"src": "1436:16:44"
},
"referencedDeclaration": 45398,
"src": "1436:16:44",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactInputParams_$45398_storage_ptr",
"typeString": "struct ISwapRouter.ExactInputParams"
}
},
"visibility": "internal"
}
],
"src": "1435:34:44"
},
"returnParameters": {
"id": 45406,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45405,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "1504:9:44",
"nodeType": "VariableDeclaration",
"scope": 45407,
"src": "1496:17:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45404,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1496:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1495:19:44"
},
"scope": 45454,
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"id": 45424,
"nodeType": "StructDefinition",
"src": "1521:257:44",
"nodes": [],
"canonicalName": "ISwapRouter.ExactOutputSingleParams",
"members": [
{
"constant": false,
"id": 45409,
"mutability": "mutable",
"name": "tokenIn",
"nameLocation": "1570:7:44",
"nodeType": "VariableDeclaration",
"scope": 45424,
"src": "1562:15:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45408,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1562:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45411,
"mutability": "mutable",
"name": "tokenOut",
"nameLocation": "1595:8:44",
"nodeType": "VariableDeclaration",
"scope": 45424,
"src": "1587:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45410,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1587:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45413,
"mutability": "mutable",
"name": "fee",
"nameLocation": "1620:3:44",
"nodeType": "VariableDeclaration",
"scope": 45424,
"src": "1613:10:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
},
"typeName": {
"id": 45412,
"name": "uint24",
"nodeType": "ElementaryTypeName",
"src": "1613:6:44",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45415,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "1641:9:44",
"nodeType": "VariableDeclaration",
"scope": 45424,
"src": "1633:17:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45414,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1633:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45417,
"mutability": "mutable",
"name": "deadline",
"nameLocation": "1668:8:44",
"nodeType": "VariableDeclaration",
"scope": 45424,
"src": "1660:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45416,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1660:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45419,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "1694:9:44",
"nodeType": "VariableDeclaration",
"scope": 45424,
"src": "1686:17:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45418,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1686:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45421,
"mutability": "mutable",
"name": "amountInMaximum",
"nameLocation": "1721:15:44",
"nodeType": "VariableDeclaration",
"scope": 45424,
"src": "1713:23:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45420,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1713:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45423,
"mutability": "mutable",
"name": "sqrtPriceLimitX96",
"nameLocation": "1754:17:44",
"nodeType": "VariableDeclaration",
"scope": 45424,
"src": "1746:25:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"typeName": {
"id": 45422,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "1746:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"visibility": "internal"
}
],
"name": "ExactOutputSingleParams",
"nameLocation": "1528:23:44",
"scope": 45454,
"visibility": "public"
},
{
"id": 45433,
"nodeType": "FunctionDefinition",
"src": "2039:112:44",
"nodes": [],
"documentation": {
"id": 45425,
"nodeType": "StructuredDocumentation",
"src": "1784:250:44",
"text": "@notice Swaps as little as possible of one token for `amountOut` of another token\n @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata\n @return amountIn The amount of the input token"
},
"functionSelector": "db3e2198",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "exactOutputSingle",
"nameLocation": "2048:17:44",
"parameters": {
"id": 45429,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45428,
"mutability": "mutable",
"name": "params",
"nameLocation": "2099:6:44",
"nodeType": "VariableDeclaration",
"scope": 45433,
"src": "2066:39:44",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactOutputSingleParams_$45424_calldata_ptr",
"typeString": "struct ISwapRouter.ExactOutputSingleParams"
},
"typeName": {
"id": 45427,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 45426,
"name": "ExactOutputSingleParams",
"nameLocations": [
"2066:23:44"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 45424,
"src": "2066:23:44"
},
"referencedDeclaration": 45424,
"src": "2066:23:44",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactOutputSingleParams_$45424_storage_ptr",
"typeString": "struct ISwapRouter.ExactOutputSingleParams"
}
},
"visibility": "internal"
}
],
"src": "2065:41:44"
},
"returnParameters": {
"id": 45432,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45431,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "2141:8:44",
"nodeType": "VariableDeclaration",
"scope": 45433,
"src": "2133:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45430,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2133:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2132:18:44"
},
"scope": 45454,
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"id": 45444,
"nodeType": "StructDefinition",
"src": "2157:165:44",
"nodes": [],
"canonicalName": "ISwapRouter.ExactOutputParams",
"members": [
{
"constant": false,
"id": 45435,
"mutability": "mutable",
"name": "path",
"nameLocation": "2198:4:44",
"nodeType": "VariableDeclaration",
"scope": 45444,
"src": "2192:10:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 45434,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2192:5:44",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45437,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "2220:9:44",
"nodeType": "VariableDeclaration",
"scope": 45444,
"src": "2212:17:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 45436,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2212:7:44",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45439,
"mutability": "mutable",
"name": "deadline",
"nameLocation": "2247:8:44",
"nodeType": "VariableDeclaration",
"scope": 45444,
"src": "2239:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45438,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2239:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45441,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "2273:9:44",
"nodeType": "VariableDeclaration",
"scope": 45444,
"src": "2265:17:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45440,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2265:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 45443,
"mutability": "mutable",
"name": "amountInMaximum",
"nameLocation": "2300:15:44",
"nodeType": "VariableDeclaration",
"scope": 45444,
"src": "2292:23:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45442,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2292:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"name": "ExactOutputParams",
"nameLocation": "2164:17:44",
"scope": 45454,
"visibility": "public"
},
{
"id": 45453,
"nodeType": "FunctionDefinition",
"src": "2617:100:44",
"nodes": [],
"documentation": {
"id": 45445,
"nodeType": "StructuredDocumentation",
"src": "2328:284:44",
"text": "@notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)\n @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata\n @return amountIn The amount of the input token"
},
"functionSelector": "f28c0498",
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "exactOutput",
"nameLocation": "2626:11:44",
"parameters": {
"id": 45449,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45448,
"mutability": "mutable",
"name": "params",
"nameLocation": "2665:6:44",
"nodeType": "VariableDeclaration",
"scope": 45453,
"src": "2638:33:44",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactOutputParams_$45444_calldata_ptr",
"typeString": "struct ISwapRouter.ExactOutputParams"
},
"typeName": {
"id": 45447,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 45446,
"name": "ExactOutputParams",
"nameLocations": [
"2638:17:44"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 45444,
"src": "2638:17:44"
},
"referencedDeclaration": 45444,
"src": "2638:17:44",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactOutputParams_$45444_storage_ptr",
"typeString": "struct ISwapRouter.ExactOutputParams"
}
},
"visibility": "internal"
}
],
"src": "2637:35:44"
},
"returnParameters": {
"id": 45452,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 45451,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "2707:8:44",
"nodeType": "VariableDeclaration",
"scope": 45453,
"src": "2699:16:44",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 45450,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2699:7:44",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2698:18:44"
},
"scope": 45454,
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
}
],
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 45360,
"name": "IUniswapV3SwapCallback",
"nameLocations": [
"305:22:44"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 43908,
"src": "305:22:44"
},
"id": 45361,
"nodeType": "InheritanceSpecifier",
"src": "305:22:44"
}
],
"canonicalName": "ISwapRouter",
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 45359,
"nodeType": "StructuredDocumentation",
"src": "176:104:44",
"text": "@title Router token swapping functionality\n @notice Functions for swapping tokens via Uniswap V3"
},
"fullyImplemented": false,
"linearizedBaseContracts": [
45454,
43908
],
"name": "ISwapRouter",
"nameLocation": "290:11:44",
"scope": 45455,
"usedErrors": [],
"usedEvents": []
}
],
"license": "GPL-2.0-or-later"
},
"id": 44
}