Skip to content

Commit

Permalink
Remove defi dependecies in CompoundManager
Browse files Browse the repository at this point in the history
  • Loading branch information
elenadimitrova committed May 6, 2020
1 parent e5749b3 commit 6f04028
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 76 deletions.
71 changes: 0 additions & 71 deletions contracts/defi/Invest.sol

This file was deleted.

3 changes: 1 addition & 2 deletions contracts/legacy/LegacyMakerManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ import "../wallet/BaseWallet.sol";
import "../modules/common/BaseModule.sol";
import "../modules/common/RelayerModule.sol";
import "../modules/common/OnlyOwnerModule.sol";
import "../defi/Loan.sol";
import "./Loan.sol";
import "../../lib/maker/DS/DSMath.sol";


// Interface to MakerDAO's Tub contract, used to manage CDPs
contract IMakerCdp {
IDSValue public pep; // MKR price feed
Expand Down
File renamed without changes.
19 changes: 16 additions & 3 deletions contracts/modules/CompoundManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import "../wallet/BaseWallet.sol";
import "./common/BaseModule.sol";
import "./common/RelayerModule.sol";
import "./common/OnlyOwnerModule.sol";
import "../defi/Loan.sol";
import "../defi/Invest.sol";
import "../infrastructure/CompoundRegistry.sol";

interface IComptroller {
Expand All @@ -47,7 +45,7 @@ interface ICToken {
* @dev Module to invest and borrow tokens with CompoundV2
* @author Julien Niset - <julien@argent.xyz>
*/
contract CompoundManager is Loan, Invest, BaseModule, RelayerModule, OnlyOwnerModule {
contract CompoundManager is BaseModule, RelayerModule, OnlyOwnerModule {

bytes32 constant NAME = "CompoundManager";

Expand All @@ -59,6 +57,21 @@ contract CompoundManager is Loan, Invest, BaseModule, RelayerModule, OnlyOwnerMo
// Mock token address for ETH
address constant internal ETH_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

event InvestmentAdded(address indexed _wallet, address _token, uint256 _invested, uint256 _period);
event InvestmentRemoved(address indexed _wallet, address _token, uint256 _fraction);
event LoanOpened(
address indexed _wallet,
bytes32 indexed _loanId,
address _collateral,
uint256 _collateralAmount,
address _debtToken,
uint256 _debtAmount);
event LoanClosed(address indexed _wallet, bytes32 indexed _loanId);
event CollateralAdded(address indexed _wallet, bytes32 indexed _loanId, address _collateral, uint256 _collateralAmount);
event CollateralRemoved(address indexed _wallet, bytes32 indexed _loanId, address _collateral, uint256 _collateralAmount);
event DebtAdded(address indexed _wallet, bytes32 indexed _loanId, address _debtToken, uint256 _debtAmount);
event DebtRemoved(address indexed _wallet, bytes32 indexed _loanId, address _debtToken, uint256 _debtAmount);

using SafeMath for uint256;

constructor(
Expand Down

0 comments on commit 6f04028

Please sign in to comment.