ETHJoin

Git Source

Inherits: Authorizable, Disableable, IETHJoin

This contract allows to connect the SAFEEngine to native ETH collateral

All Join adapters need to implement two basic methods: join and exit

State Variables

safeEngine

Address of the SAFEEngine contract

ISAFEEngine public safeEngine;

collateralType

The collateral type that this contract handles

bytes32 public collateralType;

decimals

Number of decimals of the collateral token

uint256 public decimals;

Functions

constructor

constructor(address _safeEngine, bytes32 _cType) Authorizable(msg.sender);

Parameters

NameTypeDescription
_safeEngineaddressAddress of the SAFEEngine contract
_cTypebytes32Bytes32 representation of the collateral type

join

Join ETH in the system

function join(address _account) external payable whenEnabled;

Parameters

NameTypeDescription
_accountaddressAccount that will receive the ETH representation inside the system

exit

Exit ETH from the system

function exit(address _account, uint256 _wei) external;

Parameters

NameTypeDescription
_accountaddressAccount that will receive the ETH representation inside the system
_weiuint256