SettlementSurplusAuctioneer
Inherits: Authorizable, Modifiable, ISettlementSurplusAuctioneer
This contract receives post-settlement surplus coins from the AccountingEngine and starts auctions for them
State Variables
lastSurplusTime
The last time when this contract triggered a surplus auction
uint256 public lastSurplusTime;
accountingEngine
The address of the AccountingEngine
IAccountingEngine public accountingEngine;
surplusAuctionHouse
The address of the SurplusAuctionHouse
ISurplusAuctionHouse public surplusAuctionHouse;
safeEngine
The address of the SAFEEngine
ISAFEEngine public safeEngine;
Functions
constructor
constructor(address _accountingEngine, address _surplusAuctionHouse) Authorizable(msg.sender) validParams;
Parameters
Name | Type | Description |
---|---|---|
_accountingEngine | address | Address of the AccountingEngine |
_surplusAuctionHouse | address | Address of the SurplusAuctionHouse |
auctionSurplus
Starts a new surplus auction
The contract reads surplus auction parameters from the AccountingEngine
function auctionSurplus() external returns (uint256 _id);
Returns
Name | Type | Description |
---|---|---|
_id | uint256 | The id of the started auction |
_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;
_setSurplusAuctionHouse
Sets the SurplusAuctionHouse, revoking the previous one permissions and approving the new one
function _setSurplusAuctionHouse(address _address) internal;