@defi-wonderland/keep3r-v2
Version:
The Keep3r Network is a decentralized network for projects that need external devops, and for external teams to find keeper jobs
1,927 lines • 97.1 kB
JSON
{
"id": "232331b9d5307c35abdd0b3d3af5dbd2",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.7",
"solcLongVersion": "0.8.7+commit.e28d00a7",
"input": {
"language": "Solidity",
"sources": {
"solidity/for-test/IUniswapRouter.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.5.0 <0.9.0;\n\nimport '@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol';\n"
},
"@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.7.5;\npragma abicoder v2;\n\nimport '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol';\n\n/// @title Router token swapping functionality\n/// @notice Functions for swapping tokens via Uniswap V3\ninterface ISwapRouter is IUniswapV3SwapCallback {\n struct ExactInputSingleParams {\n address tokenIn;\n address tokenOut;\n uint24 fee;\n address recipient;\n uint256 deadline;\n uint256 amountIn;\n uint256 amountOutMinimum;\n uint160 sqrtPriceLimitX96;\n }\n\n /// @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\n function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);\n\n struct ExactInputParams {\n bytes path;\n address recipient;\n uint256 deadline;\n uint256 amountIn;\n uint256 amountOutMinimum;\n }\n\n /// @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\n function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);\n\n struct ExactOutputSingleParams {\n address tokenIn;\n address tokenOut;\n uint24 fee;\n address recipient;\n uint256 deadline;\n uint256 amountOut;\n uint256 amountInMaximum;\n uint160 sqrtPriceLimitX96;\n }\n\n /// @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\n function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);\n\n struct ExactOutputParams {\n bytes path;\n address recipient;\n uint256 deadline;\n uint256 amountOut;\n uint256 amountInMaximum;\n }\n\n /// @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\n function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);\n}\n"
},
"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title Callback for IUniswapV3PoolActions#swap\n/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface\ninterface IUniswapV3SwapCallback {\n /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.\n /// @dev In the implementation you must pay the pool tokens owed for the swap.\n /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.\n /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.\n /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by\n /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.\n /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by\n /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.\n /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call\n function uniswapV3SwapCallback(\n int256 amount0Delta,\n int256 amount1Delta,\n bytes calldata data\n ) external;\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 33
},
"outputSelection": {
"*": {
"*": [
"storageLayout",
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata",
"devdoc",
"userdoc",
"evm.gasEstimates"
],
"": [
"ast"
]
}
},
"metadata": {
"useLiteralContent": true
}
}
},
"output": {
"contracts": {
"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol": {
"IUniswapV3SwapCallback": {
"abi": [
{
"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": {
"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": "Callback for IUniswapV3PoolActions#swap",
"version": 1
},
"evm": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"gasEstimates": null,
"methodIdentifiers": {
"uniswapV3SwapCallback(int256,int256,bytes)": "fa461e33"
}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":{\"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\":\"Callback for IUniswapV3PoolActions#swap\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"uniswapV3SwapCallback(int256,int256,bytes)\":{\"notice\":\"Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.\"}},\"notice\":\"Any contract that calls IUniswapV3PoolActions#swap must implement this interface\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol\":\"IUniswapV3SwapCallback\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":33},\"remappings\":[]},\"sources\":{\"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Callback for IUniswapV3PoolActions#swap\\n/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface\\ninterface IUniswapV3SwapCallback {\\n /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.\\n /// @dev In the implementation you must pay the pool tokens owed for the swap.\\n /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.\\n /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.\\n /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by\\n /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.\\n /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by\\n /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.\\n /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call\\n function uniswapV3SwapCallback(\\n int256 amount0Delta,\\n int256 amount1Delta,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x3f485fb1a44e8fbeadefb5da07d66edab3cfe809f0ac4074b1e54e3eb3c4cf69\",\"license\":\"GPL-2.0-or-later\"}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {
"uniswapV3SwapCallback(int256,int256,bytes)": {
"notice": "Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap."
}
},
"notice": "Any contract that calls IUniswapV3PoolActions#swap must implement this interface",
"version": 1
}
}
},
"@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol": {
"ISwapRouter": {
"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
},
"evm": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"gasEstimates": null,
"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"
}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"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\":{\"@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol\":\"ISwapRouter\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":33},\"remappings\":[]},\"sources\":{\"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Callback for IUniswapV3PoolActions#swap\\n/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface\\ninterface IUniswapV3SwapCallback {\\n /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.\\n /// @dev In the implementation you must pay the pool tokens owed for the swap.\\n /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.\\n /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.\\n /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by\\n /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.\\n /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by\\n /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.\\n /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call\\n function uniswapV3SwapCallback(\\n int256 amount0Delta,\\n int256 amount1Delta,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x3f485fb1a44e8fbeadefb5da07d66edab3cfe809f0ac4074b1e54e3eb3c4cf69\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.7.5;\\npragma abicoder v2;\\n\\nimport '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol';\\n\\n/// @title Router token swapping functionality\\n/// @notice Functions for swapping tokens via Uniswap V3\\ninterface ISwapRouter is IUniswapV3SwapCallback {\\n struct ExactInputSingleParams {\\n address tokenIn;\\n address tokenOut;\\n uint24 fee;\\n address recipient;\\n uint256 deadline;\\n uint256 amountIn;\\n uint256 amountOutMinimum;\\n uint160 sqrtPriceLimitX96;\\n }\\n\\n /// @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\\n function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);\\n\\n struct ExactInputParams {\\n bytes path;\\n address recipient;\\n uint256 deadline;\\n uint256 amountIn;\\n uint256 amountOutMinimum;\\n }\\n\\n /// @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\\n function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);\\n\\n struct ExactOutputSingleParams {\\n address tokenIn;\\n address tokenOut;\\n uint24 fee;\\n address recipient;\\n uint256 deadline;\\n uint256 amountOut;\\n uint256 amountInMaximum;\\n uint160 sqrtPriceLimitX96;\\n }\\n\\n /// @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\\n function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);\\n\\n struct ExactOutputParams {\\n bytes path;\\n address recipient;\\n uint256 deadline;\\n uint256 amountOut;\\n uint256 amountInMaximum;\\n }\\n\\n /// @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\\n function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);\\n}\\n\",\"keccak256\":\"0x9bfaf1feb32814623e627ab70f2409760b15d95f1f9b058e2b3399a8bb732975\",\"license\":\"GPL-2.0-or-later\"}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"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
}
}
}
},
"sources": {
"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol": {
"ast": {
"absolutePath": "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol",
"exportedSymbols": {
"IUniswapV3SwapCallback": [
13
]
},
"id": 14,
"license": "GPL-2.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
">=",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "45:24:0"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "71:144:0",
"text": "@title Callback for IUniswapV3PoolActions#swap\n @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface"
},
"fullyImplemented": false,
"id": 13,
"linearizedBaseContracts": [
13
],
"name": "IUniswapV3SwapCallback",
"nameLocation": "225:22:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"documentation": {
"id": 3,
"nodeType": "StructuredDocumentation",
"src": "254:898:0",
"text": "@notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.\n @dev In the implementation you must pay the pool tokens owed for the swap.\n The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.\n amount0Delta and amount1Delta can both be 0 if no tokens were swapped.\n @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by\n the end of the swap. If positive, the callback must send that amount of token0 to the pool.\n @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by\n the end of the swap. If positive, the callback must send that amount of token1 to the pool.\n @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call"
},
"functionSelector": "fa461e33",
"id": 12,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "uniswapV3SwapCallback",
"nameLocation": "1166:21:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 10,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "amount0Delta",
"nameLocation": "1204:12:0",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "1197:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 4,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1197:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "amount1Delta",
"nameLocation": "1233:12:0",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "1226:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 6,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "1226:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 9,
"mutability": "mutable",
"name": "data",
"nameLocation": "1270:4:0",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "1255:19:0",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 8,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1255:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "1187:93:0"
},
"returnParameters": {
"id": 11,
"nodeType": "ParameterList",
"parameters": [],
"src": "1289:0:0"
},
"scope": 13,
"src": "1157:133:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 14,
"src": "215:1077:0",
"usedErrors": []
}
],
"src": "45:1248:0"
},
"id": 0
},
"@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol": {
"ast": {
"absolutePath": "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol",
"exportedSymbols": {
"ISwapRouter": [
113
],
"IUniswapV3SwapCallback": [
13
]
},
"id": 114,
"license": "GPL-2.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 15,
"literals": [
"solidity",
">=",
"0.7",
".5"
],
"nodeType": "PragmaDirective",
"src": "45:24:1"
},
{
"id": 16,
"literals": [
"abicoder",
"v2"
],
"nodeType": "PragmaDirective",
"src": "70:19:1"
},
{
"absolutePath": "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol",
"file": "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol",
"id": 17,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 114,
"sourceUnit": 14,
"src": "91:83:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 19,
"name": "IUniswapV3SwapCallback",
"nodeType": "IdentifierPath",
"referencedDeclaration": 13,
"src": "305:22:1"
},
"id": 20,
"nodeType": "InheritanceSpecifier",
"src": "305:22:1"
}
],
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 18,
"nodeType": "StructuredDocumentation",
"src": "176:104:1",
"text": "@title Router token swapping functionality\n @notice Functions for swapping tokens via Uniswap V3"
},
"fullyImplemented": false,
"id": 113,
"linearizedBaseContracts": [
113,
13
],
"name": "ISwapRouter",
"nameLocation": "290:11:1",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "ISwapRouter.ExactInputSingleParams",
"id": 37,
"members": [
{
"constant": false,
"id": 22,
"mutability": "mutable",
"name": "tokenIn",
"nameLocation": "382:7:1",
"nodeType": "VariableDeclaration",
"scope": 37,
"src": "374:15:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "374:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 24,
"mutability": "mutable",
"name": "tokenOut",
"nameLocation": "407:8:1",
"nodeType": "VariableDeclaration",
"scope": 37,
"src": "399:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 23,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "399:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 26,
"mutability": "mutable",
"name": "fee",
"nameLocation": "432:3:1",
"nodeType": "VariableDeclaration",
"scope": 37,
"src": "425:10:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
},
"typeName": {
"id": 25,
"name": "uint24",
"nodeType": "ElementaryTypeName",
"src": "425:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 28,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "453:9:1",
"nodeType": "VariableDeclaration",
"scope": 37,
"src": "445:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 27,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "445:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 30,
"mutability": "mutable",
"name": "deadline",
"nameLocation": "480:8:1",
"nodeType": "VariableDeclaration",
"scope": 37,
"src": "472:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 29,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "472:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 32,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "506:8:1",
"nodeType": "VariableDeclaration",
"scope": 37,
"src": "498:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 31,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "498:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 34,
"mutability": "mutable",
"name": "amountOutMinimum",
"nameLocation": "532:16:1",
"nodeType": "VariableDeclaration",
"scope": 37,
"src": "524:24:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 33,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "524:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 36,
"mutability": "mutable",
"name": "sqrtPriceLimitX96",
"nameLocation": "566:17:1",
"nodeType": "VariableDeclaration",
"scope": 37,
"src": "558:25:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"typeName": {
"id": 35,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "558:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"visibility": "internal"
}
],
"name": "ExactInputSingleParams",
"nameLocation": "341:22:1",
"nodeType": "StructDefinition",
"scope": 113,
"src": "334:256:1",
"visibility": "public"
},
{
"documentation": {
"id": 38,
"nodeType": "StructuredDocumentation",
"src": "596:250:1",
"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",
"id": 46,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "exactInputSingle",
"nameLocation": "860:16:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 42,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 41,
"mutability": "mutable",
"name": "params",
"nameLocation": "909:6:1",
"nodeType": "VariableDeclaration",
"scope": 46,
"src": "877:38:1",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactInputSingleParams_$37_calldata_ptr",
"typeString": "struct ISwapRouter.ExactInputSingleParams"
},
"typeName": {
"id": 40,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 39,
"name": "ExactInputSingleParams",
"nodeType": "IdentifierPath",
"referencedDeclaration": 37,
"src": "877:22:1"
},
"referencedDeclaration": 37,
"src": "877:22:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactInputSingleParams_$37_storage_ptr",
"typeString": "struct ISwapRouter.ExactInputSingleParams"
}
},
"visibility": "internal"
}
],
"src": "876:40:1"
},
"returnParameters": {
"id": 45,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 44,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "951:9:1",
"nodeType": "VariableDeclaration",
"scope": 46,
"src": "943:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 43,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "943:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "942:19:1"
},
"scope": 113,
"src": "851:111:1",
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"canonicalName": "ISwapRouter.ExactInputParams",
"id": 57,
"members": [
{
"constant": false,
"id": 48,
"mutability": "mutable",
"name": "path",
"nameLocation": "1008:4:1",
"nodeType": "VariableDeclaration",
"scope": 57,
"src": "1002:10:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 47,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1002:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 50,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "1030:9:1",
"nodeType": "VariableDeclaration",
"scope": 57,
"src": "1022:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 49,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1022:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 52,
"mutability": "mutable",
"name": "deadline",
"nameLocation": "1057:8:1",
"nodeType": "VariableDeclaration",
"scope": 57,
"src": "1049:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 51,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1049:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 54,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "1083:8:1",
"nodeType": "VariableDeclaration",
"scope": 57,
"src": "1075:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 53,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1075:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 56,
"mutability": "mutable",
"name": "amountOutMinimum",
"nameLocation": "1109:16:1",
"nodeType": "VariableDeclaration",
"scope": 57,
"src": "1101:24:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 55,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1101:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"name": "ExactInputParams",
"nameLocation": "975:16:1",
"nodeType": "StructDefinition",
"scope": 113,
"src": "968:164:1",
"visibility": "public"
},
{
"documentation": {
"id": 58,
"nodeType": "StructuredDocumentation",
"src": "1138:273:1",
"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",
"id": 66,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "exactInput",
"nameLocation": "1425:10:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 62,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 61,
"mutability": "mutable",
"name": "params",
"nameLocation": "1462:6:1",
"nodeType": "VariableDeclaration",
"scope": 66,
"src": "1436:32:1",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactInputParams_$57_calldata_ptr",
"typeString": "struct ISwapRouter.ExactInputParams"
},
"typeName": {
"id": 60,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 59,
"name": "ExactInputParams",
"nodeType": "IdentifierPath",
"referencedDeclaration": 57,
"src": "1436:16:1"
},
"referencedDeclaration": 57,
"src": "1436:16:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactInputParams_$57_storage_ptr",
"typeString": "struct ISwapRouter.ExactInputParams"
}
},
"visibility": "internal"
}
],
"src": "1435:34:1"
},
"returnParameters": {
"id": 65,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 64,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "1504:9:1",
"nodeType": "VariableDeclaration",
"scope": 66,
"src": "1496:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 63,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1496:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1495:19:1"
},
"scope": 113,
"src": "1416:99:1",
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"canonicalName": "ISwapRouter.ExactOutputSingleParams",
"id": 83,
"members": [
{
"constant": false,
"id": 68,
"mutability": "mutable",
"name": "tokenIn",
"nameLocation": "1570:7:1",
"nodeType": "VariableDeclaration",
"scope": 83,
"src": "1562:15:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 67,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1562:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 70,
"mutability": "mutable",
"name": "tokenOut",
"nameLocation": "1595:8:1",
"nodeType": "VariableDeclaration",
"scope": 83,
"src": "1587:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 69,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1587:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 72,
"mutability": "mutable",
"name": "fee",
"nameLocation": "1620:3:1",
"nodeType": "VariableDeclaration",
"scope": 83,
"src": "1613:10:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
},
"typeName": {
"id": 71,
"name": "uint24",
"nodeType": "ElementaryTypeName",
"src": "1613:6:1",
"typeDescriptions": {
"typeIdentifier": "t_uint24",
"typeString": "uint24"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 74,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "1641:9:1",
"nodeType": "VariableDeclaration",
"scope": 83,
"src": "1633:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 73,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1633:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 76,
"mutability": "mutable",
"name": "deadline",
"nameLocation": "1668:8:1",
"nodeType": "VariableDeclaration",
"scope": 83,
"src": "1660:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 75,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1660:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 78,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "1694:9:1",
"nodeType": "VariableDeclaration",
"scope": 83,
"src": "1686:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 77,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1686:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 80,
"mutability": "mutable",
"name": "amountInMaximum",
"nameLocation": "1721:15:1",
"nodeType": "VariableDeclaration",
"scope": 83,
"src": "1713:23:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 79,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1713:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 82,
"mutability": "mutable",
"name": "sqrtPriceLimitX96",
"nameLocation": "1754:17:1",
"nodeType": "VariableDeclaration",
"scope": 83,
"src": "1746:25:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
},
"typeName": {
"id": 81,
"name": "uint160",
"nodeType": "ElementaryTypeName",
"src": "1746:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint160",
"typeString": "uint160"
}
},
"visibility": "internal"
}
],
"name": "ExactOutputSingleParams",
"nameLocation": "1528:23:1",
"nodeType": "StructDefinition",
"scope": 113,
"src": "1521:257:1",
"visibility": "public"
},
{
"documentation": {
"id": 84,
"nodeType": "StructuredDocumentation",
"src": "1784:250:1",
"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",
"id": 92,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "exactOutputSingle",
"nameLocation": "2048:17:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 88,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 87,
"mutability": "mutable",
"name": "params",
"nameLocation": "2099:6:1",
"nodeType": "VariableDeclaration",
"scope": 92,
"src": "2066:39:1",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactOutputSingleParams_$83_calldata_ptr",
"typeString": "struct ISwapRouter.ExactOutputSingleParams"
},
"typeName": {
"id": 86,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 85,
"name": "ExactOutputSingleParams",
"nodeType": "IdentifierPath",
"referencedDeclaration": 83,
"src": "2066:23:1"
},
"referencedDeclaration": 83,
"src": "2066:23:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactOutputSingleParams_$83_storage_ptr",
"typeString": "struct ISwapRouter.ExactOutputSingleParams"
}
},
"visibility": "internal"
}
],
"src": "2065:41:1"
},
"returnParameters": {
"id": 91,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 90,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "2141:8:1",
"nodeType": "VariableDeclaration",
"scope": 92,
"src": "2133:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 89,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2133:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2132:18:1"
},
"scope": 113,
"src": "2039:112:1",
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"canonicalName": "ISwapRouter.ExactOutputParams",
"id": 103,
"members": [
{
"constant": false,
"id": 94,
"mutability": "mutable",
"name": "path",
"nameLocation": "2198:4:1",
"nodeType": "VariableDeclaration",
"scope": 103,
"src": "2192:10:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 93,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2192:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 96,
"mutability": "mutable",
"name": "recipient",
"nameLocation": "2220:9:1",
"nodeType": "VariableDeclaration",
"scope": 103,
"src": "2212:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 95,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2212:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 98,
"mutability": "mutable",
"name": "deadline",
"nameLocation": "2247:8:1",
"nodeType": "VariableDeclaration",
"scope": 103,
"src": "2239:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 97,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2239:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 100,
"mutability": "mutable",
"name": "amountOut",
"nameLocation": "2273:9:1",
"nodeType": "VariableDeclaration",
"scope": 103,
"src": "2265:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 99,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2265:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 102,
"mutability": "mutable",
"name": "amountInMaximum",
"nameLocation": "2300:15:1",
"nodeType": "VariableDeclaration",
"scope": 103,
"src": "2292:23:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 101,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2292:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"name": "ExactOutputParams",
"nameLocation": "2164:17:1",
"nodeType": "StructDefinition",
"scope": 113,
"src": "2157:165:1",
"visibility": "public"
},
{
"documentation": {
"id": 104,
"nodeType": "StructuredDocumentation",
"src": "2328:284:1",
"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",
"id": 112,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "exactOutput",
"nameLocation": "2626:11:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 108,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 107,
"mutability": "mutable",
"name": "params",
"nameLocation": "2665:6:1",
"nodeType": "VariableDeclaration",
"scope": 112,
"src": "2638:33:1",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactOutputParams_$103_calldata_ptr",
"typeString": "struct ISwapRouter.ExactOutputParams"
},
"typeName": {
"id": 106,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 105,
"name": "ExactOutputParams",
"nodeType": "IdentifierPath",
"referencedDeclaration": 103,
"src": "2638:17:1"
},
"referencedDeclaration": 103,
"src": "2638:17:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ExactOutputParams_$103_storage_ptr",
"typeString": "struct ISwapRouter.ExactOutputParams"
}
},
"visibility": "internal"
}
],
"src": "2637:35:1"
},
"returnParameters": {
"id": 111,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 110,
"mutability": "mutable",
"name": "amountIn",
"nameLocation": "2707:8:1",
"nodeType": "VariableDeclaration",
"scope": 112,
"src": "2699:16:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 109,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2699:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2698:18:1"
},
"scope": 113,
"src": "2617:100:1",
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
}
],
"scope": 114,
"src": "280:2439:1",
"usedErrors": []
}
],
"src": "45:2675:1"
},
"id": 1
},
"solidity/for-test/IUniswapRouter.sol": {
"ast": {
"absolutePath": "solidity/for-test/IUniswapRouter.sol",
"exportedSymbols": {
"ISwapRouter": [
113
],
"IUniswapV3SwapCallback": [
13
]
},
"id": 117,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 115,
"literals": [
"solidity",
">=",
"0.5",
".0",
"<",
"0.9",
".0"
],
"nodeType": "PragmaDirective",
"src": "32:31:2"
},
{
"absolutePath": "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol",
"file": "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol",
"id": 116,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 117,
"sourceUnit": 114,
"src": "65:68:2",
"symbolAliases": [],
"unitAlias": ""
}
],
"src": "32:102:2"
},
"id": 2
}
}
}
}