PancakeSwap QuoterV2

PancakeSwap QuoterV2

0xB048...5997BNB Smart ChainBNB Smart Chain
DeFiPancakeSwap

Contract Level Prompt

Foundational semantic layer for AI interpretation.

psychology
This contract is used to simulate a PancakeSwap trade in order to estimate the amount of input token consumed or output token produced before performing the swap onchain. The output of the helper functions on this smart contract can be used as protective limits when interacting with the PancakeSwap V3 SwapRouter.

quoteExactInputSingle()

nonpayable

Functional Prompt

Get a quote on for an exact input single step swap

Input Parameters

input
paramstuple

Swap parameters.

Output Parameters

output
amountOutuint256

The amount of output token estimated to be produced.

output
sqrtPriceX96Afteruint160

The estimate of the sqrtPriceX96After for the single step swap

output
initializedTicksCrosseduint32

The number of price ticks predicted to be crossed.

output
gasEstimateuint256

The estimated amount of gas to be used by the swap.