SwapRouter
Represents the Uniswap V2 SwapRouter, and has static methods for helping execute trades.
#
Hierarchy↳ SwapRouter
#
Properties#
INTERFACE▪ Static
INTERFACE: Interface
Overrides: SelfPermit.INTERFACE
Defined in: swapRouter.ts:62
#
Methods#
encodePermit▸ Static
Protected
encodePermit(token
: Token, options
: PermitOptions): string
#
ParametersName | Type |
---|---|
token | Token |
options | PermitOptions |
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.
#
ParametersName | Type | Description |
---|---|---|
trade | Trade<Currency, Currency, TradeType> | to produce call parameters for |
options | SwapOptions | options for the call parameters |
Returns: MethodParameters
Defined in: swapRouter.ts:76