ICollateralAuctionHouseFactory

Git Source

Inherits: IAuthorizable, IModifiable

Functions

cParams

Getter for the collateral parameters struct

function cParams(bytes32 _cType)
  external
  view
  returns (ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams);

Parameters

NameTypeDescription
_cTypebytes32Bytes32 representation of the collateral type

Returns

NameTypeDescription
_cahParamsICollateralAuctionHouse.CollateralAuctionHouseParamsCollateralAuctionHouse parameters struct

_cParams

Getter for the unpacked collateral parameters struct

function _cParams(bytes32 _cType)
  external
  view
  returns (uint256 _minimumBid, uint256 _minDiscount, uint256 _maxDiscount, uint256 _perSecondDiscountUpdateRate);

Parameters

NameTypeDescription
_cTypebytes32Bytes32 representation of the collateral type

Returns

NameTypeDescription
_minimumBiduint256Minimum bid for the collateral auctions [wad]
_minDiscountuint256Minimum discount for the collateral auctions [wad %]
_maxDiscountuint256Maximum discount for the collateral auctions [wad %]
_perSecondDiscountUpdateRateuint256Per second rate at which the discount is updated [ray]

safeEngine

Address of the SAFEEngine contract

function safeEngine() external view returns (address _safeEngine);

liquidationEngine

Address of the LiquidationEngine contract

function liquidationEngine() external view returns (address _liquidationEngine);

oracleRelayer

Address of the OracleRelayer contract

function oracleRelayer() external view returns (address _oracleRelayer);

collateralAuctionHouses

Getter for the address of the CollateralAuctionHouse contract associated with a collateral type

function collateralAuctionHouses(bytes32 _cType) external view returns (address _collateralAuctionHouse);

Parameters

NameTypeDescription
_cTypebytes32Bytes32 representation of the collateral type

Returns

NameTypeDescription
_collateralAuctionHouseaddressAddress of the CollateralAuctionHouse contract

collateralList

Getter for the list of collateral types

function collateralList() external view returns (bytes32[] memory __collateralList);

Returns

NameTypeDescription
__collateralListbytes32[]List of collateral types

collateralAuctionHousesList

Getter for the list of CollateralAuctionHouse contracts

function collateralAuctionHousesList() external view returns (address[] memory _collateralAuctionHouses);

Returns

NameTypeDescription
_collateralAuctionHousesaddress[]List of CollateralAuctionHouse contracts

deployCollateralAuctionHouse

Deploys a CollateralAuctionHouse contract

function deployCollateralAuctionHouse(
  bytes32 _cType,
  ICollateralAuctionHouse.CollateralAuctionHouseParams calldata _cahParams
) external returns (ICollateralAuctionHouse _collateralAuctionHouse);

Parameters

NameTypeDescription
_cTypebytes32Bytes32 representation of the collateral type
_cahParamsICollateralAuctionHouse.CollateralAuctionHouseParamsInitial valid CollateralAuctionHouse parameters

Returns

NameTypeDescription
_collateralAuctionHouseICollateralAuctionHouseAddress of the deployed CollateralAuctionHouse contract

Events

DeployCollateralAuctionHouse

Emitted when a new CollateralAuctionHouse contract is deployed

event DeployCollateralAuctionHouse(bytes32 indexed _cType, address indexed _collateralAuctionHouse);

Errors

CAHFactory_CAHExists

Throws when trying to deploy a CollateralAuctionHouse contract for an existent collateral type

error CAHFactory_CAHExists();