CommonActions

Git Source

Inherits: ICommonActions

This abstract contract defines common actions to be used by the proxy actions contracts

State Variables

_THIS

Address of the inheriting contract, used to check if the call is being made through a delegate call

address internal immutable _THIS = address(this);

Functions

joinSystemCoins

Joins system coins into the safeEngine

function joinSystemCoins(address _coinJoin, address _dst, uint256 _wad) external onlyDelegateCall;

Parameters

NameTypeDescription
_coinJoinaddressAddress of the CoinJoin contract
_dstaddressAddress of the SAFE to join the coins into
_waduint256Amount of coins to join [wad]

exitSystemCoins

Exits system coins from the safeEngine

function exitSystemCoins(address _coinJoin, uint256 _coinsToExit) external onlyDelegateCall;

Parameters

NameTypeDescription
_coinJoinaddressAddress of the CoinJoin contract
_coinsToExituint256Amount of coins to exit [rad]

exitAllSystemCoins

Exits all system coins from the safeEngine

function exitAllSystemCoins(address _coinJoin) external onlyDelegateCall;

Parameters

NameTypeDescription
_coinJoinaddressAddress of the CoinJoin contract

exitCollateral

Exits collateral tokens from the safeEngine

function exitCollateral(address _collateralJoin, uint256 _wad) external onlyDelegateCall;

Parameters

NameTypeDescription
_collateralJoinaddressAddress of the CollateralJoin contract
_waduint256Amount of collateral tokens to exit [wad]

_joinSystemCoins

Joins system coins into the safeEngine

Transfers ERC20 coins from the user to the proxy, then joins them through the CoinJoin contract into the destination SAFE

function _joinSystemCoins(address _coinJoin, address _dst, uint256 _wad) internal;

_exitSystemCoins

Exits system coins from the safeEngine

Exits system coins through the CoinJoin contract, transferring the ERC20 coins to the user

function _exitSystemCoins(address _coinJoin, uint256 _coinsToExit) internal virtual;

_joinCollateral

Joins collateral tokens into the safeEngine

Transfers ERC20 tokens from the user to the proxy, then joins them through the CollateralJoin contract into the destination SAFE

function _joinCollateral(address _collateralJoin, address _safe, uint256 _wad) internal;

_exitCollateral

Exits collateral tokens from the safeEngine

Exits collateral tokens through the CollateralJoin contract, transferring the ERC20 tokens to the user

The exited tokens will be rounded down to collateral decimals precision

function _exitCollateral(address _collateralJoin, uint256 _wad) internal;

onlyDelegateCall

Checks if the call is being made through a delegate call

modifier onlyDelegateCall();