LogarithmOracle
Inherits: UUPSUpgradeable, Ownable2StepUpgradeable, IOracle Author: Logarithm Labs
The LogarithmOracle is a price oracle contract that provides price feeds for various assets using Chainlink price feeds. It implements the UUPS upgradeable pattern and includes ownership controls. The contract serves as a centralized price oracle that manages price feeds for different assets, handles price feed heartbeat monitoring, provides price conversion between different assets, and maintains asset decimal information.
State Variables
LogarithmOracleStorageLocation
Functions
_getLogarithmOracleStorage
initialize
setPriceFeeds
Updates price feeds for multiple assets.
setAssetDecimals
Sets decimals of non-existing assets on this chain.
setHeartbeats
Configures heartbeat durations for price feeds.
getPriceFeed
Returns the price feed address for an asset.
getAssetPrice
Returns the normalized price of an asset (30 decimals).
convertTokenAmount
Converts amount between different assets.
assetDecimals
Returns the decimal places for an asset.
_setAssetDecimal
Internal function to set asset decimals.
Events
PriceFeedUpdated
Emitted when a price feed is updated.
HeartBeatUpdated
Emitted when a heartbeat duration is updated.
AssetDecimalInitiated
Emitted when asset decimals are set.
Structs
LogarithmOracleStorage
Last updated