Skip to main content
Version: 3.0.0

SwapRouter

Represents the Uniswap V2 SwapRouter, and has static methods for helping execute trades.

Hierarchy#

Properties#

INTERFACE#

Static INTERFACE: Interface

Overrides: SelfPermit.INTERFACE

Defined in: swapRouter.ts:62

Methods#

encodePermit#

Static Protected encodePermit(token: Token, options: PermitOptions): string

Parameters#

NameType
tokenToken
optionsPermitOptions

Returns: string

Inherited from: SelfPermit

Defined in: selfPermit.ts:34


swapCallParameters#

Static swapCallParameters(trade: Trade<Currency, Currency, TradeType>, options: SwapOptions): MethodParameters

Produces the on-chain method name to call and the hex encoded parameters to pass as arguments for a given trade.

Parameters#

NameTypeDescription
tradeTrade<Currency, Currency, TradeType>to produce call parameters for
optionsSwapOptionsoptions for the call parameters

Returns: MethodParameters

Defined in: swapRouter.ts:76