PriceOracle.sol
View Source: contracts/test/PriceOracle.sol
↗ Extends: Exponential
Enums
OracleError
OracleFailureInfo
Structs
ExchangeRateInfo
Anchor
SetPriceLocalVars
Contract Members
Constants & Variables
Events
Functions
scale()
getExchangeRate()
getMaxSwingRate(uint256 interval)
getFixedInterestRate(uint256 interval)
getFixedExchangeRate(uint256 interval)
()
failOracle(address asset, enum PriceOracle.OracleError err, enum PriceOracle.OracleFailureInfo info)
failOracleWithDetails(address asset, enum PriceOracle.OracleError err, enum PriceOracle.OracleFailureInfo info, uint256 details)
_setPendingAnchor(address asset, uint256 newScaledPrice)
_setPaused(bool requestedState)
_setPendingAnchorAdmin(address newPendingAnchorAdmin)
_acceptAnchorAdmin()
_setPoster(address newPoster)
setExchangeRate(address asset, address exchangeRateModel, uint256 maxSwingDuration)
setMaxSwingRate(address asset, uint256 maxSwingDuration)
assetPrices(address asset)
getPrice(address asset)
setPrice(address asset, uint256 requestedPriceMantissa)
setPriceInternal(address asset, uint256 requestedPriceMantissa)
setPriceStorageInternal(address asset, uint256 priceMantissa)
calculateSwing(struct Exponential.Exp anchorPrice, struct Exponential.Exp price)
capToMax(struct Exponential.Exp anchorPrice, struct Exponential.Exp price)
setPrices(address[] assets, uint256[] requestedPriceMantissas)
scale
Arguments
getExchangeRate
Arguments
getMaxSwingRate
Arguments
getFixedInterestRate
Arguments
getFixedExchangeRate
Arguments
Do not pay into PriceOracle
Arguments
failOracle
use this when reporting a known error from the price oracle or a non-upgradeable collaborator Using Oracle in name because we already inherit a fail
function from ErrorReporter.sol via Exponential.sol
Arguments
failOracleWithDetails
Use this when reporting an error from the Alkemi Earn Verified. Give the Alkemi Earn Verified result as details
Arguments
_setPendingAnchor
provides ability to override the anchor price for an asset
Returns
uint 0=success, otherwise a failure (see enum OracleError for details)
Arguments
_setPaused
set paused
to the specified state
Returns
uint 0=success, otherwise a failure
Arguments
_setPendingAnchorAdmin
Begins transfer of anchor admin rights. The newPendingAnchorAdmin must call _acceptAnchorAdmin
to finalize the transfer.
Returns
uint 0=success, otherwise a failure
Arguments
_acceptAnchorAdmin
Accepts transfer of anchor admin rights. msg.sender must be pendingAnchorAdmin
Returns
uint 0=success, otherwise a failure
Arguments
_setPoster
Set new poster.
Returns
uint 0=success, otherwise a failure
Arguments
setExchangeRate
set new exchange rate model
Returns
uint 0=success, otherwise a failure (see enum OracleError for details)
Arguments
setMaxSwingRate
set new exchange rate maxSwingRate
Returns
uint 0=success, otherwise a failure (see enum OracleError for details)
Arguments
assetPrices
retrieves price of an asset
Returns
uint mantissa of asset price (scaled by 1e18) or zero if unset or contract paused
Arguments
getPrice
retrieves price of an asset
Returns
uint mantissa of asset price (scaled by 1e18) or zero if unset or contract paused
Arguments
setPrice
entry point for updating prices
Returns
uint 0=success, otherwise a failure (see enum OracleError for details)
Arguments
setPriceInternal
Arguments
setPriceStorageInternal
Arguments
calculateSwing
Arguments
capToMax
Arguments
setPrices
entry point for updating multiple prices
Returns
uint values in same order as inputs. For each: 0=success, otherwise a failure (see enum OracleError for details)
Arguments
Last updated