Skip to content

Commit

Permalink
fix: changed import style for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
TokenTitan committed Jul 30, 2024
1 parent 75c86a2 commit e501cca
Show file tree
Hide file tree
Showing 22 changed files with 44 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pragma solidity 0.8.26;
import {Script} from "forge-std/Script.sol";
import {BaseDeployer} from "../BaseDeployer.s.sol";
import {CronCounter} from "test/examples/CronCounter.sol";
import {MyErc20} from "test/examples/MyErc20.sol";

/* solhint-disable no-console*/
import {console2} from "forge-std/console2.sol";
Expand Down Expand Up @@ -51,10 +50,10 @@ contract DeployCronCounter is Script, BaseDeployer {

/// @dev Function to perform actual deployment.
function chainDeploySmartedContract() private broadcast(_deployerPrivateKey) {
address cronTwoCounter = address(new CronCounter{salt: _salt}(_callBreaker));
address cronCounter = address(new CronCounter{salt: _salt}(_callBreaker));

require(_create2addr == cronTwoCounter, "Address mismatch CronCounter");
require(_create2addr == cronCounter, "Address mismatch CronCounter");

console2.log("CronCounter deployed at address:", cronTwoCounter, "\n");
console2.log("CronCounter deployed at address:", cronCounter, "\n");
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion test/AssociatedDataStorage.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.0;

import {Test} from "forge-std/Test.sol";
import {AssociatedDataStorage, AssociatedDataLib} from "../src/CallBreakerTypes.sol";
import {AssociatedDataStorage, AssociatedDataLib} from "src/CallBreakerTypes.sol";

contract AssociatedDataStorageTest is Test {
AssociatedDataStorage assocData;
Expand Down
4 changes: 2 additions & 2 deletions test/CronCounter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import "forge-std/Vm.sol";

import "./solve-lib/CronCounterLib.sol";

import "../src/lamination/Laminator.sol";
import "../src/timetravel/CallBreaker.sol";
import "src/lamination/Laminator.sol";
import "src/timetravel/CallBreaker.sol";

contract CronTest is Test, CronCounterLib {
address deployer;
Expand Down
3 changes: 1 addition & 2 deletions test/FlashLiquidity.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
pragma solidity 0.8.26;

import "forge-std/Test.sol";
import "../src/timetravel/CallBreaker.sol";
import "../test/solve-lib/FlashLiquidityLib.sol";
import "test/solve-lib/FlashLiquidityLib.sol";

contract FlashLiquidityTest is Test, FlashLiquidityLib {
address deployer;
Expand Down
4 changes: 2 additions & 2 deletions test/FlashPillTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
pragma solidity 0.8.26;

import "forge-std/Test.sol";
import "../src/timetravel/CallBreaker.sol";
import "../test/examples/FlashPill.sol";
import "src/timetravel/CallBreaker.sol";
import "test/examples/FlashPill.sol";

contract FlashPillTest is Test {
CallBreaker private callbreaker;
Expand Down
4 changes: 2 additions & 2 deletions test/NoopTurnerTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pragma solidity 0.8.26;

import "forge-std/Test.sol";
import "../src/timetravel/CallBreaker.sol";
import "../test/examples/NoopTurner.sol";
import "src/timetravel/CallBreaker.sol";
import "test/examples/NoopTurner.sol";

contract NoopTurnerTest is Test {
CallBreaker public callbreaker;
Expand Down
6 changes: 3 additions & 3 deletions test/PnP.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
pragma solidity 0.8.26;

import "forge-std/Test.sol";
import "../src/timetravel/CallBreaker.sol";
import "../test/examples/PnP.sol";
import "../test/solve-lib/PnPLib.sol";
import "src/timetravel/CallBreaker.sol";
import "test/examples/PnP.sol";
import "test/solve-lib/PnPLib.sol";

contract PnPTest is Test, PnPLib {
address deployer;
Expand Down
4 changes: 2 additions & 2 deletions test/Sandwich.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import "forge-std/Vm.sol";

import "./solve-lib/CronCounterLib.sol";

import "../src/lamination/Laminator.sol";
import "../src/timetravel/CallBreaker.sol";
import "src/lamination/Laminator.sol";
import "src/timetravel/CallBreaker.sol";

contract CronTest is Test, CronCounterLib {
address deployer;
Expand Down
2 changes: 1 addition & 1 deletion test/SlippageProtection.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity 0.8.26;

import "forge-std/Test.sol";
import "src/timetravel/CallBreaker.sol";
import "test/solve-lib/SlippageProtectionLib.sol";
import "test/solve-lib/DeFi/SlippageProtectionLib.sol";

contract SlippageProtectionTest is Test, SlippageProtectionLib {
address deployer;
Expand Down
2 changes: 1 addition & 1 deletion test/examples/CronCounter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.26;

import "../../src/timetravel/SmarterContract.sol";
import "src/timetravel/SmarterContract.sol";

contract CronCounter is SmarterContract {
mapping(address => uint256) private _counters;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.26;

import "forge-std/console.sol";

import "openzeppelin/token/ERC20/ERC20.sol";
import "test/utils/interfaces/IWeth.sol";
import "test/utils/interfaces/ISwapRouter.sol";
import "src/timetravel/CallBreaker.sol";
import "src/timetravel/SmarterContract.sol";
import "src/TimeTypes.sol";
import "test/utils/interfaces/ISwapRouter.sol";
import "test/utils/interfaces/IWeth.sol";

address constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;
address constant WETH9 = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
Expand Down Expand Up @@ -67,6 +69,7 @@ contract FlashLiquidity is SmarterContract {

// The call to `exactInputSingle` executes the swap.
uint256 amountOut = router.exactInputSingle(params);
console.log("WETH", amountOut);

// check whether or not
CallObject memory callObj = CallObject({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import "src/timetravel/SmarterContract.sol";
import "src/TimeTypes.sol";
import "test/utils/interfaces/ISwapRouter.sol";

import {IWETH, IERC20} from "../utils/interfaces/IWeth.sol";
import {IPositionManager} from "../utils/interfaces/IPositionManager.sol";
import {IWETH, IERC20} from "test/utils/interfaces/IWeth.sol";
import {IPositionManager} from "test/utils/interfaces/IPositionManager.sol";

// pool fee, 0.3%.
uint24 constant poolFee = 3000;
Expand Down
4 changes: 2 additions & 2 deletions test/examples/FlashPill.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pragma solidity 0.8.26;

import "openzeppelin/token/ERC20/IERC20.sol";
import "../../src/timetravel/CallBreaker.sol";
import "../../src/timetravel/SmarterContract.sol";
import "src/timetravel/CallBreaker.sol";
import "src/timetravel/SmarterContract.sol";

contract FlashPill is IERC20, SmarterContract {
mapping(address => uint256) private _balances;
Expand Down
6 changes: 3 additions & 3 deletions test/examples/NoopTurner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

pragma solidity 0.8.26;

import "../../src/timetravel/CallBreaker.sol";
import "../../src/timetravel/SmarterContract.sol";
import "../../src/TimeTypes.sol";
import "src/timetravel/CallBreaker.sol";
import "src/timetravel/SmarterContract.sol";
import "src/TimeTypes.sol";

contract NoopTurner is SmarterContract {
address private _callbreakerAddress;
Expand Down
2 changes: 1 addition & 1 deletion test/examples/PnP.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.26;

import "../../src/timetravel/CallBreaker.sol";
import "src/timetravel/CallBreaker.sol";

contract PnP {
address private _callbreakerAddress;
Expand Down
8 changes: 4 additions & 4 deletions test/solve-lib/CronCounterLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ pragma solidity 0.8.26;

import "forge-std/Vm.sol";

import "../../src/lamination/Laminator.sol";
import "../../src/timetravel/CallBreaker.sol";
import "../../test/examples/CronCounter.sol";
import "../../src/timetravel/SmarterContract.sol";
import "src/lamination/Laminator.sol";
import "src/timetravel/CallBreaker.sol";
import "test/examples/CronCounter.sol";
import "src/timetravel/SmarterContract.sol";

// for the next year, every day:
// tip the pusher with a little eth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity 0.8.26;
import "src/lamination/Laminator.sol";
import "src/timetravel/CallBreaker.sol";
import "src/timetravel/SmarterContract.sol";
import "test/examples/SwapPool.sol";
import "test/examples/DeFi/SwapPool.sol";
import "test/utils/MockERC20Token.sol";
import "test/utils/MockSwapRouter.sol";
import "test/utils/MockPositionManager.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity 0.8.26;

import "src/lamination/Laminator.sol";
import "src/timetravel/CallBreaker.sol";
import "test/examples/SwapPool.sol";
import "test/examples/DeFi/SwapPool.sol";
import "test/utils/MockERC20Token.sol";
import "test/utils/MockSwapRouter.sol";
import "test/utils/MockPositionManager.sol";
Expand Down
8 changes: 4 additions & 4 deletions test/solve-lib/PnPLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ pragma solidity 0.8.26;

import "forge-std/Vm.sol";

import "../../src/lamination/Laminator.sol";
import "../../src/timetravel/CallBreaker.sol";
import "../../test/examples/PnP.sol";
import "../../src/timetravel/SmarterContract.sol";
import "src/lamination/Laminator.sol";
import "src/timetravel/CallBreaker.sol";
import "src/timetravel/SmarterContract.sol";
import "test/examples/PnP.sol";

contract PnPLib {
address payable public pusherLaminated;
Expand Down
2 changes: 1 addition & 1 deletion test/utils/MockPositionManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.13;

import {IPositionManager} from "./interfaces/IPositionManager.sol";
import {ISwapRouter} from "../utils/interfaces/ISwapRouter.sol";
import {ISwapRouter} from "./interfaces/ISwapRouter.sol";

/**
* @notice Oversimplified mock version of a Position Manager
Expand Down
4 changes: 2 additions & 2 deletions test/utils/MockSwapRouter.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.26;

import {IWETH, IERC20} from "../utils/interfaces/IWeth.sol";
import {ISwapRouter} from "../utils/interfaces/ISwapRouter.sol";
import {IWETH, IERC20} from "./interfaces/IWeth.sol";
import {ISwapRouter} from "./interfaces/ISwapRouter.sol";

/**
* @notice Oversimplified mock version of a router
Expand Down

0 comments on commit e501cca

Please sign in to comment.