ICollateralJoinFactory
Inherits: IAuthorizable, IDisableable
Functions
safeEngine
Address of the SAFEEngine contract
function safeEngine() external view returns (address _safeEngine);
collateralJoins
Getter for the address of the CollateralJoin contract associated with a collateral type
function collateralJoins(bytes32 _cType) external view returns (address _collateralJoin);
Parameters
Name | Type | Description |
---|---|---|
_cType | bytes32 | Bytes32 representation of the collateral type |
Returns
Name | Type | Description |
---|---|---|
_collateralJoin | address | Address of the CollateralJoin contract |
collateralTypesList
Getter for the list of collateral types
function collateralTypesList() external view returns (bytes32[] memory _collateralTypesList);
Returns
Name | Type | Description |
---|---|---|
_collateralTypesList | bytes32[] | List of collateral types |
collateralJoinsList
Getter for the list of CollateralJoin contracts
function collateralJoinsList() external view returns (address[] memory _collateralJoinsList);
Returns
Name | Type | Description |
---|---|---|
_collateralJoinsList | address[] | List of CollateralJoin contracts |
deployCollateralJoin
Deploys a CollateralJoinChild contract
function deployCollateralJoin(bytes32 _cType, address _collateral) external returns (ICollateralJoin _collateralJoin);
Parameters
Name | Type | Description |
---|---|---|
_cType | bytes32 | Bytes32 representation of the collateral type |
_collateral | address | Address of the ERC20 collateral token |
Returns
Name | Type | Description |
---|---|---|
_collateralJoin | ICollateralJoin | Address of the deployed CollateralJoinChild contract |
deployDelegatableCollateralJoin
Deploys a CollateralJoinDelegatableChild contract
function deployDelegatableCollateralJoin(
bytes32 _cType,
address _collateral,
address _delegatee
) external returns (ICollateralJoin _collateralJoin);
Parameters
Name | Type | Description |
---|---|---|
_cType | bytes32 | Bytes32 representation of the collateral type |
_collateral | address | Address of the ERC20Votes collateral token |
_delegatee | address | Address to whom the deployed child will delegate the voting power to |
Returns
Name | Type | Description |
---|---|---|
_collateralJoin | ICollateralJoin | Address of the deployed CollateralJoinDelegatableChild contract |
disableCollateralJoin
Disables a CollateralJoin contract and removes it from the collateral types list
Allows the deployment of other CollateralJoin contract for the same collateral type
function disableCollateralJoin(bytes32 _cType) external;
Parameters
Name | Type | Description |
---|---|---|
_cType | bytes32 | Bytes32 representation of the collateral type |
Events
DeployCollateralJoin
Emitted when a new CollateralJoin contract is deployed
event DeployCollateralJoin(bytes32 indexed _cType, address indexed _collateral, address indexed _collateralJoin);
Parameters
Name | Type | Description |
---|---|---|
_cType | bytes32 | Bytes32 representation of the collateral type |
_collateral | address | Address of the ERC20 collateral token |
_collateralJoin | address | Address of the deployed CollateralJoin contract |
DisableCollateralJoin
Emitted when a CollateralJoin contract is disabled
event DisableCollateralJoin(address indexed _collateralJoin);
Parameters
Name | Type | Description |
---|---|---|
_collateralJoin | address | Address of the disabled CollateralJoin contract |
Errors
CollateralJoinFactory_CollateralJoinExistent
Throws when trying to deploy a CollateralJoin contract for an existent collateral type
error CollateralJoinFactory_CollateralJoinExistent();
CollateralJoinFactory_CollateralJoinNonExistent
Throws when trying to disable a non-existent CollateralJoin contract
error CollateralJoinFactory_CollateralJoinNonExistent();