Uniswap V3
In this section, we will introduce the Uniswap V3 SDK interfaces, which provide developers with a convenient and efficient way to interact with the Uniswap V3 protocol. These interfaces are related to swap token and are designed to be used easily and flexibly.
The following section will introduce the interfaces related to the Uniswap V3 protocol, which can be accessed through the api.protocols.uniswapv3.
prefix.
SwapToken
The following code defines interfaces and functions related to the Uniswap V3 swap token logic:
Types
SwapTokenParams: A type that represents the input parameters for the Uniswap V3 swap token logic
SwapTokenFields: A type that represents the fields required for the Uniswap V3 swap token logic.
SwapTokenLogic: An interface that extends the
Logic
interface and represents the Uniswap V3 swap token logic. It includes therid
, andfields
properties.
Functions
getSwapTokenTokenList(chainId: number): An asynchronous function that retrieves the list of tokens supported by the Uniswap V3 swap token logic on the specified
chainId
.getSwapTokenQuotation(chainId: number, params: SwapTokenParams): An asynchronous function that retrieves a quotation for swapping assets on the Uniswap V3 protocol with the specified
params
object on the specifiedchainId
.newSwapTokenLogic(fields: SwapTokenFields): A function that creates the Uniswap V3 swap token logic data with the given
fields
object.
Example Code
Last updated