GlobalSettlementActions

Git Source

Inherits: CommonActions, IGlobalSettlementActions

All methods here are executed as delegatecalls from the user's proxy

Functions

freeCollateral

Free remaining collateral from a SAFE after being processed by the global settlement

function freeCollateral(
  address _manager,
  address _globalSettlement,
  address _collateralJoin,
  uint256 _safeId
) external onlyDelegateCall returns (uint256 _collateralAmount);

Parameters

NameTypeDescription
_manageraddressAddress of the HaiSafeManager contract
_globalSettlementaddressAddress of the GlobalSettlement contract
_collateralJoinaddressAddress of the CollateralJoin contract
_safeIduint256Id of the SAFE to free collateral from

Returns

NameTypeDescription
_collateralAmountuint256Amount of collateral freed [wad]

prepareCoinsForRedeeming

Prepare coins for redeeming

function prepareCoinsForRedeeming(
  address _globalSettlement,
  address _coinJoin,
  uint256 _coinAmount
) external onlyDelegateCall;

Parameters

NameTypeDescription
_globalSettlementaddressAddress of the GlobalSettlement contract
_coinJoinaddressAddress of the CoinJoin contract
_coinAmountuint256Amount of coins to prepare for redeeming [wad]

redeemCollateral

Redeem collateral tokens from the global settlement

function redeemCollateral(
  address _globalSettlement,
  address _collateralJoin
) external onlyDelegateCall returns (uint256 _collateralAmount);

Parameters

NameTypeDescription
_globalSettlementaddressAddress of the GlobalSettlement contract
_collateralJoinaddressAddress of the CollateralJoin contract

Returns

NameTypeDescription
_collateralAmountuint256Amount of collateral redeemed [wad]