OracleJob
Inherits: Authorizable, Modifiable, Job, IOracleJob
This contract contains rewarded methods to handle the oracle relayer and the PID rate setter updates
State Variables
shouldWorkUpdateCollateralPrice
Whether the update collateral price job should be worked
bool public shouldWorkUpdateCollateralPrice;
shouldWorkUpdateRate
Whether the update rate job should be worked
bool public shouldWorkUpdateRate;
oracleRelayer
Address of the OracleRelayer contract
IOracleRelayer public oracleRelayer;
pidRateSetter
Address of the PIDRateSetter contract
IPIDRateSetter public pidRateSetter;
Functions
constructor
constructor(
address _oracleRelayer,
address _pidRateSetter,
address _stabilityFeeTreasury,
uint256 _rewardAmount
) Job(_stabilityFeeTreasury, _rewardAmount) Authorizable(msg.sender) validParams;
Parameters
Name | Type | Description |
---|---|---|
_oracleRelayer | address | Address of the OracleRelayer contract |
_pidRateSetter | address | Address of the PIDRateSetter contract |
_stabilityFeeTreasury | address | Address of the StabilityFeeTreasury contract |
_rewardAmount | uint256 | Amount of tokens to reward per job transaction [wad] |
workUpdateCollateralPrice
Rewarded method to update a collateral price
function workUpdateCollateralPrice(bytes32 _cType) external reward;
Parameters
Name | Type | Description |
---|---|---|
_cType | bytes32 | Bytes32 representation of the collateral type |
workUpdateRate
Rewarded method to update the redemption rate
function workUpdateRate() external reward;
_modifyParameters
Internal function to be overriden with custom logic to modify parameters
This function is set to revert if not overriden
function _modifyParameters(bytes32 _param, bytes memory _data) internal override(Job, Modifiable);
_validateParameters
Internal function to be overriden with custom logic to validate parameters
function _validateParameters() internal view override(Job, Modifiable);