Skip to main content

OraclePassThrough

contract that passes all price calls to the Scaling Price Oracle The Scaling Price Oracle can be changed if there is a decision to change how data is interpolated without needing all contracts in the system to be upgraded, only this contract will have to change where it points

Methods

currPegPrice

function currPegPrice() external view returns (uint256)

function to get the current oracle price for the entire system

Returns

NameTypeDescription
_0uint256undefined

getCurrentOraclePrice

function getCurrentOraclePrice() external view returns (uint256)

function to get the current oracle price for the entire system

Returns

NameTypeDescription
_0uint256undefined

owner

function owner() external view returns (address)

Returns the address of the current owner.

Returns

NameTypeDescription
_0addressundefined

read

function read() external view returns (struct Decimal.D256 price, bool valid)

function to get the current oracle price for the OracleRef contract

Returns

NameTypeDescription
priceDecimal.D256undefined
validboolundefined

renounceOwnership

function renounceOwnership() external nonpayable

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

scalingPriceOracle

function scalingPriceOracle() external view returns (contract IScalingPriceOracle)

reference to the scaling price oracle

Returns

NameTypeDescription
_0contract IScalingPriceOracleundefined

transferOwnership

function transferOwnership(address newOwner) external nonpayable

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription
newOwneraddressundefined

update

function update() external nonpayable

updates the oracle price

no-op, ScalingPriceOracle is updated automatically added for backwards compatibility with OracleRef

updateScalingPriceOracle

function updateScalingPriceOracle(contract IScalingPriceOracle newScalingPriceOracle) external nonpayable

function to update the pointer to the scaling price oracle requires approval from all parties on multisig to update

Parameters

NameTypeDescription
newScalingPriceOraclecontract IScalingPriceOracleundefined

Events

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressundefined
newOwner indexedaddressundefined

ScalingPriceOracleUpdate

event ScalingPriceOracleUpdate(contract IScalingPriceOracle oldScalingPriceOracle, contract IScalingPriceOracle newScalingPriceOracle)

event emitted when the scaling price oracle is updated

Parameters

NameTypeDescription
oldScalingPriceOraclecontract IScalingPriceOracleundefined
newScalingPriceOraclecontract IScalingPriceOracleundefined