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
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
getCurrentOraclePrice
function getCurrentOraclePrice() external view returns (uint256)
function to get the current oracle price for the entire system
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
owner
function owner() external view returns (address)
Returns the address of the current owner.
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
read
function read() external view returns (struct Decimal.D256 price, bool valid)
function to get the current oracle price for the OracleRef contract
Returns
Name | Type | Description |
---|---|---|
price | Decimal.D256 | undefined |
valid | bool | undefined |
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
Name | Type | Description |
---|---|---|
_0 | contract IScalingPriceOracle | undefined |
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
Name | Type | Description |
---|---|---|
newOwner | address | undefined |
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
Name | Type | Description |
---|---|---|
newScalingPriceOracle | contract IScalingPriceOracle | undefined |
Events
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Parameters
Name | Type | Description |
---|---|---|
previousOwner indexed | address | undefined |
newOwner indexed | address | undefined |
ScalingPriceOracleUpdate
event ScalingPriceOracleUpdate(contract IScalingPriceOracle oldScalingPriceOracle, contract IScalingPriceOracle newScalingPriceOracle)
event emitted when the scaling price oracle is updated
Parameters
Name | Type | Description |
---|---|---|
oldScalingPriceOracle | contract IScalingPriceOracle | undefined |
newScalingPriceOracle | contract IScalingPriceOracle | undefined |