Price Aggregator
Contains the Library and the Facet required to pull information on token prices in Chainlink.
ChainLinkAggFacetChainLinkAggLibcontains functions that help:isTokenSupportedchecks if a token is supported and has a pair aggregatoraggregatorForgrabs the ChainLink Aggregator address to check if a token pair is supported
PriceAggFacet
PriceAggFacetContains helper functions that:
getValueForcalculates the value of a source token amount into a destination tokenpriceForcalculates a price from Compound. If price isn't found from compound, then it tries to retrieve it from ChainLinkisCTokenchecks if a token is a cToken and returns the address of the token if truecompoundPriceForretrieves the price of a source token in destination token from CompoundchainlinkPriceForretrieves the price of a source token in destination token from ChainLink
PriceAggLib
PriceAggLibImplements both the valueFor and priceFor functions to retrieve both values and prices of a source token to a destination token.
Last updated
Was this helpful?