ICollateralJoin

Git Source

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

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

NameTypeDescription
_accountaddressAccount to which we add collateral into the system
_weiuint256Amount 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

NameTypeDescription
_accountaddressAccount to which we transfer the collateral out of the system
_weiuint256Amount 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

NameTypeDescription
_senderaddressAddress of the account that called the function (sent the ERC20 collateral tokens)
_accountaddressAddress of the account that received the collateral tokens
_waduint256Amount 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

NameTypeDescription
_senderaddressAddress of the account that called the function (sent the internal collateral tokens)
_accountaddressAddress of the account that received the ERC20 collateral tokens
_waduint256Amount of collateral tokens exited [wad]