Skip to main content

OracleRef

Volt Protocol

Reference to an Oracle

defines some utilities around interacting with the referenced oracle

Methods

CONTRACT_ADMIN_ROLE

function CONTRACT_ADMIN_ROLE() external view returns (bytes32)

a role used with a subset of governor permissions for this contract only

Returns

NameTypeDescription
_0bytes32undefined

backupOracle

function backupOracle() external view returns (contract IOracle)

the backup oracle reference by the contract

Returns

NameTypeDescription
_0contract IOracleundefined

core

function core() external view returns (contract ICore)

address of the Core contract referenced

Returns

NameTypeDescription
_0contract ICoreICore implementation address

decimalsNormalizer

function decimalsNormalizer() external view returns (int256)

number of decimals to scale oracle price by, i.e. multiplying by 10^(decimalsNormalizer)

Returns

NameTypeDescription
_0int256undefined

doInvert

function doInvert() external view returns (bool)

Returns

NameTypeDescription
_0boolundefined

invert

function invert(Decimal.D256 price) external pure returns (struct Decimal.D256)

Parameters

NameTypeDescription
priceDecimal.D256undefined

Returns

NameTypeDescription
_0Decimal.D256undefined

isContractAdmin

function isContractAdmin(address _admin) external view returns (bool)

returns whether a given address has the admin role for this contract

Parameters

NameTypeDescription
_adminaddressundefined

Returns

NameTypeDescription
_0boolundefined

oracle

function oracle() external view returns (contract IOracle)

the oracle reference by the contract

Returns

NameTypeDescription
_0contract IOracleundefined

pause

function pause() external nonpayable

set pausable methods to paused

paused

function paused() external view returns (bool)

Returns true if the contract is paused, and false otherwise.

Returns

NameTypeDescription
_0boolundefined

readOracle

function readOracle() external view returns (struct Decimal.D256)

the peg price of the referenced oracle

the peg is defined as FEI per X with X being ETH, dollars, etc

Returns

NameTypeDescription
_0Decimal.D256the peg as a Decimal

setBackupOracle

function setBackupOracle(address newBackupOracle) external nonpayable

sets the referenced backup oracle

Parameters

NameTypeDescription
newBackupOracleaddressthe new backup oracle to reference

setContractAdminRole

function setContractAdminRole(bytes32 newContractAdminRole) external nonpayable

sets a new admin role for this contract

Parameters

NameTypeDescription
newContractAdminRolebytes32undefined

setDecimalsNormalizer

function setDecimalsNormalizer(int256 newDecimalsNormalizer) external nonpayable

sets the new decimalsNormalizer

Parameters

NameTypeDescription
newDecimalsNormalizerint256the new decimalsNormalizer

setDoInvert

function setDoInvert(bool newDoInvert) external nonpayable

sets the flag for whether to invert or not

Parameters

NameTypeDescription
newDoInvertboolthe new flag for whether to invert

setOracle

function setOracle(address newOracle) external nonpayable

sets the referenced oracle

Parameters

NameTypeDescription
newOracleaddressthe new oracle to reference

unpause

function unpause() external nonpayable

set pausable methods to unpaused

updateOracle

function updateOracle() external nonpayable

updates the referenced oracle

vcon

function vcon() external view returns (contract IERC20)

address of the Tribe contract referenced by Core

Returns

NameTypeDescription
_0contract IERC20IERC20 implementation address

vconBalance

function vconBalance() external view returns (uint256)

vcon balance of contract

Returns

NameTypeDescription
_0uint256vcon amount held

volt

function volt() external view returns (contract IVolt)

address of the Fei contract referenced by Core

Returns

NameTypeDescription
_0contract IVoltIFei implementation address

voltBalance

function voltBalance() external view returns (uint256)

volt balance of contract

Returns

NameTypeDescription
_0uint256volt amount held

Events

BackupOracleUpdate

event BackupOracleUpdate(address indexed oldBackupOracle, address indexed newBackupOracle)

Parameters

NameTypeDescription
oldBackupOracle indexedaddressundefined
newBackupOracle indexedaddressundefined

ContractAdminRoleUpdate

event ContractAdminRoleUpdate(bytes32 indexed oldContractAdminRole, bytes32 indexed newContractAdminRole)

Parameters

NameTypeDescription
oldContractAdminRole indexedbytes32undefined
newContractAdminRole indexedbytes32undefined

CoreUpdate

event CoreUpdate(address indexed oldCore, address indexed newCore)

Parameters

NameTypeDescription
oldCore indexedaddressundefined
newCore indexedaddressundefined

DecimalsNormalizerUpdate

event DecimalsNormalizerUpdate(int256 oldDecimalsNormalizer, int256 newDecimalsNormalizer)

Parameters

NameTypeDescription
oldDecimalsNormalizerint256undefined
newDecimalsNormalizerint256undefined

InvertUpdate

event InvertUpdate(bool oldDoInvert, bool newDoInvert)

Parameters

NameTypeDescription
oldDoInvertboolundefined
newDoInvertboolundefined

OracleUpdate

event OracleUpdate(address indexed oldOracle, address indexed newOracle)

Parameters

NameTypeDescription
oldOracle indexedaddressundefined
newOracle indexedaddressundefined

Paused

event Paused(address account)

Parameters

NameTypeDescription
accountaddressundefined

Unpaused

event Unpaused(address account)

Parameters

NameTypeDescription
accountaddressundefined