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
Name | Type | Description |
---|
_0 | bytes32 | undefined |
backupOracle
function backupOracle() external view returns (contract IOracle)
the backup oracle reference by the contract
Returns
Name | Type | Description |
---|
_0 | contract IOracle | undefined |
core
function core() external view returns (contract ICore)
address of the Core contract referenced
Returns
Name | Type | Description |
---|
_0 | contract ICore | ICore implementation address |
decimalsNormalizer
function decimalsNormalizer() external view returns (int256)
number of decimals to scale oracle price by, i.e. multiplying by 10^(decimalsNormalizer)
Returns
Name | Type | Description |
---|
_0 | int256 | undefined |
doInvert
function doInvert() external view returns (bool)
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
invert
function invert(Decimal.D256 price) external pure returns (struct Decimal.D256)
Parameters
Name | Type | Description |
---|
price | Decimal.D256 | undefined |
Returns
Name | Type | Description |
---|
_0 | Decimal.D256 | undefined |
isContractAdmin
function isContractAdmin(address _admin) external view returns (bool)
returns whether a given address has the admin role for this contract
Parameters
Name | Type | Description |
---|
_admin | address | undefined |
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
oracle
function oracle() external view returns (contract IOracle)
the oracle reference by the contract
Returns
Name | Type | Description |
---|
_0 | contract IOracle | undefined |
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
Name | Type | Description |
---|
_0 | bool | undefined |
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
Name | Type | Description |
---|
_0 | Decimal.D256 | the peg as a Decimal |
setBackupOracle
function setBackupOracle(address newBackupOracle) external nonpayable
sets the referenced backup oracle
Parameters
Name | Type | Description |
---|
newBackupOracle | address | the new backup oracle to reference |
setContractAdminRole
function setContractAdminRole(bytes32 newContractAdminRole) external nonpayable
sets a new admin role for this contract
Parameters
Name | Type | Description |
---|
newContractAdminRole | bytes32 | undefined |
setDecimalsNormalizer
function setDecimalsNormalizer(int256 newDecimalsNormalizer) external nonpayable
sets the new decimalsNormalizer
Parameters
Name | Type | Description |
---|
newDecimalsNormalizer | int256 | the new decimalsNormalizer |
setDoInvert
function setDoInvert(bool newDoInvert) external nonpayable
sets the flag for whether to invert or not
Parameters
Name | Type | Description |
---|
newDoInvert | bool | the new flag for whether to invert |
setOracle
function setOracle(address newOracle) external nonpayable
sets the referenced oracle
Parameters
Name | Type | Description |
---|
newOracle | address | the 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
Name | Type | Description |
---|
_0 | contract IERC20 | IERC20 implementation address |
vconBalance
function vconBalance() external view returns (uint256)
vcon balance of contract
Returns
Name | Type | Description |
---|
_0 | uint256 | vcon amount held |
volt
function volt() external view returns (contract IVolt)
address of the Fei contract referenced by Core
Returns
Name | Type | Description |
---|
_0 | contract IVolt | IFei implementation address |
voltBalance
function voltBalance() external view returns (uint256)
volt balance of contract
Returns
Name | Type | Description |
---|
_0 | uint256 | volt amount held |
Events
BackupOracleUpdate
event BackupOracleUpdate(address indexed oldBackupOracle, address indexed newBackupOracle)
Parameters
Name | Type | Description |
---|
oldBackupOracle indexed | address | undefined |
newBackupOracle indexed | address | undefined |
ContractAdminRoleUpdate
event ContractAdminRoleUpdate(bytes32 indexed oldContractAdminRole, bytes32 indexed newContractAdminRole)
Parameters
Name | Type | Description |
---|
oldContractAdminRole indexed | bytes32 | undefined |
newContractAdminRole indexed | bytes32 | undefined |
CoreUpdate
event CoreUpdate(address indexed oldCore, address indexed newCore)
Parameters
Name | Type | Description |
---|
oldCore indexed | address | undefined |
newCore indexed | address | undefined |
DecimalsNormalizerUpdate
event DecimalsNormalizerUpdate(int256 oldDecimalsNormalizer, int256 newDecimalsNormalizer)
Parameters
Name | Type | Description |
---|
oldDecimalsNormalizer | int256 | undefined |
newDecimalsNormalizer | int256 | undefined |
InvertUpdate
event InvertUpdate(bool oldDoInvert, bool newDoInvert)
Parameters
Name | Type | Description |
---|
oldDoInvert | bool | undefined |
newDoInvert | bool | undefined |
OracleUpdate
event OracleUpdate(address indexed oldOracle, address indexed newOracle)
Parameters
Name | Type | Description |
---|
oldOracle indexed | address | undefined |
newOracle indexed | address | undefined |
Paused
event Paused(address account)
Parameters
Name | Type | Description |
---|
account | address | undefined |
Unpaused
event Unpaused(address account)
Parameters
Name | Type | Description |
---|
account | address | undefined |