Fetcher
This class contains static methods for constructing instances of pairs and tokens from on-chain data. It cannot be constructed.
Static Methods
fetchTokenData
Initializes a Token class instance from a token address, if the decimals of the token are unknown and cannot be fetched externally.
fetchPoolData
Initializes a Pool class instance from a pool address, if the performance fee of the pool is unknown and cannot be fetched externally.
getPoolAvailableFunds
Given a pool address, returns the amount of cUSD in the pool.
getUserUSDBalance
Given a pool address and a user address, returns the USD value of the user's investment in the pool.
getPoolPositionsAndTotal
Returns the address of each position, the balance of each position, and the total USD value for the given pool.
getSupportedCurrencies
Returns the address of each currency supported on the Tradegen platform.
getAvailablePools
Returns the address of each available pool on the Tradegen platform.
fetchTokensFromAddresses
Given an array of token addresses, returns a Token instance for each address.
fetchPoolsFromAddresses
Given an array of pool addresses, returns a Pool instance for each address.
Last updated