Skip to content

Commit

Permalink
chore: update import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpawlowski committed May 20, 2024
1 parent 2e38a6c commit c3aed0f
Show file tree
Hide file tree
Showing 70 changed files with 227 additions and 227 deletions.
2 changes: 1 addition & 1 deletion test/helpers/AssertionsCustomTypes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.0;

import "src/EVault/shared/types/Types.sol";
import "../../src/EVault/shared/types/Types.sol";
import "forge-std/StdAssertions.sol";

/// @notice assertion helpers for custom types
Expand Down
2 changes: 1 addition & 1 deletion test/invariant/SimpleCriticalChecks.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity ^0.8.0;
import {Test} from "forge-std/Test.sol";
import {IEVC} from "ethereum-vault-connector/interfaces/IEthereumVaultConnector.sol";
import {EVaultTestBase} from "../unit/evault/EVaultTestBase.t.sol";
import {IEVault} from "src/EVault/IEVault.sol";
import {IEVault} from "../../src/EVault/IEVault.sol";
import {IRMTestDefault} from "../mocks/IRMTestDefault.sol";
import {MockPriceOracle} from "../mocks/MockPriceOracle.sol";
import "forge-std/console.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/invariants/CryticToFoundry.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.19;
// Libraries
import "forge-std/Test.sol";
import "forge-std/console.sol";
import {Errors} from "src/EVault/shared/Errors.sol";
import {Errors} from "../../src/EVault/shared/Errors.sol";

// Test Contracts
import {Invariants} from "./Invariants.t.sol";
Expand Down
18 changes: 9 additions & 9 deletions test/invariants/Setup.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ pragma solidity ^0.8.19;

// Libraries
import {EthereumVaultConnector} from "ethereum-vault-connector/EthereumVaultConnector.sol";
import {DeployPermit2} from "test/invariants/utils/DeployPermit2.sol";
import {DeployPermit2} from "./utils/DeployPermit2.sol";

// Contracts
import {GenericFactory} from "src/GenericFactory/GenericFactory.sol";
import {EVault} from "src/EVault/EVault.sol";
import {ProtocolConfig} from "src/ProtocolConfig/ProtocolConfig.sol";
import {GenericFactory} from "../../src/GenericFactory/GenericFactory.sol";
import {EVault} from "../../src/EVault/EVault.sol";
import {ProtocolConfig} from "../../src/ProtocolConfig/ProtocolConfig.sol";
import {IRMTestDefault} from "../mocks/IRMTestDefault.sol";
import {Base} from "src/EVault/shared/Base.sol";
import {Dispatch} from "src/EVault/Dispatch.sol";
import {SequenceRegistry} from "src/SequenceRegistry/SequenceRegistry.sol";
import {Base} from "../../src/EVault/shared/Base.sol";
import {Dispatch} from "../../src/EVault/Dispatch.sol";
import {SequenceRegistry} from "../../src/SequenceRegistry/SequenceRegistry.sol";

// Modules
import {
Expand All @@ -24,15 +24,15 @@ import {
RiskManagerExtended,
TokenExtended,
VaultExtended
} from "test/invariants/helpers/extended/ModulesExtended.sol";
} from "./helpers/extended/ModulesExtended.sol";

// Test Contracts
import {ERC20Mock as TestERC20} from "@openzeppelin/contracts/mocks/token/ERC20Mock.sol";
import {MockBalanceTracker} from "../mocks/MockBalanceTracker.sol";
import {MockPriceOracle} from "../mocks/MockPriceOracle.sol";
import {Actor} from "./utils/Actor.sol";
import {BaseTest} from "./base/BaseTest.t.sol";
import {EVaultExtended} from "test/invariants/helpers/extended/EVaultExtended.sol";
import {EVaultExtended} from "./helpers/extended/EVaultExtended.sol";

/// @title Setup
/// @notice Setup contract for the invariant test Suite, inherited by Tester
Expand Down
4 changes: 2 additions & 2 deletions test/invariants/base/BaseHandler.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ pragma solidity ^0.8.19;
// Libraries
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {TestERC20} from "test/mocks/TestERC20.sol";
import {TestERC20} from "../../mocks/TestERC20.sol";

// Contracts
import {Actor} from "../utils/Actor.sol";
import {HookAggregator} from "../hooks/HookAggregator.t.sol";

// Interfaces
import {IEVault} from "src/EVault/IEVault.sol";
import {IEVault} from "../../../src/EVault/IEVault.sol";

/// @title BaseHandler
/// @notice Contains common logic for all handlers
Expand Down
8 changes: 4 additions & 4 deletions test/invariants/base/BaseStorage.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ pragma solidity ^0.8.19;

// Contracts
import {EthereumVaultConnector} from "ethereum-vault-connector/EthereumVaultConnector.sol";
import {ProtocolConfig} from "src/ProtocolConfig/ProtocolConfig.sol";
import "src/EVault/shared/Constants.sol";
import {ProtocolConfig} from "../../../src/ProtocolConfig/ProtocolConfig.sol";
import "../../../src/EVault/shared/Constants.sol";

// Mock Contracts
import {ERC20Mock as TestERC20} from "@openzeppelin/contracts/mocks/token/ERC20Mock.sol";
import {GenericFactory} from "src/GenericFactory/GenericFactory.sol";
import {GenericFactory} from "../../../src/GenericFactory/GenericFactory.sol";
import {MockPriceOracle} from "../../mocks/MockPriceOracle.sol";

// Test Contracts
import {EVaultExtended} from "test/invariants/helpers/extended/EVaultExtended.sol";
import {EVaultExtended} from "../helpers/extended/EVaultExtended.sol";

// Utils
import {Actor} from "../utils/Actor.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/invariants/base/ProtocolAssertions.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.19;

// Base
import {BaseTest} from "./BaseTest.t.sol";
import {StdAsserts} from "test/invariants/utils/StdAsserts.sol";
import {StdAsserts} from "../utils/StdAsserts.sol";

/// @title ProtocolAssertions
/// @notice Helper contract for protocol specific assertions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Actor} from "../../utils/Actor.sol";
import {BaseHandler} from "../../base/BaseHandler.t.sol";

// Interfaces
import {IBalanceForwarder} from "src/EVault/IEVault.sol";
import {IBalanceForwarder} from "../../../../src/EVault/IEVault.sol";

/// @title BalanceForwarderModuleHandler
/// @notice Handler test contract for the risk balance forwarder module actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {Actor} from "../../utils/Actor.sol";
import {BaseHandler} from "../../base/BaseHandler.t.sol";

// Interfaces
import {IBorrowing, IERC4626} from "src/EVault/IEVault.sol";
import {IBorrowing, IERC4626} from "../../../../src/EVault/IEVault.sol";

/// @title BorrowingModuleHandler
/// @notice Handler test contract for the BorrowingModule actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
pragma solidity ^0.8.19;

// Libraries
import "src/EVault/shared/Constants.sol";
import "../../../../src/EVault/shared/Constants.sol";

// Test Contracts
import {Actor} from "../../utils/Actor.sol";
import {BaseHandler} from "../../base/BaseHandler.t.sol";

// Interfaces
import {IGovernance} from "src/EVault/IEVault.sol";
import {IGovernance} from "../../../../src/EVault/IEVault.sol";

/// @title GovernanceModuleHandler
/// @notice Handler test contract for the governance module actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Actor} from "../../utils/Actor.sol";
import {BaseHandler} from "../../base/BaseHandler.t.sol";

// Interfaces
import {ILiquidation} from "src/EVault/IEVault.sol";
import {ILiquidation} from "../../../../src/EVault/IEVault.sol";

/// @title LiquidationModuleHandler
/// @notice Handler test contract for the VaultRegularBorrowable actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Actor} from "../../utils/Actor.sol";
import {BaseHandler} from "../../base/BaseHandler.t.sol";

// Interfaces
import {IRiskManager} from "src/EVault/IEVault.sol";
import {IRiskManager} from "../../../../src/EVault/IEVault.sol";

/// @title RiskManagerModuleHandler
/// @notice Handler test contract for the risk manager module actions
Expand Down
2 changes: 1 addition & 1 deletion test/invariants/handlers/modules/TokenModuleHandler.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Actor} from "../../utils/Actor.sol";
import {BaseHandler} from "../../base/BaseHandler.t.sol";

// Interfaces
import {IERC20} from "src/EVault/IEVault.sol";
import {IERC20} from "../../../../src/EVault/IEVault.sol";

/// @title TokenModuleHandler
/// @notice Handler test contract for ERC20 contacts
Expand Down
2 changes: 1 addition & 1 deletion test/invariants/handlers/modules/VaultModuleHandler.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {Actor} from "../../utils/Actor.sol";
import {BaseHandler} from "../../base/BaseHandler.t.sol";

// Interfaces
import {IERC4626} from "src/EVault/IEVault.sol";
import {IERC4626} from "../../../../src/EVault/IEVault.sol";

/// @title VaultModuleHandler
/// @notice Handler test contract for the generic ERC4626 vault actions
Expand Down
12 changes: 6 additions & 6 deletions test/invariants/helpers/extended/EVaultExtended.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
pragma solidity ^0.8.0;

// Function Overrides
import {FunctionOverrides} from "test/invariants/helpers/extended/FunctionOverrides.sol";
import {FunctionOverrides} from "./FunctionOverrides.sol";

// Contracts
import {Base} from "src/EVault/shared/Base.sol";
import {BalanceUtils} from "src/EVault/shared/BalanceUtils.sol";
import {BorrowUtils} from "src/EVault/shared/BorrowUtils.sol";
import {EVault} from "src/EVault/EVault.sol";
import {Base} from "../../../../src/EVault/shared/Base.sol";
import {BalanceUtils} from "../../../../src/EVault/shared/BalanceUtils.sol";
import {BorrowUtils} from "../../../../src/EVault/shared/BorrowUtils.sol";
import {EVault} from "../../../../src/EVault/EVault.sol";

// Types
import "src/EVault/shared/types/Types.sol";
import "../../../../src/EVault/shared/types/Types.sol";

contract EVaultExtended is EVault, FunctionOverrides {
constructor(Integrations memory integrations, DeployedModules memory modules) EVault(integrations, modules) {}
Expand Down
10 changes: 5 additions & 5 deletions test/invariants/helpers/extended/FunctionOverrides.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
pragma solidity ^0.8.0;

// Contracts
import {BalanceUtils} from "src/EVault/shared/BalanceUtils.sol";
import {BorrowUtils} from "src/EVault/shared/BorrowUtils.sol";
import "src/EVault/shared/types/Types.sol";
import {BalanceUtils} from "../../../../src/EVault/shared/BalanceUtils.sol";
import {BorrowUtils} from "../../../../src/EVault/shared/BorrowUtils.sol";
import "../../../../src/EVault/shared/types/Types.sol";

// Utils
import "test/invariants/InvariantsSpec.t.sol";
import "test/invariants/utils/StdAsserts.sol";
import "../../InvariantsSpec.t.sol";
import "../../utils/StdAsserts.sol";

/// @notice Abstract contract to override functions and check internal invariants.
abstract contract FunctionOverrides is BalanceUtils, BorrowUtils, StdAsserts, InvariantsSpec {
Expand Down
32 changes: 16 additions & 16 deletions test/invariants/helpers/extended/ModulesExtended.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

pragma solidity ^0.8.0;

import {FunctionOverrides} from "test/invariants/helpers/extended/FunctionOverrides.sol";

import {Base} from "src/EVault/shared/Base.sol";
import {BalanceUtils} from "src/EVault/shared/BalanceUtils.sol";
import {BorrowUtils} from "src/EVault/shared/BorrowUtils.sol";

import {Initialize} from "src/EVault/modules/Initialize.sol";
import {Token} from "src/EVault/modules/Token.sol";
import {Vault} from "src/EVault/modules/Vault.sol";
import {Borrowing} from "src/EVault/modules/Borrowing.sol";
import {Liquidation} from "src/EVault/modules/Liquidation.sol";
import {BalanceForwarder} from "src/EVault/modules/BalanceForwarder.sol";
import {Governance} from "src/EVault/modules/Governance.sol";
import {RiskManager} from "src/EVault/modules/RiskManager.sol";

import "src/EVault/shared/types/Types.sol";
import {FunctionOverrides} from "./FunctionOverrides.sol";

import {Base} from "../../../../src/EVault/shared/Base.sol";
import {BalanceUtils} from "../../../../src/EVault/shared/BalanceUtils.sol";
import {BorrowUtils} from "../../../../src/EVault/shared/BorrowUtils.sol";

import {Initialize} from "../../../../src/EVault/modules/Initialize.sol";
import {Token} from "../../../../src/EVault/modules/Token.sol";
import {Vault} from "../../../../src/EVault/modules/Vault.sol";
import {Borrowing} from "../../../../src/EVault/modules/Borrowing.sol";
import {Liquidation} from "../../../../src/EVault/modules/Liquidation.sol";
import {BalanceForwarder} from "../../../../src/EVault/modules/BalanceForwarder.sol";
import {Governance} from "../../../../src/EVault/modules/Governance.sol";
import {RiskManager} from "../../../../src/EVault/modules/RiskManager.sol";

import "../../../../src/EVault/shared/types/Types.sol";

// Modules and EVault overrides.
contract BalanceForwarderExtended is BalanceForwarder, FunctionOverrides {
Expand Down
4 changes: 2 additions & 2 deletions test/invariants/hooks/BorrowingBeforeAfterHooks.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pragma solidity ^0.8.19;

// Contracts
import "src/EVault/shared/types/Types.sol";
import "src/EVault/shared/types/AmountCap.sol";
import "../../../src/EVault/shared/types/Types.sol";
import "../../../src/EVault/shared/types/AmountCap.sol";

// Test Helpers
import {Pretty, Strings} from "../utils/Pretty.sol";
Expand Down
4 changes: 2 additions & 2 deletions test/invariants/hooks/VaultBeforeAfterHooks.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pragma solidity ^0.8.19;

// Contracts
import "src/EVault/shared/types/Types.sol";
import "src/EVault/shared/types/AmountCap.sol";
import "../../../src/EVault/shared/types/Types.sol";
import "../../../src/EVault/shared/types/AmountCap.sol";

// Test Helpers
import {Pretty, Strings} from "../utils/Pretty.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/invariants/invariants/BaseInvariants.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity ^0.8.19;
import {HandlerAggregator} from "../HandlerAggregator.t.sol";

// Types
import {Snapshot, Assets} from "src/EVault/shared/types/Types.sol";
import {Snapshot, Assets} from "../../../src/EVault/shared/types/Types.sol";

/// @title BaseInvariants
/// @notice Implements Invariants for the protocol
Expand Down
2 changes: 1 addition & 1 deletion test/invariants/invariants/BorrowingModuleInvariants.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "forge-std/console.sol";

// Contracts
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "src/EVault/shared/Constants.sol";
import "../../../src/EVault/shared/Constants.sol";

// Base Contracts
import {HandlerAggregator} from "../HandlerAggregator.t.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/invariants/invariants/InterestInvariants.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.19;

// Contracts
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "src/EVault/shared/Constants.sol";
import "../../../src/EVault/shared/Constants.sol";

// Base Contracts
import {HandlerAggregator} from "../HandlerAggregator.t.sol";
Expand Down
4 changes: 2 additions & 2 deletions test/mocks/IRMTestLinear.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

pragma solidity ^0.8.0;

import "src/InterestRateModels/IIRM.sol";
import "src/EVault/shared/Constants.sol";
import "../../src/InterestRateModels/IIRM.sol";
import "../../src/EVault/shared/Constants.sol";

contract IRMTestLinear is IIRM {
uint256 internal constant MAX_IR = uint256(1e27 * 0.1) / SECONDS_PER_YEAR;
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/MockPriceOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.0;

import "src/EVault/IEVault.sol";
import "../../src/EVault/IEVault.sol";

contract MockPriceOracle {
error PO_BaseUnsupported();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/esynth/ESynth.totalSupply.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.13;

import {Test} from "forge-std/Test.sol";
import {ESynth, IEVC, Ownable} from "src/Synths/ESynth.sol";
import {ESynth, IEVC, Ownable} from "../../../src/Synths/ESynth.sol";

contract ESynthTotalSupplyTest is Test {
ESynth synth;
Expand Down
6 changes: 3 additions & 3 deletions test/unit/esynth/ESynthGeneral.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ pragma solidity ^0.8.20;

import {ESynthTest} from "./lib/ESynthTest.sol";
import {stdError} from "forge-std/Test.sol";
import {Errors} from "src/EVault/shared/Errors.sol";
import {ESynth} from "src/Synths/ESynth.sol";
import {MockWrongEVC} from "test/mocks/MockWrongEVC.sol";
import {Errors} from "../../../src/EVault/shared/Errors.sol";
import {ESynth} from "../../../src/Synths/ESynth.sol";
import {MockWrongEVC} from "../../mocks/MockWrongEVC.sol";

contract ESynthGeneralTest is ESynthTest {
uint128 constant MAX_ALLOWED = type(uint128).max;
Expand Down
4 changes: 2 additions & 2 deletions test/unit/esynth/lib/ESynthTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
pragma solidity ^0.8.0;

import {EVaultTestBase} from "../../evault/EVaultTestBase.t.sol";
import {IEVault, IERC20} from "src/EVault/IEVault.sol";
import {IEVault, IERC20} from "../../../../src/EVault/IEVault.sol";
import {IRMTestDefault} from "../../../mocks/IRMTestDefault.sol";
import {ESynth} from "src/Synths/ESynth.sol";
import {ESynth} from "../../../../src/Synths/ESynth.sol";
import {TestERC20} from "../../../mocks/TestERC20.sol";

contract ESynthTest is EVaultTestBase {
Expand Down
8 changes: 4 additions & 4 deletions test/unit/evault/DToken.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

pragma solidity ^0.8.0;

import "test/unit/evault/EVaultTestBase.t.sol";
import {DToken} from "src/EVault/DToken.sol";
import {Errors} from "src/EVault/shared/Errors.sol";
import {Events} from "src/EVault/shared/Events.sol";
import "./EVaultTestBase.t.sol";
import {DToken} from "../../../src/EVault/DToken.sol";
import {Errors} from "../../../src/EVault/shared/Errors.sol";
import {Events} from "../../../src/EVault/shared/Events.sol";

contract DTokenTest is EVaultTestBase {
address user = makeAddr("user");
Expand Down
4 changes: 2 additions & 2 deletions test/unit/evault/Dispatch.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
pragma solidity ^0.8.0;

import "./EVaultTestBase.t.sol";
import {Errors} from "src/EVault/shared/Errors.sol";
import {EVault} from "src/EVault/EVault.sol";
import {Errors} from "../../../src/EVault/shared/Errors.sol";
import {EVault} from "../../../src/EVault/EVault.sol";

contract DispatchTest is EVaultTestBase {
function test_Dispatch_moduleGetters() public view {
Expand Down
Loading

0 comments on commit c3aed0f

Please sign in to comment.