ICollateralJoinFactory

Git Source

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

NameTypeDescription
_cTypebytes32Bytes32 representation of the collateral type

Returns

NameTypeDescription
_collateralJoinaddressAddress of the CollateralJoin contract

collateralTypesList

Getter for the list of collateral types

function collateralTypesList() external view returns (bytes32[] memory _collateralTypesList);

Returns

NameTypeDescription
_collateralTypesListbytes32[]List of collateral types

collateralJoinsList

Getter for the list of CollateralJoin contracts

function collateralJoinsList() external view returns (address[] memory _collateralJoinsList);

Returns

NameTypeDescription
_collateralJoinsListaddress[]List of CollateralJoin contracts

deployCollateralJoin

Deploys a CollateralJoinChild contract

function deployCollateralJoin(bytes32 _cType, address _collateral) external returns (ICollateralJoin _collateralJoin);

Parameters

NameTypeDescription
_cTypebytes32Bytes32 representation of the collateral type
_collateraladdressAddress of the ERC20 collateral token

Returns

NameTypeDescription
_collateralJoinICollateralJoinAddress of the deployed CollateralJoinChild contract

deployDelegatableCollateralJoin

Deploys a CollateralJoinDelegatableChild contract

function deployDelegatableCollateralJoin(
  bytes32 _cType,
  address _collateral,
  address _delegatee
) external returns (ICollateralJoin _collateralJoin);

Parameters

NameTypeDescription
_cTypebytes32Bytes32 representation of the collateral type
_collateraladdressAddress of the ERC20Votes collateral token
_delegateeaddressAddress to whom the deployed child will delegate the voting power to

Returns

NameTypeDescription
_collateralJoinICollateralJoinAddress 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

NameTypeDescription
_cTypebytes32Bytes32 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

NameTypeDescription
_cTypebytes32Bytes32 representation of the collateral type
_collateraladdressAddress of the ERC20 collateral token
_collateralJoinaddressAddress of the deployed CollateralJoin contract

DisableCollateralJoin

Emitted when a CollateralJoin contract is disabled

event DisableCollateralJoin(address indexed _collateralJoin);

Parameters

NameTypeDescription
_collateralJoinaddressAddress 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();