mint.fast docs

MintFastQuoter

eth_call quote lens that simulates swaps and returns deltas via revert.

Stateless helper pinned to the same pool fee, tick spacing, and hook as the launchpad. Call via eth_call. It never settles value.

Constructor

constructor(
    IPoolManager poolManager_,
    uint24 poolFee_,
    int24 tickSpacing_,
    address hooks_
)

Quote API

quoteBuy

function quoteBuy(address token, uint256 ethIn)
    external returns (uint256 ethUsed, uint256 tokensOut);

Simulates ETH → token. If ethUsed < ethIn, the buy would only partially fill. Fee is already netted in the returned amounts.

quoteSell

function quoteSell(address token, uint256 tokenIn)
    external returns (uint256 tokenUsed, uint256 ethOut);

Simulates token → ETH. Partial fill when tokenUsed < tokenIn.

unlockCallback

Always ends in QuoteResult(amount0, amount1) (or BadCallback if miscalled). The outer quote* functions catch that revert and decode the deltas.

Errors

ErrorMeaning
QuoteResult(int256,int256)success carrier, not a real failure
UnexpectedRevert(bytes)pool/hook reverted for another reason
BadCallbackunlock completed without QuoteResult, or wrong caller

Usage tip

Wire this by simulating the call, decoding QuoteResult, then setting minTokensOut / minEthOut with your slippage buffer. See Buy and sell.