UN

Uniswap V3 Swap Router (Sepolia)

0x3bFA...e48ESepoliaSepolia· Testnet
swapuniswapv3

Contract Level Prompt

Foundational semantic layer for AI interpretation.

psychology
Swap router contract for Uniswap V3. Use `exactInputSingle` to swap a specific amount of `tokenIn` into a minimum amount of `tokenOut`.

exactInputSingle()

payable

Functional Prompt

Swaps `amountIn` of `tokenIn` for as much as possible of another token. The swapper must call `approve` on `tokenIn` before swapping so that the router contract can move their tokens.

Input Parameters

input
paramstuple

Input of type tuple

input
params.recipientunknown

The destination address of the received `tokenOut` tokens.

input
params.tokenInunknown

The contract address of the token we are swapping out of (i.e. selling) via the swap.

input
params.sqrtPriceLimitX96unknown

This value can be used to set the limit for the price the swap will push the pool to, which can help protect against price impact or for setting up logic in a variety of price-relevant mechanisms. If set to 0, the parameter is ignored.

input
params.feeunknown

The fee tier of the pool, used to determine the correct pool contract in which to execute the swap; can only be `500`, `3000` or `10000`.

input
params.amountInunknown

The exact amount of `tokenIn` which will be swapped for `tokenOut`.

input
params.tokenOutunknown

The contract address of the token we are swapping into (i.e. receiving) via the swap.

input
params.amountOutMinimumunknown

The minimum amount of `tokenOut` we require for the swap to be successful. If set to `0`, this parameter is ignored, however, this makes the swap vulnerable to sandwich attacks.

Output Parameters

output
amountOutuint256

The amount of `tokenOut` sent to `recipient`.