Class: SwapQuoter
Represents the SwapX 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
V2INTERFACE
Static V2INTERFACE: Interface
Defined in
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
| Name | Type | Description |
|---|---|---|
TInput | extends Currency | The input token, either Ether or an ERC-20 |
TOutput | extends Currency | The output token, either Ether or an ERC-20 |
Parameters
| Name | Type | Description |
|---|---|---|
route | Route TInput, TOutput | The swap route, a list of pools through which a swap can occur |
amount | CurrencyAmount | TInput TOutput | The amount of the quote, either an amount in, or an amount out |
tradeType | TradeType | The trade type, either exact input or exact output |
options | QuoteOptions | The optional params including price limit and Quoter contract switch |
Returns
The formatted calldata