ICoinJoin
Inherits: IAuthorizable, IDisableable
Functions
safeEngine
Address of the SAFEEngine contract
function safeEngine() external view returns (ISAFEEngine _safeEngine);
systemCoin
Address of the SystemCoin contract
function systemCoin() external view returns (ISystemCoin _systemCoin);
decimals
Number of decimals the coin has
function decimals() external view returns (uint256 _decimals);
join
Join system coins in the system
Exited coins have 18 decimals but inside the system they have 45 [rad] decimals. When we join, the amount [wad] is multiplied by 10**27 [ray]
function join(address _account, uint256 _wad) external;
Parameters
Name | Type | Description |
---|---|---|
_account | address | Account that will receive the joined coins |
_wad | uint256 | Amount of external coins to join [wad] |
exit
Exit system coins from the system
New coins cannot be minted after the system is disabled
Inside the system, coins have 45 decimals [rad] but outside of it they have 18 decimals [wad]. When we exit, we specify a wad amount of coins and then the contract automatically multiplies wad by 10**27 to move the correct 45 decimal coin amount to this adapter
function exit(address _account, uint256 _wad) external;
Parameters
Name | Type | Description |
---|---|---|
_account | address | Account that will receive the exited coins |
_wad | uint256 | Amount of internal coins to join (18 decimal number) |
Events
Join
Emitted when an account joins coins 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 coins) |
_account | address | Address of the account that received the coins |
_wad | uint256 | Amount of coins joined [wad] |
Exit
Emitted when an account exits coins 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 coins) |
_account | address | Address of the account that received the ERC20 coins |
_wad | uint256 | Amount of coins exited [wad] |