Skip to main content

ConstantProductPoolFactoryHelper

This is a helper contract used for fetching info for several pools.

The full contract can be found here.

Functions

getPoolsForTokens

function getPoolsForTokens(address constantProductPoolFactory, address[] calldata tokens)
external
view
returns (ConstantProductPoolInfo[] memory poolInfos, uint256 length)

Returns the info on a given pool and its length.

Parameters

NameTypeDescription
constantProductPoolFactoryaddressaddress of factory contract
tokensaddress[]array of addresses for tokens

Returns

NameTypeDescription
poolInfosConstantProductPoolInfo[]array of info about the given pool
lengthuint256length of poolInfos