UNPKG

hermes-v2-sdk

Version:

⚒️ An SDK for building applications on top of Hermes V2

26 lines (25 loc) 1.47 kB
import { Interface } from '@ethersproject/abi'; import { Currency, CurrencyAmount, MethodParameters } from 'maia-core-sdk'; import { TradeType } from '../../constants/constants'; import { QuoteOptions } from '../../types'; import { Pool, Route } from '..'; /** * Represents the Uniswap V3 QuoterV1 contract with a method for returning the formatted * calldata needed to call the quoter contract. */ export declare abstract class SwapQuoter { static readonly V1INTERFACE: Interface; static readonly V2INTERFACE: Interface; /** * Produces the on-chain method name of the appropriate function within QuoterV2, * and the relevant hex encoded parameters. * @template TInput The input token, either Ether or an ERC-20 * @template TOutput The output token, either Ether or an ERC-20 * @param route The swap route, a list of pools through which a swap can occur * @param amount The amount of the quote, either an amount in, or an amount out * @param tradeType The trade type, either exact input or exact output * @param options The optional params including price limit and Quoter contract switch * @returns The formatted calldata */ static quoteCallParameters<TPool extends Pool, TInput extends Currency, TOutput extends Currency>(route: Route<TPool, TInput, TOutput>, amount: CurrencyAmount<TInput | TOutput>, tradeType: TradeType, options?: QuoteOptions): MethodParameters; }