diff --git a/contracts/script/Exit.s.sol b/contracts/script/Exit.s.sol index 002d55f..32b95b9 100644 --- a/contracts/script/Exit.s.sol +++ b/contracts/script/Exit.s.sol @@ -25,9 +25,6 @@ contract Exit is Script { AaveLooper looper = AaveLooper(aaveLooper); - console2.log("Supply asset:", supplyAsset); - console2.log("Borrow asset:", borrowAsset); - vm.startBroadcast(); looper.exitPosition(supplyAsset, borrowAsset, 5, 500); vm.stopBroadcast(); diff --git a/contracts/script/ExitWithFlashloan.s.sol b/contracts/script/ExitWithFlashloan.s.sol index 88fd6bb..3d6a872 100644 --- a/contracts/script/ExitWithFlashloan.s.sol +++ b/contracts/script/ExitWithFlashloan.s.sol @@ -25,9 +25,6 @@ contract ExitWithFlashloan is Script { AaveLooper looper = AaveLooper(aaveLooper); - console2.log("Supply asset:", supplyAsset); - console2.log("Borrow asset:", borrowAsset); - vm.startBroadcast(); looper.exitPositionWithFlashLoan(supplyAsset, borrowAsset); vm.stopBroadcast(); diff --git a/contracts/script/Leverage.s.sol b/contracts/script/Leverage.s.sol index 01dbe8d..2fb5376 100644 --- a/contracts/script/Leverage.s.sol +++ b/contracts/script/Leverage.s.sol @@ -24,15 +24,8 @@ contract Leverage is Script { initialAmount = vm.envOr("INITIAL_AMOUNT", uint256(1000000)); iterations = vm.envOr("ITERATIONS", uint256(3)); - // address uniswapV3Factory = networkConfig.uniswapV3Factory; - AaveLooper looper = AaveLooper(aaveLooper); - // (uint24 bestFeeTier, uint256 amountOut) = - // looper.getBestFeeTier(uniswapV3Factory, supplyAsset, borrowAsset, initialAmount); - // console2.log("Best fee tier:", bestFeeTier); - // console2.log("Amount out:", amountOut); - vm.startBroadcast(); ERC20(supplyAsset).approve(aaveLooper, initialAmount); uint256 liquidity = looper.enterPosition(supplyAsset, borrowAsset, initialAmount, iterations, 500); diff --git a/contracts/script/Repay.s.sol b/contracts/script/Repay.s.sol index dc781a1..ec4fe08 100644 --- a/contracts/script/Repay.s.sol +++ b/contracts/script/Repay.s.sol @@ -26,9 +26,6 @@ contract Repay is Script { AaveLooper looper = AaveLooper(aaveLooper); - console2.log("Supply asset:", supplyAsset); - console2.log("Borrow asset:", borrowAsset); - vm.startBroadcast(); looper._repayBorrow(borrowAsset, 1); vm.stopBroadcast(); diff --git a/contracts/script/Withdraw.s.sol b/contracts/script/Withdraw.s.sol index 88fd6bb..3d6a872 100644 --- a/contracts/script/Withdraw.s.sol +++ b/contracts/script/Withdraw.s.sol @@ -25,9 +25,6 @@ contract ExitWithFlashloan is Script { AaveLooper looper = AaveLooper(aaveLooper); - console2.log("Supply asset:", supplyAsset); - console2.log("Borrow asset:", borrowAsset); - vm.startBroadcast(); looper.exitPositionWithFlashLoan(supplyAsset, borrowAsset); vm.stopBroadcast(); diff --git a/contracts/src/AaveLooper.sol b/contracts/src/AaveLooper.sol index 1d20ad2..5a2d1fb 100644 --- a/contracts/src/AaveLooper.sol +++ b/contracts/src/AaveLooper.sol @@ -12,7 +12,6 @@ import {IPoolAddressesProvider} from "../lib/aave-v3-core/contracts/interfaces/I import {IUniswapV3Pool} from "../lib/v3-core/contracts/interfaces/IUniswapV3Pool.sol"; import {IUniswapV3Factory} from "../lib/v3-core/contracts/interfaces/IUniswapV3Factory.sol"; import "./ImmutableOwnable.sol"; -import {console2} from "forge-std/console2.sol"; interface ISwapRouter { struct ExactInputSingleParams { @@ -307,9 +306,6 @@ contract AaveLooper is ImmutableOwnable { (, uint256 totalDebt,,, uint256 ltv,) = getPositionData(); // 4 decimals uint256 iterations = 0; - console2.log("Total debt:", totalDebt); - console2.log("LTV:", ltv); - while (totalDebt > 10000 && iterations < maxIterations) { _redeemSupply(supplyAsset, ((getLiquidity(supplyAsset) * 1e4) / ltv) - SAFE_BUFFER); swapUniswapV3(supplyAsset, borrowAsset, getAssetBalance(supplyAsset), feeTier);