KyberSwap Docs
Search
K

SwapQuoter

Handles the encoding of calldata required to call the quoter contract.
GitHub File: quoter.ts

Properties

Public

Property
Type
Modifier
Description
INTERFACE
Interface
static
The Application Binary Interface for the related Elastic contracts.

Methods

quoteCallParameters() - public static

Based on the input parameters, handles the encoding of the relevant on-chain method that enables safe request for quotes.

Parameters

Params
Type
Description
route
Route<TInput, TOutput>
Array of potential pools with the same pair through which the swap can be routed. Ordered by the route the swap will take.
amount
CurrencyAmount<TInput, TOutput>
The quote amount in either amount in or amount out. Direction is determined by the tradeType.
tradeType
TradeType
The type of trade: exact in OR exact out.
options
Default is {}.

Returns

Type
Description
An object containing: calldata: string = The hex encoded calldata to perform the given operation. value: string = The amount of ether (wei) to send in hex.
Last modified 4mo ago