Skip to main content

findPool

This function checks if a combination of two tokens is supported for payment and returns the applicable pool fee if available.

View an example here.

Parameters​

NameTypeDescription
token0stringThe address of the first token.
token1stringThe address of the second token.

Return value​

The function returns undefined if the token pair is not supported. Otherwise, it returns an object with the pool address and the pool fee.

Return object​

{
id: '0x...', // Pool address
feeTier: number // Pool fee
}