Skip to main content
Helpful?

SwapQuoter

@uniswap/v3-sdk / Exports / SwapQuoter

Class: SwapQuoter

Represents the Uniswap V3 QuoterV1 contract with a method for returning the formatted calldata needed to call the quoter contract.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SwapQuoter()

Properties

V1INTERFACE

Static V1INTERFACE: Interface

Defined in

quoter.ts:37


V2INTERFACE

Static V2INTERFACE: Interface

Defined in

quoter.ts:38

Methods

quoteCallParameters

Static quoteCallParameters<TInput, TOutput>(route, amount, tradeType, options?): MethodParameters

Produces the on-chain method name of the appropriate function within QuoterV2, and the relevant hex encoded parameters.

Type parameters

NameTypeDescription
TInputextends CurrencyThe input token, either Ether or an ERC-20
TOutputextends CurrencyThe output token, either Ether or an ERC-20

Parameters

NameTypeDescription
routeRoute<TInput, TOutput>The swap route, a list of pools through which a swap can occur
amountCurrencyAmount<TInput | TOutput>The amount of the quote, either an amount in, or an amount out
tradeTypeTradeTypeThe trade type, either exact input or exact output
optionsQuoteOptionsThe optional params including price limit and Quoter contract switch

Returns

MethodParameters

The formatted calldata

Defined in

quoter.ts:51

Helpful?