Skip to content

Commit

Permalink
feat: Using more common
Browse files Browse the repository at this point in the history
  • Loading branch information
deluca-mike committed Oct 30, 2024
1 parent b3d6d0a commit 67f77f9
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 270 deletions.
2 changes: 1 addition & 1 deletion lib/common
2 changes: 1 addition & 1 deletion script/DeployBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
pragma solidity 0.8.26;

import { ContractHelper } from "../lib/common/src/libs/ContractHelper.sol";
import { Proxy } from "../lib/common/src/Proxy.sol";

import { SmartMToken } from "../src/SmartMToken.sol";
import { EarnerManager } from "../src/EarnerManager.sol";
import { Proxy } from "../src/Proxy.sol";

contract DeployBase {
/**
Expand Down
4 changes: 2 additions & 2 deletions src/EarnerManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

pragma solidity 0.8.26;

import { Migratable } from "../lib/common/src/Migratable.sol";

import { IEarnerManager } from "./interfaces/IEarnerManager.sol";
import { IRegistrarLike } from "./interfaces/IRegistrarLike.sol";

import { Migratable } from "./Migratable.sol";

/**
* @title Earner Manager allows admins to define earners without governance, and take fees from yield.
* @author M^0 Labs
Expand Down
61 changes: 0 additions & 61 deletions src/Migratable.sol

This file was deleted.

48 changes: 0 additions & 48 deletions src/Proxy.sol

This file was deleted.

5 changes: 2 additions & 3 deletions src/SmartMToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@

pragma solidity 0.8.26;

import { IndexingMath } from "../lib/common/src/libs/IndexingMath.sol";
import { UIntMath } from "../lib/common/src/libs/UIntMath.sol";

import { IERC20 } from "../lib/common/src/interfaces/IERC20.sol";
import { ERC20Extended } from "../lib/common/src/ERC20Extended.sol";

import { IndexingMath } from "./libs/IndexingMath.sol";
import { Migratable } from "../lib/common/src/Migratable.sol";

import { IEarnerManager } from "./interfaces/IEarnerManager.sol";
import { IMTokenLike } from "./interfaces/IMTokenLike.sol";
import { IRegistrarLike } from "./interfaces/IRegistrarLike.sol";
import { ISmartMToken } from "./interfaces/ISmartMToken.sol";

import { Migratable } from "./Migratable.sol";

/*
██╗ ██╗██████╗ █████╗ ██████╗ ██████╗ ███████╗██████╗ ███╗ ███╗ ████████╗ ██████╗ ██╗ ██╗███████╗███╗ ██╗
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/IEarnerManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.26;

import { IMigratable } from "./IMigratable.sol";
import { IMigratable } from "../../lib/common/src/interfaces/IMigratable.sol";

/**
* @title Earner Status Manager interface for setting and returning earner status for Smart M Token accounts.
Expand Down
44 changes: 0 additions & 44 deletions src/interfaces/IMigratable.sol

This file was deleted.

3 changes: 1 addition & 2 deletions src/interfaces/ISmartMToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
pragma solidity 0.8.26;

import { IERC20Extended } from "../../lib/common/src/interfaces/IERC20Extended.sol";

import { IMigratable } from "./IMigratable.sol";
import { IMigratable } from "../../lib/common/src/interfaces/IMigratable.sol";

/**
* @title Smart M Token interface extending Extended ERC20.
Expand Down
97 changes: 0 additions & 97 deletions src/libs/IndexingMath.sol

This file was deleted.

3 changes: 2 additions & 1 deletion test/integration/TestBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ pragma solidity 0.8.26;
import { IERC20 } from "../../lib/common/src/interfaces/IERC20.sol";
import { IERC20Extended } from "../../lib/common/src/interfaces/IERC20Extended.sol";
import { IERC712 } from "../../lib/common/src/interfaces/IERC712.sol";

import { Proxy } from "../../lib/common/src/Proxy.sol";
import { Test } from "../../lib/forge-std/src/Test.sol";

import { ISmartMToken } from "../../src/interfaces/ISmartMToken.sol";

import { EarnerManager } from "../../src/EarnerManager.sol";
import { Proxy } from "../../src/Proxy.sol";
import { SmartMToken } from "../../src/SmartMToken.sol";
import { SmartMTokenMigratorV1 } from "../../src/SmartMTokenMigratorV1.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/unit/Migrations.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

pragma solidity 0.8.26;

import { Proxy } from "../../lib/common/src/Proxy.sol";
import { Test } from "../../lib/forge-std/src/Test.sol";

import { IEarnerManager } from "../../src/interfaces/IEarnerManager.sol";
import { ISmartMToken } from "../../src/interfaces/ISmartMToken.sol";

import { EarnerManager } from "../../src/EarnerManager.sol";
import { SmartMToken } from "../../src/SmartMToken.sol";
import { Proxy } from "../../src/Proxy.sol";

import { MockM, MockRegistrar } from "./../utils/Mocks.sol";

Expand Down
10 changes: 5 additions & 5 deletions test/unit/SmartMToken.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

pragma solidity 0.8.26;

import { Test, console2 } from "../../lib/forge-std/src/Test.sol";
import { IndexingMath } from "../../lib/common/src/libs/IndexingMath.sol";

import { IERC20 } from "../../lib/common/src/interfaces/IERC20.sol";
import { IERC20Extended } from "../../lib/common/src/interfaces/IERC20Extended.sol";

import { UIntMath } from "../../lib/common/src/libs/UIntMath.sol";
import { Proxy } from "../../lib/common/src/Proxy.sol";
import { Test, console2 } from "../../lib/forge-std/src/Test.sol";

import { ISmartMToken } from "../../src/interfaces/ISmartMToken.sol";

import { IndexingMath } from "../../src/libs/IndexingMath.sol";

import { Proxy } from "../../src/Proxy.sol";

import { MockEarnerManager, MockM, MockRegistrar } from "../utils/Mocks.sol";
import { SmartMTokenHarness } from "../utils/SmartMTokenHarness.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/unit/Stories.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

pragma solidity 0.8.26;

import { Proxy } from "../../lib/common/src/Proxy.sol";
import { Test } from "../../lib/forge-std/src/Test.sol";

import { ISmartMToken } from "../../src/interfaces/ISmartMToken.sol";

import { SmartMToken } from "../../src/SmartMToken.sol";
import { Proxy } from "../../src/Proxy.sol";

import { MockEarnerManager, MockM, MockRegistrar } from "../utils/Mocks.sol";

Expand Down
Loading

0 comments on commit 67f77f9

Please sign in to comment.