AccountingJob
Inherits: Authorizable, Modifiable, Job, IAccountingJob
This contract contains rewarded methods to handle the accounting engine debt and surplus
State Variables
shouldWorkPopDebtFromQueue
Whether the pop debt from queue job should be worked
bool public shouldWorkPopDebtFromQueue;
shouldWorkAuctionDebt
Whether the auction debt job should be worked
bool public shouldWorkAuctionDebt;
shouldWorkAuctionSurplus
Whether the auction surplus job should be worked
bool public shouldWorkAuctionSurplus;
shouldWorkTransferExtraSurplus
Whether the transfer extra surplus job should be worked
bool public shouldWorkTransferExtraSurplus;
accountingEngine
Address of the AccountingEngine contract
IAccountingEngine public accountingEngine;
Functions
constructor
constructor(
address _accountingEngine,
address _stabilityFeeTreasury,
uint256 _rewardAmount
) Job(_stabilityFeeTreasury, _rewardAmount) Authorizable(msg.sender) validParams;
Parameters
Name | Type | Description |
---|---|---|
_accountingEngine | address | Address of the AccountingEngine contract |
_stabilityFeeTreasury | address | Address of the StabilityFeeTreasury contract |
_rewardAmount | uint256 | Amount of tokens to reward per job transaction [wad] |
workPopDebtFromQueue
Rewarded method to pop debt from the AccountingEngine's queue
function workPopDebtFromQueue(uint256 _debtBlockTimestamp) external reward;
Parameters
Name | Type | Description |
---|---|---|
_debtBlockTimestamp | uint256 | Timestamp of the debt block to pop |
workAuctionDebt
Rewarded method to auction debt from the AccountingEngine
function workAuctionDebt() external reward;
workAuctionSurplus
Rewarded method to auction surplus from the AccountingEngine
function workAuctionSurplus() external reward;
workTransferExtraSurplus
Rewarded method to transfer surplus from the AccountingEngine
function workTransferExtraSurplus() 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(Modifiable, Job);
_validateParameters
Internal function to be overriden with custom logic to validate parameters
function _validateParameters() internal view override(Modifiable, Job);