ICollateralJoin
Inherits: IAuthorizable, IDisableable
Functions
safeEngine
Address of the SAFEEngine contract
function safeEngine() external view returns (ISAFEEngine _safeEngine);
collateral
Address of the ERC20 collateral token contract
function collateral() external view returns (IERC20Metadata _collateral);
collateralType
The collateral type that this contract handles
function collateralType() external view returns (bytes32 _cType);
Returns
Name | Type | Description |
---|---|---|
_cType | bytes32 | Bytes32 representation of the collateralType |
decimals
Number of decimals of the collateral token
function decimals() external view returns (uint256 _decimals);
multiplier
Multiplier used to transform collateral into 18 decimals within the system
function multiplier() external view returns (uint256 _multiplier);
join
Join collateral in the system
function join(address _account, uint256 _wei) external;
Parameters
Name | Type | Description |
---|---|---|
_account | address | Account to which we add collateral into the system |
_wei | uint256 | Amount of collateral to transfer in the system (represented as a number with token decimals) |
exit
Exit collateral from the system
function exit(address _account, uint256 _wei) external;
Parameters
Name | Type | Description |
---|---|---|
_account | address | Account to which we transfer the collateral out of the system |
_wei | uint256 | Amount of collateral to transfer to account (represented as a number with token decimals) |
Events
Join
Emitted when an account joins collateral tokens into the system
event Join(address _sender, address _account, uint256 _wad);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | Address of the account that called the function (sent the ERC20 collateral tokens) |
_account | address | Address of the account that received the collateral tokens |
_wad | uint256 | Amount of collateral tokens joined [wad] |
Exit
Emitted when an account exits collateral tokens from the system
event Exit(address _sender, address _account, uint256 _wad);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | Address of the account that called the function (sent the internal collateral tokens) |
_account | address | Address of the account that received the ERC20 collateral tokens |
_wad | uint256 | Amount of collateral tokens exited [wad] |