Skip to content

Commit

Permalink
Merge pull request #140 from CreamFi/add_legacy
Browse files Browse the repository at this point in the history
contracts/: refactor code structure
  • Loading branch information
bun919tw authored Sep 29, 2021
2 parents b709d39 + f98b0cf commit 7c1bb78
Show file tree
Hide file tree
Showing 28 changed files with 68 additions and 159 deletions.
1 change: 0 additions & 1 deletion contracts/Governance/Comp.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

contract Comp {
/// @notice EIP-20 token name for this token
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma solidity ^0.5.16;

import "./CCapableErc20Delegate.sol";
import "./EIP20Interface.sol";
import "../EIP20Interface.sol";

/**
* @notice Compound's Comptroller interface to get Comp address
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

import "./CToken.sol";
import "../CToken.sol";

/**
* @title Deprecated Cream's CCapableErc20 Contract
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

import "./CTokenInterfaces.sol";
import "../CTokenInterfaces.sol";

/**
* @title Cream's CCollateralCapErc20Delegator Contract
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

import "./CErc20.sol";
import "../CErc20.sol";

/**
* @title Compound's CErc20Immutable Contract
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

import "./CCapableErc20Delegate.sol";
import "./EIP20Interface.sol";
import "../EIP20Interface.sol";

// Ref: https://etherscan.io/address/0xc2edad668740f1aa35e4d8f227fb8e17dca888cd#code
interface IMasterChef {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pragma solidity ^0.5.16;

import "./ComptrollerInterface.sol";
import "./CTokenInterfaces.sol";
import "./ErrorReporter.sol";
import "./Exponential.sol";
import "./EIP20Interface.sol";
import "./EIP20NonStandardInterface.sol";
import "./InterestRateModel.sol";
import "../ComptrollerInterface.sol";
import "../CTokenInterfaces.sol";
import "../ErrorReporter.sol";
import "../Exponential.sol";
import "../EIP20Interface.sol";
import "../EIP20NonStandardInterface.sol";
import "../InterestRateModel.sol";

/**
* @title Deprecated CToken Contract only for CEther.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pragma solidity ^0.5.16;

import "./CToken.sol";
import "./ErrorReporter.sol";
import "./Exponential.sol";
import "./PriceOracle/PriceOracle.sol";
import "./ComptrollerInterface.sol";
import "./ComptrollerStorage.sol";
import "./Unitroller.sol";
import "../CToken.sol";
import "../ErrorReporter.sol";
import "../Exponential.sol";
import "../PriceOracle/PriceOracle.sol";
import "../ComptrollerInterface.sol";
import "../ComptrollerStorage.sol";
import "../Unitroller.sol";

/**
* @title Compound's Comptroller Contract
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pragma solidity ^0.5.16;

import "./CToken.sol";
import "./ErrorReporter.sol";
import "./Exponential.sol";
import "./PriceOracle/PriceOracle.sol";
import "./ComptrollerInterface.sol";
import "./ComptrollerStorage.sol";
import "./Unitroller.sol";
import "../CToken.sol";
import "../ErrorReporter.sol";
import "../Exponential.sol";
import "../PriceOracle/PriceOracle.sol";
import "../ComptrollerInterface.sol";
import "../ComptrollerStorage.sol";
import "../Unitroller.sol";

/**
* @title Compound's Comptroller Contract
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
pragma solidity ^0.5.16;

import "./CToken.sol";
import "./ErrorReporter.sol";
import "./Exponential.sol";
import "./PriceOracle/PriceOracle.sol";
import "./ComptrollerInterface.sol";
import "./ComptrollerStorage.sol";
import "./Unitroller.sol";
import "./Governance/Comp.sol";
import "../CToken.sol";
import "../ErrorReporter.sol";
import "../Exponential.sol";
import "../PriceOracle/PriceOracle.sol";
import "../ComptrollerInterface.sol";
import "../ComptrollerStorage.sol";
import "../Unitroller.sol";
import "../Governance/Comp.sol";

/**
* @title Compound's Comptroller Contract
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
pragma solidity ^0.5.16;

import "./CToken.sol";
import "./ErrorReporter.sol";
import "./Exponential.sol";
import "./PriceOracle/PriceOracle.sol";
import "./ComptrollerInterface.sol";
import "./ComptrollerStorage.sol";
import "./Unitroller.sol";
import "./Governance/Comp.sol";
import "../CToken.sol";
import "../ErrorReporter.sol";
import "../Exponential.sol";
import "../PriceOracle/PriceOracle.sol";
import "../ComptrollerInterface.sol";
import "../ComptrollerStorage.sol";
import "../Unitroller.sol";
import "../Governance/Comp.sol";

/**
* @title Compound's Comptroller Contract
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
pragma solidity ^0.5.16;

import "./CToken.sol";
import "./ErrorReporter.sol";
import "./Exponential.sol";
import "./PriceOracle/PriceOracle.sol";
import "./ComptrollerInterface.sol";
import "./ComptrollerStorage.sol";
import "./Unitroller.sol";
import "./Governance/Comp.sol";
import "../CToken.sol";
import "../ErrorReporter.sol";
import "../Exponential.sol";
import "../PriceOracle/PriceOracle.sol";
import "../ComptrollerInterface.sol";
import "../ComptrollerStorage.sol";
import "../Unitroller.sol";
import "../Governance/Comp.sol";

/**
* @title Compound's Comptroller Contract
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
pragma solidity ^0.5.16;

import "./CToken.sol";
import "./ErrorReporter.sol";
import "./Exponential.sol";
import "./PriceOracle/PriceOracle.sol";
import "./ComptrollerInterface.sol";
import "./ComptrollerStorage.sol";
import "./Unitroller.sol";
import "./Governance/Comp.sol";
import "../CToken.sol";
import "../ErrorReporter.sol";
import "../Exponential.sol";
import "../PriceOracle/PriceOracle.sol";
import "../ComptrollerInterface.sol";
import "../ComptrollerStorage.sol";
import "../Unitroller.sol";
import "../Governance/Comp.sol";

/**
* @title Compound's Comptroller Contract
Expand Down
1 change: 0 additions & 1 deletion contracts/PriceOracle/PriceOracleProxy.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

import "./Denominations.sol";
import "./PriceOracle.sol";
Expand Down
8 changes: 4 additions & 4 deletions tests/Contracts/CErc20Harness.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

import "../../contracts/CErc20Immutable.sol";
import "../../contracts/Legacy/CErc20Immutable.sol";
import "../../contracts/CErc20Delegator.sol";
import "../../contracts/CErc20Delegate.sol";
import "../../contracts/CSLPDelegate.sol";
import "../../contracts/CCTokenDelegate.sol";
import "../../contracts/Legacy/CSLPDelegate.sol";
import "../../contracts/Legacy/CCTokenDelegate.sol";
import "../../contracts/CCollateralCapErc20Delegate.sol";
import "../../contracts/CCollateralCapErc20Delegator.sol";
import "../../contracts/Legacy/CCollateralCapErc20Delegator.sol";
import "../../contracts/CWrappedNativeDelegate.sol";
import "../../contracts/CWrappedNativeDelegator.sol";
import "./ComptrollerScenario.sol";
Expand Down
2 changes: 1 addition & 1 deletion tests/Contracts/CEtherHarness.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

import "../../contracts/CEther.sol";
import "../../contracts/Legacy/CEther.sol";
import "./ComptrollerScenario.sol";

contract CEtherHarness is CEther {
Expand Down
1 change: 0 additions & 1 deletion tests/Contracts/CompHarness.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

import "../../contracts/Governance/Comp.sol";

Expand Down
2 changes: 1 addition & 1 deletion tests/Contracts/ComptrollerScenarioG1.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

import "../../contracts/ComptrollerG1.sol";
import "../../contracts/Legacy/ComptrollerG1.sol";
import "../../contracts/PriceOracle/PriceOracle.sol";

// XXX we should delete G1 everything...
Expand Down
2 changes: 1 addition & 1 deletion tests/Contracts/ComptrollerScenarioG2.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

import "../../contracts/ComptrollerG2.sol";
import "../../contracts/Legacy/ComptrollerG2.sol";

contract ComptrollerScenarioG2 is ComptrollerG2 {
uint256 public blockNumber;
Expand Down
2 changes: 1 addition & 1 deletion tests/Contracts/ComptrollerScenarioG3.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

import "../../contracts/ComptrollerG3.sol";
import "../../contracts/Legacy/ComptrollerG3.sol";

contract ComptrollerScenarioG3 is ComptrollerG3 {
uint256 public blockNumber;
Expand Down
2 changes: 1 addition & 1 deletion tests/Contracts/ComptrollerScenarioG4.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

import "../../contracts/ComptrollerG4.sol";
import "../../contracts/Legacy/ComptrollerG4.sol";

contract ComptrollerScenarioG4 is ComptrollerG4 {
uint256 public blockNumber;
Expand Down
2 changes: 1 addition & 1 deletion tests/Contracts/EvilToken.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma solidity ^0.5.16;

import "./FaucetToken.sol";
import "../../contracts/CEther.sol";
import "../../contracts/Legacy/CEther.sol";
import "../../contracts/CCollateralCapErc20.sol";

/**
Expand Down
41 changes: 0 additions & 41 deletions tests/Contracts/Fauceteer.sol

This file was deleted.

10 changes: 0 additions & 10 deletions tests/Contracts/MathHelpers.sol

This file was deleted.

36 changes: 0 additions & 36 deletions tests/Contracts/MockMCD.sol

This file was deleted.

1 change: 0 additions & 1 deletion tests/Contracts/Structs.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

contract Structs {
struct Outer {
Expand Down

0 comments on commit 7c1bb78

Please sign in to comment.