CollateralAuctionHouseChild

Git Source

Inherits: DisableableChild, AuthorizableChild, CollateralAuctionHouse, ICollateralAuctionHouseChild

This contract inherits all the functionality of CollateralAuctionHouse to be factory deployed

Functions

constructor

constructor(
  address _safeEngine,
  address _liquidationEngine,
  address _oracleRelayer,
  bytes32 _cType,
  CollateralAuctionHouseParams memory _cahParams
) CollateralAuctionHouse(_safeEngine, _liquidationEngine, _oracleRelayer, _cType, _cahParams);

Parameters

NameTypeDescription
_safeEngineaddressAddress of the SAFEEngine contract
_liquidationEngineaddressIgnored parameter (read from factory)
_oracleRelayeraddressIgnored parameter (read from factory)
_cTypebytes32Bytes32 representation of the collateral type
_cahParamsCollateralAuctionHouseParamsInitial valid CollateralAuctionHouse parameters struct

liquidationEngine

Address of the LiquidationEngine contract

Overriding method reads liquidationEngine from factory

function liquidationEngine()
  public
  view
  override(CollateralAuctionHouse, ICollateralAuctionHouse)
  returns (ILiquidationEngine _liquidationEngine);

oracleRelayer

Address of the OracleRelayer contract

Overriding method reads oracleRelayer from factory

function oracleRelayer()
  public
  view
  override(CollateralAuctionHouse, ICollateralAuctionHouse)
  returns (IOracleRelayer _oracleRelayer);

_setLiquidationEngine

Modifying liquidationEngine's address results in a no-operation (is read from factory)

function _setLiquidationEngine(address _newLiquidationEngine) internal override;

Parameters

NameTypeDescription
_newLiquidationEngineaddressIgnored parameter (read from factory)

_setOracleRelayer

Modifying oracleRelayer's address results in a no-operation (is read from factory)

function _setOracleRelayer(address _newOracleRelayer) internal override;

Parameters

NameTypeDescription
_newOracleRelayeraddressIgnored parameter (read from factory)

_isAuthorized

Method override to check for authorization also in the parent factory

function _isAuthorized(address _account)
  internal
  view
  override(AuthorizableChild, Authorizable)
  returns (bool _authorized);

Parameters

NameTypeDescription
_accountaddressAccount to check authorization for

Returns

NameTypeDescription
_authorizedboolWhether the account is authorized either in contract or in factory

_isEnabled

Method override to check for contract enablement also in the parent factory

function _isEnabled() internal view override(DisableableChild, Disableable) returns (bool _enabled);

Returns

NameTypeDescription
_enabledboolWhether the contract and the factory are enabled or not

_onContractDisable

Method override to allow disabling contract only through the parent factory

function _onContractDisable() internal override(DisableableChild, Disableable);